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

2021-09-24 Thread Vedran Čačić
Vedran Čačić added the comment: > why it would be beneficial to have custom handling like this for exit is that > exit is a site-builtin, not a builtin. In my view, that's exactly why it _shouldn't_ have a special treatment. After all, site can add many more builtins. Do you want all of them

[issue44687] io.BufferedReader:peek() closes underlying file, breaking peek/read expectations

2021-09-24 Thread Jun De
Jun De added the comment: Awesome! To be honest I was very inclined to add test cases for this edge case, but while some existing test cases use native objects like io.BytesIO, the one that our edge case uses is HTTPResponse from `urllib3.response.py`. Should I still go ahead with writing th

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-24 Thread Guido van Rossum
Guido van Rossum added the comment: Ah, I think the docs need to be clarified a bit. Here's what I was missing: The key thing to know here is that there are *three* state variables; `c_tracefunc`, `c_profilefunc` (on the thread state), and `use_tracing` (on the C frame). Normally `use_traci

[issue45279] avoid redundant _commit_removals pending_removals guard

2021-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Antoine, git blame says you added at least many of the lines Thomas proposes to remove. -- nosy: +pitrou, terry.reedy ___ Python tracker ___

[issue43914] Highlight invalid ranges in SyntaxErrors

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +26941 pull_request: https://github.com/python/cpython/pull/28558 ___ Python tracker ___ __

[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue45277] typo in codecs documentation

2021-09-24 Thread miss-islington
miss-islington added the comment: New changeset 2a7d985bb3a1d85d63f135956750b330408702e6 by Miss Islington (bot) in branch '3.9': bpo-45277: Fix typo in codecs doc (GH-28555) https://github.com/python/cpython/commit/2a7d985bb3a1d85d63f135956750b330408702e6 -- __

[issue45277] typo in codecs documentation

2021-09-24 Thread miss-islington
miss-islington added the comment: New changeset 371ca3b54d355476cc735cb932e80f5cd16310da by Miss Islington (bot) in branch '3.10': bpo-45277: Fix typo in codecs doc (GH-28555) https://github.com/python/cpython/commit/371ca3b54d355476cc735cb932e80f5cd16310da -- _

[issue45277] typo in codecs documentation

2021-09-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +26939 pull_request: https://github.com/python/cpython/pull/28556 ___ Python tracker _

[issue45277] typo in codecs documentation

2021-09-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +26940 pull_request: https://github.com/python/cpython/pull/28557 ___ Python tracker ___ __

[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 4c0fc65cd8a6d4c18330505576ccd4b46abeec1c by Terry Jan Reedy in branch 'main': bpo-45277: Fix typo in codecs doc (GH-28555) https://github.com/python/cpython/commit/4c0fc65cd8a6d4c18330505576ccd4b46abeec1c -- __

[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +26938 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28555 ___ Python tracker ___ _

[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the report. I will fix this. -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-

[issue45275] Make argparse print description of subcommand when invoke help doc on subcommand

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Pyt

[issue45267] New install Python 3.9.7 install of Sphinx Document Generator fails

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue45020] Freeze all modules imported during startup.

2021-09-24 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +26937 pull_request: https://github.com/python/cpython/pull/28554 ___ Python tracker ___ ___

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: > I am not sure that it can be solved at Python level. Right. In pure Python, we cannot write code which works in all cases. My PR 28532 fix the most common case: application interrupted by a single CTRL+C. > with suppress_interrupt(): (...) It's important

[issue45252] Missing support for Source Specific Multicast

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___ Pyt

[issue45254] HAS_SHMEM detection logic is duplicated in implementation and tests

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +davin, pitrou versions: -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue45251] signal.SIGCLD alias is not available on OSX

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: I close the issue. > bpo-41299: Fix EnterNonRecursiveMutex() (GH-28548) I don't think that it's worth it to backport this change to 3.9 and 3.10. In practice, Py_FatalError() will never be called, and _PyTime_GetMonotonicClock() result must always be greate

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6bc89116cb121c176453b9745e3daa2cc5df43ab by Victor Stinner in branch 'main': bpo-41299: Mark private thread_nt.h functions as static (GH-28553) https://github.com/python/cpython/commit/6bc89116cb121c176453b9745e3daa2cc5df43ab -- _

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: Analysis use use_tracing usage in 3rd part code. I see two main ways to add C API functions covering these use cases: * Provide high-level functions like "call a trace function" (disable tracing, call trace function, reenable tracing, increment/decrement tst

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset d639e3170506a1a80c4b2f1b3a6250bb95ff190a by Victor Stinner in branch 'main': bpo-41299: Fix EnterNonRecursiveMutex() (GH-28548) https://github.com/python/cpython/commit/d639e3170506a1a80c4b2f1b3a6250bb95ff190a -- _

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset f35ddf24227e834c9b6b39ad23a0ec382b4de48b by Victor Stinner in branch 'main': bpo-41299: QueryPerformanceFrequency() cannot fail (GH-28552) https://github.com/python/cpython/commit/f35ddf24227e834c9b6b39ad23a0ec382b4de48b -- __

[issue44687] io.BufferedReader:peek() closes underlying file, breaking peek/read expectations

2021-09-24 Thread Steve Dower
Steve Dower added the comment: That change makes me much happier :) Do you think we need a specific test added for this case? I'd guess we have plenty of coverage for the changed macro already, but clearly nothing that showed the issue before. -- ___

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

2021-09-24 Thread Filipe Laíns
Filipe Laíns added the comment: One technical argument on why it would be beneficial to have custom handling like this for exit is that exit is a site-builtin, not a builtin. $ python -S Python 3.9.7 (default, Aug 31 2021, 13:28:12) [GCC 11.1.0] on linux >>> exit() Traceback (most recent call

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26936 pull_request: https://github.com/python/cpython/pull/28553 ___ Python tracker ___ __

[issue45249] Update doctect SyntaxErrors for location range

2021-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: In 3.10+, end_lineno and end_offset fields were added to SyntaxError objects and the args tuple. >>> try: compile('1 1', '', 'single') ... except SyntaxError as e: print(e.args) ... ('invalid syntax. Perhaps you forgot a comma?', ('', 1, 1, '1 1', 1, 4)) He

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26935 pull_request: https://github.com/python/cpython/pull/28552 ___ Python tracker ___ __

[issue35921] Use ccache by default

2021-09-24 Thread Łukasz Langa
Łukasz Langa added the comment: It seems to me like the consensus is to not alter CPython's build files because ccache is supposed to be used through its `cc`/`gcc` compiler wrappers. Those can be provided to a ./configure run either by modifying PATH to include the directory with the wrapper

[issue45020] Freeze all modules imported during startup.

2021-09-24 Thread Eric Snow
Eric Snow added the comment: New changeset 7c801e0fa603b155eab3fd19698aa90854ac5a7b by Eric Snow in branch 'main': bpo-45020: Fix some corner cases for frozen module generation. (gh-28538) https://github.com/python/cpython/commit/7c801e0fa603b155eab3fd19698aa90854ac5a7b --

[issue45244] pip not installed with fresh python3.8.10 installation

2021-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you installed 'py' (the default), you should be able to install pip with 'py -3.8 -m ensurepip'. (I had to do this once. I wrote the failure off as a random glitch and did not think to open an issue.) -- nosy: +terry.reedy _

[issue45285] c_char incorrectly treated as bytes in Structure

2021-09-24 Thread Eryk Sun
Eryk Sun added the comment: A simple ctypes type implements a get function that's called when its value is returned as an attribute of struct/union, index of an array/pointer, or result of a function pointer. For example: >>> a = (ctypes.c_char * 1)(97) >>> a[0] b'a' >>> p =

[issue41914] test_pdb fails

2021-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Léon's message from #45242, which I closed as a duplicate of this. Leon: please try with 3.11 (best, repository main), 3.10, or at least 3.9. 3.8 and before only get security fixes. --- Building Python 3.7, I ran into the same issue reported [here] (only lin

[issue45242] test_pdb fails

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_pdb fails ___ Python tracker ___ ___

[issue45240] Add +REPORT_NDIFF option to pdb tests that use doctest

2021-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Lukasz, there is no current doctest expert and I think that this is something you could either accept or reject fairly quickly. Since the enhancement is to the tests, it could be backported. -- nosy: +lukasz.langa, terry.reedy _

[issue45285] c_char incorrectly treated as bytes in Structure

2021-09-24 Thread CireSnave
New submission from CireSnave : When dealing with a Structure containing c_char variables, the variables are incorrectly being typed as bytes. As a result, a pointer to those c_char variables can not be created because bytes is not a ctypes type. from ctypes import ( Structure, c_cha

[issue44687] io.BufferedReader:peek() closes underlying file, breaking peek/read expectations

2021-09-24 Thread Jun De
Jun De added the comment: Yeap Steve, I was thinking the same thing. I've taken the buffered data into consideration when checking if the file is closed in my fix, feel free to take a look and let me know what you think :) -- ___ Python tracker <

[issue44019] operator.call/operator.__call__

2021-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset bfe26bbad787c124f0ce144cff1b513ef9d2dc9c by Terry Jan Reedy in branch 'main': bpo-44019: Add missing comma to operator.call doc (GH-28551) https://github.com/python/cpython/commit/bfe26bbad787c124f0ce144cff1b513ef9d2dc9c -- __

[issue35077] Make TypeError message less ambiguous

2021-09-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://bugs.python.org/issue44110 did some improvements to error message to include type. -- ___ Python tracker ___ _

[issue45284] Better `TypeError` message when a string is indexed using a non int

2021-09-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue44110 . This looks like a duplicate. Also https://bugs.python.org/issue35077 -- nosy: +xtreak ___ Python tracker ___

[issue45284] Better `TypeError` message when a string is indexed using a non int

2021-09-24 Thread Rin RIn
Change by Rin RIn : -- title: Better `TypeError` message when a string is indexed using a string -> Better `TypeError` message when a string is indexed using a non int ___ Python tracker

[issue44019] operator.call/operator.__call__

2021-09-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +terry.reedy nosy_count: 6.0 -> 7.0 pull_requests: +26934 pull_request: https://github.com/python/cpython/pull/28551 ___ Python tracker ___

[issue45284] Better `TypeError` message when a string is indexed using a string

2021-09-24 Thread Ganesh Kumar
New submission from Ganesh Kumar : The `TypeError` message when a string is indexed using a string should be similar to the `TypeError` message when a list or tuple is indexed using a string. >>> my_str = 'Rin' >>> my_str[1:3] # works 'in' >>> my_str['no'] Traceback (most recent call last):

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

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

[issue40699] Memory leak in threading library with Python 3.6-3.8

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: I fail to reproduce the leak using attached script. I close the issue. I get constant memory usage on Linux with the main branch of Python (future 3.11): (...) VmRSS: 11344 kB VmRSS: 11344 kB VmRSS: 11344 kB VmRSS: 11344 kB VmRSS: 11344

[issue40657] Resource leaks with threading.Thread

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: You must join thread using thread.join(). If I add .join() calls, threading.active_count() stays around 2, it doesn't grow. It's not a bug in Python. -- resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue45218] cmath.log has an invalid signature

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

[issue45272] 'os.path' should not be a frozen module

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

[issue43050] threading timer memory leak

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: I cannot reproduce the issue. IMO it has been fixed. Moreover, you must join timers using timer.join(): a timer remains a thread. Code: --- import os import threading os.system(f"grep ^VmRSS /proc/{os.getpid()}/status") # warmup for n in range(10): timer

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

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: I proposed PR 28549 to fix this very old threading issue. A C extension can spawn threads without using the threading module and then then run Python code which imports the threading module. In this case, threading._main_thread is the thread which imported f

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

2021-09-24 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch nosy: +vstinner nosy_count: 14.0 -> 15.0 pull_requests: +26932 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28549 ___ Python tracker

[issue44019] operator.call/operator.__call__

2021-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the contribution! -- stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker ___ _

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-24 Thread Jeremy Maitin-Shepard
Jeremy Maitin-Shepard added the comment: To be clear, the problem I'm trying to address here is not specific to embedding Python in a C++ application. In fact the issue came to my attention while using Python directly, but loading an extension module that was written in C++ using the popula

[issue44019] operator.call/operator.__call__

2021-09-24 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 6587fc60d447603fb8c631d81d9bb379f53c39ab by Antony Lee in branch 'main': bpo-44019: Implement operator.call(). (GH-27888) https://github.com/python/cpython/commit/6587fc60d447603fb8c631d81d9bb379f53c39ab -- ___

[issue20524] format error messages should provide context information

2021-09-24 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the improvement, @sobolevn! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue20524] format error messages should provide context information

2021-09-24 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 8d8729146f21f61af66e70d3ae9501ea6bdccd09 by Nikita Sobolev in branch 'main': bpo-20524: adds better error message for `.format()` (GH-28310) https://github.com/python/cpython/commit/8d8729146f21f61af66e70d3ae9501ea6bdccd09 -- _

[issue45282] isinstance(x, typing.Protocol-class) unexpectedly evaluates properties

2021-09-24 Thread Alex Waygood
Alex Waygood added the comment: Related: https://bugs.python.org/issue44904 -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python

[issue45267] New install Python 3.9.7 install of Sphinx Document Generator fails

2021-09-24 Thread Paul Broe
Paul Broe added the comment: Good Morning: I was able to resolve the issue based on your assistance. I created this topic at github.com https://github.com/sphinx-doc/sphinx/issues/9669 Someone answered it and it was simple: Thank you so much. That was it. I thought it was looking for a pac

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: Calling Py_FatalError() must be avoided by any mean. I spent significant time to remove Py_FatalError() at Python startup in my PEP 587 implementation: https://www.python.org/dev/peps/pep-0587/ I also removed Py_FatalError() calls to report errors to the cal

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: I created PR #28548 to remove the Py_FatalError() code path. -- ___ Python tracker ___ ___ Python

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-09-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26931 pull_request: https://github.com/python/cpython/pull/28548 ___ Python tracker ___ __

[issue45283] Top / function argument level ClassVar should not be allowed during `get_type_hints()`

2021-09-24 Thread Nikita Sobolev
New submission from Nikita Sobolev : This code currently does not raise any issues: ```python # contents of `ex.py` from typing import ClassVar a: ClassVar[int] = 1 def b(c: ClassVar[int]): ... ``` And then: 1. Module: `python -c 'import ex; from typing import get_type_hints; print(get_type

[issue45282] isinstance(x, typing.Protocol-class) unexpectedly evaluates properties

2021-09-24 Thread Daisuke Takahashi
New submission from Daisuke Takahashi : Because __instancecheck__ of _ProtocolMeta uses hasattr() and getattr(), both of which evaluate property attributes, calling isinstance() with an object and a class that inherits typing.Protocol evaluates the input object's properties in some cases. Th

[issue45281] Make `is_attribute` and `module` arguments to `ForwardRef` kw-only

2021-09-24 Thread Nikita Sobolev
New submission from Nikita Sobolev : After https://github.com/python/cpython/pull/28279 and https://bugs.python.org/issue45166 `ForwardRef` and `_type_check` now have `is_class` kw-only argument. It is now inconsistent with `is_argument` and `module` arguments. It would be quite nice to make

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: Jeremy Maitin-Shepard: "In general, I view hanging threads as the least bad thing to do when faced with either acquiring the GIL or not returning at all. There is a lot of existing usage of Python that currently poses a risk of random crashes and memory cor

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: Another example where a developer asks to call abort() to notice bugs, whereas Python previously silently ignored it: bpo-36829. Calling abort() is a legit use case, but not really the best default behavior. Again, the problem was solved by letting developer

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: Gregory P. Smith: Python has many API using callbacks: PEP 445 added PyMem_SetAllocator() to set memory allocator. Adding PyMem_GetAllocator() also made possible to chain allocators and to "hook" into an existing allocator to execute code before and after it

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-24 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on `mypy` support of `NamedTuple`s (https://github.com/python/mypy/issues/11047), I've noticed that currently when testing `typing.NamedTuple` cases like: 1. `N = NamedTuple('N')` and 2. ```python class N(NamedTuple): ... ``` are igno

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: > In this case that unexpected thread simply disappearing can lead to a > deadlock in our process. This problem also remains me the very complex case of bpo-6721: "Locks in the standard library should be sanitized on fork". The issue title looks simple, but

[issue45026] More compact range iterator

2021-09-24 Thread Łukasz Langa
Łukasz Langa added the comment: Serhiy, right: looks like the difference stems from recreating the range objects, not from iteration. But Dennis' observation still stands: using `for i in range(...):` is a very popular idiom. If that becomes slower than the status quo, we will be making exist

[issue45279] avoid redundant _commit_removals pending_removals guard

2021-09-24 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +26930 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28546 ___ Python tracker ___

[issue45279] avoid redundant _commit_removals pending_removals guard

2021-09-24 Thread Thomas Grainger
New submission from Thomas Grainger : refactor to avoid redundant _commit_removals pending_removals guard -- components: Library (Lib) messages: 402554 nosy: graingert priority: normal severity: normal status: open title: avoid redundant _commit_removals pending_removals guard versions:

[issue45278] RuntimeError on race on weakset concurrent iteration

2021-09-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) nosy: +fdrake, pitrou, serhiy.storchaka versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___ __

[issue45278] RuntimeError on race on weakset concurrent iteration

2021-09-24 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +graingert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue45278] RuntimeError on race on weakset concurrent iteration

2021-09-24 Thread Ben
New submission from Ben : This is a very subtle race WeakSet uses _weakrefset.py's _IterationGuard structure to protect against the case where the elements the WeakSet refers to get cleaned up while a thread is iterating over the WeakSet. It defers the actual removal of any elements which ge

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-09-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26929 pull_request: https://github.com/python/cpython/pull/28545 ___ Python tracker ___ __

[issue45213] Frozen modules are looked up using a linear search.

2021-09-24 Thread Dong-hee Na
Dong-hee Na added the comment: > Then we can at least bail out of the loop early, and one day someone could > make it a binary search. I like this idea if we can guarantee the order :) -- ___ Python tracker __

[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-24 Thread Petr Viktorin
Petr Viktorin added the comment: > But at least if it's available as a slot then a module is *able* to use it > with limited ABI going backwards. A new function doesn't allow that. I think you're confusing PyType_Slot with the tp_* members of type structures. If a Py_tp_meta is added, it wo

[issue30951] Documentation error in inspect module

2021-09-24 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Alex! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.10, Python 3.11 -Python 3.8 ___ Python tracker

[issue30951] Documentation error in inspect module

2021-09-24 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 402d5f3d77684c91ad02a2ab5223673bec5f1602 by Miss Islington (bot) in branch '3.10': bpo-30951: Correct co_names docstring in inspect module (GH-2743) (GH-28543) https://github.com/python/cpython/commit/402d5f3d77684c91ad02a2ab5223673bec5f1602

[issue30951] Documentation error in inspect module

2021-09-24 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 91a5ba1bcb24c87a82c1417b1e5df57c89cbd3e0 by Miss Islington (bot) in branch '3.9': bpo-30951: Correct co_names docstring in inspect module (GH-2743) (GH-28544) https://github.com/python/cpython/commit/91a5ba1bcb24c87a82c1417b1e5df57c89cbd3e0 -

[issue30951] Documentation error in inspect module

2021-09-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +26927 pull_request: https://github.com/python/cpython/pull/28543 ___ Python tracker _

[issue30951] Documentation error in inspect module

2021-09-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +26928 pull_request: https://github.com/python/cpython/pull/28544 ___ Python tracker ___ __

[issue30951] Documentation error in inspect module

2021-09-24 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 3f8b23f8ddab75d9b77a3997d54e663187e12cc8 by Alex Vig in branch 'main': bpo-30951: Correct co_names docstring in inspect module (GH-2743) https://github.com/python/cpython/commit/3f8b23f8ddab75d9b77a3997d54e663187e12cc8 -- nosy: +lukasz.la

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-09-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26926 pull_request: https://github.com/python/cpython/pull/28542 ___ Python tracker ___ __

[issue45256] Remove the usage of the C stack in Python to Python calls

2021-09-24 Thread Christian Tismer
Christian Tismer added the comment: FYI., in Stackless Python I built a chain of frames by a double linked list. This was the replacement for the current frame/stack mix. Debugging was still quite easy, following this frame chain. Note that it is a rather easy step to add the capability to sq

[issue45277] typo in codecs documentation

2021-09-24 Thread HugoThiolliere
New submission from HugoThiolliere : There is a typo in https://docs.python.org/3/library/codecs.html#encodings-and-unicode The first sentence in the last paragraph before the table reads : "There’s another encoding that is able to encoding the full range of Unicode characters" When it should

[issue45276] avoid try 1000 in asyncio all_tasks by making weak collection .copy() atomic

2021-09-24 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +26925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28541 ___ Python tracker ___

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-24 Thread Eryk Sun
Change by Eryk Sun : -- nosy: +eryksun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue45276] avoid try 1000 in asyncio all_tasks by making weak collection .copy() atomic

2021-09-24 Thread Thomas Grainger
New submission from Thomas Grainger : the weak collections should have the same threadsafe/thread unsafe guarantees as their strong reference counterparts - eg dict.copy and set.copy are atomic and so the weak versions should be atomic also -- components: Interpreter Core, asyncio mes

[issue45269] c_make_encoder() has uncovered error: "argument 1 must be dict or None"

2021-09-24 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26924 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28540 ___ Python tracker ___ _

[issue45026] More compact range iterator

2021-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not see any difference in iterating small integers: $ ./python -m pyperf timeit -s 'r = range(1)' 'for i in r: pass' PR 27986: Mean +- std dev: 174 us +- 9 us PR 28176: Mean +- std dev: 172 us +- 10 us -- __