[issue36521] Consider removing docstrings from co_consts in code objects

2021-09-27 Thread Inada Naoki
Inada Naoki added the comment: Mark, would you take a look, please? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41994] Refcount issues in import

2021-09-27 Thread Gregory Szorc
Gregory Szorc added the comment: I didn't want to derail this old issue too much. So I filed issue45307 to track a solution. -- ___ Python tracker ___

[issue45307] Removal of _PyImport_FindExtensionObject() in 3.10 limits custom extension module loaders

2021-09-27 Thread Gregory Szorc
New submission from Gregory Szorc : https://bugs.python.org/issue41994 / commit 4db8988420e0a122d617df741381b0c385af032c removed _PyImport_FindExtensionObject() from the C API and it is no longer available in CPython 3.10 after alpha 5. At least py2exe and PyOxidizer rely on this API for

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-27 Thread Josh Haberman
Josh Haberman added the comment: > Windows/MSVC defines DLLs as separate programs, with their own lifetime and > entry point (e.g. you can reload a DLL multiple times and it will be > reinitialised each time). All of this is true of so's in ELF also. It doesn't mean that the

[issue45306] Docs are incorrect re: constant initialization in the C99 standard

2021-09-27 Thread Josh Haberman
New submission from Josh Haberman : I believe the following excerpt from the docs is incorrect (https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_base): > Slot initialization is subject to the rules of initializing > globals. C99 requires the initializers to be “address >

[issue45020] Freeze all modules imported during startup.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26972 pull_request: https://github.com/python/cpython/pull/28590 ___ Python tracker ___

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-27 Thread Steve Dower
Steve Dower added the comment: > MSVC rejects this standard-conforming TU when __declspec(dllimport) is added: > https://godbolt.org/z/GYrfTqaGn I am pretty sure this is out of compliance > with C99. Windows/MSVC defines DLLs as separate programs, with their own lifetime and entry point

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-27 Thread Cristobal Riaga
Cristobal Riaga added the comment: That worked , thank you for your time and answer. I will keep working on PyAPIReference. Also I will close the pull request I created on GitHub. -- ___ Python tracker

[issue41214] -O0: Segmentation fault in _PyArg_UnpackStack

2021-09-27 Thread Irit Katriel
Irit Katriel added the comment: Python 3.7 is no longer maintained. Please create a new issue if you see this problem on a current version (>= 3.9). -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, if you only need a module, then just use its __dict__ (or vars()). -- ___ Python tracker ___

[issue29971] threading.Lock.acquire() not interruptible on Windows

2021-09-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Lock.acquire() not interruptible on Windows -> threading.Lock.acquire() not interruptible on Windows ___ Python tracker ___

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-27 Thread Cristobal Riaga
Cristobal Riaga added the comment: I'm don't really need inherit order, neither built-in members. e.g.: ```py a = 3 # First class B: # Second pass def foo(): # Third pass ``` Or in a more complex module: ```py class A: # First pass class B: # Second pass class C(A, B): #

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: Better late than never. I only took 15 years to fix this old bug :-D -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2 ___ Python tracker

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 94d19f606fa18a1c4d2faca1caf2f470a8ce6d46 by Victor Stinner in branch '3.9': bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) (GH-28589) https://github.com/python/cpython/commit/94d19f606fa18a1c4d2faca1caf2f470a8ce6d46

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread miss-islington
miss-islington added the comment: New changeset 38c67738c64304928c68d5c2bd78bbb01d979b94 by Miss Islington (bot) in branch '3.10': bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) https://github.com/python/cpython/commit/38c67738c64304928c68d5c2bd78bbb01d979b94

[issue45305] Incorrect record of call_args_list when using multiple side_effect in mock.patch

2021-09-27 Thread Dave McNulla
New submission from Dave McNulla : https://gist.github.com/dmcnulla/ecec8fc96a2fd07082f240eeff6888d9 I'm trying to reproduce an error in a call to a method, forcing a second call to the method. In my test, the call_args_list is showing incorrectly (both in debugging or running unittest

[issue45249] Update doctect SyntaxErrors for location range

2021-09-27 Thread miss-islington
miss-islington added the comment: New changeset c7fdd6879b5c8447ee65b1bec95a1db43837a7a5 by Miss Islington (bot) in branch '3.10': bpo-45249: Ensure the traceback module prints correctly syntax errors with ranges (GH-28575)

[issue45301] pycore_condvar.h: remove Windows conditonal variable emulation, use Windows native conditional variable

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: Eryk: > SleepConditionVariableSRW() can't be interrupted in PyCOND_WAIT() and > PyCOND_TIMEDWAIT(). Oh. A comment on StackOverlow says: "The WaitForXxx functions accept parameters of the generic HANDLE type, which represents a handle to a kernel

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26971 pull_request: https://github.com/python/cpython/pull/28589 ___ Python tracker ___

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 15.0 -> 16.0 pull_requests: +26970 pull_request: https://github.com/python/cpython/pull/28588 ___ Python tracker

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 95d31370829b7d729667588e0a9943217401ea5b by Victor Stinner in branch 'main': bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) https://github.com/python/cpython/commit/95d31370829b7d729667588e0a9943217401ea5b --

[issue45249] Update doctect SyntaxErrors for location range

2021-09-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +26969 pull_request: https://github.com/python/cpython/pull/28587 ___ Python tracker

[issue45249] Update doctect SyntaxErrors for location range

2021-09-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 20f439b6b9e1032930a31b88694ab9f37a09e6b4 by Pablo Galindo Salgado in branch 'main': bpo-45249: Ensure the traceback module prints correctly syntax errors with ranges (GH-28575)

[issue45234] copy_file raises FileNotFoundError when src is a directory

2021-09-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-27 Thread Josh Haberman
Josh Haberman added the comment: This behavior is covered by the standard. The following C translation unit is valid according to C99: struct PyTypeObject; extern struct PyTypeObject Foo_Type; struct PyTypeObject *ptr = _Type; Specifically, _Type is an "address constant" per the

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26968 pull_request: https://github.com/python/cpython/pull/28586 ___ Python tracker ___

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-27 Thread Steve Dower
Steve Dower added the comment: The section of documentation you reference explains that this behaviour is not covered by the standard ("applied to a non-static variable like PyBaseObject_Type() is not required to produce an address constant"), and so static addresses of exported symbols do

[issue40718] Support out-of-band pickling for builtin types

2021-09-27 Thread jakirkham
Change by jakirkham : -- versions: +Python 3.10, Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41223] `object`-backed `memoryview`'s `tolist` errors

2021-09-27 Thread jakirkham
Change by jakirkham : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43096] Adding `read_into` method to `asyncio.StreamReader`

2021-09-27 Thread jakirkham
Change by jakirkham : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41226] Supporting `strides` in `memoryview.cast`

2021-09-27 Thread jakirkham
Change by jakirkham : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45304] Supporting out-of-band buffers (pickle protocol 5) in multiprocessing

2021-09-27 Thread jakirkham
New submission from jakirkham : In Python 3.8+, pickle protocol 5 ( PEP<574> ) was added, which supports out-of-band buffer collection[1]. The idea being that when pickling an object with a large amount of data attached to it (like an array, dataframe, etc.) one could collect this large

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-27 Thread Josh Haberman
Josh Haberman added the comment: > On ELF/Mach-O... nvm, I just realized that you were speaking about Windows specifically here. I believe you that on Windows "static" makes no difference in this case. The second point stands: if you consider LoadLibrary()/dlopen() to be outside the

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-27 Thread Josh Haberman
Josh Haberman added the comment: > "static" anything in C is completely irrelevant to how symbols are looked up > and resolved between modules That is not true. On ELF/Mach-O the "static" storage-class specifier in C will prevent a symbol from being added to the dynamic symbol table, which

[issue45020] Freeze all modules imported during startup.

2021-09-27 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26967 pull_request: https://github.com/python/cpython/pull/28585 ___ Python tracker ___

[issue41468] IDLE: "Unrecoverable server exiting" message

2021-09-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Unrecoverable server exiting -> IDLE: "Unrecoverable server exiting" message ___ Python tracker ___

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-27 Thread Steve Dower
Steve Dower added the comment: > As a tangential point, I think that the DLL case on Windows may be a case > where Windows is not compliant with the C standard I wasn't aware the C standard covered dynamic symbol resolution? "static" anything in C is completely irrelevant to how symbols are

[issue2821] IDLE: unittest.py sys.exit error

2021-09-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: unittest.py sys.exit error -> IDLE: unittest.py sys.exit error ___ Python tracker ___ ___

[issue45301] pycore_condvar.h: remove Windows conditonal variable emulation

2021-09-27 Thread Steve Dower
Steve Dower added the comment: > SleepConditionVariableSRW() can't be interrupted in PyCOND_WAIT() and > PyCOND_TIMEDWAIT() This was my immediate reaction as well. Unfortunately, we keep seeing that all waits need to be interruptible, so either a WaitForMultipleObjects or a slow spinlock.

[issue17838] Can't assign a different value for sys.stdin in IDLE

2021-09-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26966 pull_request: https://github.com/python/cpython/pull/28584 ___ Python tracker ___

[issue29971] Lock.acquire() not interruptible on Windows

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: time.sleep() is now implemented with a waitable timer and WaitForMultipleObjects() on Windows. It uses _PyOS_SigintEvent() so it can be interrupted with CTRL+C. commit 58f8adfda3c2b42f654a55500e8e3a6433cb95f2 Author: Victor Stinner Date: Wed Sep 22

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-27 Thread Eric Snow
Eric Snow added the comment: New changeset ae7839bbe817329dd015f9195da308a0f3fbd3e2 by Eric Snow in branch 'main': bpo-45211: Move helpers from getpath.c to internal API. (gh-28550) https://github.com/python/cpython/commit/ae7839bbe817329dd015f9195da308a0f3fbd3e2 --

[issue16974] when "python -c command" does a traceback, it open the file ""

2021-09-27 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Traceback display code can attempt to open a file named "" ___ Python tracker

[issue45303] ast module classes missing __text_signature__ attribute

2021-09-27 Thread xloem
New submission from xloem <0xl...@gmail.com>: The ast module has no signature information on its types. The types are generated in a uniform way, so it should be reasonable to add __text_signature__ or __signature__ fields to all of them at once. -- components: Argument Clinic,

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-27 Thread Josh Haberman
Josh Haberman added the comment: > I consider Py_tp_bases to be a mistake: it's an extra way of doing things > that doesn't add any extra functionality I think it does add one extra bit of functionality: Py_tp_bases allows the bases to be retrieved with PyType_GetSlot(). This isn't quite

[issue45302] basic builtin functions missing __text_signature__ attributes

2021-09-27 Thread xloem
New submission from xloem <0xl...@gmail.com>: As there is no __text_signature__ nor __signature__ attribute on basic builtin functions such as print or open, inspect.signature() cannot enumerate their parameters. It seems adding these might not be a complex task for somebody familiar with

[issue40059] Provide a toml module in the standard library

2021-09-27 Thread Sebastian Koslowski
Change by Sebastian Koslowski : -- nosy: +skoslowski ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36819] Crash during encoding using UTF-16/32 and custom error handler

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am working on it, since it is more complex issue, and PR 13134 does not solve it. 1. This bug affects also other codecs implemented in C: ASCII, Latin1, UTF-8, etc. 2. It still crashes in UTF-16/32 encoders if the error handler returns a position less

[issue45020] Freeze all modules imported during startup.

2021-09-27 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26965 pull_request: https://github.com/python/cpython/pull/28583 ___ Python tracker ___

[issue45301] pycore_condvar.h: remove Windows conditonal variable emulation

2021-09-27 Thread Eryk Sun
Eryk Sun added the comment: > IMO it's time to remove _PY_EMULATED_WIN_CV code path from > pycore_condvar.h. SleepConditionVariableSRW() can't be interrupted in PyCOND_WAIT() and PyCOND_TIMEDWAIT(). Maybe a hybrid solution could be adopted. Use native condition variables for the GIL,

[issue45026] More compact range iterator

2021-09-27 Thread Łukasz Langa
Łukasz Langa added the comment: Well, this is kind of disappointing on my end. I attach the full result of a three-way comparison between `main` at the time of Serhiy's last merge (3f8b23f8ddab75d9b77a3997d54e663187e12cc8) with GH-27986 (20e3149c175a24466c7d1c352f8ff2c11effc489) and GH-28176

[issue45294] Conditional import fails and produce UnboundLocalError, if a variable machting import name is used before

2021-09-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm glad that you fixed the bug in your code, but this is not a bug in Python. It isn't "a parsing issue", the code is parsed fine. What you did was no different from: def func(): print(x) x = 1 except that the binding operation was an

[issue45295] Speed up classmethod calls via LOAD_METHOD

2021-09-27 Thread Ken Jin
Change by Ken Jin : -- title: _PyObject_GetMethod/LOAD_METHOD for C classmethods -> Speed up classmethod calls via LOAD_METHOD ___ Python tracker ___

[issue45301] pycore_condvar.h: remove Windows conditonal variable emulation

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-29971 "Lock.acquire() not interruptible on Windows". -- ___ Python tracker ___ ___

[issue29971] Lock.acquire() not interruptible on Windows

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-45301 "pycore_condvar.h: remove Windows conditonal variable emulation". -- ___ Python tracker ___

[issue45301] pycore_condvar.h: remove Windows conditonal variable emulation

2021-09-27 Thread STINNER Victor
New submission from STINNER Victor : I recently worked on time.sleep() enhancement (bpo-21302) and threading bugfixes (bpo-45274, bpo-1596321). I saw one more time that Python emulates conditional variables to support Windows XP and older. But Python 3.11 requires Windows 8.1 or newer. IMO

[issue45294] Conditional import fails and produce UnboundLocalError, if a variable machting import name is used before

2021-09-27 Thread arts stars
arts stars added the comment: It is not for debuging my code. your answer is really middleclass sorry to say that. you admit its a due the undefined name of var DiaObjectFactoryHelper that is exactly I wanted to point out. I solved my issue not having answer like in the FAQ like you simply

[issue29971] Lock.acquire() not interruptible on Windows

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-21822: some comments are about this issue. It's a duplicate of bpo-45274 "Race condition in Thread._wait_for_tstate_lock()". -- ___ Python tracker

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: > This is the same as bpo-21822, so I suppose it should be closed as well with > a reference to this issue. You're right. I marked bpo-21822 as a duplicate of this issue. -- ___ Python tracker

[issue21822] [Windows] KeyboardInterrupt during Thread.join hangs that Thread

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: I mark this issue as a duplicate of bpo-45274. -- I fixed bpo-45274 with this change: New changeset a22be4943c119fecf5433d999227ff78fc2e5741 by Victor Stinner in branch 'main': bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)

[issue21822] [Windows] KeyboardInterrupt during Thread.join hangs that Thread

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: > I am having the same blocked signal issue on Windows when using Thread.join. > This program does not print "interrupted" after pressing Ctrl+C: This is a different issue: bpo-29971. Currently, threading.Lock.acquire() cannot be interrupted by CTRL+C.

[issue43914] Highlight invalid ranges in SyntaxErrors

2021-09-27 Thread miss-islington
miss-islington added the comment: New changeset 9e209d48cac35108f3955d3f610b6ce60b574ecc by Miss Islington (bot) in branch '3.10': bpo-43914: Correctly highlight SyntaxError exceptions for invalid generator expression in function calls (GH-28576)

[issue29971] Lock.acquire() not interruptible on Windows

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: Copy of Antoine Pitrou's msg316024 (bpo-21822): multiprocessing semaphores support Ctrl-C under Windows, so it should be doable for regular locks as well (notice the `sigint_event`):

[issue45026] More compact range iterator

2021-09-27 Thread Łukasz Langa
Łukasz Langa added the comment: Benchmarks for PGO builds on macOS 10.15 Catalina, Intel MBP 2018. Like in Dennis' case, 20e3149c175a24466c7d1c352f8ff2c11effc489 is GH-27986 and cffa90a8b0057d7e7456571045f2fb7b9ceb426f is GH-28176. The difference is that `it_` benchmarks create the iterator

[issue43914] Highlight invalid ranges in SyntaxErrors

2021-09-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset e5f13ce5b48b551c09fdd0faeafa6ecf860de51c by Pablo Galindo Salgado in branch 'main': bpo-43914: Correctly highlight SyntaxError exceptions for invalid generator expression in function calls (GH-28576)

[issue43914] Highlight invalid ranges in SyntaxErrors

2021-09-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +26964 pull_request: https://github.com/python/cpython/pull/28582 ___ Python tracker

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-27 Thread Eryk Sun
Eryk Sun added the comment: This is the same as bpo-21822, so I suppose it should be closed as well with a reference to this issue. -- ___ Python tracker ___

[issue45300] Building Python documentation with doctest logs a ResourceWarning in Doc/library/nntplib.rst

2021-09-27 Thread STINNER Victor
New submission from STINNER Victor : Build Python documentatioin with: make -C Doc/ PYTHON=../python venv LANG= PYTHONTRACEMALLOC=10 make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W -j10" doctest 2>&1|tee log See the logs: /home/vstinner/python/main/Lib/socket.py:776: ResourceWarning:

[issue45026] More compact range iterator

2021-09-27 Thread Łukasz Langa
Łukasz Langa added the comment: Dennis, run your benchmarks with --rigorous to avoid "Benchmark hidden because not significant". I note that the second and third benchmarks aren't useful as written because the iterators are exhausted after first repetition. I could see this in my results,

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-27 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 ___ Python tracker ___

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset fae2694bea5e9e5a114af8cb40b60e7131a6340c by Miss Islington (bot) in branch '3.10': bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532) (GH-28580)

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-27 Thread miss-islington
miss-islington added the comment: New changeset 1ecb641b887af2feb026a266e2fceedee0815ca8 by Miss Islington (bot) in branch '3.9': bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532) https://github.com/python/cpython/commit/1ecb641b887af2feb026a266e2fceedee0815ca8

[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2021-09-27 Thread Daniel Hillier
Daniel Hillier added the comment: I agree it is bad form but I would accidentally do it when I couldn't remember the proper API and took a stab in the dark without looking up the docs. I unfortunately used it in an example in the docs for pyzipper and started getting a few bug reports even

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +26963 pull_request: https://github.com/python/cpython/pull/28580 ___ Python tracker ___

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +26962 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28579 ___ Python tracker

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset a22be4943c119fecf5433d999227ff78fc2e5741 by Victor Stinner in branch 'main': bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532) https://github.com/python/cpython/commit/a22be4943c119fecf5433d999227ff78fc2e5741 --

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: That you need to override the __new__ method? I don't know whether it is documented specially. But the constructor calls __new__() and then __init__(). If changing the argument in __init__ does not help, it is because it was already proceeded in __new__.

[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why do you set the ZipFile.pwd attribute directly? -- ___ Python tracker ___ ___

[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-09-27 Thread Vedran Čačić
Vedran Čačić added the comment: Just wanted to say that "raise SystemExit" is shorter than "import sys; sys.exit()", has no special characters (just letters and space) and is really much quicker to write. Yes, it doesn't work if someone rebound SystemExit, but if that's your problem, you

[issue45261] Unreliable (?) results from timeit (cache issue?)

2021-09-27 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It depends on what you want to get. In general, it is difficult if interpret your request literally. For example, if you define class A in module a, class B in module b, and class C which inherits from classes A and B in module c, then what members of C

[issue24391] Better repr for threading objects

2021-09-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.11 -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24391] Better repr for threading objects

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In the last version of PR 20534, the reprs will be similar to proposed by Larry in msg244958, except that a colon is used to separate an address from status, and keyword names are used for values. It is closer to existing reprs, I'm going to

[issue45295] _PyObject_GetMethod/LOAD_METHOD for C classmethods

2021-09-27 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +26961 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28572 ___ Python tracker ___

[issue41994] Refcount issues in import

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _PyImport_FindExtensionObject is a private API. It was added in 3.3 because import.c and importdl.c needed to share code. Since 3.5 it was only used in import.c, so there is no longer need to expose it. It was removed in 3.10 because there was an issue

[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-27 Thread E. Paine
E. Paine added the comment: > How about "Control-D (end-of-file, a.k.a. EOF)" I doubt beginners care that it's EOF. > or even just "Control-D" I'd be a lot more inclined towards this. > IDLE uses the latter [Ctrl-D] even on Windows, and Ctrl-Z does not work. Is it worth considering

[issue41994] Refcount issues in import

2021-09-27 Thread Petr Viktorin
Petr Viktorin added the comment: Please don't use private API. The underscore at the beginning marks the function as private. (This has been the case for a long time; in 3.10 it is finally officially documented: https://docs.python.org/3.10/c-api/stable.html#stable ) It has been removed in

[issue41021] ctypes callback with structure crashes in Python 3.8 on Windows x86

2021-09-27 Thread Andreas Skaar
Andreas Skaar added the comment: What is the next steps on this bug? Have you created a bug with libffi if this is not working correctly eryksun? Sounds like you understand what the bug report need to contain. On implementing a workaround in ctypes. Is this possible? -- nosy:

[issue45261] Unreliable (?) results from timeit (cache issue?)

2021-09-27 Thread Tim Holy
Change by Tim Holy : -- resolution: not a bug -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11838] IDLE: make interactive code savable as a runnable script

2021-09-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: In #45297, Steven D'Aprano suggests deleting code immediately followed by traceback. (SyntaxErrors should not be there at all -- another issue.) But should NameError, for instance, be ignore, just because user printed something? Or block removed just

[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-27 Thread Tal Einat
Tal Einat added the comment: How about "Control-D (end-of-file, a.k.a. EOF)" or even just "Control-D"? -- ___ Python tracker ___

[issue21140] Idle: saving Shell or an OutputWindow should default to .txt

2021-09-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From #45297, closed as duplicate. https://discuss.python.org/t/what-is-this-syntax-i-dont-know-how-to-fix-it/10844 -- ___ Python tracker