[issue38222] pathlib Path objects should support __format__

2021-09-13 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I would be in favour of adding Path.__format__, even though I'm not terribly 
convinced by the use case presented.

--

___
Python tracker 
<https://bugs.python.org/issue38222>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43468] functools.cached_property incorrectly locks the entire descriptor on class instead of per-instance locking

2021-09-07 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

In addition to _NOT_FOUND and _EXCEPTION_RAISED, you could have an additional 
sentinel value _CONCURRENTLY_COMPUTING. Then you don't need to maintain a 
separate self.updater mapping.

--
nosy: +pitrou

___
Python tracker 
<https://bugs.python.org/issue43468>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44188] ThreadPoolExecutor unbalanced semaphore count

2021-08-31 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

To be clear, this probably doesn't have any actual consequence, since the right 
number of threads is launched anyway (at least in the example). But it's 
probably worth making the implementation less quirky (also, the semaphore's 
internal counter *might* overflow at some point?).

--
components: +Library (Lib) -asyncio
nosy: +pitrou

___
Python tracker 
<https://bugs.python.org/issue44188>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44188] ThreadPoolExecutor unbalanced semaphore count

2021-08-31 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.11 -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue44188>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45021] Race condition in thread.py

2021-08-31 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

As the multiprocessing doc says 
(https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods):
"""Note that safely forking a multithreaded process is problematic."""

The reproducer is trivially fixed by adding a call to 
`multiprocessing.set_start_method("forkserver")` (you can also replace 
"forkserver" with "spawn")

--

___
Python tracker 
<https://bugs.python.org/issue45021>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45021] Race condition in thread.py

2021-08-31 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.10, Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45021>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27175] Unpickling Path objects

2021-08-31 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.6

___
Python tracker 
<https://bugs.python.org/issue27175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27175] Unpickling Path objects

2021-08-31 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I understand.  Unpickling to PurePath might make enough sense indeed...

--

___
Python tracker 
<https://bugs.python.org/issue27175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27175] Unpickling Path objects

2021-08-31 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I guess the question is: why do people expect Paths to be picklable accross 
platforms? Is there a particular use case?

--

___
Python tracker 
<https://bugs.python.org/issue27175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27175] Unpickling Path objects

2021-08-31 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

What does "converting" mean in this context?

--

___
Python tracker 
<https://bugs.python.org/issue27175>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Wow. I hope this didn't hide any regression :-(

--

___
Python tracker 
<https://bugs.python.org/issue45042>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35391] threading.RLock exception handling while waiting

2021-08-28 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue35391>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35391] threading.RLock exception handling while waiting

2021-08-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

RLock is implemented in C nowadays so this problem doesn't occur anymore:
https://github.com/python/cpython/blob/main/Modules/_threadmodule.c#L436-L459

You can of course, however, import the pure Python RLock under the name 
"_PyRLock", which is still vulnerable to this issue:
https://github.com/python/cpython/blob/main/Lib/threading.py#L204-L206

--
type: crash -> behavior
versions:  -Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue35391>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44979] pathlib: support relative path construction

2021-08-23 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I am rejecting this for the reasons explained in the Github PR:

"""This seems like an extremely specific API. Perhaps you want to propose it 
for inclusion in pytest, but I don't think it belongs in pathlib.

(also, it's not difficult to spell out `Path(__file__)`)"""

--
nosy: +pitrou
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44979>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43392] Optimize repeated calls to `__import__()`

2021-08-12 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
components: +Interpreter Core
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> performance
versions: +Python 3.11 -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 
<https://bugs.python.org/issue43392>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2021-07-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +Matthew Rocklin

___
Python tracker 
<https://bugs.python.org/issue37355>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41539] print blocks with multiprocessing and buffered output

2021-06-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

This is just issue6721 again.

The workaround is easy: just add 
`multiprocessing.set_start_method("forkserver")` at the start of your program.

