[issue31582] Add _pth breadcrumb to sys.path documentation

2022-01-28 Thread Russel Webber
Russel Webber added the comment: I agree wholeheartedly, an explantation of sys.path initialisation would be very helpful. I've seen too many hacks in end user Python code due to misunderstandings around sys.path initialisation and the available ways to customise sys.path. I'll work on this,

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-28 Thread Gregory Beauregard
Change by Gregory Beauregard : -- keywords: +patch pull_requests: +29162 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30983 ___ Python tracker _

[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

[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 c

[issue42238] Deprecate suspicious.py?

2022-01-28 Thread Julien Palard
Julien Palard added the comment: New changeset 44afdbd5af4503e376148e9404b9c7a4f595b1fe by Julien Palard in branch 'main': bpo-42238: [doc] Avoid hardcoding fast-moving lines in susp-ignored.csv. (GH-30981) https://github.com/python/cpython/commit/44afdbd5af4503e376148e9404b9c7a4f595b1fe -

[issue46560] ParamSpec: Typo in doc string

2022-01-28 Thread Alex Waygood
Change by Alex Waygood : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch versions: +Python 3.11 ___ Python tracker ___ ___

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-28 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +29163 pull_request: https://github.com/python/cpython/pull/30984 ___ Python tracker ___

[issue46548] macOS installers cannot be signed on Monterey

2022-01-28 Thread Ronald Oussoren
Change by Ronald Oussoren : -- components: +macOS nosy: +ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue46550] __slots__ updates despite being read-only

2022-01-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: Python's is behaving as expected here (but see below): the slots definition tells the interpreter which attribute names can be set on an instance and "__slots__" is not one of those attributes in your code. "a.__slots__ += ..." will try to set the "a.__slo

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

2022-01-28 Thread Keelung Yang
Keelung Yang added the comment: This shouldn't be limited logging. In unstable application scene, file should be append and then close immediately to avoid breaking filesystem (e.g. inode is not updated timely). Such as main.py file in MicroPython development board, user may disconnect USB or

[issue46528] Simplify the VM's stack manipulations

2022-01-28 Thread Ken Jin
Ken Jin added the comment: > IIRC, Carl got a lot of benefit out of reordering the opcodes in the main > loop to put the most common ones at the top. I don't know if that is still > relevant or whether computed gotos, when enabled, change that calculus. AFAIK, on nix systems with PGO, the o

[issue46541] Replace _Py_IDENTIFIER() with statically initialized objects.

2022-01-28 Thread STINNER Victor
STINNER Victor added the comment: > `_Py_Identifier` has been useful but at this point there is a faster and > simpler approach we could take as a replacement: statically initialize the > objects as fields on `_PyRuntimeState` and reference them directly through a > macro. This change is go

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-28 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29164 pull_request: https://github.com/python/cpython/pull/30985 ___ Python tracker ___

[issue46458] Optimise try-except code generation for the happy path

2022-01-28 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +29165 pull_request: https://github.com/python/cpython/pull/30986 ___ Python tracker ___

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-28 Thread Kumar Aditya
Change by Kumar Aditya : -- pull_requests: +29166 pull_request: https://github.com/python/cpython/pull/30987 ___ Python tracker ___

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-28 Thread Kumar Aditya
Kumar Aditya added the comment: Another solution would be to shard the tests on windows i.e. run tests on two different jobs concurrently, edgedb does this. See https://github.com/edgedb/edgedb/actions/runs/1746736086 -- ___ Python tracker

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-28 Thread Mark Shannon
Mark Shannon added the comment: It's plenty slow on linux as well. I like the idea of starting the slower tests first. The long tail of slow tests is annoying when running `make -j12 test`. -- nosy: +Mark.Shannon ___ Python tracker

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

2022-01-28 Thread Keelung Yang
Keelung Yang added the comment: In file operations, write/modify/append, which one is generic/common? They're all. Modifying need more then one line code, but write/oppend needn't. Two lines are bad to readability and readability counts. How do you determine it's not common enough? There're

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5a9e423473bf2c4eb32a0982e8d73420875db1da by Kumar Aditya in branch 'main': bpo-46449: deepfreeze get_code() now returns strong ref (GH-30987) https://github.com/python/cpython/commit/5a9e423473bf2c4eb32a0982e8d73420875db1da -- __

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-28 Thread Mark Shannon
Mark Shannon added the comment: New changeset 89fd7c34520aac493a8784a221366ed04452612b by Mark Shannon in branch 'main': bpo-46329: Split calls into precall and call instructions. (GH-30855) https://github.com/python/cpython/commit/89fd7c34520aac493a8784a221366ed04452612b -- __

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-28 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29167 pull_request: https://github.com/python/cpython/pull/30988 ___ Python tracker ___ __

[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-28 Thread STINNER Victor
STINNER Victor added the comment: With my additional GH-30988 fix, msg411075 example no longer leaks :-) --- Loop #1: 2 refs Loop #2: 2 refs Loop #3: 2 refs ... Loop #98: 2 refs Loop #99: 2 refs Loop #100: 2 refs --- I close the issue. Thanks Christian and Kumar for the fix! -- resol

[issue46429] Merge all deepfrozen files into one

2022-01-28 Thread Kumar Aditya
Change by Kumar Aditya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-28 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9a241271139a317597aca71d5971346b2cfe7dbd by Victor Stinner in branch 'main': bpo-46417: _PyStructSequence_FiniType() updates _Py_RefTotal (GH-30988) https://github.com/python/cpython/commit/9a241271139a317597aca71d5971346b2cfe7dbd --

[issue46562] Add typeof or eum behavior for in the Typing module

2022-01-28 Thread Pedro Torres
New submission from Pedro Torres : Currently, the addition of Annotated in PEP 593 on Python 3.9 allows adding arbitrary metadata for type hints. Let's consider the following time_available_online: list[str] = [ '1m', '5m', '1d' ] ``` Hour = Annotated(str, "time available online") ``` Ano

[issue46562] Add typeof or enum behavior for in the Typing module

2022-01-28 Thread Pedro Torres
Change by Pedro Torres : -- title: Add typeof or eum behavior for in the Typing module -> Add typeof or enum behavior for in the Typing module ___ Python tracker ___ _

[issue46562] Add typeof or enum behavior in the typing module

2022-01-28 Thread Pedro Torres
Change by Pedro Torres : -- title: Add typeof or enum behavior for in the Typing module -> Add typeof or enum behavior in the typing module ___ Python tracker ___

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2022-01-28 Thread STINNER Victor
STINNER Victor added the comment: > On such platforms, the `PyGet_Foo` API can be on equal footing with the > legacy `Py_Foo` statics, i.e. both would do the same thing. That's how I've > done it in my experiment. The obvious problem is that on platforms without > compiler support for TLS, `

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2022-01-28 Thread STINNER Victor
STINNER Victor added the comment: The negative refcount issue has been fixed ;-) At commit 9a241271139a317597aca71d5971346b2cfe7dbd, Python now leaks exactly 0 reference count and 0 memory block at exit: $ ./python -I -X showrefcount -c pass [0 refs, 0 blocks] -- __

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2022-01-28 Thread STINNER Victor
STINNER Victor added the comment: Changes already done: * Macros converted to regular functions: * PyObject_GET_WEAKREFS_LISTPTR(); add internal inline _PyObject_GET_WEAKREFS_LISTPTR() * PyType_SUPPORTS_WEAKREFS(); add internal inline _PyType_SUPPORTS_WEAKREFS() * PyObject_CheckBuffer

[issue40170] [C API] Prepare PyTypeObject structure for a stable ABI: avoid accessing members in the public API

2022-01-28 Thread STINNER Victor
Change by STINNER Victor : -- title: [C API] Make PyTypeObject structure an opaque structure in the public C API -> [C API] Prepare PyTypeObject structure for a stable ABI: avoid accessing members in the public API ___ Python tracker

[issue40170] [C API] Prepare PyTypeObject structure for a stable ABI: avoid accessing members in the public API

2022-01-28 Thread Michael Felt
Change by Michael Felt : -- nosy: -Michael.Felt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue46072] Unify handling of stats in the CPython VM

2022-01-28 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29168 pull_request: https://github.com/python/cpython/pull/30989 ___ Python tracker ___

[issue46562] Add typeof or enum behavior in the typing module

2022-01-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for your report! I think you're looking for the Literal type. Also, new typing behaviors are better discussed first on https://github.com/python/typing or the typing-sig mailing list. -- nosy: +Jelle Zijlstra resolution: -> later stage: ->

[issue40170] [C API] Prepare PyTypeObject structure for a stable ABI: avoid accessing members in the public API

2022-01-28 Thread STINNER Victor
STINNER Victor added the comment: I close the issue. While this issue is not fully fixed, it's a milestone of my "stable ABI" goal. I prefer to address remaining issues in new separted issues. This issues is not fully fixed, there are are still a 4 macros which access directly PyTypeObject m

[issue46550] __slots__ updates despite being read-only

2022-01-28 Thread Ian Lee
Ian Lee added the comment: @ronaldoussoren - right, I agree that I think that raising the AttributeErrors is the right thing. The part that feels like a bug to me is that the exception is saying it is read only and yet it is not being treated it that way (even though as you point out, the en

[issue46533] Specialize for staticmethods and classmethods

2022-01-28 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +29169 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30990 ___ Python tracker ___ ___

[issue46072] Unify handling of stats in the CPython VM

2022-01-28 Thread Mark Shannon
Mark Shannon added the comment: New changeset 90ab138bbdc63763ad825ed6d4821367c09c4015 by Mark Shannon in branch 'main': bpo-46072: Add simple stats for Python calls. (GH-30989) https://github.com/python/cpython/commit/90ab138bbdc63763ad825ed6d4821367c09c4015 -- ___

[issue46563] Add tests and documentation regarding context of exception in a finally block

2022-01-28 Thread Irit Katriel
New submission from Irit Katriel : This behavior (that the OSError has the ValueError as context) should be tested and documented: >>> try: ... raise TypeError(1) ... except: ... raise ValueError(2) ... finally: ... raise OSError(3) ... Traceback (most recent call last): File "", li

[issue46563] Add tests and documentation regarding context of exception in a finally block

2022-01-28 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +29170 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30986 ___ Python tracker ___ ___

[issue46458] Optimise try-except code generation for the happy path

2022-01-28 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: -29165 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue46557] Logging captured warnings with a format string unnecessarily groups warnings together

2022-01-28 Thread Vinay Sajip
Change by Vinay Sajip : -- type: behavior -> enhancement versions: -Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-01-28 Thread Steve Dower
Steve Dower added the comment: New changeset db77bcd6092f3c174ae855522411ab83854d65a8 by Kumar Aditya in branch 'main': bpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485) https://github.com/python/cpython/commit/db77bcd6092f3c174ae855522411ab83854d65a8 -- _

[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-01-28 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +29171 pull_request: https://github.com/python/cpython/pull/30991 ___ Python tracker ___ _

[issue46564] Near zero-cost super().meth() calls via adaptive superinstructions

2022-01-28 Thread Ken Jin
New submission from Ken Jin : `super().meth()` is expensive. I propose to optimize 3 parts of this: 1. Avoid creating a temporary super() proxy object. 2. Avoid creating a bound method. 3. Avoid method lookup in super MRO using the inline cache. Credit for 1. and 2. doesn't belong to me. Those

[issue46565] Multiple modules leak `for` loop variables into module's namespace

2022-01-28 Thread Nikita Sobolev
New submission from Nikita Sobolev : Some variables created as `for X in ...` leak into module's namespace, where the loop is defined. I wrote a simple `flake8` plugin to find names that are used in `ast.Module` in `ast.For`, but not under `if __name__ == '__main__'` and are not used in `del`

[issue46564] Near zero-cost super().meth() calls via adaptive superinstructions

2022-01-28 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +29172 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30992 ___ Python tracker ___

[issue33125] Windows 10 ARM64 platform support

2022-01-28 Thread Steve Dower
Steve Dower added the comment: New changeset 45faf151c693b6f13f78926761caea6df7242024 by Steve Dower in branch 'main': bpo-33125: Enables building traditional installer for Windows ARM64 (GH-30885) https://github.com/python/cpython/commit/45faf151c693b6f13f78926761caea6df7242024 --

[issue46565] Multiple modules leak `for` loop variables into module's namespace

2022-01-28 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue46565] Multiple modules leak `for` loop variables into module's namespace

2022-01-28 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29173 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30993 ___ Python tracker ___ _

[issue46566] Support -3.11-arm64 in py.exe launcher

2022-01-28 Thread Steve Dower
New submission from Steve Dower : We now have a traditional installer that runs on Windows ARM64 devices, but it omits the py.exe launcher. This is because sys.winver is "3.11-arm64" and hence the registry tag (see PEP 514) is not detected by the launcher. Currently, the launcher is not inclu

[issue46550] __slots__ updates despite being read-only

2022-01-28 Thread Eryk Sun
Eryk Sun added the comment: If the target object of an augmented assignment doesn't support the in-place binary operation, the normal binary operation is used instead. Thus an augmented assignment is implemented to always assign the result back to the target. For an attribute, that's similar

[issue46565] Multiple modules leak `for` loop variables into module's namespace

2022-01-28 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue33125] Windows 10 ARM64 platform support

2022-01-28 Thread Steve Dower
Steve Dower added the comment: The ARM64 installer will be part of the next 3.11 release, minus the py.exe launcher (which needs a chunk of work in issue46566) and Tcl/Tk (which needs upstream support for the platform) and hence IDLE. I'm hesitant to make a final release without these compon

[issue46567] Add Tcl/Tk builds for ARM64

2022-01-28 Thread Steve Dower
New submission from Steve Dower : Currently our ARM64 installs omit Tcl/Tk (and implicitly tkinter and IDLE) because there appears to be no upstream support for building Tcl/Tk for ARM64. Once the upstream support exists, or we have a good enough patch to apply to our own copy of the sources,

[issue33125] Windows 10 ARM64 platform support

2022-01-28 Thread Steve Dower
Steve Dower added the comment: Tcl/Tk tracking issue is issue46567 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-28 Thread miss-islington
miss-islington added the comment: New changeset ce5c637f5ae06f2a6a6e966524af9d0cc816bd3f by Miss Islington (bot) in branch '3.9': bpo-46530: add `"thread_time"` to `test_time.test_get_clock_info` (GH-30913) https://github.com/python/cpython/commit/ce5c637f5ae06f2a6a6e966524af9d0cc816bd3f --

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-28 Thread miss-islington
miss-islington added the comment: New changeset 95b70e2ccfb295c77c3696bcb20c1513310efd1f by Miss Islington (bot) in branch '3.10': bpo-46530: add `"thread_time"` to `test_time.test_get_clock_info` (GH-30913) https://github.com/python/cpython/commit/95b70e2ccfb295c77c3696bcb20c1513310efd1f -

[issue46553] typing: get_type_hints on stringified lone ClassVar raises TypeError

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 5445e173e76ec792358082caf660fbdc846c64b2 by Gregory Beauregard in branch 'main': bpo-46553: allow bare typing.ClassVar annotations (#30983) https://github.com/python/cpython/commit/5445e173e76ec792358082caf660fbdc846c64b2 -- ___

[issue46542] test_json and test_lib2to3 crash on s390x Fedora Clang 3.x buildbot

2022-01-28 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +29174 pull_request: https://github.com/python/cpython/pull/30913 ___ Python tracker ___ ___

[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-28 Thread Eric Snow
Eric Snow added the comment: On Tue, Jan 25, 2022 at 4:14 PM STINNER Victor wrote: > Currently, most CI run "make buildbottest" which uses -r option of > libregrtest: randomize tests order. How hard would it be to first randomize the list and then move the slow tests up to a random position

[issue46565] Multiple modules leak `for` loop variables into module's namespace

2022-01-28 Thread Alex Waygood
Alex Waygood added the comment: +1 for the proposed PR. Loop variables leaking into the global namespace creates an extra burden for typeshed when we have to wade through a long list of objects that our tests report are present at runtime but not in the typeshed stubs. It's not the end of th

[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-01-28 Thread Steve Dower
Steve Dower added the comment: New changeset 4d191fcde426ca0643d961aa18e787103f05fce2 by Steve Dower in branch '3.10': bpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485) https://github.com/python/cpython/commit/4d191fcde426ca0643d961aa18e787103f05fce2 -- __

[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-01-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +29175 pull_request: https://github.com/python/cpython/pull/30994 ___ Python tracker _

[issue46560] ParamSpec: Typo in doc string

2022-01-28 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +29176 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30995 ___ Python tracker

[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-01-28 Thread miss-islington
miss-islington added the comment: New changeset ad9cf2fdd39968b07e04136c8b50f65a4596c087 by Miss Islington (bot) in branch '3.9': bpo-45925: Update Windows installer to SQLite 3.37.2 (GH-30485) https://github.com/python/cpython/commit/ad9cf2fdd39968b07e04136c8b50f65a4596c087 -- ___

[issue46560] ParamSpec: Typo in doc string

2022-01-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +29177 pull_request: https://github.com/python/cpython/pull/30996 ___ Python tracker _

[issue46560] ParamSpec: Typo in doc string

2022-01-28 Thread Ken Jin
Ken Jin added the comment: New changeset ffa505b580464d9d90c29e69bd4db8c52275280a by Zackery Spytz in branch 'main': bpo-46560: Fix a typo in `typing.ParamSpec's` doc string (GH-30995) https://github.com/python/cpython/commit/ffa505b580464d9d90c29e69bd4db8c52275280a -- nosy: +kj __

[issue46563] Add tests and documentation regarding context of exception in a finally block

2022-01-28 Thread Irit Katriel
Irit Katriel added the comment: The documentation is fine: https://docs.python.org/3/library/exceptions.html#exception-context -- ___ Python tracker ___ _

[issue46560] ParamSpec: Typo in doc string

2022-01-28 Thread miss-islington
miss-islington added the comment: New changeset 315a60acd14dd730b2081574c09ccc29e92ee687 by Miss Islington (bot) in branch '3.10': bpo-46560: Fix a typo in `typing.ParamSpec's` doc string (GH-30995) https://github.com/python/cpython/commit/315a60acd14dd730b2081574c09ccc29e92ee687 --

[issue46560] ParamSpec: Typo in doc string

2022-01-28 Thread Ken Jin
Ken Jin added the comment: Thanks for the fix Zackery. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue46563] Add tests regarding context of exception in a finally block

