[issue44571] itertools: takedowhile()

2021-07-10 Thread Tim Peters
Tim Peters added the comment: I agree Raymond's `before_and_after()` looks like an elegant, efficient, and usable approach to this. One minor nit: there's no need for the `iter()` call in: yield from iter(transition) Indeed, it confused me at first, because `yield from x` does its o

[issue42799] Please document fnmatch LRU cache size (256) and suggest alternatives

2021-07-10 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've put up the PR here: https://github.com/python/cpython/pull/27084/files -- ___ Python tracker ___ ___

[issue42799] Please document fnmatch LRU cache size (256) and suggest alternatives

2021-07-10 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch nosy: +andrei.avk nosy_count: 2.0 -> 3.0 pull_requests: +25632 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27084 ___ Python tracker

[issue44517] test__xxsubinterpreters: AMD64 Fedora Stable 3.x buildbot aborts at test_still_running

2021-07-10 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue44517] test__xxsubinterpreters: AMD64 Fedora Stable 3.x buildbot aborts at test_still_running

2021-07-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI, this buildbot has been green after Victor's git clean adjustment in the buildbot repo. I've been trying to reproduce the test_still_running failure on the buildbot, but have not been able to do so deterministically. -- __

[issue44594] AsyncExitStack.enter_async_context() is mishandling exception __context__

2021-07-10 Thread David Hoyes
Change by David Hoyes : -- nosy: +David Hoyes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue44589] Pattern Matching - duplicate keys in mapping patterns

2021-07-10 Thread Brandt Bucher
Change by Brandt Bucher : -- assignee: -> brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2021-07-10 Thread Christian Tanzer
Christian Tanzer added the comment: Json keys *are strings*. That‘s why json.dump stringifies all keys. If you want to argue that this behavior is wrong I wouldn’t protest except for that it breaks extant code. But arguing that sorting the stringified keys would violate user’s expectations

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2021-07-10 Thread Andrei Kulakov
Andrei Kulakov added the comment: Some observations: - sort_keys arg does a deep sorting of nested dictionaries. It's a bit too much to ask users to do this type of preprocessing manually before dumping to json. - the error doesn't seem too onerous to me. 'unorderable types: str() < int()

[issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist

2021-07-10 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-10 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor

2021-07-10 Thread Mauricio Villegas
Mauricio Villegas added the comment: I think this is affecting me or it is a new similar issue. And it is not only for python 3.9, but also from 3.6 up. I am working on making code configurable based on signatures (see https://jsonargparse.readthedocs.io/en/stable/#classes-methods-and-functi

[issue43124] [security] smtplib multiple CRLF injection

2021-07-10 Thread Alireza Pourali
Change by Alireza Pourali : -- components: -email type: security -> performance versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set

2021-07-10 Thread Robert
Robert added the comment: You see the usecase from the stack trace: PythonWin (the IDE from pywin32 package) uses pyclbr - to inspect arbitrary user code. (Neither code is from me) I'm not inspecting __main__ explicitely. The problem seems to arise in newer Python versions (3.10+?) because

[issue44597] Poll returns POLLOUT on Pipe read endpoint on MacOS 10.14

2021-07-10 Thread Sam Harding
New submission from Sam Harding : The behaviour of select.poll() is inconsistent across MacOS versions, on MacOS Mojave (10.14.6) registering and polling the receiving channel of mp.Pipe(duplex=False) returns the event POLLOUT (ready to write to). This is verified by a colleagues setup. Wher

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-10 Thread Nick Coghlan
Nick Coghlan added the comment: I stumbled across this independently in bpo-44596, but missed this existing report due to the specific word I was looking for (encapsulation). In addition to the comparison operand coercion, there's now another access option through the `__ror__` method. The

[issue43838] There is a way to access an underlying mapping in MappingProxyType

2021-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Example of modifying a builtin type: >>> class Sneaky: ... def __eq__(self, other): ... other['real'] = 42 ... >>> int.__dict__ == Sneaky() >>> (1).real 42 But it can also lead to crash (due to outdated type cache): >>> class Sneaky: ... d

[issue44596] Operand coercion breaks MappingProxyType encapsulation

2021-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a duplicate of issue43838. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> There is a way to access an underlying mapping in MappingProxyType _