Serhiy Storchaka added the comment:
Seems a CancelledError message can be lost also in Condition.wait().
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
What about `CancelledError(*msg_list)` or
`CancelledError(*reversed(msg_list))`? It is backward compatible and all
messages are uniformely represented.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Serhiy Storchaka added the comment:
No, I say that
with suppress():
...
is equivalent to
try:
...
except ():
pass
or
try:
...
except BaseException as err:
if not isinstance(err, ()):
raise
If you want to suppress all
Serhiy Storchaka added the comment:
The re module does not support features corresponding to
std::regex_constants::__polynomial in C++. Rewrite your regular expression or
try to use alternative regex implementations (for example wrappers around the
re2 library or C++ regex library
Serhiy Storchaka added the comment:
I concur with Zachary.
Note that suppress without arguments corresponds to "except" and isinstance()
with empty tuple.
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status
Serhiy Storchaka added the comment:
What exactly was happened? What rule was changed? Can it cause other changes
which allow ambiguous code or change semantic?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46
Serhiy Storchaka added the comment:
New changeset f20ac2ed076df63a77f65ff2660148af9f1a9b3c by Miss Islington (bot)
in branch '3.10':
bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in"
(GH-31479) (GH-31493)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
pull_requests: +29624
pull_request: https://github.com/python/cpython/pull/31494
___
Python tracker
<https://bugs.python.org/issue46
Serhiy Storchaka added the comment:
New changeset 090e5c4b946b28f50fce445916c5d3ec45c8f45f by Serhiy Storchaka in
branch 'main':
bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in"
(GH-31479)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +29608
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31479
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Good catch. Thank you for your report Patrick.
--
stage: patch review ->
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
> In the long run, it would be better to migrate the implementations in the
> other direction. Rewrite genericpath, ntpath, posixpath, and parts of shutil
> to use PurePath and Path objects.
pathlib does not allow to distinguish "pa
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset b77158b4da449ec5b8f682816a79d004fd65ed07 by Lital Natan in branch
'main':
bpo-39327: Close file descriptors as soon as possible in shutil.rmtree
(GH-31384)
https://github.com/python/cpython/commit/b77158b4da449ec5b8f682816a79d004fd65ed07
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Wrong type when missname dataclass attribute with existing
variable name
___
Python tracker
<https://bugs.python
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
Removed message: https://bugs.python.org/msg413575
___
Python tracker
<https://bugs.python.org/issue46804>
___
___
Python-bug
Change by Serhiy Storchaka :
--
Removed message: https://bugs.python.org/msg413574
___
Python tracker
<https://bugs.python.org/issue46804>
___
___
Python-bug
Serhiy Storchaka added the comment:
It is because we did not have a plan for removing deprecates features.
Deprecation in documentation only helps third-party code. Instead of adding a
complex code which switches between using old and new names depending on Python
version, the third-party
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +29567
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31432
___
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
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +29566
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31431
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
Before 3.10 many asyncio classes did have an optional parameter "loop". It was
deprecated in 3.8. To simplify the code, such classes inherited a constructor
from _LoopBoundMixin which set the _loop attribute and (since 3.8) emitted a
warning i
Serhiy Storchaka added the comment:
New changeset 2923d87ca258b9d421e8147b12f0d98295ee3f8e by Serhiy Storchaka in
branch 'main':
bpo-46777: Fix incorrect use of directives in asyncio documentation (GH-31388)
https://github.com/python/cpython/commit/2923d87ca258b9d421e8147b12f0d98295ee3f8e
Serhiy Storchaka added the comment:
It would return 1/7 for "0.1" and 1/4 for "0.2". Is it what you expected?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bug
Serhiy Storchaka added the comment:
6. The loop parameter of Task() was documented as both removed and required (if
there is no current event loop) in 3.10.
--
___
Python tracker
<https://bugs.python.org/issue46
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +29533
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31388
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
There are some issues with formatting added or removed parameters in the
asyncio module.
1. "deprecated-removed" directives were used for already removed directives. It
should be used for deprecated features with known term of removal. F
Serhiy Storchaka added the comment:
You can create a module on PyPI. If it becomes popular we could consider
including in the stdlib.
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Pytho
Serhiy Storchaka added the comment:
For now, there are three uses of commonprefix() in the stdlib:
1. In urllib.request it causes a security issue (see issue46756). commonpath()
or just str.startswith() should be used instead.
2. In lib2to3.main. The code contains a workaround around
Change by Serhiy Storchaka :
--
title: Incorrect -> Incorrect authorization check in urllib.request
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +29502
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31353
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
There is an error in determining a sub-URI in the urllib.request module. Due to
it, if the user is authorized for example.org/foo, it gets also access to
example.org/foobar.
--
components: Library (Lib)
messages: 413280
nosy: orsenthil
Serhiy Storchaka added the comment:
Note that there is a similar issue with cached generators.
>>> from functools import *
>>> @lru_cache()
... def g():
... yield 1
...
>>> list(g())
[1]
>>> list(g())
[]
I am not sure that it is safe to detect
Serhiy Storchaka added the comment:
Is it compatible with C++?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46748>
___
___
Pytho
Serhiy Storchaka added the comment:
It will be even more efficient after applying a set.intersection() optimization
in issue43464.
--
___
Python tracker
<https://bugs.python.org/issue46
Serhiy Storchaka added the comment:
See also issue46721. set.issuperset() can get similar optimization.
And set.issubset() will benefit from this optimization if use
set.intersection() in issue46705.
--
keywords: -patch
stage: patch review
Change by Serhiy Storchaka :
--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 2.0 -> 3.0
pull_requests: +29477
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31316
___
Python tracker
<https://bugs.p
Serhiy Storchaka added the comment:
It is by design. Functions and types are pickled by name. The copy module uses
the pickling protocol and only use different methods for performance or for
non-pickleable objects. Changing this will break existing code.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
Thanks Dennis for your report and PRs.
Do you mind to analyze also uses of _PySet_NextEntry(), PyDict_Next() and
_PyDict_Next()? Many of them look safe, but _pickle.c seems vulnerable.
--
___
Python tracker
Serhiy Storchaka added the comment:
New changeset c31b8a97a8a7e8255231c9e12ed581c6240c0d6c by Dennis Sweeney in
branch '3.9':
bpo-46615: Don't crash when set operations mutate the sets (GH-31120) (GH-31312)
https://github.com/python/cpython/commit/c31b8a97a8a7e8255231c9e12ed581c6240c0d6c
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 cc6d8f88289917d67237a10f7a0e2439fde7a573 by Jacob Walls in branch
'3.9':
[3.9] bpo-45948: Remove constructor discrepancy in C version of
ElementTree.XMLParser (GH-31152) (GH-31299)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
New changeset 168fd6453b5de15236116f9261d64601d92571ac by Jacob Walls in branch
'main':
bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser
(GH-31152)
https://github.com/python/cpython/commit
Change by Serhiy Storchaka :
--
nosy: +pitrou
___
Python tracker
<https://bugs.python.org/issue46726>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
New changeset e0bc8ee945af96f9395659bbe3cc30b082e7a361 by Alex Waygood in
branch 'main':
bpo-46483: [doc] pathlib classes no longer support parameterized generics
(GH-31281)
https://github.com/python/cpython/commit/e0bc8ee945af96f9395659bbe3cc30b082e7a361
Change by Serhiy Storchaka :
--
dependencies: +Use-after-free by mutating set during set operations
___
Python tracker
<https://bugs.python.org/issue46
Serhiy Storchaka added the comment:
The new code is similar to the code of set.isdisjoint(), so we can share the
code if generalize it.
--
___
Python tracker
<https://bugs.python.org/issue46
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +29440
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31280
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
If the argument of set.issuperset() is not a set, it is first converted to a
set. It is equivalent to the following code:
if not isinstance(other, (set, frozenset)):
other = set(other)
# The following is equivalent to:
# return
Serhiy Storchaka added the comment:
See also issue18032.
--
___
Python tracker
<https://bugs.python.org/issue46705>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
Did you try to print a traceback of the exception?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46
Serhiy Storchaka added the comment:
Something like:
_unset = ['unset']
class CachedAwaitable:
def __init__(self, awaitable):
self.awaitable = awaitable
self.result = _unset
def __await__(self):
if self.result is _unset:
self.result = yield from
Serhiy Storchaka added the comment:
Would not testing len(self.difference(other)) == 0 be more efficient? Making a
copy of a set and removing elements one by one may be faster than add elements
one by one, because we only need to allocate a single chunk of memory for a set.
It depends
Serhiy Storchaka added the comment:
I do not think it is a backwards incompatible change, but concur with the rest
said by Stefan.
--
___
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:
New changeset cbdcae5ab90710e8d82c213f3798af1154670ff9 by Gregory Beauregard in
branch '3.10':
[3.10] bpo-46676: Make ParamSpec args and kwargs equal to themselves (GH-31203)
(GH-31210)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
getdefaultlocale() falls back to LANG and LANGUAGE. It allows also to specify a
list of looked up environment variables. How could this use case be covered
with getlocale()?
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
Should it? Annotated wraps types, and P.args/P.kwargs are not types.
If make Annotated accepting P.args/P.kwargs (and possible other non-types, e.g.
P), it is a new feature which should be publicly discussed first and
documented. I do not thing
Serhiy Storchaka added the comment:
New changeset c8b62bbe46e20d4b6dd556f2fa85960d1269aa45 by Gregory Beauregard in
branch 'main':
bpo-46676: Make ParamSpec args and kwargs equal to themselves (GH-31203)
https://github.com/python/cpython/commit/c8b62bbe46e20d4b6dd556f2fa85960d1269aa45
Change by Serhiy Storchaka :
--
components: +Extension Modules
nosy: +serhiy.storchaka
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
Round division would be useful not less than ceil division, if not more. In the
stdlib it would be used in:
1. The datetime module.
2. Fraction.__round__.
--
___
Python tracker
<https://bugs.python.
Serhiy Storchaka added the comment:
It is valid syntax.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46674>
___
___
Python-bug
Serhiy Storchaka added the comment:
Thanks Nikita.
--
components: +Tests -Library (Lib)
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset c1ff4cb98b11c00aee765019364544c71e7dd2df by Nikita Sobolev in
branch '3.10':
[3.10] bpo-46611: add coverage to instance and class checks in `typing.py`
(GH-31078) (GH-31182)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
The test is good. If we accidentally make a TypeVar instance subclassable, it
will catch such error.
--
___
Python tracker
<https://bugs.python.org/issue46
Serhiy Storchaka added the comment:
But it gives the same result.
What version of Python do you test with?
--
___
Python tracker
<https://bugs.python.org/issue46
Serhiy Storchaka added the comment:
No, List[42] is not currently accepted.
>>> List[42]
Traceback (most recent call last):
File "", line 1, in
File "/home/serhiy/py/cpython/Lib/typing.py", line 318, in inner
return func(*args, **kwds)
Serhiy Storchaka added the comment:
Note that instances of most other types are non-subclassable "by accident".
>>> class A(42): pass
...
Traceback (most recent call last):
File "", line 1, in
TypeError: int() takes at most 2 arguments (3 given)
>>&
Change by Serhiy Storchaka :
--
pull_requests: +29332
pull_request: https://github.com/python/cpython/pull/31159
___
Python tracker
<https://bugs.python.org/issue46
Serhiy Storchaka added the comment:
There were two reasons of accepting arbitrary callables in _type_check():
1. NewType() returned a function.
2. xml.etree.cElementTree.Element was a function in Python 2.
Now NewType is a class, and Python 2 no longer supported. I agree that we
should get
Serhiy Storchaka added the comment:
I have created an alternative PR 31143 which adds special method
__typing_subst__ in TypeVar and ParamSpec instead of __parameters__ and
__getitem__. It has almost the same effect except making TypeVar and ParamSpec
and subscriptable. The Python code
Change by Serhiy Storchaka :
--
pull_requests: +29321
pull_request: https://github.com/python/cpython/pull/31143
___
Python tracker
<https://bugs.python.org/issue44
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 am not convinced. What are examples of using re.match() instead of
re.search()? How common is this type of errors?
There are perhaps many millions of scripts which use re.match(), deprecating
re.match() at any time in future would be very destructive
Serhiy Storchaka added the comment:
See also issue31978.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46639>
___
___
Python-bug
Serhiy Storchaka added the comment:
It does not have a use case of T[int] in mind. It is an implementation detail
which simplifies the code, makes runtime checks more strict and makes
types.GenericAlias more similar to typing._GenericAlias.
For example, currently:
>>> A = List
Serhiy Storchaka added the comment:
Thanks Zackery.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset b4bd1e1422997de61faf506b4916e83013bc7d21 by Zackery Spytz in
branch 'main':
bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)
https://github.com/python/cpython/commit/b4bd1e1422997de61faf506b4916e83013bc7d21
Serhiy Storchaka added the comment:
New changeset 7ffe7ba30fc051014977c6f393c51e57e71a6648 by Nikita Sobolev in
branch 'main':
bpo-46483: Remove `__class_getitem__` from `pathlib.PurePath` (GH-30848)
https://github.com/python/cpython/commit/7ffe7ba30fc051014977c6f393c51e57e71a6648
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 0cbdd2131195b0d313762968f604e80a3e65ca9f by Nikita Sobolev in
branch 'main':
bpo-46565: `del` loop vars that are leaking into module namespaces (GH-30993)
https://github.com/python/cpython/commit/0cbdd2131195b0d313762968f604e80a3e65ca9f
Serhiy Storchaka added the comment:
Concur with Eric and Raymond.
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46615>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
There is nothing wrong with writing two lines of code. And two lines of code
may be more readable than one line of code. New method or parameter has a cost
-- core developers need to maintain it, update documentation and tests if they
conflict with new
Serhiy Storchaka added the comment:
https://docs.python.org/3/library/constants.html#built-in-constants
--
___
Python tracker
<https://bugs.python.org/issue46
Change by Serhiy Storchaka :
--
pull_requests: +29195
pull_request: https://github.com/python/cpython/pull/21628
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
True is a keyword which is compiled to expression whose value is True, 핋핣핦핖 is
an identifier which refers to the builtin variable "True" which has a value
True by default. You can change the value of a builtin variable, but the value
of expre
Serhiy Storchaka added the comment:
Usually, when you benchmark a non-trivial piece of code, you need also to
specify a setup code. If the benchmarked code is large enough to be read from a
file, the setup code should be read from a file too.
The common practice is to write the benchmarked
Serhiy Storchaka added the comment:
I think it should be closed for the same reasons as #35095. It is not common
enough case to complicate Path.write_text(), and you always can use
open()+write().
--
nosy: +serhiy.storchaka
___
Python tracker
Serhiy Storchaka added the comment:
PR 27518 fixes a substitution of a ParamSpec variable with a Concatenate nad a
list of types. It is not specified explicitly in PEP 612, but it does not
contradict it.
PR 30969 makes an ellipsis be valid as the last argument of Concatenate to fix
Change by Serhiy Storchaka :
--
pull_requests: +29147
pull_request: https://github.com/python/cpython/pull/30969
___
Python tracker
<https://bugs.python.org/issue44
Serhiy Storchaka added the comment:
New changeset ecfacc362dd7fef7715dcd94f2e2ca6c622ef115 by Serhiy Storchaka in
branch 'main':
bpo-44791: Fix substitution of ParamSpec in Concatenate with different
parameter expressions (GH-27518)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
New changeset 82bce54614f8116a40454fbbbf96a3fd460ca7df by Nikita Sobolev in
branch 'main':
bpo-46544: Do not leak `x` and `uspace` in textwrap.TextWrapper (GH-30955)
https://github.com/python/cpython/commit/82bce54614f8116a40454fbbbf96a3fd460ca7df
Serhiy Storchaka added the comment:
It is not related to email and asyncio either.
--
components: -asyncio, email
___
Python tracker
<https://bugs.python.org/issue46
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 3f1ea163ea54513e00e0e9d5442fee1b639825cc by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30757)
https://github.com/python/cpython/commit/3f1ea163ea54513e00e0e9d5442fee1b639825cc
Serhiy Storchaka added the comment:
This module provides a simple way to time small bits of Python code.
What problem are you trying to solve.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5
___
Python tracker
<https://bugs.python.or
201 - 300 of 25750 matches
Mail list logo