2022-01-28 Thread Irit Katriel
Change by Irit Katriel : -- title: Add tests and documentation regarding context of exception in a finally block -> Add tests regarding context of exception in a finally block ___ Python tracker

[issue46528] Simplify the VM's stack manipulations

2022-01-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: Minor nit: I think swaptimize() should check the for PyMem_Malloc returning NULL here. // Create an array with elements {0, 1, 2, ..., depth - 1}: int *stack = PyMem_Malloc(depth * sizeof(int)); for (int i = 0; i < depth; i++) { stack[i] =

[issue36346] Prepare for removing the legacy Unicode C API

2022-01-28 Thread Irit Katriel
Irit Katriel added the comment: Is there anything left to do here? -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-lis

[issue34888] Python3.8 optimizes away a "while" line

2022-01-28 Thread Irit Katriel
Irit Katriel added the comment: Does PEP626 help with this problem? -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-li

[issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og: Cannot access memory at address 0xfffffedc

2022-01-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: I manually tested this on 3.11 main and it appears to be working. -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker ___

[issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects

2022-01-28 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23291] Documentation about Py_Finalize(): Freeing objects

2022-01-28 Thread Irit Katriel
Change by Irit Katriel : -- assignee: -> docs@python components: +Documentation nosy: +docs@python, iritkatriel, vstinner versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7 ___ Python tracker __

[issue37588] Py_DEPRECATED and unavoidable warnings

2022-01-28 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue45555] Object stays alive for weak reference if an exception happens in constructor

