New submission from Andrew Lutomirski:
Linux 3.15 and newer support a vastly superior API for file locking, in which
locks are owned by open file descriptions instead of by processes. This is how
everyone seems to expect POSIX locks to work, but now they can finally work
that way.
Please
New submission from Andrew Lutomirski:
I'll admit that what I'm doing is possibly unhealthy. Nonetheless, I find this
behavior *extremely* surprising. This code:
--- start code ---
import datetime
class my_dt(datetime.datetime):
def __new__(cls, *args, **kwargs):
print
New submission from Andrew Lutomirski:
Running python python_thread_bug.py -j4 often results in one of the threads
failing to start until another thread finishes.
The bug appears to be that subprocess's pipe_cloexec function is racy: if
another thread forks between os.pipe
Andrew Lutomirski added the comment:
Would it be worth adding something to the Python 2.7 subprocess docs indicating
that subprocess is known to be broken?
--
resolution: wont fix -
status: closed - open
___
Python tracker rep...@bugs.python.org
Andrew Lutomirski added the comment:
FWIW, sticking a mutex in Popen.__init__ (wrapping the whole thing) seems to
work around this issue (for programs that aren't using multiprocessing or fork,
for example). This might be a good-enough fix and be safe enough to stick in
the standard library
New submission from Andrew Lutomirski:
inspect.formatargvalues assumes (incorrectly) that every argument in args is a
key in values. This isn't very hard to break -- see the attachment for a
complete example.
--
components: Library (Lib)
files: test_cgitb.py
messages: 182446
nosy