[issue18813] Speed up slice object processing

2013-08-23 Thread Stefan Behnel
Stefan Behnel added the comment: Here is another patch that remembers the Py_ssize_t slice indices if they are known at instantiation time. It only makes a very small difference for the fannkuch benchmark, so that's no reason to add both the complexity and the (IMHO ignorable) memory

[issue17741] event-driven XML parser

2013-08-23 Thread Stefan Behnel
Stefan Behnel added the comment: Ok, so what are we going to do for the next alpha? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ PYTHONIOENCODING= ./python Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: Aborted (core dumped) As a consequence we can't set only the error handler. $ PYTHONIOENCODING=:surrogateescape ./python

[issue18713] Clearly document the use of PYTHONIOENCODING to set surrogateescape

2013-08-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Empty PYTHONIOENCODING is not the same as nonexistent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18713 ___

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file31432/empty_pythonioencoding.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18818 ___

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file31433/empty_pythonioencoding.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18818 ___

[issue18813] Speed up slice object processing

2013-08-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +mark.dickinson, serhiy.storchaka stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18813 ___

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-23 Thread Nick Coghlan
Nick Coghlan added the comment: Patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18818 ___ ___ Python-bugs-list mailing

[issue18816] mmap.flush() is always synchronous, hurting performance

2013-08-23 Thread Charles-François Natali
Charles-François Natali added the comment: I propose to add an optional keyword parameter with default value SYNC (compatibility) but that can be ASYNC, INVALIDATE (can be SYNC|INVALIDATE and ASYNC|INVALIDATE too). AFAICT it's mostly useless on a modern OS. MS_INVALIDATE is a no-op on

[issue18819] tarfile fills devmajor and devminor fields even for non-devices

2013-08-23 Thread Nuutti Kotivuori
New submission from Nuutti Kotivuori: when tarfile generates a tar, it uses TarInfo objects which are packed to the binary format. This packing uses itn format for filling the devmajor and devminor fields of the tar file entry, with a default value of zero. The field length is 8 characters,

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: Patch looks good to me, but you have to update Doc/using/cmdline.rst, at least to add a versionchanged section. Tests would also be nice :-) I really like the the PYTHONIOENCODING=:surrogateescape use case! -- ___

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Second variant of the patch also supports empty error handler as the default error handler (i.e. strict). $ PYTHONIOENCODING=ascii: ./python Python 3.4.0a1+ (default:5b5ef012cd4e+, Aug 23 2013, 10:18:51) [GCC 4.6.3] on linux Type help, copyright, credits or

[issue18817] Got resource warning when running Lib/aifc.py

2013-08-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18817 ___ ___ Python-bugs-list

[issue18807] Allow venv to create copies, even when symlinks are supported

2013-08-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18807 ___ ___ Python-bugs-list

[issue15175] pydoc -k zip throws segmentation fault

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yeah, pydoc will walk and import all installed Python modules, which may trigger various kinds of issues with buggy third-party stuff. Note that in 2.x, extension modules compiled with different fundamental options (such as debug/non-debug) aren't

[issue18623] Factor out the _SuppressCoreFiles context manager

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Will also be useful for issue #18808 :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18623 ___ ___

[issue17588] runpy cannot run Unicode path on Windows

2013-08-23 Thread Drekin
Drekin added the comment: There is over year old closely related issue: http://bugs.python.org/issue13758 . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17588 ___

[issue13758] compile() should not encode 'filename' (at least on Windows)

2013-08-23 Thread Drekin
Drekin added the comment: Hello. Will this be fixed? It's really annoying that you cannot pass valid unicode filename to compile(). I'm using a workaround: I just pass placeholder and then “update” the resulting code object recursively to set the correct co_filename. Afterwards the code

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-23 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18818 ___

[issue16392] import crashes on circular imports in ext modules

2013-08-23 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16392 ___

[issue18811] add ssl-based generator to random module

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Seriously, why are we obsessed with performance when talking about a security feature? Did anyone *actually* complain about urandom() being too slow (ok, someone complained about it eating file descriptors... :-))? The question is whether OpenSSL's random

