Serhiy Storchaka added the comment:
I agree with Andrei. I'll test this approach on Windows.
--
___
Python tracker
<https://bugs.python.org/issue43153>
___
___
Change by Serhiy Storchaka :
--
nosy: +benjamin.peterson, pitrou, stutzbach
versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
What if change FileIO.isatty() instead? If make it returning False without
invoking a system call if the file size is non-zero it will eliminate the need
to expose _size.
--
nosy: +serhiy.storchaka
___
Python
Serhiy Storchaka added the comment:
Biopython uses next() without iter(), and there is no guarantee that it should
work.
--
nosy: +brett.cannon, pitrou, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Change by Serhiy Storchaka :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue44884>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
I do not remember details, but I encountered this issue (maybe when run tests
in subprocesses?).
--
___
Python tracker
<https://bugs.python.org/issue13
Change by Serhiy Storchaka :
--
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue13236>
___
___
Python-bugs-list mailin
Change by Serhiy Storchaka :
--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 7.0 -> 8.0
pull_requests: +28091
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29864
___
Python tracker
Serhiy Storchaka added the comment:
You are right about an uppercase converter. I forget this. I withdraw this
proposition.
It seems that even if we add support of "N" to all numeric formatting it will
not cover all use cases. "n" is a locale specific variant of &qu
Serhiy Storchaka added the comment:
It is a good idea in general. Please go ahead, I am sure that the PR will be
accepted.
But keep in mind that not always additional links make the documentation
better. The rule of tumb is to not add multiple links to the same entity in one
paragraph. In
Serhiy Storchaka added the comment:
I have no strong opinion. I found the discrepancy when reviewed one of Mark's
PRs. I was surprised because I did not know that "N" is supported.
On other hand, there are reasons for supporting upper-case variant of "n" if we
suppo
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
The patch LGTM, and I have nothing to add. Ronald, do you mind to create a PR.
--
assignee: -> ronaldoussoren
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
I concur with Raymond. It is difficult to find any use case for sorting bytes
objects (I cannot find any).
As for using radix sort in list.sort() in special case of small integer keys,
it is difficult to implement, because we should preserve the initial
Serhiy Storchaka added the comment:
What else can it be? dict.fromkeys() adds keys in the order of obtaining them,
and it obtains them by iterating its argument. If we need a special note here,
we need a special note for list(), tuple(), filter(), enumerate() and all other
functions which
Serhiy Storchaka added the comment:
> It doesn't seem to make sense why other operations on literals are optimized
> but these particular ones aren't optimized (much).
The existing optimizer optimizes the following cases (note that the parser does
not produce negative or
Serhiy Storchaka added the comment:
It is not related to loop.stop() and asyncio in general. It is the return
statement which eats the exception. Simpler example:
>>> def f():
... try:
... 1/0
... finally:
... return 42
...
>>> f()
42
Return (
Serhiy Storchaka added the comment:
New changeset b48ac6fe38b2fca9963b097c04cdecfc6083104e by Nikita Sobolev in
branch 'main':
bpo-45878: convert `try/except` to `self.assertRaises` in
`Lib/ctypes/test/test_functions.py` (GH-29721)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
Yes, it was 2.7-only issue.
Thank you Irit for checking and closing outdated issues.
--
resolution: works for me -> out of date
stage: -> resolved
status: pending -> closed
___
Python tracke
Change by Serhiy Storchaka :
--
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Concur with Eric.
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
I think it is good idea, although we may get reports about regressions in 3.11
when Python will start to reject GZIP files which was successfully read before.
But before merging this I want to know:
1. How much overhead does it add for reading files with
Serhiy Storchaka added the comment:
BTW, is not the correct name _IGNORED_ERRNOS?
--
___
Python tracker
<https://bugs.python.org/issue45853>
___
___
Python-bug
Serhiy Storchaka added the comment:
If it is only used in a single place in the module would not be better to
inline it?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
Thank you for your report and PR JMcB.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Why anybody needs to write 255581293 > 12938373?
We try to keep the compiler code maintenable and only implement optimizations
which have the largest effect. PR 29639 adds around 200 lines of complex code
and I do not see the bene
Serhiy Storchaka added the comment:
I think there is a bug in either numpy.timedelta64.__hash__ or
panda.Timedelta.__hash__. Please report it to corresponding libraries.
It is not related to the documentation of membership test. If you have
different hashes for equal objects most dict and
Serhiy Storchaka added the comment:
New changeset bc2bc0dbdb52498d009f9f9771452e6aa4faff2b by JMcB in branch 'main':
bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641)
https://github.com/python/cpython/commit/bc2bc0dbdb52498d009f9f9771452e
Serhiy Storchaka added the comment:
But in this case it starts a sentence.
--
nosy: +gvanrossum, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
All typing related tests are fixed by updating
types.GenericAlias.__getattribute__. So the only thing is left to make all
tests passed is removing some special methods tests.
The lookup of __instancecheck__ and __subclasscheck__ was changed by Benjamin
Serhiy Storchaka added the comment:
Most of failed tests are related to typing, but there is a purposed test for
__instancecheck__ and __subclasscheck__ bypassing __getattr__ and
__getattribute__
(test.test_descr.ClassPropertiesAndMethods.test_special_method_lookup
Serhiy Storchaka added the comment:
Failed tests:
==
FAIL: test_isinstance_with_or_union
(test.test_isinstance.TestIsInstanceIsSubclass)
--
Traceback (most
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27789
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29540
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
versions: +Python 3.11 -Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue37295>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
I think that the code is correct, and the documentation is not complete. As in
most (but not all) cases of dunder methods it is looked up in a class, ignoring
instance attributes.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
The quoting style affects not only the CSV formatting, but also the CSV
parsing. How QUOTE_NOTNULL and QUOTE_STRINGS will affect parsing?
--
___
Python tracker
<https://bugs.python.org/issue23
Serhiy Storchaka added the comment:
In alternative 1 we control the type and the message of exception. In
alternative 3 we left this to the SQLite3 engine. It is difficult to keep
consistency in alternative 2, errors raised for sizes less and larger than
INT_MAX can be different. I think
New submission from Serhiy Storchaka :
The C implementation supports both formats "n" and "N". The Python
implementation only supports format "n".
>>> from decimal import Decimal
>>> format(Decimal('1e100'), 'n')
'1e+1
Change by Serhiy Storchaka :
--
resolution: duplicate ->
stage: resolved ->
status: closed -> open
superseder: Add underscore as a decimal separator for string formatting ->
___
Python tracker
<https://bugs.python
Serhiy Storchaka added the comment:
There is a difference if you modify the arguments list after creating a thread.
args = [1]
t = threading.Thread(target=access, args=args)
args[0] = 2
t.start()
Would it call access(1) or access(2)?
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
New changeset 3d42cd9461e60c7427f3793f640cd975fbd99289 by Erlend Egeberg
Aasland in branch 'main':
bpo-45243: Use connection limits to simplify `sqlite3` tests (GH-29356)
https://github.com/python/cpython/commit/3d42cd9461e60c7427f3793f640cd9
Change by Serhiy Storchaka :
--
pull_requests: +27682
pull_request: https://github.com/python/cpython/pull/29425
___
Python tracker
<https://bugs.python.org/issue27
Change by Serhiy Storchaka :
--
pull_requests: +27681
pull_request: https://github.com/python/cpython/pull/29425
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
pull_requests: -27678
___
Python tracker
<https://bugs.python.org/issue27313>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
This is a duplicate of issue43624. It was also discussed in Discuss.
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Add underscore as a decimal separator for strin
Change by Serhiy Storchaka :
--
pull_requests: +27678
pull_request: https://github.com/python/cpython/pull/29425
___
Python tracker
<https://bugs.python.org/issue27
Serhiy Storchaka added the comment:
The tests are passed because this modification does not affect behavior, it
just makes the code slightly less efficient. Replacing i+1 with i just adds one
iteration:
b = bases[i] # == self
if isinstance(b, _BaseGenericAlias) and b is not self
Serhiy Storchaka added the comment:
Thank you for your contribution Itamar.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset 2c045bd5673d56c3fdde7536da9df1c7d6f270f0 by Itamar Ostricher in
branch 'main':
bpo-45697: Use PyObject_TypeCheck in type_call (GH-29392)
https://github.com/python/cpython/commit/2c045bd5673d56c3fdde7536da9df1
Serhiy Storchaka added the comment:
Creating a new type takes microseconds, and using PyObject_TypeCheck() instead
of PyType_IsSubtype() can save nanoseconds. So, while this replacement looks
harmless, its effect can hardly be measured even in microbenchmarks
Serhiy Storchaka added the comment:
Rather of using AC_COMPILE_IFELSE() in configure.ac, would not be easier to use
#ifdef in the C file?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
What is the problem actually?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45672>
___
___
Serhiy Storchaka added the comment:
It looks strange. The line containing "function (including the special meanings
of arguments of the form `-'" is a part of a multiline string literal, so there
should not be such error. And it is line 4, not line 3 as in
Serhiy Storchaka added the comment:
Could you please provide an output as a text?
--
___
Python tracker
<https://bugs.python.org/issue45698>
___
___
Python-bug
Serhiy Storchaka added the comment:
What error?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45698>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
The PyObject_TypeCheck() macro is used in performance critical cases. If it is
not the case the PyType_IsSubtype() function can be used. Adding yet check in
PyType_IsSubtype() will slow down more performance sensitive cases in which
PyObject_TypeCheck
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27639
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29381
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
This in an interesting problem. I am going to work on it at the next weekends.
--
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
Complete sets of characters which can be used in identifiers are too large:
>>> allchars = ''.join(map(chr, range(0x11)))
>>> identstartchars = ''.join(c for c in allchars if c.isidentifier())
>>> identcont
Serhiy Storchaka added the comment:
This set is mostly outdated. In Python 2 it was a set of characters composing
identifiers, but in Python 3 identifiers can contain non-ASCII characters.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Change by Serhiy Storchaka :
--
components: +Interpreter Core
nosy: +serhiy.storchaka
versions: +Python 3.11 -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
Do we need Lib/test/test_sqlite3/__init__.py? Would not tests in package be
loaded automatically?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue10
Change by Serhiy Storchaka :
--
pull_requests: +27607
pull_request: https://github.com/python/cpython/pull/29342
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset 634984d7dbdd91e0a51a793eed4d870e139ae1e0 by Serhiy Storchaka in
branch 'main':
bpo-45679: Fix caching of multi-value typing.Literal (GH-29334)
https://github.com/python/cpython/commit/634984d7dbdd91e0a51a793eed4d87
Serhiy Storchaka added the comment:
>From the man page:
S (Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for
ls. Don't use.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org
Change by Serhiy Storchaka :
--
pull_requests: +27602
pull_request: https://github.com/python/cpython/pull/29334
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
I agree. lru_cache(typed=True) itself should not look into iterable internals.
It would be not only slow, but a change of semantic.
The simplest way to solve this issue is to remove caching of __getitem__(). The
more sophisticated way is to move caching
Serhiy Storchaka added the comment:
I was also against this feature. My reasons:
1. There will be not much benefit. ascii_alphanumerics is too long, so there is
no much saving of typing. There is larger chance of typo. You will be not able
to use it for several years, until support of
Serhiy Storchaka added the comment:
Then you would get
>>> raise asyncio.CancelledError
Traceback (most recent call last):
File "", line 1, in
asyncio.exceptions.CancelledError: CancelledError
instead of
>>> raise asyncio.CancelledError
Traceback (most recent
Serhiy Storchaka added the comment:
sre_parse.parse() is an internal function and this behaviour is an
implementation detail.
This change enabled some optimizations which did not work with non-capturing
groups before. It did not affect the matching itself.
--
nosy
Serhiy Storchaka added the comment:
Concur with Andrew.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45671>
___
___
Python-bug
Serhiy Storchaka added the comment:
PR 29316 looks complicated.
First of all, why do Enum needs a custom __dir__? What is wrong with the
default implementation?
--
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
title: Problems caused by isinstance(list[int]) returning True -> Problems
caused by isinstance(list[int], type) returning True
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset a043706f907e82ee6a562005991ff0b896a4e64d by Serhiy Storchaka in
branch '3.9':
[3.9] [3.10] bpo-45502: Fix test_shelve (GH-29003) (GH-29305) (GH-29306)
https://github.com/python/cpython/commit/a043706f907e82ee6a562005991ff0
Change by Serhiy Storchaka :
--
pull_requests: +27575
pull_request: https://github.com/python/cpython/pull/29306
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset 6b867022d926be9fcc6f8038fb1093ba8c348ca5 by Serhiy Storchaka in
branch '3.10':
[3.10] bpo-45502: Fix test_shelve (GH-29003) (GH-29305)
https://github.com/python/cpython/commit/6b867022d926be9fcc6f8038fb1093
Change by Serhiy Storchaka :
--
pull_requests: +27574
pull_request: https://github.com/python/cpython/pull/29305
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
I have opened separate issues for different cases and a meta-issue45665 for
general discussion.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> behavior
versions: +Python 3.11
Serhiy Storchaka added the comment:
isinstance(x, type) returns True for instances of types.GenericAlias (like
list[int]). While it may help in some cases related to typing, in many
unrelated cases it causes problems if the value which is not a type passes
checks for types.
Also
New submission from Serhiy Storchaka :
This is a meta-issue for problems caused by isinstance(list[int]) returning
True.
See also discussion in issue45438.
--
components: Library (Lib)
messages: 405290
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title
Change by Serhiy Storchaka :
--
pull_requests: -27570
___
Python tracker
<https://bugs.python.org/issue45664>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Serhiy Storchaka :
--
pull_requests: -27569
___
Python tracker
<https://bugs.python.org/issue45664>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27562
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29298
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
resolve_bases() returns incorrect result:
>>> import types
>>> types.resolve_bases((list[int],))
(list[int],)
Expected (list,).
new_class() fails:
>>> types.new_class('L', (list[int],), {})
Traceback (most rec
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27557
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29294
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
>>> import dataclasses, types
>>> @dataclasses.dataclass
... class A(types.GenericAlias):
... origin: type
... args: type
...
>>> dataclasses.is_dataclass(A)
True
>>> a = A(list, int)
>&g
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27554
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29291
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
The repr of InitVar preserves type aliases from the typing module, but not
builtin.
>>> import typing, dataclasses
>>> dataclasses.InitVar[typing.List[int]]
dataclasses.InitVar[typing.List[int]]
>>> dataclasses.InitVar[list[int
Serhiy Storchaka added the comment:
See also issue40296.
--
___
Python tracker
<https://bugs.python.org/issue45438>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
> issubclass(x, list[int]) rejects the second argument for reasons explained in
> the PEP.
1. One problem is that isinstance(x, type) != issubclass(type(x), type)
if x is list[int]. It is unprecedented, I cannot recall any other case
in which isin
Serhiy Storchaka added the comment:
New changeset b1302abcc8a4be5f39b4d60a1ce28032b77655b3 by Alex Waygood in
branch 'main':
bpo-44904: Fix classmethod property bug in doctest module (GH-28838)
https://github.com/python/cpython/commit/b1302abcc8a4be5f39b4d60a1ce280
Serhiy Storchaka added the comment:
This is a duplicate of issue18510. It was also discussed on the Python-Dev
mailing list (maybe more than once). If you have some new arguments or
something in past 8 years made the old arguments no longer valid please open a
new discussion on the mailing
Serhiy Storchaka added the comment:
Two years is not so long for a bug. We fixed 8-year and 12-year bugs.
The issue is that this feature is internally inconsistent (isinstance() is not
consistent with issubclass()), the C implementation of list[int] is not
consistent with the Python
Serhiy Storchaka added the comment:
Are there changes in handling empty values for other options? If yes, we
perhaps need to add version-dependent tests for empty values instead of just
skipping this case.
--
___
Python tracker
<ht
Serhiy Storchaka added the comment:
There are two ways to fix the larger issue.
1. Make issubclass(types.GenericAlias, type) returning True, and also make
isinstance(typing.List[int], type) returning True and
issubclass(typing._GenericAlias, type) returning True, and analyze every place
in
Serhiy Storchaka added the comment:
The simple implementation is:
def cached_method(func):
return cached_property(lambda self: lru_cache()(partial(func, self)))
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
It is expected behavior. Your code is equivalent to:
_result = []
for i in your_list:
_result.append(your_list.append(i))
which is equivalent to:
_result = []
_j = 0
while _j < len(your_list):
i = your_list[_j]
_result.append(your_list.app
Serhiy Storchaka added the comment:
Would not be more correct to look at cls.__dict__[fieldname]?
BTW, mro() cannot be builtin, because you should be able to override it in some
classes.
--
___
Python tracker
<https://bugs.python.org/issue45
501 - 600 of 25874 matches
Mail list logo