[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-23 Thread Serhiy Storchaka
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

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-22 Thread Serhiy Storchaka
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

[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Serhiy Storchaka
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

[issue46825] slow matching on regular expression

2022-02-22 Thread Serhiy Storchaka
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

[issue46819] Add an Error / Exception / Warning when contextlib.suppress() is entered with no specified exception(s) to suppress

2022-02-22 Thread Serhiy Storchaka
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

[issue46725] Unpacking without parentheses is allowed since 3.9

2022-02-22 Thread Serhiy Storchaka
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

[issue46820] SyntaxError on `1not in...`

2022-02-22 Thread Serhiy Storchaka
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

[issue46820] SyntaxError on `1not in...`

2022-02-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29624 pull_request: https://github.com/python/cpython/pull/31494 ___ Python tracker <https://bugs.python.org/issue46

[issue46820] SyntaxError on `1not in...`

2022-02-21 Thread Serhiy Storchaka
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

[issue46820] SyntaxError on `1not in...`

2022-02-21 Thread Serhiy Storchaka
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

[issue46820] SyntaxError on `1not in...`

2022-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch. Thank you for your report Patrick. -- stage: patch review -> ___ Python tracker <https://bugs.python.org/issu

[issue46733] pathlib.Path methods can raise NotImplementedError

2022-02-21 Thread Serhiy Storchaka
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

[issue39327] shutil.rmtree using vagrant synched folder fails

2022-02-21 Thread Serhiy Storchaka
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

[issue39327] shutil.rmtree using vagrant synched folder fails

2022-02-20 Thread Serhiy Storchaka
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

[issue46807] Wrong class __annotations__ when field name and type are equal

2022-02-20 Thread Serhiy Storchaka
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

[issue46804] Yaytext.net - Tạo văn bản chữ kiểu, kí tự đặc biệt độc đáo

2022-02-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46804] Yaytext.net - Tạo văn bản chữ kiểu, kí tự đặc biệt độc đáo

2022-02-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- Removed message: https://bugs.python.org/msg413575 ___ Python tracker <https://bugs.python.org/issue46804> ___ ___ Python-bug

[issue46804] Yaytext.net - Tạo văn bản chữ kiểu, kí tự đặc biệt độc đáo

2022-02-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- Removed message: https://bugs.python.org/msg413574 ___ Python tracker <https://bugs.python.org/issue46804> ___ ___ Python-bug

[issue46797] ast.Constant.n deprecated without warning

2022-02-19 Thread Serhiy Storchaka
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

[issue46797] ast.Constant.n deprecated without warning

2022-02-19 Thread Serhiy Storchaka
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

[issue46777] Fix incorrect use of directives in asyncio documentation

2022-02-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46796] Simplify handling of removed parameter "loop" in asyncio

2022-02-18 Thread Serhiy Storchaka
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

[issue46796] Simplify handling of removed parameter "loop" in asyncio

2022-02-18 Thread Serhiy Storchaka
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

[issue46777] Fix incorrect use of directives in asyncio documentation

2022-02-18 Thread Serhiy Storchaka
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