2022-01-28 Thread Irit Katriel
Irit Katriel added the comment: I don't think there's any suitable place in the documentation to describe this. Like Pablo says, it is one of the many ways in which you can create a reference to an object. -- nosy: +iritkatriel stage: -> resolved status: open -> closed

[issue39486] Confusing error messages for %-formatting, related to escaped %-characters

2022-01-28 Thread Irit Katriel
Irit Katriel added the comment: On 3.11: >>> "%+%abc% %" % () Traceback (most recent call last): File "", line 1, in TypeError: not enough arguments for format string >>> "%+%abc% %" % {} Traceback (most recent call last): File "", line 1, in ValueError: unsupported format character '%'

[issue46528] Simplify the VM's stack manipulations

2022-01-28 Thread Brandt Bucher
Brandt Bucher added the comment: Hm, yeah. Bummer that this needs error handling now. I'll have a fix up soon. -- ___ Python tracker ___ _

[issue46458] Optimise try-except code generation for the happy path

2022-01-28 Thread Irit Katriel
Irit Katriel added the comment: New changeset 36f538c8092eeb3d5b8bc9df0ae7cc348f08a865 by Irit Katriel in branch 'main': bpo-46458: Add tests for context of exception in finally block (GH-30986) https://github.com/python/cpython/commit/36f538c8092eeb3d5b8bc9df0ae7cc348f08a865 -- __