Also, this is more or less documented, though quite tersely:
"""Note that safely forking a multithreaded process is problematic.""
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Locks in the standard library should be sanitized on fork
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue41539>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22472] OSErrors should use str and not repr on paths

2021-06-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I'll close as rejected. Unfortunately, we have to make an exclusive choice here 
:-(

--

___
Python tracker 
<https://bugs.python.org/issue22472>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22472] OSErrors should use str and not repr on paths

2021-06-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue22472>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30966] Add multiprocessing.queues.SimpleQueue.close()

2021-06-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.10 -Python 2.7, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue30966>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30966] Add multiprocessing.queues.SimpleQueue.close()

2021-06-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
stage: patch review -> resolved
status: pending -> closed
type:  -> resource usage

___
Python tracker 
<https://bugs.python.org/issue30966>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2021-05-26 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
stage: test needed -> needs patch
versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue12731>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-15 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue37788>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-15 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +24777
pull_request: https://github.com/python/cpython/pull/26142

___
Python tracker 
<https://bugs.python.org/issue37788>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-15 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions:  -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue37788>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28146] Confusing error messages in str.format()

2021-05-13 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

It seems like this issue is entirely fixed now, closing.

--
nosy: +pitrou
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue28146>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44114>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43952] Multiprocessing UNIX socket connection: client freeze if authkey is an empty byte string

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.11 -Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43952>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions:  -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue44114>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44094] Remove PyErr_Set...WithUnicodeFilename APIs

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue44094>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28146] Confusing error messages in str.format()

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue28146>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44125] "make patchcheck" fails

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +pitrou
nosy_count: 13.0 -> 14.0
pull_requests: +24745
pull_request: https://github.com/python/cpython/pull/26103

___
Python tracker 
<https://bugs.python.org/issue37788>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44074] patchcheck checks against branch "master" not "main"

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +pitrou
nosy_count: 4.0 -> 5.0
pull_requests: +24744
pull_request: https://github.com/python/cpython/pull/26102

___
Python tracker 
<https://bugs.python.org/issue44074>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44125] "make patchcheck" fails

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +24743
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/26102

___
Python tracker 
<https://bugs.python.org/issue44125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44125] "make patchcheck" fails

2021-05-13 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

The patch from bpo-44074 does not account for a possibly non-English locale and 
blindly greps for "HEAD branch" in a possibly localized text.

--

___
Python tracker 
<https://bugs.python.org/issue44125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44125] "make patchcheck" fails

2021-05-13 Thread Antoine Pitrou


New submission from Antoine Pitrou :

./python ./Tools/scripts/patchcheck.py
Getting base branch for PR ... Traceback (most recent call last):
  File "/home/antoine/cpython/default/./Tools/scripts/patchcheck.py", line 307, 
in 
main()
  File "/home/antoine/cpython/default/./Tools/scripts/patchcheck.py", line 267, 
in main
base_branch = get_base_branch()
  File "/home/antoine/cpython/default/./Tools/scripts/patchcheck.py", line 35, 
in call_fxn
result = fxn(*args, **kwargs)
  File "/home/antoine/cpython/default/./Tools/scripts/patchcheck.py", line 111, 
in get_base_branch
return upstream_remote + "/" + base_branch
TypeError: can only concatenate str (not "NoneType") to str
make: *** [Makefile:2006 : patchcheck] Erreur 1

--
assignee: pitrou
components: Demos and Tools
messages: 393591
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: "make patchcheck" fails
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44125>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44074] patchcheck checks against branch "master" not "main"

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44074>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.11

___
Python tracker 
<https://bugs.python.org/issue37788>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2021-04-30 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Agreed, but again, changing will break some applications.

We could switch to forkserver, but we should have a transition period where a 
FutureWarning will be displayed if people didn't explicitly set a start method.

--

___
Python tracker 
<https://bugs.python.org/issue40379>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2021-04-30 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

The macOS change was required before "fork" simply ceased to work.
Windows has always used "spawn", because no other method can be implemented on 
Windows.

--

___
Python tracker 
<https://bugs.python.org/issue40379>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2021-04-30 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

The problem with changing the default is that this will break any application 
that depends on passing non-picklable data to the child process (in addition to 
the potentially unexpected performance impact).

The docs already contain a significant elaboration on the matter, but feel free 
to submit a PR that would make the various caveats more explicit:
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

--

___
Python tracker 
<https://bugs.python.org/issue40379>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39812] Avoid daemon threads in concurrent.futures

2021-04-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

@Jan, without taking a look, I'd answer that indeed you should avoid using the 
"fork" method if you're doing any kind of multithreading in the parent process. 
 "forkserver" is a good choice nowadays on Linux and will result in more robust 
code.

--

___
Python tracker 
<https://bugs.python.org/issue39812>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43939] Deadlock in logging

2021-04-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

But also, please ask the "external package" that uses PyThreadState_SetAsyncExc 
to clear up its documentation and mentions the pitfalls.

--

___
Python tracker 
<https://bugs.python.org/issue43939>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43939] Deadlock in logging

2021-04-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Feel free to submit a PR to use context managers, though I'm not sure it solves 
the problem in a guaranteed way.

Nick, what is the official word wrt. interruptibility of context managers?

--
nosy: +ncoghlan

___
Python tracker 
<https://bugs.python.org/issue43939>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43907] pickle.py bytearray memoization bug with protocol 5

2021-04-23 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Thanks for the report and fix!

--
components: +Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43907>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43907] pickle.py bytearray memoization bug with protocol 5

2021-04-23 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 1e9f0933095403b215c2c4a0be7915d034ff7026 by Carl Friedrich 
Bolz-Tereick in branch 'master':
bpo-43907: add missing memoize call in pure python pickling of bytearray 
(GH-25501)
https://github.com/python/cpython/commit/1e9f0933095403b215c2c4a0be7915d034ff7026


--

___
Python tracker 
<https://bugs.python.org/issue43907>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43856] Docs for importlib.metadata should mention Python version

2021-04-15 Thread Antoine Pitrou


New submission from Antoine Pitrou :

https://docs.python.org/3/library/importlib.metadata.html lacks a mention of 
which Python version saw the introduction of `importlib.metadata` (it 
definitely doesn't exist in my 3.7 install, for example).

--
components: Library (Lib)
messages: 391139
nosy: eric.araujo, ezio.melotti, jaraco, mdk, pitrou, willingc
priority: normal
severity: normal
stage: needs patch
status: open
title: Docs for importlib.metadata should mention Python version
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43856>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41369] Update to libmpdec-2.5.1

2021-03-30 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41369>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41369] Update to libmpdec-2.5.1

2021-03-30 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 73b20ae2fb7a5c1374aa5c3719f64c53d29fa0d2 by Antoine Pitrou in 
branch 'master':
bpo-41369: Finish updating the vendored libmpdec to version 2.5.1 (GH-24962)
https://github.com/python/cpython/commit/73b20ae2fb7a5c1374aa5c3719f64c53d29fa0d2


--

___
Python tracker 
<https://bugs.python.org/issue41369>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43569] test_importlib failed on installed Python

2021-03-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I don't think that build includes your change.
Here are the builds that have been triggered (the list seems incomplete for 
now):
https://buildbot.python.org/all/#/changes/3355

--

___
Python tracker 
<https://bugs.python.org/issue43569>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43569] test_importlib failed on installed Python

2021-03-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43569>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43569] test_importlib failed on installed Python

2021-03-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 9a50ef43e42ee32450a81ce13ed5a0729d3b84e8 by Jason R. Coombs in 
branch 'master':
bpo-43569: Add test/test_importlib/namespacedata01 to TESTSUBDIRS (GH-24952)
https://github.com/python/cpython/commit/9a50ef43e42ee32450a81ce13ed5a0729d3b84e8


--

___
Python tracker 
<https://bugs.python.org/issue43569>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43569] test_importlib failed on installed Python

2021-03-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

You can find your submitted change here by looking here:
https://buildbot.python.org/all/#/changes

For some reason, though, it seems that no build was triggered:
https://buildbot.python.org/all/#/changes/3344

In any case, the fix is a no-brainer.

--
nosy: +pitrou

___
Python tracker 
<https://bugs.python.org/issue43569>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2021-03-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +pitrou

___
Python tracker 
<https://bugs.python.org/issue41701>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41369] Update to libmpdec-2.5.1

2021-03-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +23719
pull_request: https://github.com/python/cpython/pull/24962

___
Python tracker 
<https://bugs.python.org/issue41369>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43422] Revert _decimal C API changes

2021-03-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43422>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2021-03-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

For the record, this is going to be reverted at Stefan's request in issue43422.

--

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43422] Revert _decimal C API changes

2021-03-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +23718
pull_request: https://github.com/python/cpython/pull/24960

___
Python tracker 
<https://bugs.python.org/issue43422>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32592] Drop support of Windows Vista and Windows 7

2021-03-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

As a data point, my Windows development VM uses Windows 7.  It would be a major 
annoyance for me to reinstall a new development VM from scratch (going through 
the usual hurdles to have a usable development environment would probably be a 
full day of work, perhaps more).

--
nosy: +pitrou

___
Python tracker 
<https://bugs.python.org/issue32592>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43572] "Too many open files" on macOS buildbot

2021-03-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Thank you!

--

___
Python tracker 
<https://bugs.python.org/issue43572>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43572] "Too many open files" on macOS buildbot

2021-03-21 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43572>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43517] Fix false positives in circular import detection with from-imports

2021-03-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43572] "Too many open files" on macOS buildbot

2021-03-20 Thread Antoine Pitrou


New submission from Antoine Pitrou :

See https://buildbot.python.org/all/#/builders/366/builds/960/steps/5/logs/stdio

--
messages: 389184
nosy: mattbillenstein, pablogsal, pitrou, zach.ware
priority: normal
severity: normal
status: open
title: "Too many open files" on macOS buildbot

___
Python tracker 
<https://bugs.python.org/issue43572>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43517] Fix false positives in circular import detection with from-imports

2021-03-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +23709
pull_request: https://github.com/python/cpython/pull/24951

___
Python tracker 
<https://bugs.python.org/issue43517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43517] Fix false positives in circular import detection with from-imports

2021-03-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +23708
pull_request: https://github.com/python/cpython/pull/24950

___
Python tracker 
<https://bugs.python.org/issue43517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43517] Fix false positives in circular import detection with from-imports

2021-03-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +23706
pull_request: https://github.com/python/cpython/pull/24948

___
Python tracker 
<https://bugs.python.org/issue43517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43517] Fix false positives in circular import detection with from-imports

2021-03-20 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 2fd16ef406bba239b1334057fb499496a84b3aa2 by Antoine Pitrou in 
branch 'master':
bpo-43517: Fix false positive in detection of circular imports (#24895)
https://github.com/python/cpython/commit/2fd16ef406bba239b1334057fb499496a84b3aa2


--

___
Python tracker 
<https://bugs.python.org/issue43517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Created a new issue + fix in issue43517.

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue35943>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43515] Lazy import in concurrent.futures produces partial import errors

2021-03-16 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Fix false positives in circular import detection with 
from-imports

___
Python tracker 
<https://bugs.python.org/issue43515>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2021-03-16 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Fix false positives in circular import detection with 
from-imports

___
Python tracker 
<https://bugs.python.org/issue41567>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43517] Fix false positives in circular import detection with from-imports

2021-03-16 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +23660
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24895

___
Python tracker 
<https://bugs.python.org/issue43517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43517] Fix false positives in circular import detection with from-imports

2021-03-16 Thread Antoine Pitrou


New submission from Antoine Pitrou :

This seems to be caused by a logic error in the patch for issue35943.

It has been causing multiple issues for multi-threaded and multi-process 
systems written in Python:
* issue41567
* issue43515
* https://github.com/dask/distributed/issues/4168

--

___
Python tracker 
<https://bugs.python.org/issue43517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43517] Fix false positives in circular import detection with from-imports

2021-03-16 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
assignee: pitrou
components: Library (Lib)
nosy: pitrou
priority: deferred blocker
severity: normal
stage: needs patch
status: open
title: Fix false positives in circular import detection with from-imports
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

After analysis, it may not need reversal.  There is a simple logic error it 
seems.  Will check.

--

___
Python tracker 
<https://bugs.python.org/issue35943>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue35943>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Ok, going through other open issues including on third-party projects, I think 
these changes should unfortunately be reverted.  The regressions produced are 
far from trivial and most developers seem at a loss how to fix them.

--

___
Python tracker 
<https://bugs.python.org/issue35943>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35943] PyImport_GetModule() can return partially-initialized module

2021-03-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Note the conjunction of this change + issue32596 produces import fragility:
https://bugs.python.org/issue43515

--

___
Python tracker 
<https://bugs.python.org/issue35943>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43515] Lazy import in concurrent.futures produces partial import errors

2021-03-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Bisecting actually points to issue35943.

--

___
Python tracker 
<https://bugs.python.org/issue43515>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43515] Lazy import in concurrent.futures produces partial import errors

2021-03-16 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions:  -Python 3.8

___
Python tracker 
<https://bugs.python.org/issue43515>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43515] Lazy import in concurrent.futures produces partial import errors

2021-03-16 Thread Antoine Pitrou


New submission from Antoine Pitrou :

Here is a reproducer script:
https://gist.github.com/pitrou/a73fa2cfce2557e0dd435353b9976972

With Python 3.6 it works fine.

--
components: Library (Lib)
messages: 388844
nosy: methane, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Lazy import in concurrent.futures produces partial import errors
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43515>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32596] Lazy import concurrent.futures.process and thread

2021-03-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I don't think this was a good idea. Making some imports implicitly lazy 
introduces unpredictability in stdlib imports. Here is an example bug report:
https://issues.apache.org/jira/browse/ARROW-11983

--
nosy: +pitrou

___
Python tracker 
<https://bugs.python.org/issue32596>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43422] Revert _decimal C API changes

2021-03-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

FWIW, I have the roles "User,Developer,Coordinator" according to my user page.
You (Terry) have the roles "User,Developer".
Perhaps the "Coordinator" role explains I see things you don't see (it's a 
better explanation than believing I am a psychic :-D).

--

___
Python tracker 
<https://bugs.python.org/issue43422>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43422] Revert _decimal C API changes

2021-03-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Terry, the list of roles in https://bugs.python.org/user11089 is empty, which I 
take it to mean that Stefan doesn't have any access rights on this issue 
tracker (except to read issues).  Other users all seem to have the "User" role.

--

___
Python tracker 
<https://bugs.python.org/issue43422>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43356] PyErr_SetInterrupt should have an equivalent that takes a signal number

2021-03-11 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43356>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43356] PyErr_SetInterrupt should have an equivalent that takes a signal number

2021-03-11 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset ba251c2ae6654bfc8abd9d886b219698ad34ac3c by Antoine Pitrou in 
branch 'master':
bpo-43356: Allow passing a signal number to interrupt_main() (GH-24755)
https://github.com/python/cpython/commit/ba251c2ae6654bfc8abd9d886b219698ad34ac3c


--

___
Python tracker 
<https://bugs.python.org/issue43356>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43422] Revert _decimal C API changes

2021-03-08 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +23559
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24792

___
Python tracker 
<https://bugs.python.org/issue43422>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43406] Possible race condition between signal catching and signal.signal

2021-03-07 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +23546
pull_request: https://github.com/python/cpython/pull/24755

___
Python tracker 
<https://bugs.python.org/issue43406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41324] Add a minimal decimal capsule API

2021-03-07 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

@mattip, see issue43422

--
assignee: skrah -> 

___
Python tracker 
<https://bugs.python.org/issue41324>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41369] Update to libmpdec-2.5.1

2021-03-06 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Stefan wrote me that the changes which complete this update are here:
https://github.com/python/cpython/compare/master...skrah:libmpdec-2.5.1

I can turn this diff into a PR but first I want to gather feedback here.  Mark, 
Serhiy, Raymond, what do you say?

--
assignee: skrah -> 
nosy: +facundobatista, mark.dickinson, pitrou, rhettinger, serhiy.storchaka

___
Python tracker 
<https://bugs.python.org/issue41369>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43422] Revert _decimal C API changes

2021-03-06 Thread Antoine Pitrou


New submission from Antoine Pitrou :

Stefan Krah (who doesn't have access rights here, and is the author of the C 
_decimal module) asked me to transmit me this request:
"""
The capsule API does not meet my testing standards, since I've focused
on the upstream mpdecimal in the last couple of months.

