[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-11 Thread Mark Shannon
New submission from Mark Shannon : We exiting a frame (returning from a Python function) we have to release the stack allocated frame. If a heap-allocated frame object exists, we need to copy the contents of the (stack) frame into the frame object. However, this involves allocating memory for

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Allocating memory can invoke GC Technically, only allocating objects can trigger GC (specifically initializing them). All the malloc APIs don't currently call the GC by themselves. -- ___ Python tracker

[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2021-11-11 Thread Mark Shannon
Mark Shannon added the comment: Ok, so it is not as bad as I thought. A failed allocation might leave us with an invalid frameobject, though. So it is still worth fixing. -- ___ Python tracker

[issue45766] Add direct proportion option to statistics.linear_regression()

2021-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: It usually isn't wise to be preachy in the docs, but we could add a suggestion that proportional=True be used only when (0, 0) is known to be in the dataset and when it is in the same neighborhood as the other data points. A reasonable cross-check would

[issue45753] Further speed up Python-to-Python calls.

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

[issue45788] sys.prefix include directory on Windows

2021-11-11 Thread Catherine Holloway
New submission from Catherine Holloway : On the page: https://docs.python.org/3.10/library/sys.html#sys.prefix the text says The main collection of Python library modules is installed in the directory prefix/lib/pythonX.Y while the platform independent header files (all except pyconfig.h)

[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-11-11 Thread Kevin
Change by Kevin : -- nosy: +Strongbeard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: +1 to these modules removal. One concern I have is when users follow internet examples and look out for these modules or examples. What is the best way to show them the modern usage? - Should Python docs show some example snippet of the most common usage

[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Miro Hrončok
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Eric Snow
Eric Snow added the comment: Thanks for the report, Petr! I'll take a look. -- assignee: -> eric.snow components: +Tests stage: -> needs patch ___ Python tracker ___

[issue45787] HOWTO for socket programming and select documentation contradict

2021-11-11 Thread Alex Waygood
New submission from Alex Waygood : The HOWTO for socket programming in Python (https://docs.python.org/3/howto/sockets.html#non-blocking sockets) includes the following lines (using triple-quotes here to indicate multiline quotes from the docs): """ The major mechanical difference [between

[issue45784] spam

2021-11-11 Thread Mark Dickinson
Change by Mark Dickinson : -- title: SAP HANA Training in Chennai -> spam ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45510] Specialize BINARY_SUBTRACT

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

[issue45784] SAP HANA Training in Chennai

2021-11-11 Thread Mark Dickinson
Change by Mark Dickinson : -- Removed message: https://bugs.python.org/msg406152 ___ Python tracker ___ ___ Python-bugs-list

[issue45753] Further speed up Python-to-Python calls.

2021-11-11 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +27774 pull_request: https://github.com/python/cpython/pull/29524 ___ Python tracker ___

[issue45510] Specialize BINARY_SUBTRACT

2021-11-11 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +27773 pull_request: https://github.com/python/cpython/pull/29523 ___ Python tracker ___

[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Only 3.9 needs an expedited rerelease. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45773] Compiler hangs during jump elimination

2021-11-11 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset a89bbde83fe7f8cc347341e7ec57cda3ba312530 by Brandt Bucher in branch '3.10': [3.10] bpo-45773: Stop "optimizing" certain jump patterns (GH-29526) https://github.com/python/cpython/commit/a89bbde83fe7f8cc347341e7ec57cda3ba312530 --

[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +27775 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29525 ___ Python tracker ___

[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The next bugfixe release of 3.10 is the 6th of December -- ___ Python tracker ___ ___

[issue45789] Python execution broken after update via Windows Store

2021-11-11 Thread firewave
firewave added the comment: I checked them and they look fine. I have Python 3.10 installed as well so the non-suffix and "3" suffix-only executable refer to that. All the "3.9" suffix ones point to the "Python 3.9" entries and are enabled. --

[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-11-11 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher nosy_count: 4.0 -> 5.0 pull_requests: +27778 pull_request: https://github.com/python/cpython/pull/29528 ___ Python tracker ___

[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: How long until the next bugfix releases for 3.9 and 3.10? To avoid further snowballing, it would be great to have this reversion pushed out soonish. -- nosy: +pablogsal priority: normal -> high ___ Python

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: > One concern I have is when users follow internet examples and look out for these modules or examples. There is an option: keep removed modules but replace each module content with 'raise ImportError("Please use instead")' stub. The actual module removal

[issue45773] Compiler hangs during jump elimination

2021-11-11 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset 27b69e60daa7b191ee6bc76fb6d5fb7d793062ab by Brandt Bucher in branch 'main': bpo-45773: Stop "optimizing" certain jump patterns (GH-29505) https://github.com/python/cpython/commit/27b69e60daa7b191ee6bc76fb6d5fb7d793062ab --

[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +2 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29527 ___ Python tracker

[issue45773] Compiler hangs during jump elimination

2021-11-11 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +27776 pull_request: https://github.com/python/cpython/pull/29526 ___ Python tracker ___

[issue45789] Python execution broken after update via Windows Store

2021-11-11 Thread firewave
New submission from firewave : I have Python 3.9 installed from the Windows Store and use it in CMake scripts. After the recent update to 3.92288.0 Python executions suddenly started failing with "Access is denied". I assumed I was using a wrong or cached path but that didn't turn out to be

[issue45789] Python execution broken after update via Windows Store

2021-11-11 Thread Steve Dower
Steve Dower added the comment: If you open "Manage app execution aliases", do you see the entries for Python? I've heard that they sometimes switch themselves off during updates, but nobody seems to know why. Even if not, disabling and re-enabling them may help. The executable in Program

[issue45054] json module should issue warning about duplicate keys

2021-11-11 Thread Andrei Kulakov
Andrei Kulakov added the comment: In general this sounds reasonable; - but a couple of thoughts / comments: - If you have a dict with mixed numbers in str format and in number format (i.e. ints as numbers and ints as strings in your case), you are creating problems in many potential places.

[issue45790] Inaccurate phrasing in extending/newtypes_tutorial

2021-11-11 Thread Rodrigo Tobar
New submission from Rodrigo Tobar : In `extending/newtypes_tutorial.rst` the following phrase appears: "[...], containing a pointer to a type object and a reference count (these can be accessed using the macros :c:macro:`Py_REFCNT` and c:macro:`Py_TYPE` respectively)." I believe it should

[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2021-11-11 Thread Zac Hatfield-Dodds
Zac Hatfield-Dodds added the comment: I've recently had [1] reported, which makes https://bugs.python.org/issue45738 the *third* parser bug [2] that Hypothesmith caught after release, and the second in a stable version - so I'll be maintaining a workaround for some time. I remain happy to

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

2021-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that the code is correct, and the documentation is not complete. As in most (but not all) cases of dunder methods it is looked up in a class, ignoring instance attributes. -- nosy: +serhiy.storchaka ___

[issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv

2021-11-11 Thread Hynek Schlawack
New submission from Hynek Schlawack : Doc/library/contextvars.rst defines a module using `.. module:: contextvars` which means that all defined symbols are automatically part of the contextvars module. The docs added in https://github.com/python/cpython/pull/5685 however explicitly use `..

[issue45582] Rewrite getpath.c in Python

2021-11-11 Thread Eric Snow
Eric Snow added the comment: On Thu, Nov 11, 2021 at 6:27 PM Steve Dower wrote: > rather than streamline anything by changing it (yet). We can do those once we > know we've got something working. +1 -- ___ Python tracker

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

2021-11-11 Thread Raymond Hettinger
New submission from Raymond Hettinger : Per PEP 3119, "Overloading works as follows: The call isinstance(x, C) first checks whether C.__instancecheck__ exists, and if so, calls C.__instancecheck__(x) instead of its normal implementation." However, this doesn't work because the isinstance()

[issue45789] Python execution broken after update via Windows Store

2021-11-11 Thread Steve Dower
Steve Dower added the comment: Can you look in your %LocalAppData%\Microsoft\WindowsApps folder and see if the python*.exe files are there? You should be able to double-click them to launch them. That folder should be on your PATH so that they work everywhere, and it should reflect what

[issue45054] json module should issue warning about duplicate keys

2021-11-11 Thread Andrei Kulakov
Andrei Kulakov added the comment: Another good option would be to use typed dict like `mydict : dict[int,str] = {}`; and use typed values when populating the dict; this way a type checker will warn you of inconsistent key types. -- ___ Python

[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-11-11 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +27782 pull_request: https://github.com/python/cpython/pull/29532 ___ Python tracker ___

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

2021-11-11 Thread Zac Hatfield-Dodds
Zac Hatfield-Dodds added the comment: It looks like this also affects Python 3.9.8, which makes me very suspicious of https://bugs.python.org/issue45494 as the probable cause. See https://github.com/Zac-HD/hypothesmith/issues/16 and

[issue45582] Rewrite getpath.c in Python

2021-11-11 Thread Steve Dower
Steve Dower added the comment: I'm expecting another dumb error (on my part) or two in the PR, but I'm very close to having this working. Reviews would be appreciated! Bear in mind that I'm trying to match the current (quirky) behaviour, rather than streamline anything by changing it (yet).

[issue45790] Inaccurate phrasing in extending/newtypes_tutorial

2021-11-11 Thread Rodrigo
Change by Rodrigo : -- keywords: +patch nosy: +rtobar nosy_count: 2.0 -> 3.0 pull_requests: +27779 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29529 ___ Python tracker

[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 807f839bbfd5805fb76eb3436c9252a0441296eb by Raymond Hettinger in branch 'main': bpo-45235: Revert an argparse bugfix that caused a regression (GH-29525) https://github.com/python/cpython/commit/807f839bbfd5805fb76eb3436c9252a0441296eb

[issue45235] argparse does not preserve namespace with subparser defaults

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

[issue45235] argparse does not preserve namespace with subparser defaults

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

[issue45789] Python execution broken after update via Windows Store

2021-11-11 Thread Eryk Sun
Eryk Sun added the comment: > It fails with "The system cannot find the file > C:\Users\\AppData\Local\Microsoft\WindowsApps\python3.9.exe." The shell's CreateProcessW() call failed with ERROR_FILE_NOT_FOUND (2). The file exists, but it's probably a broken appexec link. I'm attaching a

[issue45782] Bug in struct.pack

2021-11-11 Thread Terje Myklebust
New submission from Terje Myklebust : >>> struct.pack("i", 119) b'w\x00\x00\x00' "w" in a binary value? >>> struct.pack("I", 116) b't\x00\x00\x00' "t" in a binary value? -- messages: 406150 nosy: terje.myklebust123 priority: normal severity: normal status: open title: Bug in

[issue45784] SAP HANA Training in Chennai

2021-11-11 Thread Steven D'Aprano
Change by Steven D'Aprano : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45466] Simple curl/wget-like download functionality in urllib (like http offers server)

2021-11-11 Thread STINNER Victor
STINNER Victor added the comment: I don't think that urllib.request is a great library. There are better replacements like https://www.python-httpx.org/ or https://urllib3.readthedocs.io/ urllib.request API is not great and it doesn't support HTTP2 (nor HTTP3). -- nosy: +vstinner

[issue45466] Simple curl/wget-like download functionality in urllib (like http offers server)

2021-11-11 Thread Tom Pohl
Change by Tom Pohl : -- nosy: -tom.pohl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45781] Deleting __debug__ should be an SyntaxError

2021-11-11 Thread Carl Friedrich Bolz-Tereick
New submission from Carl Friedrich Bolz-Tereick : Right now, deleting __debug__ is not prevented: >>> def f(): ... del __debug__ ... Of course actually executing it doesn't work: >>> del __debug__ Traceback (most recent call last): File "", line 1, in NameError: name '__debug__' is

[issue45783] test_freeze fails if a file is removed

2021-11-11 Thread Petr Viktorin
New submission from Petr Viktorin : In Fedora, we remove the bundled wheels; pip & co. are supplied (and kept updated) by the system. I believe this is good practice. However, removing any file from the CPython source checkout makes test_freeze fail: Traceback (most recent call last):

[issue45784] SAP HANA Training in Chennai

2021-11-11 Thread Pavithra
New submission from Pavithra : SAP MM Training in Chennai SAP SD Training in Chennai SAP FICO Training in Chennai SAP ARIBA Training in Chennai SAP ABAP Training in Chennai SAP HR Training in Chennai SAP HANA Training in Chennai -- messages: 406152 nosy: Pavithra priority: normal

[issue45782] Bug in struct.pack

2021-11-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: The behaviour is correct. You have tripped over the ASCII representation of bytes. In ASCII, 119 (or in hex, 0x77) is displayed as 'w'. >>> b'\x77\x00\x00\x00' b'w\x00\x00\x00' -- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved

[issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon

2021-11-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: Please include reproducer code in the issue itself, not on some external side. That said, the error you're getting is related to the start method used by multiprocessing. On Linux the start method is fork, on macOS (and Windows) the start method is spawn.

[issue45785] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread STINNER Victor
New submission from STINNER Victor : I propose to remove asyncore, asynchat and smtpd modules from the Python standard library to remove the Python maintenance burden. These modules are deprecated since Python 3.6. -- The asyncore module is a very old module of the Python stdlib for

[issue45785] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread STINNER Victor
STINNER Victor added the comment: Ah, a DeprecationWarning warning is only emitted at runtime since Python 3.10. What's New in Python 3.10: "asynchat, asyncore, smtpd: These modules have been marked as deprecated in their module documentation since Python 3.6. An import-time

[issue45785] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread Christian Heimes
Christian Heimes added the comment: +1 This bug is kind of a duplicate of #28533. A year ago Kyle worked on a patch. You can find their work at https://github.com/aeros/cpython/tree/remove-asycore-asynchat-smtpd -- nosy: +christian.heimes superseder: -> Replace

[issue28533] Replace asyncore/asynchat/smptd in tests

2021-11-11 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +27771 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29521 ___ Python tracker

[issue28533] Replace asyncore/asynchat/smptd in tests

2021-11-11 Thread STINNER Victor
STINNER Victor added the comment: I forgot about this issue and I created a duplicate: bpo-45785. Copy of my messages. I propose to remove asyncore, asynchat and smtpd modules from the Python standard library to remove the Python maintenance burden. These modules are deprecated since

[issue28533] Replace asyncore/asynchat/smptd in tests

2021-11-11 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 29521 to remove the asyncore, asynchat and smtpd modules. > libregrtest/save_env.py only checks that asyncore.socket_map is not modified, > we can keep it until asyncore is really removed. I chose to remove it instead of my PR. > test_support.py

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread STINNER Victor
STINNER Victor added the comment: Since Christian Heimes decided to mark my issue bpo-45785 "Remove asyncore, asynchat and smtpd modules" as a duplicate of this issue, I changed this issue title to "Remove asyncore, asynchat and smtpd modules". -- title: Replace

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread STINNER Victor
STINNER Victor added the comment: I announced my plan to remove the 3 modules on python-dev: https://mail.python.org/archives/list/python-...@python.org/thread/LZOOLX5EKOITW55TW7JQYKLXJUPCAJB4/ -- ___ Python tracker

[issue45785] Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45696] "Deep-freeze": skip the marshal step by generating C code

2021-11-11 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes nosy_count: 2.0 -> 3.0 pull_requests: +27772 pull_request: https://github.com/python/cpython/pull/29522 ___ Python tracker