[issue46563] Add tests regarding context of exception in a finally block

2022-01-28 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue6682] Default traceback does not handle PEP302 loaded modules

2022-01-28 Thread Irit Katriel
Irit Katriel added the comment: This was reported for 2.6, not clear why 3.1 and 3.2 were added later. Anyway, I'm not seeing the issue on 3.11 (with a script updated for python-3 prints). Also, imp is deprecated now. -- nosy: +iritkatriel resolution: -> out of date stage: needs

[issue46511] dataclasses: Allow typing.Annotated to wrap dataclasses-specific annotations

2022-01-28 Thread Gregory Beauregard
Change by Gregory Beauregard : -- keywords: +patch pull_requests: +29178 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30997 ___ Python tracker _

[issue46511] dataclasses: Allow typing.Annotated to wrap dataclasses-specific annotations

2022-01-28 Thread Gregory Beauregard
Gregory Beauregard added the comment: I had a few style, approach, and testing preference questions, but I decided they're probably best addressed in a code review so I went ahead and posted the PR. -- ___ Python tracker

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-01-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Seems that this PR is causing some segfaults. See https://github.com/python/cpython/pull/30855#issuecomment-1024658459 -- nosy: +pablogsal ___ Python tracker ___

[issue46561] Descriptor resolution should own arguments passed to descriptors