Additionally, I'd like to refine the API, perhaps together with the
Arrow community.
"""

The relevant diff is here:
https://github.com/python/cpython/compare/master...skrah:revert_decimal_capsule_api

I can turn it into a PR but first I'd like to gather reactions here.

--
components: Extension Modules
messages: 388205
nosy: facundobatista, mark.dickinson, pitrou, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Revert _decimal C API changes
type: behavior
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43422>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43406] Possible race condition between signal catching and signal.signal

2021-03-06 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue43406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43406] Possible race condition between signal catching and signal.signal

2021-03-05 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +23534
pull_request: https://github.com/python/cpython/pull/24762

___
Python tracker 
<https://bugs.python.org/issue43406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43406] Possible race condition between signal catching and signal.signal

2021-03-05 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 68245b7a1030287294c65c298975ab9026543fd2 by Antoine Pitrou in 
branch 'master':
bpo-43406: Fix possible race condition where ``PyErr_CheckSignals`` tries to 
execute a non-Python signal handler (GH-24756)
https://github.com/python/cpython/commit/68245b7a1030287294c65c298975ab9026543fd2


--

___
Python tracker 
<https://bugs.python.org/issue43406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN

2021-03-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Turns out this didn't fix all possible situations. See bpo-43406 for an updated 
patch.

--

___
Python tracker 
<https://bugs.python.org/issue23395>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39169] TypeError: 'int' object is not callable if the signal handler is SIG_IGN

2021-03-04 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> Possible race condition between signal catching and 
signal.signal

___
Python tracker 
<https://bugs.python.org/issue39169>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43406] Possible race condition between signal catching and signal.signal

2021-03-04 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +neologix

___
Python tracker 
<https://bugs.python.org/issue43406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43406] Possible race condition between signal catching and signal.signal

2021-03-04 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +23527
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24756

___
Python tracker 
<https://bugs.python.org/issue43406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43406] Possible race condition between signal catching and signal.signal

2021-03-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Here is a reproducer:
https://gist.github.com/pitrou/e5a566e644730516b51de71145c5ea06

If you execute it, it will fail after a few iterations:

sig 2
sig 2
sig 2
Traceback (most recent call last):
  File "/home/antoine/cpython/default/setinterrupt.py", line 30, in 
main()
  File "/home/antoine/cpython/default/setinterrupt.py", line 27, in main
cycle_handlers(signum)
  File "/home/antoine/cpython/default/setinterrupt.py", line 19, in 
cycle_handlers
signal.signal(signum, handler)
  File "/home/antoine/cpython/default/Lib/signal.py", line 48, in signal
return _int_to_enum(handler, Handlers)
  File "/home/antoine/cpython/default/Lib/signal.py", line 30, in _int_to_enum
return enum_klass(value)
  File "/home/antoine/cpython/default/Lib/enum.py", line 606, in __call__
return cls.__new__(cls, value)
  File "/home/antoine/cpython/default/Lib/enum.py", line 927, in __new__
ve_exc = ValueError("%r is not a valid %s" % (value, cls.__qualname__))
TypeError: 'int' object is not callable

--

___
Python tracker 
<https://bugs.python.org/issue43406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43406] Possible race condition between signal catching and signal.signal

2021-03-04 Thread Antoine Pitrou


New submission from Antoine Pitrou :

We can receive signals (at the C level, in trip_signal() in signalmodule.c) 
while signal.signal is being called to modify the corresponding handler.  Later 
when PyErr_CheckSignals() is called to handle the given signal, the handler may 
be a non-callable object and will raise a cryptic asynchronous exception.

--
components: Interpreter Core, Library (Lib)
messages: 388131
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Possible race condition between signal catching and signal.signal
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >