[issue45804] IDLE - faster shell writing

2021-11-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you Roger. Good to hear from you. https://stackoverflow.com/questions/66286367/why-is-my-function-faster-than-pythons-print-function-in-idle, Feb 2021, was about this issue. In my answer I verified the claim and then showed in further experiments

[issue45752] copy module doc wrongly says it doesn't copy arrays

2021-11-13 Thread Stefan Pochmann
Stefan Pochmann added the comment: Just saw that it's in copy.py's docstring as well: "This version does not copy types like module, class, function, method, nor stack trace, stack frame, nor file, socket, window, nor array, nor any similar types."

[issue45804] IDLE - faster shell writing

2021-11-13 Thread Roger Serwy
New submission from Roger Serwy : The shell provided by IDLE uses synchronous sys.stdout.write() calls between the subprocess and the front-end, leading to very slow writes. The provided patch proposes buffering the stdout/stderr streams in the subprocess and then sending a single update

[issue45054] json module should issue warning about duplicate keys

2021-11-13 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> bob.ippolito ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation

2021-11-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 142fcb40b6e460fa9b4a89fe9846b1ce4176354e by Pablo Galindo Salgado in branch '3.9': bpo-45738: Fix computation of error location for invalid continuation characters in the parser (GH-29550) (GH-29552)

[issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation

2021-11-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This should be fixed by now, but please, check if everything is in order in your respective test suites and confirm here. -- ___ Python tracker

[issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation

2021-11-13 Thread miss-islington
miss-islington added the comment: New changeset bf26a6da7aaedb526c9eb1cb56b0e46d1c10384c by Miss Islington (bot) in branch '3.10': bpo-45738: Fix computation of error location for invalid continuation (GH-29550)

[issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation

2021-11-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +27801 pull_request: https://github.com/python/cpython/pull/29552 ___ Python tracker ___

[issue45054] json module should issue warning about duplicate keys

2021-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: -0 on doing this. The suggested warning/error adds overhead that everyone would pay for but would almost never be of benefit. I haven't seen this particular problem arise in practice. The likely reasons it doesn't come up are 1) that generated data

[issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation

2021-11-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +27800 pull_request: https://github.com/python/cpython/pull/29551 ___ Python tracker

[issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation

2021-11-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 25835c518aa7446f3680b62c1fb43827e0f190d9 by Pablo Galindo Salgado in branch 'main': bpo-45738: Fix computation of error location for invalid continuation (GH-29550)

[issue37295] Possible optimizations for math.comb()

2021-11-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: These speedups all to be significant and worth doing. -- ___ Python tracker ___ ___

[issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation

2021-11-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +27799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29550 ___ Python tracker

[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-13 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45799] Fix confusing wording in Doc/library/__main__.rst

2021-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for your contribution! -- nosy: +eric.smith resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue45243] [sqlite3] add support for changing connection limits

2021-11-13 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45801] Incorrect "Perhaps you forgot a comma" hint

2021-11-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I will close this but will try to think for another issue into an error for the parens -> braket. Thanks for opening the issue! -- resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue45799] Fix confusing wording in Doc/library/__main__.rst

2021-11-13 Thread miss-islington
miss-islington added the comment: New changeset 28326ac5f87ede140268376f0c87c3b2aba62906 by Miss Islington (bot) in branch '3.10': bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546) https://github.com/python/cpython/commit/28326ac5f87ede140268376f0c87c3b2aba62906

[issue45803] make_dataclass is missing the documented kw_only argument

2021-11-13 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith components: +Library (Lib) -ctypes nosy: +eric.smith versions: +Python 3.11 ___ Python tracker ___

[issue45799] Fix confusing wording in Doc/library/__main__.rst

2021-11-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +27798 pull_request: https://github.com/python/cpython/pull/29549 ___ Python tracker ___

[issue45799] Fix confusing wording in Doc/library/__main__.rst

2021-11-13 Thread miss-islington
miss-islington added the comment: New changeset f8da00ef04fdadf7cd9821e8ec4b317ecf3ed663 by Jack DeVries in branch 'main': bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546) https://github.com/python/cpython/commit/f8da00ef04fdadf7cd9821e8ec4b317ecf3ed663 --

[issue45801] Incorrect "Perhaps you forgot a comma" hint

2021-11-13 Thread Andre Roberge
Andre Roberge added the comment: I understand. I reported this issue when one of my newest tests failed with Python 3.10 and 3.11. Actually, using friendly-traceback, using the location of the exception as indicated by cPython 3.10 and 3.11, here's part of the explanation it gives: The

[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset ed55426acd58f030ccc0cf1297e66078f538797c by Miss Islington (bot) in branch '3.10': [bpo-45765] Fix distribution discovery on empty path. (GH-29487) (GH-29510) https://github.com/python/cpython/commit/ed55426acd58f030ccc0cf1297e66078f538797c

[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 3e0b830e859ca8792401bfd1402d659f56f99941 by Jason R. Coombs in branch '3.9': [3.9] [bpo-45765] Fix distribution discovery on empty path. (GH-29487). (GH-29511) https://github.com/python/cpython/commit/3e0b830e859ca8792401bfd1402d659f56f99941

[issue45801] Incorrect "Perhaps you forgot a comma" hint

2021-11-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think this is correct because if you add a comma, indeed is valid syntax: >>> sum,[i for i in [1, 2, 3] if i%2==0] (, [2]) Here the problem is that you are mentally mapping the construct to sum(...) where the parens are substituted with brackets,

[issue45803] make_dataclass is missing the documented kw_only argument

2021-11-13 Thread Tsvetan Kintisheff
Tsvetan Kintisheff added the comment: to clarify, the documentation permalink is: https://docs.python.org/3/library/dataclasses.html#dataclasses.make_dataclass -- ___ Python tracker

[issue45803] make_dataclass is missing the documented kw_only argument

2021-11-13 Thread Tsvetan Kintisheff
New submission from Tsvetan Kintisheff : According to the 3.10 documentation, make_dataclass includes the kw_only argument: https://github.com/python/cpython/blob/3f15792d60011639d9b170d8a76c6db7f6e83665/Lib/dataclasses.py#L1327 However, the source code referred to by the same doc does not

[issue45762] Missing `list` symbols in the object inventory

2021-11-13 Thread Éric Araujo
Éric Araujo added the comment: If you search in the index, there is no entry like 'append (list method)', only 'append (sequence method)': https://docs.python.org/3/genindex-A.html This goes to the reference docs, where list methods are documented indirectly by reference to the Sequence

[issue45752] copy module doc wrongly says it doesn't copy arrays

2021-11-13 Thread Mohammad Mostafa Farzan
Change by Mohammad Mostafa Farzan : -- keywords: +patch nosy: +m2_farzan nosy_count: 4.0 -> 5.0 pull_requests: +27797 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29548 ___ Python tracker

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-11-13 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44559] Enum: revert to 3.9

2021-11-13 Thread Ethan Furman
Change by Ethan Furman : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue45802] MozillaCookieJar can't read cookies, should support cookies.sqlite

2021-11-13 Thread Akkana Peck
New submission from Akkana Peck : http.cookiejar.MozillaCookieJar only reads from cookies.txt, a format that Mozilla hasn't used in over a decade. It should read the file mozilla actually uses, cookies.sqlite. Here's some code that works to turn cookies.sqlite into cookies.txt in order to

[issue45801] Incorrect "Perhaps you forgot a comma" hint

2021-11-13 Thread Andre Roberge
New submission from Andre Roberge : Python 3.10 and 3.11: >>> sum[i for i in [1, 2, 3] if i%2==0] File "", line 1 sum[i for i in [1, 2, 3] if i%2==0] ^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? Furthermore, I don't find that

[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-11-13 Thread Jack_B
Jack_B added the comment: OK, I had a misunderstanding about what record.stack_info was. I see it is a string, so doesn't need to be stripped. Ignore my first con and the previous message. Sorry for the noise. -- ___ Python tracker

[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-11-13 Thread Jack_B
Jack_B added the comment: Whoops! I've been a bit inconsistent between the code and my pros and cons about whether exc_text gets record.stack_info as well as record.exc_info. But either option is possible. As an aside, I'm not sure why stack info is not cached in e.g. record.stack_text for

[issue45756] mock raises exception when using a spec with an attribute that raises exception on access

2021-11-13 Thread Jaap Roes
Jaap Roes added the comment: I think I encountered this when trying to mock `requests.Response`: https://github.com/psf/requests/issues/5944 -- nosy: +jaap3 ___ Python tracker

[issue44924] logging.handlers.QueueHandler does not maintain the exc_text

2021-11-13 Thread Jack_B
Jack_B added the comment: This also tripped me up recently. More broadly, I assumed that handlers downstream of the QueueHandler/QueueListener would get complete log records. Having looked at it, I can see they need to be pickled, and that means stripping some information. But like Mikael,

[issue45773] Compiler hangs during jump elimination

2021-11-13 Thread Brandt Bucher
Change by Brandt Bucher : -- resolution: -> fixed stage: patch review -> resolved status: open -> pending ___ Python tracker ___

[issue45791] __instancecheck__ being checked on type(cls) instead of cls

2021-11-13 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45800] Move expat handling into configure and Makefile

2021-11-13 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +27796 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29547 ___ Python tracker

[issue45800] Move expat handling into configure and Makefile

2021-11-13 Thread Christian Heimes
Christian Heimes added the comment: An intermediate libexpat.a simplifies Modules/Setup. The explicit rules are required to support BSD make. bmake does neither have "%.o: %.c" nor target variable overrides like GNU make. -- ___ Python tracker

[issue45800] Move expat handling into configure and Makefile

2021-11-13 Thread Christian Heimes
New submission from Christian Heimes : Move logic for --with-system-expat out of setup.py into configure and Makefile. This will enable --with-system-expat in Modules/Setup without manual patching. * Set CFLAGS and LDFLAGS for pyexpat and libexpat in configure. * Build a static libexpat.a

[issue45755] Specialized generic class does not return class attributes in dir

2021-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: Isn’t the solution to use the unspecialized class? -- ___ Python tracker ___ ___

[issue45799] Fix confusing wording in Doc/library/__main__.rst

2021-11-13 Thread Jack DeVries
Change by Jack DeVries : -- keywords: +patch pull_requests: +27795 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29546 ___ Python tracker ___

[issue45799] Fix confusing wording in Doc/library/__main__.rst

2021-11-13 Thread Jack DeVries
New submission from Jack DeVries : I was reading this bit last night and thought it was a typo. In the light of day, I realized it wasn't *technically* a typo, but definitely confusing wording. This PR fixes the confusing sentence. -- assignee: docs@python components: Documentation

[issue45292] Implement PEP 654: Exception Groups

2021-11-13 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +27794 pull_request: https://github.com/python/cpython/pull/29545 ___ Python tracker ___

[issue45798] Move _decimal build setup into configure

2021-11-13 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45798] Move _decimal build setup into configure

2021-11-13 Thread Christian Heimes
Christian Heimes added the comment: I tested the --with-system-libmpdec successfully on my system. Most vendors are using the internal copy of libmpdec any way. AFAIK only Debian-based systems use their own system libmpdec. $ ./configure -C --with-system-libmpdec $ make ... building

[issue45781] Deleting __debug__ should be an SyntaxError

2021-11-13 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: ouch, apologies for not checking that! -- ___ Python tracker ___ ___

[issue45798] Move _decimal build setup into configure

2021-11-13 Thread Christian Heimes
Christian Heimes added the comment: Thanks for the quick review, Mark! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45798] Move _decimal build setup into configure

2021-11-13 Thread Christian Heimes
Christian Heimes added the comment: New changeset 0486570f7b2b5a75812e5a01a8dca58bfadc2437 by Christian Heimes in branch 'main': bpo-45798: Move _decimal build setup into configure (GH-29541) https://github.com/python/cpython/commit/0486570f7b2b5a75812e5a01a8dca58bfadc2437 --

[issue31842] pathlib: "Incorrect function" during resolve()

2021-11-13 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> needs patch type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31842] pathlib: "Incorrect function" during resolve()

2021-11-13 Thread Eryk Sun
Eryk Sun added the comment: > perfectly valid redirected paths (winfsp ram drives for example) I mounted a WinFsp MEMFS filesystem on a directory, which set a mountpoint that targets the root path of a volume device in the native "\Device" object directory. It didn't create a volume GUID

[issue40222] "Zero cost" exception handling

2021-11-13 Thread Ruairidh MacLeod
Change by Ruairidh MacLeod : -- nosy: +rkm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43878] ./configure fails on Apple Silicon with coreutils uname

2021-11-13 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: > Someone nonchalantly updated these in > https://github.com/python/cpython/commit/2fc857a5721a5b42bcb696c9cae1bbcc82a91b17 > so this bug is now fixed That PR only goes into 3.11. While this ticket claims to have fixed the problem for 3.10 as well. Should

[issue45798] Move _decimal build setup into configure

2021-11-13 Thread Christian Heimes
Christian Heimes added the comment: PS: I had to add an explicit make rule for each object file. "%.o: %c" templates are not portable. -- ___ Python tracker ___

[issue45798] Move _decimal build setup into configure

2021-11-13 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +27793 pull_request: https://github.com/python/cpython/pull/29541 ___ Python tracker ___

[issue45798] Move _decimal build setup into configure

2021-11-13 Thread Christian Heimes
New submission from Christian Heimes : Compiler and linker flags for _decimal and internal libmpdec are currently handled by a mix of configure checks and if/else chains in setup.py. The split makes it harder to build _decimal correctly from Modules/Setup. The Modules/Setup file also does