[issue43890] Deadlock when mixing event loops and subprocesses

2021-04-19 Thread Thomas Buhrmann


New submission from Thomas Buhrmann :

When mixing code that spawns subprocesses with code that creates event loops, 
Python appears to deadlock.

In the attached example, when WORKERS = 16 and ASYNC_WORKERS = 8, Python will 
sometimes (50% of the time?) deadlock, never exiting, with no exceptions 
raised. Oddly, if ASYNC_WORKERS is set to 0 or 16 (i.e., only subprocesses or 
only event loops), it runs reliably.

I tested this in an x86_64 Ubuntu 20.04.2 VM with Python 3.8.6. I was only able 
to reproduce it when the VM had more than one CPU, and I was unable to 
reproduce it on x86_64 MacOS.

--
files: subprocess_asyncio_deadlock.py
messages: 391386
nosy: thomas
priority: normal
severity: normal
status: open
title: Deadlock when mixing event loops and subprocesses
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49967/subprocess_asyncio_deadlock.py

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



[issue36497] Undocumented behavior in csv.Sniffer (preferred delimiters)

2019-04-01 Thread Thomas Buhrmann


New submission from Thomas Buhrmann :

When the Sniffer detects more than one possible delimiter, as e.g. in the 
following file

"a;b;c;d,e;f;g;h"

the result will always be the ',' delimiter, independent of how "dominant" 
another delimiter is. This is because the codepath analyzing dominance will 
only get executed if the undocumented Sniffer member Sniffer.preferred is 
overwritten by the user after initialization.

While not strictly a bug, the behavior should probably be documented, and the 
'preferred' member could be exposed as an argument in __init__() perhaps?

--
components: Library (Lib)
messages: 339291
nosy: thomas
priority: normal
severity: normal
status: open
title: Undocumented behavior in csv.Sniffer (preferred delimiters)
type: behavior
versions: Python 3.7

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