[issue40510] [regression] ZipFile fails to round trip on some files

2020-05-05 Thread David Naylor
New submission from David Naylor : With commit 18ee29d0b8 [1] a change was introduced that prevents a round-trip of some zip files (i.e. files generated by Microsoft Excel) due to the clobbering of `ZipInfo.flag_bits`[2] and `external_attr`[3]. For example: ```python[name=zip-round-trip.py

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2014-03-10 Thread David Naylor
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34334/test_kqueue.py.diff ___ Python trac

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2014-03-10 Thread David Naylor
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34335/test_kqueue.py.diff ___ Python trac

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2014-03-10 Thread David Naylor
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34332/test_kqueue.py.diff ___ Python trac

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2014-03-10 Thread David Naylor
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34333/test_kqueue.py.diff ___ Python trac

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2014-03-10 Thread David Naylor
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34331/test_kqueue.py.diff ___ Python trac

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2014-03-10 Thread David Naylor
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- keywords: +patch Added file: http://bugs.python.org/file34330/test_kque

[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2011-05-01 Thread David Naylor
New submission from David Naylor : kevent does not accept all legitimate parameters, such as KQ_NOTE_EXIT. For example: >> from select import * >> kevent(0, KQ_FILTER_PROC, KQ_EV_ADD | KQ_EV_ENABLE, KQ_NOTE_EXIT) OverflowError: signed integer is greater than maximum While the

[issue3957] [contextlib] Reverse order of locking

2008-09-24 Thread David Naylor
David Naylor <[EMAIL PROTECTED]> added the comment: Apologies, obviously the invert function should be preceded by an @contextmanager to become: @contextmanager def invert(thing): thing.__exit__(None, None, None) yield thing thing.__enter__() [Although there may be a better way of

[issue3957] [contextlib] Reverse order of locking

2008-09-24 Thread David Naylor
New submission from David Naylor <[EMAIL PROTECTED]>: Overview: Add a generator that will revert the order applied to a with statement. Motivation: Often with threaded applications one needs to do a certain task outside of a lock but while inside a greater block of code protected by

[issue2320] Race condition in subprocess using stdin

2008-09-06 Thread David Naylor
David Naylor <[EMAIL PROTECTED]> added the comment: I'm currently developing a script that makes extensive use of threads and Popen, with threads being created dynamically and each thread creating a large number of Popen processes. If I limit the thread count to 2 (main + worke