2022-01-28 Thread Maxwell Bernstein
Maxwell Bernstein added the comment: Hi Dennis, Sorry, let me be more clear. CPython in general ensures that objects passed in as arguments to a function will live for the duration of the function call if they are otherwise untouched. As it is now, this invariant is not maintained when call

[issue45628] TimedRotatingFileHandler backupCount not working

2022-01-28 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher nosy_count: 3.0 -> 4.0 pull_requests: +29179 pull_request: https://github.com/python/cpython/pull/30998 ___ Python tracker ___

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: So I just realized that the OP's description is slightly misleading. (Their code is spot on though!) The code does not create an unwaited-for *task*, assuming that "task" refers to the asyncio.Task class. What is created is a *coroutine* object that's nev

[issue46497] IDLE macOS shortcut ctrl+S doesn’t work for show completions

2022-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe that this is a subset of #18444. There are other shortcut that 'flash' a menu entry but do nothing. But I would consider a fix for this short of fixing everything. How do you disable the default for ^space? In mac settings or tkinter (tk) set

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 24cc6411adbfeecd8901f1ea50caa414c908 by Kumar Aditya in branch 'main': bpo-26552: Fixed case where failing `asyncio.ensure_future` did not close the coroutine (#30288) https://github.com/python/cpython/commit/24cc6411adbfeecd8901f1ea5

[issue46561] Descriptor resolution should own arguments passed to descriptors

2022-01-28 Thread Maxwell Bernstein
Change by Maxwell Bernstein : -- components: +C API ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue26552] Failing ensure_future still creates a Task

