[issue14678] Update zipimport to support importlib.invalidate_caches()
Nick Coghlan ncogh...@gmail.com added the comment: Moving zipimporter to Python code is harder than it sounds: we don't want to break the ability to ship the standard library itself inside a zipfile. If you try to move zipimporter to pure Python, you could easily end up with a *very* ugly bootstrapping problem, on par with that already encountered when hacking on importlib._bootstrap. In fact, the path of least resistance here might actually be to implement zipimporter directly *in* importlib._bootstrap. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14678 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14702] os.makedirs breaks under autofs directories
Hynek Schlawack h...@ox.cx added the comment: David: What do you mean? I'd just catch EPERM and look whether the directory appeared in the meantime. If it exists, continue. If not: re-raise. Am I missing something? I may have a look at GNU mkdir if it doesn't help. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14727] test_multiprocessing failure under Linux
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: I've recently started seeing this failure repeatably on Linux (Ubuntu Jaunty): [195/364] test_multiprocessing Process Process-133: Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap self.run() File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 95, in run self._target(*self._args, **self._kwargs) File /home/vinay/projects/python/default/Lib/test/test_multiprocessing.py, line 2005, in _remote client.connect(address) ConnectionRefusedError: [Errno 111] Connection refused /home/vinay/projects/python/default/Lib/multiprocessing/process.py:274: ResourceWarning: unclosed socket.socket object, fd=15, family=2, type=1, proto=0 traceback.print_exc() -- components: Tests messages: 159981 nosy: sbt, vinay.sajip priority: normal severity: normal status: open title: test_multiprocessing failure under Linux type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: The AssertionError in Brian's initial post indicates that the test is too restrictive. Though the discussion here has talked about removing the popups altogether, the test passes on Windows with a small change: instead of assertEqual(), I used self.assertTrue(err.rstrip().startswith( b'Fatal Python error:' b' PyThreadState_Get: no current thread')) Patch attached. As this seems to be a sufficiently specific test, but not too specific, I'd like to apply this patch soon, unless someone thinks the test needs to stay exactly like it is. -- nosy: +vinay.sajip Added file: http://bugs.python.org/file25457/test_capi.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14684] zlib set dictionary support inflateSetDictionary
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14702] os.makedirs breaks under autofs directories
Charles-François Natali neolo...@free.fr added the comment: To me, this doesn't look like a os.makedirs() bug, but rather an autofs one (didn't know it was still in use). I don't like the idea of adding such a kludge (i.e. catching EPERM and checking whether the directory appeared in between). Could you please provide an strace output of both os.makedirs() and mkdir -p? Thanks. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14468] Update cloning guidelines in devguide
Sandro Tosi sandro.t...@gmail.com added the comment: Here's the proposed patch. I'm sorry but probably 'hg diff' went too wild, and since I moved the Using several working copies as the first sub-paragraph of Forward-Porting it seems it got confused, so the diff is not so clean. I've also changed quite some part of Porting Within * sections - please look at them carefully since it's not that evident. A brief list is: - change in commands to reflect the multi-clone setup - add of Assuming all your clones are in the same directory - add of The import is possible... sentence -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file25458/issue14468.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14728] trace function not set, causing some Pdb commands to fail
New submission from Xavier de Gaye xdeg...@gmail.com: The issue 13183 raises the problem that when the trace function is not set in the caller frame, the step command fails at a return statement. This new issue raises the point that, for the same reason: * the next, until and return statements fail also at a return statement when the caller frame does not have a trace function * when the user runs the up and down commands at any line in a frame to select a new frame, then the next, until or return commands fail when the selected frame does not have a trace function The attached patch fixes all those problems (by first removing the changes made in bdb.py at issue 13183). After the patch, the implementation ensures now that self.stopframe is either None, or belongs to the stack frame in the interval [self.botframe, self._curframe] and that it is set to self.botframe when the debugging session terminates. This allows removing the while loop in stop_here with an improvement in the performance of Pdb (since stop_here may be called at each line, even when no breakpoint is set in the function). The patch applies to the default branch and includes 5 new test cases. A patch for 2.7 will be submitted later. -- components: Library (Lib) files: pdb.patch keywords: patch messages: 159985 nosy: xdegaye priority: normal severity: normal status: open title: trace function not set, causing some Pdb commands to fail type: behavior versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25459/pdb.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14728 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14729] test_faulthandler test is too specific to work on Windows
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: In test_faulthandler.test_check_fatal_error, the test expects a response which matches ^Fatal Python error: {name} {header}: File string, line {lineno} in module$ .strip() On Windows, some more information is appended to the end of the message, so the match fails because of the trailing $. I propose to remove this $, so that the match succeeds just on the basis of the prefix. Patch attached; I'll apply it soon, assuming you don't object. -- components: Tests files: test_faulthandler.diff keywords: patch messages: 159986 nosy: haypo, vinay.sajip priority: normal severity: normal status: open title: test_faulthandler test is too specific to work on Windows versions: Python 3.3 Added file: http://bugs.python.org/file25460/test_faulthandler.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14727] test_multiprocessing failure under Linux
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Some more information: after the above-described appears, the test hangs. When interrupted with a Ctrl+C, this is displayed: ^CProcess PoolWorker-104: Process PoolWorker-102: Process PoolWorker-105:1: Process PoolWorker-101: Process PoolWorker-105:4: Process PoolWorker-105:3: Process PoolWorker-105:2: Process PoolWorker-103: Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Process Process-132: Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 258, in _bootstrap Warning -- threading._dangling was modified by test_multiprocessing Warning -- multiprocessing.process._dangling was modified by test_multiprocessing self.run() File /home/vinay/projects/python/default/Lib/multiprocessing/process.py, line 95, in run self._target(*self._args, **self._kwargs) File /home/vinay/projects/python/default/Lib/test/test_multiprocessing.py, line 1989, in _listener new_conn, addr = l.accept() File /home/vinay/projects/python/default/Lib/socket.py, line 135, in accept fd, addr = self._accept() KeyboardInterrupt /home/vinay/projects/python/default/Lib/multiprocessing/process.py:274: ResourceWarning: unclosed socket.socket object, fd=17, family=2, type=1, proto=0 traceback.print_exc() test test_multiprocessing crashed -- Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/test/test_multiprocessing.py, line 2825, in test_main run(suite) File /home/vinay/projects/python/default/Lib/test/support.py, line 1407, in run_unittest _run_suite(suite) File /home/vinay/projects/python/default/Lib/test/support.py, line 1373, in _run_suite result = runner.run(suite) File /home/vinay/projects/python/default/Lib/test/support.py, line 1272, in run test(result) File /home/vinay/projects/python/default/Lib/unittest/suite.py, line 67, in __call__ return self.run(*args, **kwds) File /home/vinay/projects/python/default/Lib/unittest/suite.py, line 105, in run test(result) File /home/vinay/projects/python/default/Lib/unittest/suite.py, line 67, in __call__ return self.run(*args, **kwds) File /home/vinay/projects/python/default/Lib/unittest/suite.py, line 105, in run test(result) File /home/vinay/projects/python/default/Lib/unittest/suite.py, line 67, in __call__ return self.run(*args, **kwds) File /home/vinay/projects/python/default/Lib/unittest/suite.py, line 105, in run test(result) File /home/vinay/projects/python/default/Lib/unittest/case.py, line 492, in __call__ return self.run(*args, **kwds) File /home/vinay/projects/python/default/Lib/unittest/case.py, line 440, in run self._executeTestPart(testMethod, outcome, isTest=True) File /home/vinay/projects/python/default/Lib/unittest/case.py, line 385, in _executeTestPart function() File /home/vinay/projects/python/default/Lib/test/test_multiprocessing.py, line 2038, in test_pickling new_conn = lconn.recv() File /home/vinay/projects/python/default/Lib/multiprocessing/connection.py, line 252, in recv buf = self._recv_bytes() File /home/vinay/projects/python/default/Lib/multiprocessing/connection.py, line 398, in _recv_bytes buf = self._recv(4) File /home/vinay/projects/python/default/Lib/multiprocessing/connection.py, line 377, in _recv chunk = read(handle, remaining) KeyboardInterrupt During handling of the above exception, another exception occurred: Traceback (most recent call last): File /home/vinay/projects/python/default/Lib/multiprocessing/managers.py, line 729, in _callmethod conn = self._tls.connection AttributeError: 'ForkAwareLocal' object has no attribute 'connection' During handling of the above exception, another exception occurred: Traceback (most recent call last): File Lib/test/regrtest.py, line 1237, in runtest_inner File
[issue14702] os.makedirs breaks under autofs directories
Hynek Schlawack h...@ox.cx added the comment: Charles, I don't think you can blame autofs here. The problem at hand is that makedirs() never checks whether the directory exists (that would trigger the mount too I presume). Instead, it tries a mkdir and looks if it gets an EEXIST. If you try that approach in this case where /net is non-writable and /net/prodigy appears only on demand, it fails with an EPERM instead. Have a look at http://hg.python.org/cpython/file/8215aaccc9dd/Lib/os.py#l136 especially line 151. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14726] Lib/email/*.py use an EMPTYSTRING global instead of ''
R. David Murray rdmur...@bitdance.com added the comment: Good enough for me. I personally don't find it to be easier or harder to read with the names, so let's keep them. -- resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14726 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14702] os.makedirs breaks under autofs directories
Charles-François Natali neolo...@free.fr added the comment: Charles, I don't think you can blame autofs here. The problem at hand is that makedirs() never checks whether the directory exists (that would trigger the mount too I presume). Yes, it does. Have a look at line 148: if head and tail and not path.exists(head): Instead, it tries a mkdir and looks if it gets an EEXIST. Actually, EEXIST is just caught to cope with race conditions (i.e. the directory got created in between, TOCTTOU race). If you try that approach in this case where /net is non-writable and /net/prodigy appears only on demand, it fails with an EPERM instead. Actually, no. makedirs() does a recursive depth-first traversal: makedirs('/net/prodigy/foo') will actually do something like: stat('/net/prodigy/foo') == ENOENT stat('/net/prodigy') == ENONENT mkdir('/net/prodigy') == EPERM The NFS mount should appear upon the first - or second - stat() call, before mkdir(). But I'd like to be sure about that, that's why I think an strace() output would be useful ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14702] os.makedirs breaks under autofs directories
R. David Murray rdmur...@bitdance.com added the comment: Hynek: you said just like EEXIST, which doesn't check to see if the directory exists before continuing, thus my confusion. If mkdir -p does a stat first, then changing the makedirs algorithm to match is probably not a bad idea for OS compatibility reasons, with autofs just being an example of why. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14729] test_faulthandler test is too specific to work on Windows
STINNER Victor victor.stin...@gmail.com added the comment: On Windows, some more information is appended to the end of the message (...) Which information? What do write these information? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14702] os.makedirs breaks under autofs directories
Hynek Schlawack h...@ox.cx added the comment: Charles, I don't think you can blame autofs here. The problem at hand is that makedirs() never checks whether the directory exists (that would trigger the mount too I presume). Yes, it does. Have a look at line 148: if head and tail and not path.exists(head): Now that's embarrassing. I take everything back and claim the opposite. If you try that approach in this case where /net is non-writable and /net/prodigy appears only on demand, it fails with an EPERM instead. Actually, no. makedirs() does a recursive depth-first traversal: makedirs('/net/prodigy/foo') will actually do something like: stat('/net/prodigy/foo') == ENOENT stat('/net/prodigy') == ENONENT mkdir('/net/prodigy') == EPERM The NFS mount should appear upon the first - or second - stat() call, before mkdir(). But I'd like to be sure about that, that's why I think an strace() output would be useful ;-) I glanced over coreutil's mkdir code and it seems that it changes the directory while creating the directories. I suspect it's related to that. At least it does no fstab parsing. ;) The code is wayyy too intricate to be grokable at glancing though. mkdir -p seems to be quite a can of worms. Andrew, please send straces. :) -- keywords: -easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14730] Implementation of the PEP 419
New submission from Paul Colomiets p...@colomiets.name: Attached patch is a partial implementation of PEP 419, it lacks inspect module functions and requires more unit tests. -- components: Interpreter Core files: cleanuphook.patch keywords: patch messages: 159994 nosy: tailhook priority: normal severity: normal status: open title: Implementation of the PEP 419 type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file25461/cleanuphook.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14729] test_faulthandler test is too specific to work on Windows
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Which information? What do write these information? The Windows error message has the same beginning, but an additional This application has requested the Runtime to terminate it in an unusual way.\nPlease contact the application's support team for more information. I believe this is added by Microsoft libraries - it's doesn't come from Python AFAIK. See #9116 for a similar problem (look only at the initial report - most of the following comments go off at a tangent about preventing debugger popups). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14728] trace function not set, causing some Pdb commands to fail
Xavier de Gaye xdeg...@gmail.com added the comment: Uploaded pdb_default.patch that applies on the default branch with minor changes to the initial pdb.patch. -- Added file: http://bugs.python.org/file25463/pdb_default.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14728 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14728] trace function not set, causing some Pdb commands to fail
Xavier de Gaye xdeg...@gmail.com added the comment: Uploaded pdb_2.7.patch that applies on the 2.7 branch. -- Added file: http://bugs.python.org/file25464/pdb_2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14728 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13815] tarfile.ExFileObject can't be wrapped using io.TextIOWrapper
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 254cb4f5d0ff by Lars Gustäbel in branch 'default': Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects. http://hg.python.org/cpython/rev/254cb4f5d0ff -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13815 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Larry Hastings la...@hastings.org added the comment: Attached is rev 3 of my patch, incorporating mainly backing out of dumb ideas. Thanks for the feedback, Serhiy and Mark! My name is Serhiy. :) My genuine apologies! In my defense it was rather late. 'P' has the advantage that you can safely backward-compatibly remove the restriction by replacing 'P' on 'p'. :) That's not a reason to use 'P'. Why you should use 'P' in the first place? In this line in the patch (Python/getargs.c): +if (val == -1 || PyErr_Occurred()) { Isn't that call to PyErr_Occurred() redundant? Certainly one of the two expressions is! My thinking was: if the call fails, then the val == -1 will be an early-exit and we can save the call to PyErr_Occurred. This was always a dumb idea, as the 99.99% case is that PyObject_IsTrue succeeds, in which case we would have called PyErr_Occured anyway. Some savings! I can't find any documentation on permitted return values from nb_bool. However, PyObject_IsTrue itself says about its own return value: /* if it is negative, it should be either -1 or -2 */ So I definitely shouldn't check specifically for -1. Having meditated on it, I think either I should either just call PyErr_Occured, check for explicit failure (val 0), or explicit success (val = 0). I've opted for the last of those. I considered briefly trying to make 'P' handle subclasses of bool. But then I hit the problem of: okay, what now? Call nb_bool? I note that bool itself doesn't define nb_bool. Anyway, what lunatic would subclass bool? I'm really on the fence about 'P'. Serhiy is definitely pro-, everyone else seems to think it shouldn't be used. However nobody has argued against its inclusion. At the moment I'm -0 on it myself, but since the code is written... Do we have an anti-champion? -- Added file: http://bugs.python.org/file25465/larry.parse.tuple.p.and.P.3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Benjamin Peterson benja...@python.org added the comment: Since no one has produced a good example needing P, I say drop it. At any rate, it can be almost trivially imitated with O!. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13815] tarfile.ExFileObject can't be wrapped using io.TextIOWrapper
Lars Gustäbel l...@gustaebel.de added the comment: I did some tarfile spring cleaning: I removed the ExFileObject class completely as it was more or less a leftover from the old days. io.BufferedReader now does the job. So, as a side-effect, I close this issue as fixed. (BTW, this makes tarfile.py smaller by about 100 lines.) -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13815 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Georg Brandl ge...@python.org added the comment: Indeed, because the code is written is not a good argument if even you yourself are -0. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14684] zlib set dictionary support inflateSetDictionary
Nadeem Vawda nadeem.va...@gmail.com added the comment: I've posted a review on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Mark Dickinson dicki...@gmail.com added the comment: Having meditated on it, I think either I should either just call PyErr_Occured, check for explicit failure (val 0), or explicit success (val = 0). I've opted for the last of those. Yes, I think that works; it avoids a relatively expensive PyErr_Occurred() call in the non-failure case. The new code looks fine to me! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Mark Dickinson dicki...@gmail.com added the comment: I considered briefly trying to make 'P' handle subclasses of bool. Not an issue: bool can't be subclassed. :-) Python 3.2.3 (default, Apr 13 2012, 00:15:25) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type help, copyright, credits or license for more information. class MyBool(bool): ... pass ... Traceback (most recent call last): File stdin, line 1, in module TypeError: type 'bool' is not an acceptable base type -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Serhiy Storchaka storch...@gmail.com added the comment: That's not a reason to use 'P'. Why you should use 'P' in the first place? I just guided by the principle Explicit is better than implicit. Statements 'if' and 'while' I consider explicit and expect cast to bool. Implicit cast to bool in the transfer of parameter causes discomfort (no one (no one Pythonist) expects the implicit cast to str). Unfortunately, for historical reasons, there is a lot of code, where the parameters are casted to bool or int is used instead of bool. Therefore, we cannot simply enter the restrictions. Well, I was certainly wrong. Don't let me mislead you. Anyway, what lunatic would subclass bool? Class bool cannot be subclassed further. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Larry Hastings la...@hastings.org added the comment: Serhiy, I'm having a little trouble with your English. (But I'm sure your English is far better than my... uh, anything besides English.) So let me ask a question with a clear yes/no answer: Do you still think 'P' is better than 'p'? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14725] test_multiprocessing failure under Windows
Richard Oudkerk shibt...@gmail.com added the comment: The documentation page for ConnectNamedPipe (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365146(v=vs.85).aspx) has a community addition which says that ConnectNamedPipe will appear to fail with ERROR_NO_DATA (232) if a client has previously connected, written some data and disconnected. That seems to be what is happening. For example Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import multiprocessing.connection as con l = con.Listener() c = con.Client(l.address) c.send(hello) c.close() l.accept() Traceback (most recent call last): File stdin, line 1, in module File c:\Python27\lib\multiprocessing\connection.py, line 145, in accept c = self._listener.accept() File c:\Python27\lib\multiprocessing\connection.py, line 345, in accept win32.ConnectNamedPipe(handle, win32.NULL) WindowsError: [Error 232] The pipe is being closed I will look in to it. The community addition says to just treat ERROR_NO_DATA as success. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14725 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*
Serhiy Storchaka storch...@gmail.com added the comment: No one integer produces infinity in 'double' parameter parsing. But the 'float' parameter parsing can produce infinity, and it can raise an exception. To be consistent, we need or produce infinity on double overflow (in this case, we must explicitly produce infinity on float overflow), or to raise an exception on float overflow. There is also a third option -- deprecate the 'float' parameter parsing. Leave the responsibility for the proper overflow handling on the user. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14722 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14730] Implementation of the PEP 419: Protecting cleanup statements from interruptions
Changes by R. David Murray rdmur...@bitdance.com: -- title: Implementation of the PEP 419 - Implementation of the PEP 419: Protecting cleanup statements from interruptions ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14654] Faster utf-8 decoding
Serhiy Storchaka storch...@gmail.com added the comment: Well, it seems, 64-bit processors are smart enough to not feel the need for this optimization. On 32-bit platforms I see a noticeable increase in speed. I am now working on a more advanced optimization, which now shows a gain of +20-60% compared with the previous patches, but I hope to increase a gain by +50%-100%. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14082] shutil doesn't copy extended attributes
Antoine Pitrou pit...@free.fr added the comment: The copyxattr() function should be private (_copyxattr()). For some reason the tests are failing here: == ERROR: test_copy2_xattr (test.test_shutil.TestShutil) -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/test/test_shutil.py, line 410, in test_copy2_xattr os.setxattr(src, 'user.foo', b'42') OSError: [Errno 95] Operation not supported == ERROR: test_copyxattr (test.test_shutil.TestShutil) -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/test/test_shutil.py, line 296, in test_copyxattr os.setxattr(src, 'user.foo', b'42') OSError: [Errno 95] Operation not supported -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Serhiy Storchaka storch...@gmail.com added the comment: Do you still think 'P' is better than 'p'? No. I hope I haven't made a lot of mistakes in the previous sentence. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Antoine Pitrou pit...@free.fr added the comment: Updated patch also makes PyImport_ImportModuleNoBlock a simple alias of PyImport_ImportModule. -- Added file: http://bugs.python.org/file25466/module_locks4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14731] Enhance Policy framework in preparation for adding eamil6 policy as provisional
New submission from R. David Murray rdmur...@bitdance.com: As discussed in my email to python-dev, I'm planning to add the new header parsing to Python 3.3 as a provisional extension, by adding a (set) of policies that are clearly marked provisional in the documentation. In order for this to work, I first need to make certain enhancements to the Policy framework that I previously committed to default. When reviewing the patch, please start with the 'architecture.rst' file in the Lib/email directory, which provides an overview of the changes and the plan. The primary changes are to add some new policy hooks that feedparser, message, and generator call. These hooks are then implemented on the renamed default policy (now called 'compat32') in such a way as to replicate the behavior of Python 3.2. The other significant change is that Message objects now have a policy. In order to accommodate this, this patch adds 'policy propagation' logic. That is, if you pass a policy to feedparser, then all the Message objects it creates get that policy. And when you flatten a message with a Generator, it uses the policy attached to the message unless you explicitly override it. I also factored policy into _basepolicy.py and policy.py. This doesn't mean much for this patch, but when the new policies land they go in policy.py, while the default policy is imported from _policybase. This means that if a Python 3.3 program does not explicitly use a policy, it will not import any of the new code. The remaining changes in the patch are some test reorganization. Since the goal is now 100% backward compatibility with Python 3.2 (including bugs in some cases), the patch removes some tests that were previously added to test.test_email.test_email and puts them into module specific test files (test_generator, test_parser, test_policy). Additional tests are also added. The end result of the test refactoring is that if you diff test_email.py after this patch against the 3.2 test_email.py, you should find a few places where the scaffolding is changed and the addition of some tests for bug fixes in the 3.2 code. Otherwise the tests should be identical to 3.2, with all the policy related tests moving into test_policy. The longer term plan for this is to replicate all of the test_email.py tests in appropriate module-specific test files (I've already marked a few such tests that got replicated in test_policy). By the time we get to Python4 the plan is for all the tests to be replicated, so that we can at that point drop compat32 by removing the policy and the test_email.py test file, as well as the code that will be at that point obsolete. The primary review here should be to make sure I am in fact producing 100% backward compatibility. Any other review comments will be welcome, of course. PS: I also changed the 'must_be_7bit' policy control, whose name I never liked, to be 'cte_type', which can be '7bit' or '8bit'. As noted in the architecture.rst file, the extra motivation for this is that there will eventually be a 'cte_type=unicode' which will support unicode display of formatted messages and, perhaps even more important, rfc 5335. -- hgrepos: 121 messages: 160015 nosy: barry, r.david.murray priority: normal severity: normal stage: patch review status: open title: Enhance Policy framework in preparation for adding eamil6 policy as provisional type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14731] Enhance Policy framework in preparation for adding eamil6 policy as provisional
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +patch Added file: http://bugs.python.org/file25467/676f9c8c28c6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Larry Hastings la...@hastings.org added the comment: I hope I haven't made a lot of mistakes in the previous sentence. It depends, do you consider three a lot? ;-) Attached is a new patch removing 'P'. (The regrtest is still running but I don't expect any failures.) I'm guessing I won't get any further feedback. So unless I hear otherwise I'll check it in tomorrow. -- Added file: http://bugs.python.org/file25468/larry.parse.tuple.p.4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14731] Enhance Policy framework in preparation for adding email6 policies as provisional
Changes by R. David Murray rdmur...@bitdance.com: -- title: Enhance Policy framework in preparation for adding eamil6 policy as provisional - Enhance Policy framework in preparation for adding email6 policies as provisional ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file25466/module_locks4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file25469/module_locks4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14725] test_multiprocessing failure under Windows
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 44f078ea05f3 by Richard Oudkerk in branch 'default': Fix for Issue 14725 for 3.3 branch. http://hg.python.org/cpython/rev/44f078ea05f3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14725 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14082] shutil doesn't copy extended attributes
Hynek Schlawack h...@ox.cx added the comment: The copyxattr() function should be private (_copyxattr()). Ok. I presumed that not adding it to __all__ is private enough. For some reason the tests are failing here: == ERROR: test_copy2_xattr (test.test_shutil.TestShutil) -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/test/test_shutil.py, line 410, in test_copy2_xattr os.setxattr(src, 'user.foo', b'42') OSError: [Errno 95] Operation not supported == ERROR: test_copyxattr (test.test_shutil.TestShutil) -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/test/test_shutil.py, line 296, in test_copyxattr os.setxattr(src, 'user.foo', b'42') OSError: [Errno 95] Operation not supported Looks like your file system Python uses for tmp files doesn't support xattr. That's bad because you can't verify. How should I cope with that? try/catch on the first setxattr() and skip the test if it fails? Is the an official way to do that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14731] Enhance Policy framework in preparation for adding email6 policies as provisional
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Mark Dickinson dicki...@gmail.com added the comment: Latest patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14654] Faster utf-8 decoding
Martin v. Löwis mar...@v.loewis.de added the comment: I'll be closing this issue at this point. Serhiy: I don't think the bug tracker should be used to evolve work in progress (except when responding to reviews received). Use a Mercurial clone for that instead. By posting a patch here, you are requesting that it be reviewed and considered - please understand that you consume a lot of people's time by such a posting. At this point, it appears that you don't intend to submit any of these patches for inclusion into Python. If you ever do want to contribute something in this area, please create a new issue. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Antoine Pitrou pit...@free.fr added the comment: Updated patch also adds unit tests for the module locks and the deadlock avoidance algorithm. -- Added file: http://bugs.python.org/file25470/module_locks5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14678] Update zipimport to support importlib.invalidate_caches()
Brett Cannon br...@python.org added the comment: The real problem becomes the issue of what zipfile depends on, which complicates bootstrapping. I mean things could go as far as to write a script that takes in anchor points in the stdlib and freezes all code they depend on, but that seems like potential overkill and executable bloat. But something needs to happen as zipimporter has major shortcomings thanks to to its re-implementation of zip handling (e.g. no ZIP64 support, etc.). Plus no one ever wants to touch that code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14678 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Antoine Pitrou pit...@free.fr added the comment: Updated patch with a couple new tests. -- stage: - patch review Added file: http://bugs.python.org/file25471/module_locks6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Martin v. Löwis mar...@v.loewis.de added the comment: I still wonder whether Graham Dumpleton's observation has merits. Suppose we have these modules # a.py time.sleep(10) import b # b.py time.sleep(10) import a # main.py def x(): import a def y(): import b Now, if x and y are executed in separate threads - won't it deadlock? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14678] Update zipimport to support importlib.invalidate_caches()
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14678 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14654] Faster utf-8 decoding
Antoine Pitrou pit...@free.fr added the comment: I'll be closing this issue at this point. Serhiy: I don't think the bug tracker should be used to evolve work in progress (except when responding to reviews received). Use a Mercurial clone for that instead. By posting a patch here, you are requesting that it be reviewed and considered - please understand that you consume a lot of people's time by such a posting. That's not very nice. If Serhiy wants feedback on his work, he definitely has to post *somewhere*. The bug tracker sounds like a reasonable place (certainly more reasonable than python-dev). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Antoine Pitrou pit...@free.fr added the comment: Now, if x and y are executed in separate threads - won't it deadlock? Well, the patch has a deadlock avoidance mechanism, and it includes unit tests for precisely this situation. I cannot promise the algorithm is perfect (although there *are* a bunch of tests), but it looks correct from here. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14082] shutil doesn't copy extended attributes
Antoine Pitrou pit...@free.fr added the comment: Looks like your file system Python uses for tmp files doesn't support xattr. That's bad because you can't verify. How should I cope with that? try/catch on the first setxattr() and skip the test if it fails? Is the an official way to do that? Well, apparently the extended attributes tests in test_os get skipped with the following message: no non-broken extended attribute support. Perhaps you need the same condition somewhere. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14684] zlib set dictionary support inflateSetDictionary
Sam Rushing rushing@gmail.com added the comment: renames dict-zdict, splits the test, adds BEGIN/END around inflate call. -- Added file: http://bugs.python.org/file25472/zlib_set_dictionary_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Martin v. Löwis mar...@v.loewis.de added the comment: Can you please elaborate in the patch what the deadlock avoidance does? AFAICT, the comment explains that it is able to detect deadlocks, but nowhere says what it does when it has detected a deadlock. Also, please submit patches against default's head, or stop using git-style diffs, to enable Rietveld review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14729] test_faulthandler test is too specific to work on Windows
Stefan Krah stefan-use...@bytereef.org added the comment: Vinay's patch solves the problem. +1 for committing. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows
Stefan Krah stefan-use...@bytereef.org added the comment: I tested the patch, it works fine. I can't test the popup situation since I currently only have ssh access. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14732] PEP 3121 Refactoring applied to _csv module
New submission from Robin Schreiber robin.schrei...@me.com: This patch presents my first try to apply the proposed Refactoring of PEP3121 to the csv module. I have identified three mutable global variables inside the module, two of which are references to PyObjects. I have wrapped all of them inside a dedicated struct, which is traversed by the gc after freeing the module. I also defined some macros, to hide functions calls that are now needed because of the newly introduced indirections. -- components: Extension Modules files: csv_pep3121.patch keywords: patch messages: 160032 nosy: Robin.Schreiber priority: normal severity: normal status: open title: PEP 3121 Refactoring applied to _csv module type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file25473/csv_pep3121.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14732] PEP 3121 Refactoring applied to _csv module
Robin Schreiber robin.schrei...@me.com added the comment: The following script should fail before you have applied the bespoken patch: It basically checks wether one of the global PyObjects inside the csv module is being deleted after freeing the csv module. -- Added file: http://bugs.python.org/file25474/refactoring_test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Antoine Pitrou pit...@free.fr added the comment: Updated patch against tip, and with a comment of what deadlock avoidance does (in _ModuleLock.acquire's docstring). -- Added file: http://bugs.python.org/file25475/module_locks7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14733] Custom commands don't work
New submission from Janusz Lewandowski le...@xtreeme.org: Running (by pysetup run cmdname) custom commands doesn't work, because setup.cfg is parsed after command handling. I've attached a patch to fix this behavior. -- assignee: eric.araujo components: Distutils2 files: fix-custom-commands.patch keywords: patch messages: 160035 nosy: LEW21, alexis, eric.araujo, tarek priority: normal severity: normal status: open title: Custom commands don't work type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file25476/fix-custom-commands.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14733 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14725] test_multiprocessing failure under Windows
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 35ef949e85d7 by Richard Oudkerk in branch '2.7': Fix for issue 14725 for 2.7 branch http://hg.python.org/cpython/rev/35ef949e85d7 New changeset afab4d14d5e7 by Richard Oudkerk in branch '3.2': Fix for issue 14725 for 3.2 branch http://hg.python.org/cpython/rev/afab4d14d5e7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14725 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9260] A finer grained import lock
Martin v. Löwis mar...@v.loewis.de added the comment: The patch parser of Rietveld actually choked on the git binary diff. It now skips over these chunks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14734] Use binascii.b2a_qp/a2b_qp in email package header handling?
New submission from R. David Murray rdmur...@bitdance.com: Currently the email package uses its own custom quoted printable encode/decode implementation for handling header quoted printable CTE encoding and decoding. It could be that using binascii would work, and be more performant. Or it might not be, but it seems like it might be worth investigating. -- assignee: r.david.murray messages: 160038 nosy: r.david.murray priority: low severity: normal status: open title: Use binascii.b2a_qp/a2b_qp in email package header handling? type: performance versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14732] PEP 3121 Refactoring applied to _csv module
Changes by Martin v. Löwis mar...@v.loewis.de: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*
Stefan Krah stefan-use...@bytereef.org added the comment: The proposal makes sense at first glance, but I agree with Mark that it is not clear what should be done. For example, all arrays in Python silently convert to inf: from numpy import array x = array([1,2,3], 'f') x array([ 1., 2., 3.], dtype=float32) x[0] = 10**100 x array([ inf, 2., 3.], dtype=float32) Same for array.array and memoryview. I would not be surprised if users rely on this behavior. Anyway, silently converting to infinity is exactly what I'd expect (also for double BTW). Regarding undefined behavior: I only know compilers that convert to infinity without signaling overflow. The tests for the new memoryview implementation should include this case (I think!), and I ran the tests with all compilers that I've access to. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14722 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14082] shutil doesn't copy extended attributes
Hynek Schlawack h...@ox.cx added the comment: Ok, I've extracted the xattr checker from test_os.py and transformed it into a caching decorator like skip_unless_symlinks. _copyxattr rename is also done. -- Added file: http://bugs.python.org/file25477/copy2-xattr-with-better-protection.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14733] Custom commands don't work
Éric Araujo mer...@netwok.org added the comment: Thanks for the report and patch. I discovered the same thing a few weeks ago when working on a bug with a contributor; I thought there was already a bug opened for that but apparently not. The fix I had in mind is the same as your patch, and I also have a test for this. This was not caught before because our tests use internal objects directly (i.e. the Distribution class), so the run function is not exercised by the test suite. Some of the tests are starting to use subprocess instead so that we can really test the script. -- versions: +3rd party, Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14733 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work
New submission from Ed Wodrich ewodri...@rainbowhaven.net: Greetings, I am a brand new user attempting to learn Python. I downloaded and installed the .msi installer version 3.2.3 on May 5, 2012. I am running Windows XP SP2 32-bit on a Pentium 4. I opted to load all features of the program. Installation finished without any errors. Admittedly, despite previous programming experience with other languages, I have a lot to learn. What I saw when I tried using the IDLE was that it would not end with ctrl-Z followed by carriage return. Using either quit() and replying to the dialog or using ctrl-d followed by carriage return worked. I am submitting this because the GUI interface and what documentation I have seen so far states that ctrl-z followed by carriage return is the method to use in Windows. IMHO possible fix options (presuming this is not something weird because I don't know what I am doing yet) would be to update the documentation for consistency or to change the behavior of the IDLE? Thank you, in advance, for your efforts with regard to this issue. Best Regards, Ed -- components: IDLE messages: 160042 nosy: ewodrich priority: normal severity: normal status: open title: Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work
Changes by Ed Wodrich ewodri...@rainbowhaven.net: -- nosy: -ewodrich ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14654] Faster utf-8 decoding
Martin v. Löwis mar...@v.loewis.de added the comment: That's not very nice. If Serhiy wants feedback on his work, he definitely has to post *somewhere*. The bug tracker sounds like a reasonable place (certainly more reasonable than python-dev). I completely disagree (and I really tried to be nice). It is my utmost belief that the tracker must not be used for work-in-progress. For any open issue, numerous people review the issue, and even if they spend only a few minutes, this easily adds up to a lot of wasted time if there isn't anything to be done about an issue. OTOH, discussing it on python-dev indeed seems more appropriate: even though the readership is larger, people know that they can safely skip over messages that clearly don't need their attention. So if Serhiy posts a message titled UTF-8 performance, people will hit the delete button very quickly if they are not interested. However, it would really be best in this case if Serhiy takes a step back, and analyzes the performance of the current decoder carefully, then proposes a patch which undoubtedly improves the performance and is meanwhile also maintainable. He may come to the conclusion that further improvement isn't really possible or reasonable, in which case it would be good if he posted his findings to python-dev. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bc6d28e726d8 by Larry Hastings in branch 'default': Issue #14705: Add 'p' format character to PyArg_ParseTuple* for bool support. http://hg.python.org/cpython/rev/bc6d28e726d8 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Larry Hastings la...@hastings.org added the comment: Eh, it was ready, why wait? Thanks everybody for your feedback! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I would have expected a bool parse code to insist on a boolean, so that: int x; PyArg_ParseTupleAndKeywords(args, kwds, p:func, x); would behave the same as: PyObject *o; int x; PyArg_ParseTupleAndKeywords(args, kwds, O!:func, PyBool_Type, o); x = o == Py_True; -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Larry Hastings la...@hastings.org added the comment: I would have expected a bool parse code to insist on a boolean, I originally had a second form ('P') that insisted on a boolean as you suggest. But nobody could come up with a use case. So I removed it in the final patch. Please see this issue for the discussion. If you have a use case for it I'd be happy to revive it and check it in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14127] add st_*time_ns fields to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 709850f1ec67 by Larry Hastings in branch 'default': Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) http://hg.python.org/cpython/rev/709850f1ec67 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 709850f1ec67 by Larry Hastings in branch 'default': Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) http://hg.python.org/cpython/rev/709850f1ec67 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10148] st_mtime differs after shutil.copy2
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 709850f1ec67 by Larry Hastings in branch 'default': Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) http://hg.python.org/cpython/rev/709850f1ec67 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14736] Add {encode, decode}_filter_properties() functions to lzma module
New submission from Nadeem Vawda nadeem.va...@gmail.com: Patch attached. Reviews welcome. -- components: Extension Modules files: lzma-properties.diff keywords: patch messages: 160051 nosy: nadeem.vawda priority: normal severity: normal stage: patch review status: open title: Add {encode,decode}_filter_properties() functions to lzma module type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file25478/lzma-properties.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Changes by Larry Hastings la...@hastings.org: -- resolution: - fixed stage: patch review - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14366] Supporting lzma compression in zip files
Nadeem Vawda nadeem.va...@gmail.com added the comment: I've put together a patch for the lzma module adding functions for encoding and decoding filter properties (see issue 14736). It's a bit bulky, though, so I'd like to get a review before committing it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14366 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14657] Avoid two importlib copies
Eric Snow ericsnowcurren...@gmail.com added the comment: Here's my take. No one will care about _frozen_importlib vs. importlib._bootstrap normally, right? If __module__/__file__ says _frozen_importlib, it's no big deal. The only time you care about the distiction for importlib._bootstrap is when you're hacking on _bootstrap.py. So let's keep the common case in sight and go from there. There are two sides to the uncommon case: 1. making sure importlib still works after hacking on _bootstrap.py (test_imp, test_import, test_importlib using your new _bootstrap.py). 2. making sure everything still works after hacking on _bootstrap.py (the whole test suite with a new importlib.h?). For the first part, let's simply ignore the pure Python importlib._bootstrap by default? Then we stick a context manager in importlib.test.util that enables it. When you're hacking on _bootstrap.py, you switch it over. The common path stays pretty clean. I've attached a patch for the first part which has similarities to Antoine's. (I didn't apply the context manager to the importlib test cases though.) For that second part, something along the lines of what Nick has posted would be pretty close, but I'm not sure it's worth it. From what I understand, Nick's patch would add yet another import (importlib) to startup to cover a situation that happens very infrequently (hacking _bootstrap.py). However, I'm torn because... ...dealing with a busted importlib.h is not fun. Is there a different approach we could take for that second part? Perhaps something like this: 1. python starts up normally. 2. we clear out all the entire import state except for builtins. 3. we stick importlib._bootstrap in place. 4. we set builtins.__import__ to importlib.__import__. 5. we re-populate sys.modules by reloading all the modules that were in there before (?). 6. we run the test suite against this new import state. 7. ... 8. profit! I'm probably missing something here, but I expect we could stick something like that in some place like importlib.test.util. Would that be sufficient to mitigate the chance of breaking importlib.h? Example of using my patch: import sys import importlib.test.util as util importlib._bootstrap module '_frozen_importlib' from 'frozen' sys.modules['importlib._bootstrap'] module '_frozen_importlib' from 'frozen' with util.bootstrap_context(importlib, importlib._pure_bootstrap): ... importlib._bootstrap ... sys.modules['importlib._bootstrap'] ... module 'importlib._bootstrap' from '/home/esnow/projects/cpython/Lib/importlib/_bootstrap.py' module 'importlib._bootstrap' from '/home/esnow/projects/cpython/Lib/importlib/_bootstrap.py' importlib._bootstrap module '_frozen_importlib' from 'frozen' sys.modules['importlib._bootstrap'] module '_frozen_importlib' from 'frozen' -- Added file: http://bugs.python.org/file25479/issue14657_safe_bootstrap.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14657 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 05274ab06182 by Larry Hastings in branch 'default': Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) http://hg.python.org/cpython/rev/05274ab06182 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10148] st_mtime differs after shutil.copy2
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 05274ab06182 by Larry Hastings in branch 'default': Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) http://hg.python.org/cpython/rev/05274ab06182 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14127] add st_*time_ns fields to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 05274ab06182 by Larry Hastings in branch 'default': Update Misc/NEWS for issues #14127 and #14705. (And, technically, #10148.) http://hg.python.org/cpython/rev/05274ab06182 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com