[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2013-08-23 Thread July Tikhonov
New submission from July Tikhonov: According to documentation of json.dump(), concerning its 'default' option: default(obj) is a function that should return a serializable version of obj or raise TypeError. The default simply raises TypeError. But this function is actually never applied to

[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2013-08-23 Thread July Tikhonov
July Tikhonov added the comment: Oops, my patch disables 'skipkeys' argument of dump. Another version attached. -- Added file: http://bugs.python.org/file31437/json-default-dict-keys.diff ___ Python tracker rep...@bugs.python.org

[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2013-08-23 Thread July Tikhonov
Changes by July Tikhonov july.t...@gmail.com: Removed file: http://bugs.python.org/file31436/json-default-dict-keys.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18820 ___

[issue18652] Add itertools.first_true (return first true item in iterable)

2013-08-23 Thread Radu Voicilas
Changes by Radu Voicilas radu.voici...@gmail.com: -- nosy: +raduv ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___ Python-bugs-list

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I just applied the dict version of dummy to sets in http://hg.python.org/cpython/rev/f0202c3daa7a and it unexpectedly broke test_gdb again: FAIL: test_sets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of sets

[issue18821] Add .lastitem attribute to takewhile instances

2013-08-23 Thread Oscar Benjamin
New submission from Oscar Benjamin: I've often wanted to be able to query a takewhile object to discover the item that failed the predicate but the item is currently discarded. A usage example: def sum(items): it = iter(items) ints = takewhile(Integral.__instancecheck__, it)

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Checking for dummies in dicts in python-gdb.py is implicit (see PyDictObjectPtr.iteritems()): entries whose value is NULL are not printed. Set entries do not have values, so instead pySetObjectPtr.write_repr() uses a hack with the repr() of the key to check

[issue18812] PyImport_Import redundant calls to find module

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: Because that is how it has always been: http://hg.python.org/cpython/file/b9b521efeba3/Python/import.c#l3164 . It could be changed but someone out there is relying on those semantics and it's a minor thing to leave in so I don't want to mess with it.

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Attaching a patch, but I don't have a way to test it. -- Added file: http://bugs.python.org/file31438/fix_dummy.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18772

[issue18713] Clearly document the use of PYTHONIOENCODING to set surrogateescape

2013-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: With new subject this issue looks as a duplicate of (or tightly related to) issue12832. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18713 ___

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In Python 3 ascii() uses the backslashreplace error handler. class T: ... def __repr__(self): ... return '\u20ac\udcff' ... print(ascii(T())) \u20ac\udcff I think using the backslashreplace error handler in repr() in Python 2.7 is good

[issue18812] PyImport_Import redundant calls to find module

2013-08-23 Thread Rob Bairos
Rob Bairos added the comment: However, if it fails __import()__ it doesn't get to the sys.modules[] call anyways. The only case affected by this are: PASS the __import()__ call, then FAIL the sys.modules[] lookup afterwards. Why will that effect anything currently out there? As it

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Checking repr() perpetuates the original hack so, why it may work, I think it's better if we take the opportunity to solve it cleanly. I'll try to take a look tonight (I suppose you're under Windows?). -- ___ Python

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: This change is going to break backward compatibility. I don't think that it can be done in Python 2.7.x, and there is no Python 2.8 (PEP 404). -- ___ Python tracker rep...@bugs.python.org

[issue18816] mmap.flush() is always synchronous, hurting performance

2013-08-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Depending of a concrete OS implementation is not good. Linux is not the only OS out there, and I have very old machines in production yet: # uname -a Linux colquide..es 2.4.37 #4 Fri Dec 12 01:10:45 CET 2008 i686 unknown I have been hit by the VM/file

[issue17883] Fix buildbot testing of Tkinter

2013-08-23 Thread Zachary Ware
Zachary Ware added the comment: Ping! The buildbots still seem to be failing, are my proposed fixes acceptable? Both patches still apply cleanly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17883

[issue17702] os.environ converts key type from string to bytes in KeyError exception

2013-08-23 Thread Drekin
Drekin added the comment: This patch introduces a bit ugly traceback. Shouldn't there be “raise from None” or “raise from previous_exc” instead of simple raise? -- nosy: +Drekin ___ Python tracker rep...@bugs.python.org

[issue18811] add ssl-based generator to random module

2013-08-23 Thread Christian Heimes
Christian Heimes added the comment: I don't get it either. urandom is perfectly fine. I showed that urandom is just a bit slower than SSL_rand(). How about we generalize SystemRandom so users can implement a custom RNG class wby providing a method rng(amount) - bytes? Antoine Pitrou

[issue18811] add ssl-based generator to random module

2013-08-23 Thread Charles-François Natali
Charles-François Natali added the comment: How about we generalize SystemRandom so users can implement a custom RNG class wby providing a method rng(amount) - bytes? The random module already makes it easy: Class Random can also be subclassed if you want to use a different basic generator

[issue18811] add ssl-based generator to random module

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: How about we generalize SystemRandom so users can implement a custom RNG class wby providing a method rng(amount) - bytes? We may make it easier to implement custom Random implementations with user-defined random generators, but they needn't be

[issue18326] Mention 'keyword only' for list.sort, improve glossary.

2013-08-23 Thread Zachary Ware
Zachary Ware added the comment: How about a combination of the two? It's still short, but gets the point across without assuming the reader knows exactly what 'keyword-only argument' or requiring further reading, while introducing the term and providing the link for deeper understanding.

[issue18812] PyImport_Import redundant calls to find module

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: If I were to change this code in any way it would be to stop passing in a dummy value for fromlist, not stop pulling from sys.modules. The official idiom for directly calling __import__() is:: __import__(module_name) return sys.modules[module_name] It just

[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-08-23 Thread Freek Dijkstra
Freek Dijkstra added the comment: Peter, first of all, thanks for your library. I didn't mention that before, but should have. I'm in favour of a pragmatic approach. I've only come across NATing for RFC 1918 and RFC 6598 addresses. While it can technically be done for other addresses, and

[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-08-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: -haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17400 ___ ___ Python-bugs-list

[issue17702] os.environ converts key type from string to bytes in KeyError exception

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: This patch introduces a bit ugly traceback. Shouldn't there be “raise from None” or “raise from previous_exc” instead of simple raise? Oh, I see. os.environb[b'10'] Traceback (most recent call last): File /home/vstinner/prog/python/default/Lib/os.py, line

[issue17326] Windows build docs still referring to VS 2008 in 3.3

2013-08-23 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17326 ___ ___

[issue17702] os.environ converts key type from string to bytes in KeyError exception

2013-08-23 Thread Drekin
Drekin added the comment: It's also in __delitem__. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17702 ___ ___ Python-bugs-list mailing list

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file31413/775890a666bf.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18571 ___

[issue18755] imp read functions do not try to re-open files that have been closed from previous reads

2013-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset ddd610cb65ef by Brett Cannon in branch '3.3': Issue #18755: Allow imp.load_*() loaders to have get_data() called http://hg.python.org/cpython/rev/ddd610cb65ef New changeset b107f7a8730d by Brett Cannon in branch '3.3': NEW entry for issue #18755

[issue13758] compile() should not encode 'filename' (at least on Windows)

2013-08-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor, do you have any opinion on this unicode filename issue? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13758 ___

[issue18755] imp read functions do not try to re-open files that have been closed from previous reads

2013-08-23 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18755 ___

[issue18821] Add .lastitem attribute to takewhile instances

2013-08-23 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18821 ___ ___ Python-bugs-list mailing list

[issue18623] Factor out the _SuppressCoreFiles context manager

2013-08-23 Thread Valerie Lambert
Valerie Lambert added the comment: Of course, here is the patch without the '--git' option. -- Added file: http://bugs.python.org/file31442/issue-18623_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18623

[issue18767] csv documentation does not note default quote constant

2013-08-23 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18767 ___ ___

[issue18769] argparse remove subparser

2013-08-23 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18769 ___ ___

[issue18783] No more refer to Python long

2013-08-23 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18783 ___ ___

[issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor

2013-08-23 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18804 ___ ___

[issue18760] Fix internal doc references for the xml package

2013-08-23 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18760 ___ ___

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How it can break backward compatibility? Currently repr() just raises UnicodeEncodeError. UnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac' in position 0: ordinal not in range(128) With patch it always returns 8-bit string. As far as

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: How it can break backward compatibility? Currently repr() just raises UnicodeEncodeError. It depends on sys.getdefaultencoding() which can be modified in the site module (or in a PYTHONSTARTUP script) using sys.setdefaultencoding(). It should not possible

[issue17702] os.environ converts key type from string to bytes in KeyError exception

2013-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26c049dc1a4a by Victor Stinner in branch '3.3': Close #17702: On error, os.environb now removes suppress the except context http://hg.python.org/cpython/rev/26c049dc1a4a New changeset 01f33959ddf6 by Victor Stinner in branch 'default': (Merge 3.3)

[issue17702] os.environ converts key type from string to bytes in KeyError exception

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: This patch introduces a bit ugly traceback. It is now fixed, thanks for the report! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17702 ___

[issue18586] Allow running benchmarks for Python 3 from same directory

2013-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset b868d0a9c5d7 by Brett Cannon in branch 'default': Issue #18586: Remove the need for make_perf3.sh http://hg.python.org/benchmarks/rev/b868d0a9c5d7 -- nosy: +python-dev ___ Python tracker

[issue18586] Allow running benchmarks for Python 3 from same directory

2013-08-23 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18586 ___

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 79007c4244d6 by Barry Warsaw in branch '2.6': - Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes http://hg.python.org/cpython/rev/79007c4244d6 -- ___ Python tracker

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread Armin Rigo
Armin Rigo added the comment: @Serhiy: it would certainly break a program that tries to call the repr() and catches the UnicodeEncodeError to do something else, like encode the data differently. -- ___ Python tracker rep...@bugs.python.org

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-23 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch with a more robust test: the previous test worked, but assume that only stdin, stdout and stderr FDs would be open in the child process. This might not hold anymore in a near future (/dev/urandom persistent FD). The new test is much

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: I don't understand why os.dup2() is more reliable than os.pipe() for a unit test? Is subprocess_close-default-1.diff portable? test_os uses hasattr(os, dup2). In Modules/posixmodule.c, it looks like the function is always defined!? --

[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2013-08-23 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17213 ___ ___

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: .__repr__() is not really allowed to return Unicode objects in Python 2.x. If you do this, you're on your own. The CPython internals try to convert any non-str object to a str object, but this is only done to assure that PyObject_Repr() always returns a

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Attached patch solves the issue and removes the repr()-based hack in the gdb plugin. -- Added file: http://bugs.python.org/file31444/gdb_sets_repr2.patch ___ Python tracker rep...@bugs.python.org

[issue18822] poor proxyval() coverage in test_gdb

2013-08-23 Thread Antoine Pitrou
New submission from Antoine Pitrou: The proxyval() of many built-in types doesn't seem covered by test_gdb, as write_repr() is specialized for most of them. (check: add 1/0 to one of those proxyval() implementations and watch test_gdb succeed) -- components: Tests messages: 195998

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch for 3.3/3.4. -- keywords: +patch stage: needs patch - patch review versions: -Python 2.7 Added file: http://bugs.python.org/file31445/subinterp_threads.patch ___ Python tracker rep...@bugs.python.org

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-23 Thread Charles-François Natali
Charles-François Natali added the comment: I don't understand why os.dup2() is more reliable than os.pipe() for a unit test? I use dup2() because it allows me to specify a target FD, so the parent can know precisely which FD was opened by the preexec hook, and check it's closed in the child

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: the parent can know precisely which FD was opened by the preexec hook, and check it's closed in the child process. Oh ok, I see: +self.assertNotIn(fd, remaining_fds) You might also add a check: self.assertLessEqual(remaining_fds, {0, 1, 2})

[issue11619] On Windows, don't encode filenames in the import machinery

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue because some users are now requesting this feature. I updated parser_unicode.patch to the last Python version. The new patch has just a minor nit: test_symtable does crash :-D I will investigate the crash later. -- resolution:

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: I'd suggest closing this as won't fix. Agreed, it's time to upgrade to Python 3! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5876

[issue18776] atexit error display behavior changed in python 3

2013-08-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18776 ___ ___

[issue18760] Fix internal doc references for the xml package

2013-08-23 Thread Ezio Melotti
Ezio Melotti added the comment: Serhiy, you forgot to attach the patch. -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18760 ___

[issue13758] compile() should not encode 'filename' (at least on Windows)

2013-08-23 Thread STINNER Victor
STINNER Victor added the comment: Victor, do you have any opinion on this unicode filename issue? I closed the issue #11619 in january 2013 before there was no user requesting the feature. I just reopened the issue because users now ask for it. --

[issue18774] There is still last bit of GNU Pth code in signalmodule.c

2013-08-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- Removed message: http://bugs.python.org/msg195643 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18774 ___

[issue17618] base85 encoding

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy, Martin, is one of you still working on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17618 ___

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with tests and documentation. For the documentation I hope on your help. -- Added file: http://bugs.python.org/file31447/empty_pythonioencoding_3.patch ___ Python tracker rep...@bugs.python.org

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It depends on sys.getdefaultencoding() which can be modified in the site module (or in a PYTHONSTARTUP script) using sys.setdefaultencoding(). Of course. Every successful without patch repr() will left same with patch. However the patch allows you to see

[issue18817] Got resource warning when running Lib/aifc.py

2013-08-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18817 ___ ___

[issue18817] Got resource warning when running Lib/aifc.py

2013-08-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18817 ___

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0e9ba7b26d5 by Brett Cannon in branch 'default': Issue #18394: Explicitly close the file object cgi.FieldStorage http://hg.python.org/cpython/rev/c0e9ba7b26d5 -- nosy: +python-dev ___ Python tracker

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: I managed to write a similar patch to Vajrasky independently, so at least I know the approach is reasonable. =) I'm not backporting since it really isn't that critical; I fixed it just to turn off the ResourceWarning while running the test suite. --

[issue18760] Fix internal doc references for the xml package

2013-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry. Can't believe I done it again. -- keywords: +patch Added file: http://bugs.python.org/file31448/refs.xml.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18760

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Seems fixed now. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732

[issue18757] Fix internal references for concurrent modules

2013-08-23 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18757 ___ ___

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2013-08-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Serhiy Storchaka wrote: .__repr__() is not really allowed to return Unicode objects in Python 2.x. If you do this, you're on your own. PyObject_Repr() contains a code which converts unicode to str and raise an exception if __repr__() result is not

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +georg.brandl stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18795 ___

[issue18796] Wrong documentation of show_code function from dis module

2013-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64678369c4d0 by Ezio Melotti in branch 'default': #18796: improve documentation of the file argument of dis.show_code. Initial patch by Vajrasky Kok. http://hg.python.org/cpython/rev/64678369c4d0 -- nosy: +python-dev

[issue18796] Wrong documentation of show_code function from dis module

2013-08-23 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed type: - enhancement ___ Python tracker

[issue18756] os.urandom() fails under high load

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, you're gonna laugh, the simplified patch has a complication (not theoretical, it would trip test_cmd_line). Attaching patch. -- Added file: http://bugs.python.org/file31449/persistent_urandom_fd4.patch ___

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-23 Thread Eric Snow
Eric Snow added the comment: Isn't this related somewhat to #7732? -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18810 ___ ___

[issue18798] Typo and unused variables in test fcntl

2013-08-23 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed type: - enhancement versions: +Python 2.7, Python 3.3

[issue18798] Typo and unused variables in test fcntl

2013-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7bac470951b by Ezio Melotti in branch '2.7': #18798: fix typo in test_fcntl. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/d7bac470951b New changeset 41c90b8f49d9 by Ezio Melotti in branch '3.3': #18798: fix typo in test_fcntl. Patch

  1   2   >