2022-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Kumar for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46561] Descriptor resolution should own arguments passed to descriptors

2022-01-28 Thread Maxwell Bernstein
Maxwell Bernstein added the comment: Ah, and another piece of the puzzle: this can happen in runtimes like Cinder that provide their own native code entrypoints to functions like a __get__. -- ___ Python tracker

[issue24398] Update test_capi to use test.support.script_helper

2022-01-28 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue46501] Windows 10, turtle left right not working

2022-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: When posting code for a bug report, here or anywhere else, please use the minimal code needed to demonstrate the issue. That includes using default arg values. And do not use non-essential files that responders will not have. Anyway, with default backgroun

[issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc

2022-01-28 Thread miss-islington
miss-islington added the comment: New changeset 1f036ede59e2c4befc07714cf76603c591d5c972 by Natanael Copa in branch 'main': bpo-43112: detect musl as a separate SOABI (GH-24502) https://github.com/python/cpython/commit/1f036ede59e2c4befc07714cf76603c591d5c972 -- nosy: +miss-islingto

[issue46512] filecmp.cmpfiles w/ absolute path names

2022-01-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://docs.python.org/3/library/filecmp.html#filecmp.cmpfiles I consider not working for absolute path names to be a bug. Did your example work with relative paths? -- nosy: +terry.reedy title: Explicit or correct behavior of filecmp.cmpfiles w/ ab

  1   2   >