[issue22367] Please add F_OFD_SETLK, etc support to fcntl.lockf

2014-09-08 Thread Andrew Lutomirski
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

[issue20371] datetime.datetime.replace bypasses a subclass's __new__

2014-01-23 Thread Andrew Lutomirski
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

[issue20318] subprocess.Popen can hang in threaded applications

2014-01-20 Thread Andrew Lutomirski
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

[issue20318] subprocess.Popen can hang in threaded applications

2014-01-20 Thread Andrew Lutomirski
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

[issue20318] subprocess.Popen can hang in threaded applications

2014-01-20 Thread Andrew Lutomirski
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

[issue17246] cgitb fails when frame arguments are deleted (due to inspect bug I think)

2013-02-19 Thread Andrew Lutomirski
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