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

2021-10-03 Thread Nathaniel Smith
Nathaniel Smith added the comment: New changeset e6d1aa1ac65b6908fdea2c70ec3aa8c4f1dffcb5 by John Belmonte in branch 'main': bpo-44594: fix (Async)ExitStack handling of __context__ (gh-27089) https://github.com/python/cpython/commit/e6d1aa1ac65b6908fdea2c70ec3aa8c4f1dffcb5 -- _

[issue45361] Provide a more convenient way to set an exception as "active", from Python code

2021-10-03 Thread Nathaniel Smith
Nathaniel Smith added the comment: Ugh, the gnarly ExitStack bug is bpo-44594, not whatever I wrote above -- ___ Python tracker ___ ___

[issue45361] Provide a more convenient way to set an exception as "active", from Python code

2021-10-03 Thread Nathaniel Smith
New submission from Nathaniel Smith : Inside 'except' and 'finally' blocks, the interpreter keeps track of the 'active exception in the thread-state. It can be introspected via `sys.exc_info()`, it enables bare `raise`, and it triggers implicit context propagation. In an odd bit of synchroni

[issue45360] xml.etree.ElementTree: add feature in write to create directories also like mkdir -p

2021-10-03 Thread Terunobu Inaba
New submission from Terunobu Inaba : In the xml.etree.ElementTree module, the function "write(args)" (https://docs.python.org/ja/3/library/xml.etree.elementtree.html) does not seem to have a function like "-p" in "mkdir -p" in UNIX system, i.e., it will raise an error when some directories in

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-03 Thread Inada Naoki
Inada Naoki added the comment: Lazy filling func.__doc__ has only 3~5% performance gain. And it has small backward incompatibility. ``` >>> def foo(): "foo" ... >>> def bar(): "bar" ... >>> bar.__code__ = foo.__code__ >>> bar.__doc__ 'foo' # was 'bar' ``` Note that non-constant docstring (

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-03 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +27065 pull_request: https://github.com/python/cpython/pull/28704 ___ Python tracker ___ _

[issue19290] Clarify compile and eval interaction.

2021-10-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list

[issue44182] python-config.sh vs python-config.py inconsistency

2021-10-03 Thread Ned Deily
Ned Deily added the comment: > If you want, I can send a PR. Thanks, that would be good. Embedding is something we currently don't really test, unfortunately. Off the top of my head, I'm not sure how feasible it would be to add some tests for embedding, especially given the range of configu

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset a25dcaefb7c4eb0767a112cd31fe0b055f168844 by Pablo Galindo Salgado in branch 'main': bpo-45350: Rerun autoreconf with the pkg-config macros (GH-28708) https://github.com/python/cpython/commit/a25dcaefb7c4eb0767a112cd31fe0b055f168844

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset f146ca36f81075f222aa3a1595042597d96dfad3 by Pablo Galindo Salgado in branch '3.10': bpo-45350: Rerun autoreconf with the pkg-config macros (GH-28707) https://github.com/python/cpython/commit/f146ca36f81075f222aa3a1595042597d96dfad3

[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-10-03 Thread Jacob Hayes
Change by Jacob Hayes : -- keywords: +patch pull_requests: +27064 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28714 ___ Python tracker ___

[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-10-03 Thread Jacob Hayes
New submission from Jacob Hayes : Reproduction: ``` from graphlib import TopologicalSorter TopologicalSorter[str]({"a": {}, "b": {"a"}}) ``` ``` $ mypy /tmp/toposort.py Success: no issues found in 1 source file $ python3 /tmp/toposort.py Traceback (most recent call last): File "/tmp/toposort

[issue45358] Bogus cookie generated after invalid cookie attribute is input

2021-10-03 Thread greob
New submission from greob : Youtube sends cookies with some non-standard attributes. For example: ``` Secure-1PSID=XX; Domain=.youtube.com; Path=/; Expires=Tue, 03-Oct-2023 16:26:27 GMT; Secure; HttpOnly; Priority=HIGH; SameParty ``` Notice the Priority and SameParty attributes. In the c

[issue44182] python-config.sh vs python-config.py inconsistency

2021-10-03 Thread Isuru Fernando
Isuru Fernando added the comment: Agree that this should be fixed. If you want, I can send a PR. -- nosy: +isuruf ___ Python tracker ___ __

[issue45357] Idle does not check user config for extention configuration

2021-10-03 Thread CoolCat467
Change by CoolCat467 : -- keywords: +patch pull_requests: +27063 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28713 ___ Python tracker ___ _

[issue45357] Idle does not check user config for extention configuration

2021-10-03 Thread CoolCat467
Change by CoolCat467 : -- nosy: -terry.reedy versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue45357] Idle does not check user config for extention configuration

2021-10-03 Thread CoolCat467
New submission from CoolCat467 : I was trying to write an extension for Idle, and was noticing extension keys defined in ~/.idlerc weren't being used, so I looked into it and found that in idlelib.config.idleConf, `GetExtensionKeys`, `__GetRawExtensionKeys`, and `GetKeyBinding` would never ch

[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-03 Thread Alex Waygood
Alex Waygood added the comment: See also: https://bugs.python.org/issue44904 -- nosy: +AlexWaygood ___ Python tracker ___ ___ Pytho

[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-03 Thread Randolf Scholz
Randolf Scholz added the comment: I updated the script with dome more info. The class-property gets actually executed 5 times when calling `help(MyClass)` ``` Computing class property of ...DONE! Computing class property of ...DONE! Computing class property of ...DONE! Computing class prop

[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-03 Thread Randolf Scholz
New submission from Randolf Scholz : I noticed some strange behaviour when calling `help` on a class inheriting from a class or having itself @classmethod @property decorated methods. ```python from time import sleep from abc import ABC, ABCMeta, abstractmethod class MyMetaClass(ABCMeta):

[issue44674] dataclasses should allow frozendict default value

2021-10-03 Thread Eric V. Smith
Change by Eric V. Smith : -- type: compile error -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44674] dataclasses should allow frozendict default value

2021-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: That's a good idea, Raymond. >>> [x.__hash__ is None for x in (list, dict, set, frozenset)] [True, True, True, False] I don't think this change would cause any backward compatibility issues, except it would now allow a default of something bad like: >>> clas

[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-03 Thread Guido van Rossum
Guido van Rossum added the comment: > Where are capabilities like "list[str]" and "dict[str, list[int]]" going to > be documented? I think those should go with the individual types as well. AFter all, it's specific to the type how many parameters it has and what they mean. There should prob

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 60b9e040c9cf40e69f42c0008e564458aa0379e8 by Serhiy Storchaka in branch 'main': bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit (GH-28711) https://github.com/python/cpython/commit/60b9e040c9cf40e69f42c000

[issue45302] 10 built-in functions need non-None .__text_signature__

2021-10-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: As Serhiy says, this is a known issue that we can't do anything about until signature objects become more expressive. The C code already has comments such as: /* AC: cannot convert yet, waiting for *args support */ /* AC: cannot convert yet, as

[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: Where are capabilities like "list[str]" and "dict[str, list[int]]" going to be documented? -- ___ Python tracker ___

[issue44674] dataclasses should allow frozendict default value

2021-10-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Eric] > I agree that there's no good way of telling if an > arbitrary class is immutable, so I'm not sure we can > do anything here. Consider using non-hashability as a proxy indicator for immutability. - isinstance(f.default, (list, dict, set))

[issue45354] test_winconsoleio fails on Windows 11

2021-10-03 Thread Jeremy Kloth
Change by Jeremy Kloth : -- keywords: +patch pull_requests: +27062 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28712 ___ Python tracker ___ ___

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Christian Heimes
Christian Heimes added the comment: I have updated the container at https://quay.io/repository/tiran/cpython_autoconf to include pkg-config. -- ___ Python tracker ___ ___

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +27061 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28711 ___ Python tracker ___

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Some C code in 3.10+ uses literal 2 for the size of the code unit. It should use sizeof(_Py_CODEUNIT) instead. 1. It is self-documented and allows to distinguish this 2 from other 2 constants. 2. It will help if we change from 16-bit code units to 24-, 3

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Something seems wrong with the openssl detection when the PKG_PROG_PKG_CONFIG is active :( Christian, could you please take a look? I would like to get this ready for the release -- ___ Python tracker

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Ned Deily
Ned Deily added the comment: +1, I wasn't aware of the existence of that. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +27060 pull_request: https://github.com/python/cpython/pull/28708 ___ Python tracker ___ ___

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +27059 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28707 ___ Python tracker ___

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Created a PR for this: https://github.com/pablogsal/cpython_autoconf/pull/1 I think we should move this dockerfile to the CPython repo and update the devguide. -- ___ Python tracker

[issue45353] sys.modules: dictionary changed size during iteration

2021-10-03 Thread Dennis Sweeney
Dennis Sweeney added the comment: One standard way of preventing this is copying the dictionary whenever there's risk of it changing out from under you, as in: modules = sys.modules.copy() for key, value in modules.items(): ... -- nosy: +Dennis Sweeney __

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ah, the problem is that pkgconfig is *not* installed in that DOckerfile. I can confirm that installing pkg-config and rerunning works. -- nosy: +christian.heimes ___ Python tracker

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I can confirm that running autoreconf with Christian's version doesn't change the git tree: ❯ docker run -v`pwd`:/src tiran/cpython_autoconf Rebuilding configure script autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext auto

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This runs: "autoreconf -ivf" with the correct version of autotools required by the openssl changes -- ___ Python tracker ___ ___

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: For regeneration I was using: https://github.com/tiran/cpython_autoconf as instructed by Christian. -- ___ Python tracker ___ __

[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-03 Thread Guido van Rossum
Guido van Rossum added the comment: I think we should go ahead and duplicate the documentation in collections.abc (and in a few other places -- PEP 585 lists some builtins, some in contextlib, some in re). Then we won't have to worry about what happens when the typing module is slimmed down

[issue45354] test_winconsoleio fails on Windows 11

2021-10-03 Thread Jeremy Kloth
Jeremy Kloth added the comment: Note that I have a pending PR for adding a Windows 11 build worker that will, once merged, help in testing a solution. -- ___ Python tracker _

[issue45354] test_winconsoleio fails on Windows 11

2021-10-03 Thread Jeremy Kloth
New submission from Jeremy Kloth : It appears there have been some console related changes in Windows 11 == ERROR: test_open_name (test.test_winconsoleio.WindowsConsoleIOTests) --

[issue45353] sys.modules: dictionary changed size during iteration

2021-10-03 Thread Idan Cohen
New submission from Idan Cohen : Hi, When iterating over sys.modules it might be that because of lazy loading or that other module reload is being reloaded (even if sys.modules.copy() is being used) you will get: "RuntimeError: dictionary changed size during iteration" The usage of sys.modu

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg403087 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Ned Deily
Ned Deily added the comment: The updates to aclocal.m4 are generated by the aclocal tool of the GNU build system. That, and other things including autoconf, gets run by autoreconf. Running autoconf by itself is not sufficient. https://devguide.python.org/setup/#regenerate-configure https:/

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Ned Deily
Ned Deily added the comment: The updates to aclocal.a4 are generated by the aclocal tool of the GNU build system. That, and other things including autoconf, gets run by autoreconf. Running autoconf by itself is not sufficient. https://devguide.python.org/setup/#regenerate-configure ---

[issue34778] Memoryview for column-major (f_contiguous) arrays from bytes impossible to achieve

2021-10-03 Thread Laurent Gautier
Laurent Gautier added the comment: Bump. I am still stumbling on that issue. I have a workaround by importing numpy but that's a rather large dependency for that one little thing. I see that the related issue https://bugs.python.org/issue35845 opened later has later discussion entries. ---

[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-03 Thread Ken Jin
Change by Ken Jin : -- nosy: +gvanrossum, kj, rhettinger, stutzbach ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue45352] Move documentation for typed generic forms of standard collections to collections.abc

2021-10-03 Thread Patrick Reader
New submission from Patrick Reader : Currently the documentation for the generic forms (e.g. what the parameters in square brackets mean) of standard collections (e.g. collections.abc.Generator), is still on the typing page (https://docs.python.org/3.10/library/typing.html#typing.Generator).

[issue20028] csv: Confusing error message when giving invalid quotechar in initializing dialect

2021-10-03 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +27058 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28705 ___ Python tracker ___

[issue45351] List all sockets in TCP echo server using streams

2021-10-03 Thread Olaf van der Spek
New submission from Olaf van der Spek : Replace: addr = server.sockets[0].getsockname() print(f'Serving on {addr}') By: for socket in server.sockets: addr = socket.getsockname() print(f'Serving on {addr}') https://docs.python.org/3/library/asyncio-stream.html -- assignee: docs@py

[issue20028] csv: Confusing error message when giving invalid quotechar in initializing dialect

2021-10-03 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue45077] multiprocessing.Pool(64) throws on Windows

2021-10-03 Thread Kagami Sascha Rosylight
Change by Kagami Sascha Rosylight : -- title: multiprocessing.Pool(64) crashes on Windows -> multiprocessing.Pool(64) throws on Windows ___ Python tracker ___

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-03 Thread Inada Naoki
Inada Naoki added the comment: > Do you have any explanation of this? I think its because current PyFunction_New tries to get docstring always. See this pull request (lazy-func-doc). https://github.com/python/cpython/pull/28704 lazy-func-doc is faster than co-docstring and remove-docstring i

[issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone

2021-10-03 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10, erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue45347] datetime subject to rounding?

2021-10-03 Thread Daniel Fortunov
Change by Daniel Fortunov : -- nosy: +dfortunov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Regarding preventing this, I have added a check so the autotools version doesn't get updated incorrectly: https://github.com/python/cpython/pull/28152 -- ___ Python tracker

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > it appears to have been inadvertently deleted in > 2fc857a5721a5b42bcb696c9cae1bbcc82a91b17 (PR 25860) probably due to an > autoconf version mismatch. Since then, I have updated the autotools version to the old one in https://github.com/python/cp

[issue45077] multiprocessing.Pool(64) crashes on Windows

2021-10-03 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Hint: you can specify several arguments for multiline code. E.g. timeit -s "setup1" -s "setup2" "test1" "test2". > And as a bonus, creating function without docstring is little faster. Do you have any explanation of this? -- _

[issue45302] 10 built-in functions need non-None .__text_signature__

2021-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are reasons for this. There is no supported by inspect.signature() syntax to adequately define the signature of say getattr(). It has one required parameter and one optional parameter, but the default value of the optional parameter cannot be express

[issue45347] datetime subject to rounding?

2021-10-03 Thread Joachim Jablon
Joachim Jablon added the comment: It may or it may not be obvious to some, but in year 5328, October 31st is the last Sunday of October, which in Rome, as in the rest of EU, according to the 202X rules, means it’s the day we shift from summer time (in Rome UTC+2) to standard time (in Rome UTC