[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

2022-02-17 Thread Serhiy Storchaka
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

[issue46777] Fix incorrect use of directives in asyncio documentation

2022-02-17 Thread Serhiy Storchaka
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

[issue46777] Fix incorrect use of directives in asyncio documentation

2022-02-17 Thread Serhiy Storchaka
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

[issue46777] Fix incorrect use of directives in asyncio documentation

2022-02-17 Thread Serhiy Storchaka
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

[issue46766] Add a class for file operations so a syntax such as open("file.img", File.Write | File.Binary | File.Disk) is possible.

2022-02-16 Thread Serhiy Storchaka
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

[issue30267] Deprecate os.path.commonprefix

2022-02-15 Thread Serhiy Storchaka
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

[issue46756] Incorrect authorization check in urllib.request

2022-02-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Incorrect -> Incorrect authorization check in urllib.request ___ Python tracker <https://bugs.python.org/issu

[issue46756] Incorrect

2022-02-15 Thread Serhiy Storchaka
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

[issue46756] Incorrect

2022-02-15 Thread Serhiy Storchaka
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

[issue46622] Support decorating a coroutine with functools.cached_property

2022-02-14 Thread Serhiy Storchaka
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

[issue46748] Python.h includes stdbool.h

2022-02-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it compatible with C++? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46748> ___ ___ Pytho

[issue46705] Memory optimization for set.issubset

2022-02-13 Thread Serhiy Storchaka
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

[issue43464] set intersections should short-circuit

2022-02-13 Thread Serhiy Storchaka
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

[issue43464] set intersections should short-circuit

2022-02-13 Thread Serhiy Storchaka
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

[issue39805] Copying functions doesn't actually copy them

2022-02-13 Thread Serhiy Storchaka
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

[issue46615] Use-after-free by mutating set during set operations

2022-02-13 Thread 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

[issue46615] Use-after-free by mutating set during set operations

2022-02-13 Thread Serhiy Storchaka
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

[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2022-02-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2022-02-12 Thread Serhiy Storchaka
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

[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2022-02-12 Thread Serhiy Storchaka
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

[issue46726] Thread spuriously marked dead after interrupting a join call

2022-02-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +pitrou ___ Python tracker <https://bugs.python.org/issue46726> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-11 Thread Serhiy Storchaka
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

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Use-after-free by mutating set during set operations ___ Python tracker <https://bugs.python.org/issue46

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka
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

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka
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

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka
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

[issue46705] Memory optimization for set.issubset

2022-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue18032. -- ___ Python tracker <https://bugs.python.org/issue46705> ___ ___ Python-bugs-list mailing list Unsub

[issue46717] Raising exception multiple times leaks memory

2022-02-10 Thread Serhiy Storchaka
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

[issue46622] Support decorating a coroutine with functools.cached_property

2022-02-10 Thread Serhiy Storchaka
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

[issue46705] Memory optimization for set.issubset

2022-02-10 Thread Serhiy Storchaka
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

[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2022-02-08 Thread Serhiy Storchaka
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

[issue46676] ParamSpec args and kwargs are not equal to themselves.

2022-02-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46676] ParamSpec args and kwargs are not equal to themselves.

2022-02-08 Thread Serhiy Storchaka
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

[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-08 Thread Serhiy Storchaka
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

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-07 Thread 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

[issue46676] ParamSpec args and kwargs are not equal to themselves.

2022-02-07 Thread Serhiy Storchaka
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

[issue45948] Unexpected instantiation behavior for xml.etree.ElementTree.XMLParser(target=None)

2022-02-07 Thread Serhiy Storchaka
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

[issue46639] Ceil division with math.ceildiv

2022-02-07 Thread Serhiy Storchaka
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.

[issue46674] Two if in a row in generators

2022-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is valid syntax. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46674> ___ ___ Python-bug

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-07 Thread Serhiy Storchaka
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

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-07 Thread Serhiy Storchaka
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

[issue46642] typing: tested TypeVar instance subclass TypeError is incidental

2022-02-06 Thread Serhiy Storchaka
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

[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Serhiy Storchaka
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

[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Serhiy Storchaka
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)

[issue46642] typing: tested TypeVar instance subclass TypeError is incidental

2022-02-06 Thread Serhiy Storchaka
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) >>&

[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29332 pull_request: https://github.com/python/cpython/pull/31159 ___ Python tracker <https://bugs.python.org/issue46

[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Serhiy Storchaka
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

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-02-05 Thread Serhiy Storchaka
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

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-02-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29321 pull_request: https://github.com/python/cpython/pull/31143 ___ Python tracker <https://bugs.python.org/issue44

[issue41259] Find adverbs is not correct on the documentation

2022-02-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42353] Proposal: re.prefixmatch method (alias for re.match)

2022-02-05 Thread Serhiy Storchaka
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

[issue46639] Ceil division with math.ceildiv

2022-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue31978. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46639> ___ ___ Python-bug

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-02-03 Thread Serhiy Storchaka
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

[issue44977] Deprecate delegation of int to __trunc__

2022-02-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Zackery. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44977] Deprecate delegation of int to __trunc__

2022-02-03 Thread Serhiy Storchaka
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

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-03 Thread Serhiy Storchaka
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

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-02-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46565] Delete module-level loop variables when no longer needed

2022-02-03 Thread Serhiy Storchaka
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

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-03 Thread Serhiy Storchaka
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

[issue46615] Use-after-free by mutating set during set operations

2022-02-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46615> ___ ___ Python-bugs-list mailing list Unsub

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-30 Thread Serhiy Storchaka
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

[issue46555] Unicode-mangled names refer inconsistently to constants

2022-01-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: https://docs.python.org/3/library/constants.html#built-in-constants -- ___ Python tracker <https://bugs.python.org/issue46

[issue41416] Restore default implementation of __ne__ in mixins Set and Mapping

2022-01-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29195 pull_request: https://github.com/python/cpython/pull/21628 ___ Python tracker <https://bugs.python.org/issue41

[issue46555] Unicode-mangled names refer inconsistently to constants

2022-01-29 Thread Serhiy Storchaka
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

[issue46500] make timeit module accept files

2022-01-28 Thread Serhiy Storchaka
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

[issue46554] Add append keyword argument to Path.write_text() and Path.write_bytes()

2022-01-28 Thread Serhiy Storchaka
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

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Serhiy Storchaka
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

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +29147 pull_request: https://github.com/python/cpython/pull/30969 ___ Python tracker <https://bugs.python.org/issue44

[issue44791] Substitution of ParamSpec in Concatenate

2022-01-27 Thread Serhiy Storchaka
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

[issue46544] `textwrap.TextWrapper` leaks two intermediate vars into class namespace

2022-01-27 Thread Serhiy Storchaka
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

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not related to email and asyncio either. -- components: -asyncio, email ___ Python tracker <https://bugs.python.org/issue46

[issue46426] Improve tests for the dir_fd argument

2022-01-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46426] Improve tests for the dir_fd argument

2022-01-24 Thread Serhiy Storchaka
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

[issue46500] make timeit module accept files

2022-01-24 Thread Serhiy Storchaka
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

[issue46157] Typo in JSON documentation

2022-01-24 Thread Serhiy Storchaka
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

[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2022-01-23 Thread Serhiy Storchaka
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

<    1   2   3   4   5   6   7   8   9   10   >