From report at bugs.python.org Fri Nov 1 00:36:33 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 31 Oct 2013 23:36:33 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383260353.22.0.783819472357.issue19465@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Hm... I'm trying to understand how you're using the selector in telnetlib.py (currently the only example outside asyncio). It seems you're always using it with a single file/object, which is always 'self' (which wraps a socket), except one place where you're also selecting on stdin. Sometimes you're using select(0) to check whether I/O is possible right now, using select(0), and then throw away the selector; other times you've got an actual loop. I wonder if you could just create the selector when the Telnet class is instantiated (or the first time you need the selector) and keep the socket permanently registered; IIUC selectors are level-triggered, and no resources are consumed when you're not calling its select() method. (I think this means that if the socket was ready at some point in the past, but you already read those bytes, and now you're calling select(), it won't be considered ready even though it was registered the whole time.) It still seems to me that this is pretty atypical use of selectors; the extra FD used doesn't bother me much, since it doesn't really scale anyway (that would require hooking multiple Telnet instances into the the same selector, probably using an asyncio EventLoop). If you insist on having a function that prefers poll and select over kqueue or epoll, perhaps we can come up with a slightly higher abstraction for the preference order? Maybe faster startup time vs. better scalability? (And I wouldn't be surprised if on Windows you'd still be better off using IocpProactor instead of SelectSelector -- but that of course has a different API altogether.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 00:37:13 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 31 Oct 2013 23:37:13 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383260353.22.0.783819472357.issue19465@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Hm... I'm trying to understand how you're using the selector in telnetlib.py (currently the only example outside asyncio). It seems you're always using it with a single file/object, which is always 'self' (which wraps a socket), except one place where you're also selecting on stdin. Sometimes you're using select(0) to check whether I/O is possible right now, using select(0), and then throw away the selector; other times you've got an actual loop. I wonder if you could just create the selector when the Telnet class is instantiated (or the first time you need the selector) and keep the socket permanently registered; IIUC selectors are level-triggered, and no resources are consumed when you're not calling its select() method. (I think this means that if the socket was ready at some point in the past, but you already read those bytes, and now you're calling select(), it won't be considered ready even though it was registered the whole time.) It still seems to me that this is pretty atypical use of selectors; the extra FD used doesn't bother me much, since it doesn't really scale anyway (that would require hooking multiple Telnet instances into the the same selector, probably using an asyncio EventLoop). If you insist on having a function that prefers poll and select over kqueue or epoll, perhaps we can come up with a slightly higher abstraction for the preference order? Maybe faster startup time vs. better scalability? (And I wouldn't be surprised if on Windows you'd still be better off using IocpProactor instead of SelectSelector -- but that of course has a different API altogether.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 00:39:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 23:39:46 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown Message-ID: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> New submission from STINNER Victor: Each Python thread holds references to objects, in its current frame for example. At Python shutdown, clearing threads state happens very late: the import machinery is already dead, types are finalized, etc. If a thread has an object with a destructor, bad things may happen. For example, when open files are destroyed, a warning is emitted. The problem is that you cannot emits warnings because the warnings module has been unloaded, and so you miss warnings. See the issue #19442 for this specific case. It is possible to clear the Python threads earlier since Python 3.2, because Python threads will now exit cleanly when they try to acquire the GIL: see PyEval_RestoreThread(). The value of the tstate pointer is used in PyEval_RestoreThread(), but the pointer is not dereferenced (the content of a Python state is not read). So it is even possible to free the memory of the threads state (not only to clear the threads state). Attached patch implements destroy the all threads except the current thread, and clear the state of the current thread. The patch calls also the garbage collector before flushing stdout and stderr, and disable signal handlers just before PyImport_Cleanup(). The main idea is to reorder functions like this: - clear state of all threads to release strong references -> may call destructores - force a garbage collector to release more references -> may call destructores - flush stdout and stderr -> write pending warnings and any other buffered messages - disable signal handler -> only at the end so previous steps can still be interrupted by CTRL+c The side effect of the patch is that the destructor of destroyed objects are now called, especially for daemon threads. If you try the warn_shutdown.py script attached to #19442, you now get the warning with the patch! As a result, test_threading.test_4_daemon_threads() is also modified by my patch to ignore warnings :-) If I understood correctly, the patch only has an impact on daemon threads, the behaviour of classic threads is unchanged. ---------- files: finalize_threads.patch keywords: patch messages: 201860 nosy: haypo, pitrou priority: normal severity: normal status: open title: Clear state of threads earlier in Python shutdown versions: Python 3.4 Added file: http://bugs.python.org/file32443/finalize_threads.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 00:53:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Oct 2013 23:53:46 +0000 Subject: [issue19442] Python crashes when a warning is emitted during shutdown In-Reply-To: <1383089513.19.0.894432052121.issue19442@psf.upfronthosting.co.za> Message-ID: <1383263626.14.0.260478702594.issue19442@psf.upfronthosting.co.za> STINNER Victor added the comment: warn_shutdown.py does not emit warnings because the thread states are destroyed too late, when the modules have been destroyed. I opened a new issue #19466 "Clear state of threads earlier in Python shutdown" which would permit to emit properly warnings, at least for the specific case of warn_shutdown.py. > The changeset 1787277915e9 is closer to a workaround than a real fix: ... If the module is None, it's too late: modules have been destroyed, so it's safer to not call warn_explicit() and do nothing. I tested to fail with an assertion error if a warning is emitted too late (ie. when module is None). test_threading.test_4_daemon_threads() does fail in this case. Using the patch attached to #19466, the full test suite pass correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 00:55:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Oct 2013 23:55:45 +0000 Subject: [issue19442] Python crashes when a warning is emitted during shutdown In-Reply-To: <1383089513.19.0.894432052121.issue19442@psf.upfronthosting.co.za> Message-ID: <3d9k1r470Qz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 13a05ed33cf7 by Victor Stinner in branch 'default': Close #19442: warn_explicit() does nothing when called late during Python shutdown http://hg.python.org/cpython/rev/13a05ed33cf7 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 01:18:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 00:18:07 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> Message-ID: <1383265087.38.0.833995871291.issue19465@psf.upfronthosting.co.za> STINNER Victor added the comment: > It still seems to me that this is pretty atypical use of selectors I already implemented something similar to subprocess.Popen.communicate() when I was working on old Python versions without the timeout parameter of communicate(). http://ufwi.org/projects/edw-svn/repository/revisions/master/entry/trunk/src/nucentral/nucentral/common/process.py#L222 IMO calling select with a few file descriptors (between 1 and 3) and destroying quickly the "selector" is no a rare use case. If I would port my code to selectors, I don't want to rewrite it to keep the selector alive longer, just because selectors force me to use the super-powerful fast epoll/kqueue selector. (To be honest, I will probably not notice any performance impact. But I like reducing the number of syscalls, not the opposite :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 01:38:57 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 01 Nov 2013 00:38:57 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1383266337.26.0.456558124217.issue19466@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 01:39:27 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 01 Nov 2013 00:39:27 +0000 Subject: [issue19435] Directory traversal attack for CGIHTTPRequestHandler In-Reply-To: <1383064441.57.0.197155402259.issue19435@psf.upfronthosting.co.za> Message-ID: <1383266367.54.0.553811057165.issue19435@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 01:41:44 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 01 Nov 2013 00:41:44 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1383266504.73.0.628389988484.issue19462@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 01:45:21 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 01 Nov 2013 00:45:21 +0000 Subject: [issue19447] py_compile.compile raises if a file has bad encoding In-Reply-To: <1383126127.06.0.0829407086057.issue19447@psf.upfronthosting.co.za> Message-ID: <1383266721.35.0.216723782757.issue19447@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 01:46:52 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 01 Nov 2013 00:46:52 +0000 Subject: [issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser In-Reply-To: <1381041750.41.0.637077946349.issue19176@psf.upfronthosting.co.za> Message-ID: <1383266812.4.0.684032169067.issue19176@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 01:56:55 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 01 Nov 2013 00:56:55 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1383267415.74.0.710232148395.issue19331@psf.upfronthosting.co.za> Ethan Furman added the comment: How's this? I liked Barry's simpler Overriding Principle combine with Nick's simpler Class Names. ---------- Added file: http://bugs.python.org/file32444/issue19331.stoneleaf.03.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 01:58:39 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 01 Nov 2013 00:58:39 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383265087.38.0.833995871291.issue19465@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: OK. Let's have a function to select a default selector. Can you think of a better name for the parameter? Or maybe there should be two functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 02:03:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 01:03:46 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> Message-ID: <1383267826.89.0.109699771099.issue19465@psf.upfronthosting.co.za> STINNER Victor added the comment: > OK. Let's have a function to select a default selector. > Can you think of a better name for the parameter? Or > maybe there should be two functions? I prefer to leave the question to the author of the module, Charles-Fran?ois :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 02:09:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 01:09:45 +0000 Subject: [issue19421] FileIO destructor imports indirectly the io module at exit In-Reply-To: <1382964595.86.0.735733174732.issue19421@psf.upfronthosting.co.za> Message-ID: <1383268185.84.0.183855372861.issue19421@psf.upfronthosting.co.za> STINNER Victor added the comment: I misunderstood the gdb traceback. Display a warning does not reload the io module: in fact, the io module was unloaded and PyImport_ImportModuleLevelObject() already raises an ImportError in this case: ImportError("import of 'io' halted; None in sys.modules"). So nothing else need to be done, I'm now closing the issue. I created more specific issues about warnings, see issues #19442 and #19466. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 02:19:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 01:19:40 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1383268780.0.0.552874058256.issue19230@psf.upfronthosting.co.za> STINNER Victor added the comment: Original: $ ./python -S -m timeit -s 'import sys' 'import keyword; keyword=None; del sys.modules["keyword"]' 10000 loops, best of 3: 149 usec per loop Python patched with keyword_grammar.patch: $ ./python -S -m timeit -s 'import sys' 'import keyword; keyword=None; del sys.modules["keyword"]' 10000 loops, best of 3: 20 usec per loop The gain is 129 microseconds (import 7.4x faster). Python starts in between 8,850 and 13,800 microseconds on my PC: $ ./python -S -m timeit -s 'import subprocess; args=[sys.executable, "-S", "-c", "pass"]' 'subprocess.call(args)' 100 loops, best of 3: 8.85 msec per loop $ ./python -S -m timeit -s 'import subprocess; args=[sys.executable, "-c", "pass"]' 'subprocess.call(args)' 100 loops, best of 3: 13.8 msec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 02:21:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 01:21:29 +0000 Subject: [issue19230] Reimplement the keyword module in C In-Reply-To: <1381537991.31.0.762180400628.issue19230@psf.upfronthosting.co.za> Message-ID: <1383268889.04.0.919115465005.issue19230@psf.upfronthosting.co.za> STINNER Victor added the comment: "IMO this should be rejected. Failure to improve startup time + more complicated maintenance." What do you mean by "complicated maintenance"? The C module is short and doesn't use complex functions, I don't expect it to change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 02:30:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 01:30:16 +0000 Subject: [issue19467] asyncore documentation: redirect users t Message-ID: <1383269416.17.0.388850209653.issue19467@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: haypo priority: normal severity: normal status: open title: asyncore documentation: redirect users t _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 02:36:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 01:36:44 +0000 Subject: [issue19467] asyncore documentation: redirect users t Message-ID: <1383269804.3.0.264747393931.issue19467@psf.upfronthosting.co.za> New submission from STINNER Victor: The asyncore module is old and has an efficient design: it is not possible to use modern selectors like epoll() or kqueue() before asyncore.poll() function has to recreate a selector at each call. See a better explanation of its author: msg196995. The asyncio has a better abstraction, a better design and has pluggable eventloops and selectors. I suggest to modify asyncore users in the documentation to the new asyncio module. It would be better to explain how to port the code, but I don't know asyncio enough to explain that. I don't know what to do with asynchat. ---------- nosy: +giampaolo.rodola, gvanrossum, neologix versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 02:36:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 01:36:53 +0000 Subject: [issue19467] asyncore documentation: redirect users to the new asyncio module In-Reply-To: <1383269804.3.0.264747393931.issue19467@psf.upfronthosting.co.za> Message-ID: <1383269813.7.0.586234141233.issue19467@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: asyncore documentation: redirect users t -> asyncore documentation: redirect users to the new asyncio module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 02:57:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 01:57:36 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1383271056.84.0.329148405947.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch. ---------- Added file: http://bugs.python.org/file32445/compare_hash-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 03:07:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 01 Nov 2013 02:07:11 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383271631.13.0.926087955822.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: Donald, could you upload an updated patch here that includes both your changes and my docs updates? We'll give people a day to look it over, and then go ahead and commit it and create the tracker issues to update pyvenv/venv and the Mac OS X and Windows installers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 03:18:18 2013 From: report at bugs.python.org (Donald Stufft) Date: Fri, 01 Nov 2013 02:18:18 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383272298.05.0.0453804204287.issue19406@psf.upfronthosting.co.za> Changes by Donald Stufft : Added file: http://bugs.python.org/file32446/combined.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 03:23:27 2013 From: report at bugs.python.org (Donald Stufft) Date: Fri, 01 Nov 2013 02:23:27 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383272606.99.0.451826384122.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: There you go Nick. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 04:00:48 2013 From: report at bugs.python.org (Martin Panter) Date: Fri, 01 Nov 2013 03:00:48 +0000 Subject: [issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4. In-Reply-To: <1218901279.9.0.954545383172.issue3566@psf.upfronthosting.co.za> Message-ID: <1383274848.69.0.783747988556.issue3566@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 04:16:53 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 03:16:53 +0000 Subject: [issue19468] Relax the type restriction on reloaded modules Message-ID: <1383275813.81.0.924128062775.issue19468@psf.upfronthosting.co.za> New submission from Eric Snow: The first thing that importlib.reload() does is to verify that the passed module is an instance of types.ModuleType (Lib/importlib/__init__.py:107). This check seems unnecessary to me. We really don't have a functional need for the check (that I know of). Furthermore, there has been at least one serious proposal recently that suggested using custom module types. The only benefit that I can think of to the type check is it makes the failure more clear when someone tries to "reload" an attribute in a module (thinking just the attribute will get reloaded!). However, does that matter all that much now that reload() is not a builtin (ergo less likely to get misused very often)? I'm not invested in removing these 2 lines (or at least loosening the restriction). I've brought it up simply because it keeps staring me in the face lately. :-) If anyone has any objections, I'll drop it (at least it will be recorded here in the tracker). That said, I'm glad to remove the restriction otherwise. ---------- components: Library (Lib) messages: 201874 nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Relax the type restriction on reloaded modules type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 04:39:36 2013 From: report at bugs.python.org (Martin Panter) Date: Fri, 01 Nov 2013 03:39:36 +0000 Subject: [issue9740] Support for HTTP 1.1 persistent connections throughout the standard library In-Reply-To: <1283428611.84.0.131704513964.issue9740@psf.upfronthosting.co.za> Message-ID: <1383277176.35.0.321914568568.issue9740@psf.upfronthosting.co.za> Martin Panter added the comment: I wrote a basic ?urllib.request? handler class that I have been using for HTTP persistent connections. It is called PersistentConnectionHandler; see https://github.com/vadmium/python-iview/blob/80dc1b4/iview/hds.py#L442 I am happy for this to be used as the basis for a patch for Python, or elsewhere. It manages a single connection. You pass an instance to urllib.request.build_opener(), and then it connects to whatever host is specified when open() is called. Any old connection is closed when you ask for a URL on a new host. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 05:35:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 01 Nov 2013 04:35:08 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <3d9rCp2cJ9z7Ljj@mail.python.org> Roundup Robot added the comment: New changeset 88c3a1a3c2ff by Eric Snow in branch 'default': Issue #19413: Restore pre-3.3 reload() semantics of re-finding modules. http://hg.python.org/cpython/rev/88c3a1a3c2ff ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 05:37:52 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 04:37:52 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383280672.51.0.337425910161.issue19413@psf.upfronthosting.co.za> Eric Snow added the comment: As you can see, Nick, I came up with a test that did just about the same thing (which you had suggested earlier :-) ). For good measure I also added a test that replaces a namespace package with a normal one. ---------- assignee: -> eric.snow resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 06:42:58 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 05:42:58 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383284578.95.0.0232592636818.issue19413@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 06:43:54 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 05:43:54 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383284634.61.0.363067210007.issue19413@psf.upfronthosting.co.za> Eric Snow added the comment: Looks like this broke on windows: ====================================================================== FAIL: test_reload_namespace_changed (test.test_importlib.test_api.Source_ReloadTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_importlib\test_api.py", line 283, in test_reload_namespace_changed [os.path.dirname(bad_path)] * 2) AssertionError: Lists differ: ['C:\[46 chars]spam'] != ['C:\[46 chars]spam', 'C:\\DOCUME~1\\db3l\\LOCALS~1\\Temp\\tmpxhxk6rt9\\spam'] Second list contains 1 additional elements. First extra element 1: C:\DOCUME~1\db3l\LOCALS~1\Temp\tmpxhxk6rt9\spam - ['C:\\DOCUME~1\\db3l\\LOCALS~1\\Temp\\tmpxhxk6rt9\\spam'] ? ^ + ['C:\\DOCUME~1\\db3l\\LOCALS~1\\Temp\\tmpxhxk6rt9\\spam', ? ^ + 'C:\\DOCUME~1\\db3l\\LOCALS~1\\Temp\\tmpxhxk6rt9\\spam'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 06:50:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 01 Nov 2013 05:50:02 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <3d9stD61qQz7Ljl@mail.python.org> Roundup Robot added the comment: New changeset 78d36d54391c by Eric Snow in branch 'default': Issue #19413: Disregard duplicate namespace portions during reload tests. http://hg.python.org/cpython/rev/78d36d54391c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 07:05:32 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 06:05:32 +0000 Subject: [issue19469] Duplicate namespace package portions (but not on Windows) Message-ID: <1383285932.19.0.495289288555.issue19469@psf.upfronthosting.co.za> New submission from Eric Snow: In changeset 88c3a1a3c2ff you'll find in test_api.py where I threw together a __path__ to compare against the one I was getting (which had 2 identical entries) on my Ubuntu 12.04 workstation. The XP buildbot (http://buildbot.python.org/all/builders/x86%20XP-4%203.x) took issue with that (but non-windows was fine). I was able to work around the difference (78d36d54391c), but I find the extra namespace portions surprising. I'd like to get to the bottom of it. I expect it has to do with how path entries are done on Windows, or perhaps with the way support.temp_cwd() iteracts with sys.path during testing. ---------- messages: 201880 nosy: brett.cannon, eric.smith, eric.snow priority: normal severity: normal stage: test needed status: open title: Duplicate namespace package portions (but not on Windows) type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 07:11:57 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 06:11:57 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383286317.58.0.599244170626.issue19413@psf.upfronthosting.co.za> Eric Snow added the comment: Windows looks happy now. I'll look into the duplicate portions separately in issue19469. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 07:12:22 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 06:12:22 +0000 Subject: [issue19413] Reload semantics changed unexpectedly in Python 3.3 In-Reply-To: <1382843791.56.0.901507046365.issue19413@psf.upfronthosting.co.za> Message-ID: <1383286342.22.0.204837346066.issue19413@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 08:36:00 2013 From: report at bugs.python.org (paul j3) Date: Fri, 01 Nov 2013 07:36:00 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1383291360.58.0.184292173517.issue19462@psf.upfronthosting.co.za> paul j3 added the comment: When you add an argument, argparse creates an `Action`, and returns it. It also places that action in various lists (e.g. parse._actions) and dictionaries. A `remove_argument` function would have to trace and remove all of those links. That's a non-trivial task. However modifying an argument (or Action) is much easier, since there is only one instance. Obviously some modifications will be safer than others. For example: parser = ArgumentParser() a = parser.add_argument('--foo') print a produces: _StoreAction(option_strings=['--foo'], dest='foo', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None) `vars(a)` gives a somewhat longer list of attributes. Within reason, those attributes can be changed directly. I think the 'dest', 'help', 'nargs', 'metavar' could all be changed without hidden effects. There's also a 'required' attribute that could be changed for optionals. Changing the 'option_strings' might be problematic, since the parser has a dictionary using those strings as keys. The constant `argparse.SUPPRESS` is used in several places to alter actions. For example, to suppress the help, or to suppress default values in the Namespace. So it might be possible to 'hide' arguments in the subclass, even if you can't remove them. In http://bugs.python.org/issue14191 I explored a couple of ways of temporarily 'deactivating' certain groups of arguments, so as to parse the optionals and positionals separately. It's an advance issue, but might still give some ideas. Another possibility is to use 'parent' parsers to define clusters of arguments. Your base class could create a parser with one set of parents, and the subclass could use a different set. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 10:06:46 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 01 Nov 2013 09:06:46 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1383296806.25.0.005258429234.issue19063@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the *preliminary* patch to address R. David Murray's request. It does not address the case where we send raw utf-8 bytes to payload. Maybe we should handle that in different ticket. msg.set_payload(b'\xd0\x90\xd0\x91\xd0\x92') ==> chucks ---------- Added file: http://bugs.python.org/file32447/fix_8bit_data_charset_none_set_payload_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 10:13:40 2013 From: report at bugs.python.org (hhm) Date: Fri, 01 Nov 2013 09:13:40 +0000 Subject: [issue19470] email.header.Header - should not allow two newlines in a row Message-ID: <1383297220.57.0.645523530796.issue19470@psf.upfronthosting.co.za> New submission from hhm: An email.header.Header object should not allow two consecutive newlines, since this terminates interpretation of headers and starts the body section. This can be exploited by an attacker in a case of user input being used in headers, and validated with the Header object, by stopping interpretation of any further headers, which become interpreted by an user (or other) agent. This in turn can be used to modify the behavior of emails, web pages, and the like, where such code is present. ---------- components: Library (Lib) messages: 201884 nosy: hhm priority: normal severity: normal status: open title: email.header.Header - should not allow two newlines in a row type: security versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 10:14:16 2013 From: report at bugs.python.org (hhm) Date: Fri, 01 Nov 2013 09:14:16 +0000 Subject: [issue19470] email.header.Header - should not allow two newlines in a row In-Reply-To: <1383297220.57.0.645523530796.issue19470@psf.upfronthosting.co.za> Message-ID: <1383297256.87.0.971211760979.issue19470@psf.upfronthosting.co.za> hhm added the comment: (see also http://bugs.python.org/issue5871) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 10:17:43 2013 From: report at bugs.python.org (Russell Jurney) Date: Fri, 01 Nov 2013 09:17:43 +0000 Subject: [issue19471] pandas DataFrame access results in segfault Message-ID: <1383297462.98.0.184422006167.issue19471@psf.upfronthosting.co.za> New submission from Russell Jurney: Python 2.7.6 RC1 on Mac OS X Mavericks 10.9 results in segfault when accessing a Pandas DataFrame. Same problem as in 2.7.5. See http://stackoverflow.com/questions/19722580/segfault-with-pandas-with-python-v2-7-6-rc1-on-mac-os-x-10-9 ---------- messages: 201886 nosy: Russell.Jurney priority: normal severity: normal status: open title: pandas DataFrame access results in segfault type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 10:19:47 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 01 Nov 2013 09:19:47 +0000 Subject: [issue19470] email.header.Header - should not allow two newlines in a row In-Reply-To: <1383297220.57.0.645523530796.issue19470@psf.upfronthosting.co.za> Message-ID: <1383297587.89.0.114261516792.issue19470@psf.upfronthosting.co.za> Changes by Vajrasky Kok : ---------- nosy: +r.david.murray, vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 10:26:01 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 01 Nov 2013 09:26:01 +0000 Subject: [issue19471] pandas DataFrame access results in segfault In-Reply-To: <1383297462.98.0.184422006167.issue19471@psf.upfronthosting.co.za> Message-ID: <1383297961.58.0.435617981621.issue19471@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is probably a duplicate of #18458. ---------- nosy: +ezio.melotti, ned.deily, ronaldoussoren resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 10:35:12 2013 From: report at bugs.python.org (Russell Jurney) Date: Fri, 01 Nov 2013 09:35:12 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1383298512.01.0.254848940343.issue18458@psf.upfronthosting.co.za> Russell Jurney added the comment: I have installed 2.7.6 RC1 on OS X 10.9, and this bug still exists. See http://stackoverflow.com/questions/19722580/segfault-11-with-pandas-with-python-v2-7-6-rc1-on-mac-os-x-10-9 ---------- nosy: +Russell.Jurney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 10:58:54 2013 From: report at bugs.python.org (hhm) Date: Fri, 01 Nov 2013 09:58:54 +0000 Subject: [issue19470] email.header.Header - should not allow two newlines in a row In-Reply-To: <1383297220.57.0.645523530796.issue19470@psf.upfronthosting.co.za> Message-ID: <1383299934.64.0.131849019685.issue19470@psf.upfronthosting.co.za> Changes by hhm : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 11:37:03 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 01 Nov 2013 10:37:03 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <1383302223.59.0.775422282772.issue18923@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : Added file: http://bugs.python.org/file32448/subprocess_selectors-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 12:07:03 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 01 Nov 2013 11:07:03 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383267826.89.0.109699771099.issue19465@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: There are actually two reasons to choosing poll over epoll/kqueue (i.e. no extra FD): - it's a bit faster (1 syscall vs 3) - but more importantly - and that's the main reason I did it in telnetlib/multiprocessing/subprocess - sometimes, you really don't want to use an extra FD: for example, if you're creating 300 telnet/subprocess instances, one more FD per instance can make you reach RLIMIT_NOFILE, which makes some syscalls fail with EMFILE (at work we have up to a 100 machines, and we spawn 1 subprocess per machine when distributing files with bittorrent). So I agree it would be nice to have a better way to get a selector not requiring any extra FD. The reason I didn't add such a method in the first place is that I don't want to end up like many Java APIs: Foo.getBarFactory().getInstance().initialize().provide() :-) > I read somewhere that differenet selectors may have different limits on the number of file descriptors. Apart from select(), all other selectors don't have an upper limit. As for the performance profiles, depending on the application usage, select() can be faster than poll(), poll() can be faster than epoll(), etc. But since it's really highly usage-specific - and of course OS specific - I think the current choice heuristic is fine: people with specific needs can just use PollSelector/EpollSelector themselves. To sum up, get_selector(use_fd=True) looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 12:31:27 2013 From: report at bugs.python.org (Artem Ustinov) Date: Fri, 01 Nov 2013 11:31:27 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383291360.58.0.184292173517.issue19462@psf.upfronthosting.co.za> Message-ID: Artem Ustinov added the comment: Paul, essentialy, what i looking for is to replace the 'help' string of the inherited argument with the new one. If you say it could be changed without any effect so what would be the proper way to do it using argparse? Artem ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 12:54:23 2013 From: report at bugs.python.org (Marco Buttu) Date: Fri, 01 Nov 2013 11:54:23 +0000 Subject: [issue19472] inspect.getsource() raises a wrong exception type Message-ID: <1383306863.35.0.879382426433.issue19472@psf.upfronthosting.co.za> New submission from Marco Buttu: I was looking at inspect.getsource(). In Python 3.3 and 3.4 either the docstring and the online doc say it raises a OSError, and in fact: >>> import inspect >>> def foo(): ... pass ... >>> inspect.getsource(foo) Traceback (most recent call last): ... OSError: could not get source code However, getsource() calls getfile(), and this one raises a TypeError: >>> inspect.getsource(0) Traceback (most recent call last): ... TypeError: 0 is not a module, class, method, function, traceback, frame, or code object ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 201891 nosy: docs at python, marco.buttu priority: normal severity: normal status: open title: inspect.getsource() raises a wrong exception type type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 13:49:46 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 01 Nov 2013 12:49:46 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1383310186.54.0.0764014948489.issue16500@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Given PEP 446 (fds are now CLOEXEC by default) I prepared an updated patch where the fork lock is undocumented and subprocess no longer uses the fork lock. (I did not want to encourage the mixing of threads with fork() without exec() by exposing the fork lock just for that case.) But I found that a test for the leaking of fds to a subprocess started with closefds=False was somewhat regularly failing because the creation of CLOEXEC pipe fds is not atomic -- the GIL is not held while calling pipe(). It seems that PEP 446 does not really make the fork lock redundant for processes started using fork+exec. So now I don't know whether the fork lock should be made public. Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 14:12:54 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 13:12:54 +0000 Subject: [issue19473] Expose cache validation check in FileFinder Message-ID: <1383311574.05.0.474186248833.issue19473@psf.upfronthosting.co.za> New submission from Brett Cannon: People seem to be sensitive enough to stat calls that exposing the cache validation check in FileFinder so it can be overridden to effectively turn it off would be useful to power users. ---------- components: Library (Lib) messages: 201893 nosy: brett.cannon priority: low severity: normal stage: test needed status: open title: Expose cache validation check in FileFinder type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 14:13:02 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 13:13:02 +0000 Subject: [issue19473] Expose cache validation check in FileFinder In-Reply-To: <1383311574.05.0.474186248833.issue19473@psf.upfronthosting.co.za> Message-ID: <1383311582.93.0.592648498572.issue19473@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 14:13:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 01 Nov 2013 13:13:56 +0000 Subject: [issue19464] Remove warnings from Windows buildbot "clean" script In-Reply-To: <1383246934.8.0.971910154804.issue19464@psf.upfronthosting.co.za> Message-ID: <3dB3kR12xMz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 599b5200ad51 by Tim Golden in branch 'default': Issue #19464 Suppress compiler warnings during clean. Patch by Zachary Ware. http://hg.python.org/cpython/rev/599b5200ad51 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 14:23:48 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 01 Nov 2013 13:23:48 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <1383312228.69.0.592357970028.issue19437@psf.upfronthosting.co.za> Stefan Krah added the comment: Since this is tagged "crash", I'm curious if you managed to crash _decimal. The unhandled return in convert_op_cmp should result in AtrributeError("object does not have a numerator attribute"). The exception that wasn't set in dec_format should result in a wrong exception, but not a crash. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 14:24:18 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 01 Nov 2013 13:24:18 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1383267415.74.0.710232148395.issue19331@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: +1, works for me :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 14:31:16 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 01 Nov 2013 13:31:16 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1383312676.79.0.250089202945.issue10197@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: -> tim.golden versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 14:36:17 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Nov 2013 13:36:17 +0000 Subject: [issue19470] email.header.Header - should not allow two newlines in a row In-Reply-To: <1383297220.57.0.645523530796.issue19470@psf.upfronthosting.co.za> Message-ID: <1383312977.77.0.39401408042.issue19470@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure how appropriate it is to "validate" a header using the Header object. Header is for *composing* internationalized headers, and does no validation to speak of. However, if you'd like to write a patch to add this check, I would probably commit it, since it is analogous to issue 5871. However, since the security issue was already dealt with in issue 5871, this fix would be a convenience (detecting the issue earlier). On the flip side, it would also be a behavior change, so there might be objections to backporting it. (Do any programs use Header for things other than composing email messages and actually rely on embedded newlines? I hope not, but you never know :) Further, if you use the new policies available in 3.3 and 3.4 (currently provisional, but they are the Way of the Future ;), you don't ever need to use Header objects, and embedded newlines are rejected as soon as you try to assign a string containing them as a header value in a message object. ---------- components: +email nosy: +barry type: security -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 14:47:14 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 01 Nov 2013 13:47:14 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1383310186.54.0.0764014948489.issue16500@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Given PEP 446 (fds are now CLOEXEC by default) I prepared an updated patch where the fork lock is undocumented and subprocess no longer uses the fork lock. (I did not want to encourage the mixing of threads with fork() without exec() by exposing the fork lock just for that case.) > > But I found that a test for the leaking of fds to a subprocess started with closefds=False was somewhat regularly failing because the creation of CLOEXEC pipe fds is not atomic -- the GIL is not held while calling pipe(). Was it on Linux? If yes, was it on an old kernel/libc? (I just want to make sure that pipe2() is indeed used if available). > It seems that PEP 446 does not really make the fork lock redundant for processes started using fork+exec. > > So now I don't know whether the fork lock should be made public. Thoughts? IMO it should be kept private for now: I think it's really only useful in some corner cases, and if it turns out to be useful, we can expose it later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:06:23 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 01 Nov 2013 14:06:23 +0000 Subject: [issue19385] dbm.dumb should be consistent when the database is closed In-Reply-To: <1382683121.03.0.174486602388.issue19385@psf.upfronthosting.co.za> Message-ID: <1383314783.85.0.894433815263.issue19385@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Here's the new version which addresses your last comment. Regarding the first issue, I don't believe that the result will be as readable (but I agree with you that it will be better). For instance, `items` will probably look like this: try: return [(key, self[key]) for key in self._index.keys()] except AttributeError: raise dbm.dumb.error(...) from None but will look totally different for other __len__: try: return len(self._index) except TypeError: raise dbm.dumb.error(...) from None. We could catch TypeError only for dunder methods though and for the rest of the methods check the value of _index before access. ---------- Added file: http://bugs.python.org/file32449/dbm_dumb1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:20:32 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 14:20:32 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <1383315632.16.0.10304670047.issue18810@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Restore empty string special casing in importlib.machinery.FileFinder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:32:12 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 14:32:12 +0000 Subject: [issue19474] Argument Clinic causing compiler warnings about uninitialized variables Message-ID: <1383316332.19.0.314587339416.issue19474@psf.upfronthosting.co.za> New submission from Brett Cannon: In the curses module there are some variables that can go uninitialized which are causing clang to complain: /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:624:17: warning: variable 'x' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!PyArg_ParseTuple(args, "Ol:addch", &ch, &attr)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:643:65: note: uninitialized use occurs here return_value = curses_window_addch_impl(self, group_left_1, x, y, ch, group_right_1, attr); ^ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:624:13: note: remove the 'if' if its condition is always true if (!PyArg_ParseTuple(args, "Ol:addch", &ch, &attr)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:620:17: warning: variable 'x' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!PyArg_ParseTuple(args, "O:addch", &ch)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:643:65: note: uninitialized use occurs here return_value = curses_window_addch_impl(self, group_left_1, x, y, ch, group_right_1, attr); ^ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:620:13: note: remove the 'if' if its condition is always true if (!PyArg_ParseTuple(args, "O:addch", &ch)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:612:10: note: initialize the variable 'x' to silence this warning int x; ^ = 0 /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:624:17: warning: variable 'y' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!PyArg_ParseTuple(args, "Ol:addch", &ch, &attr)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:643:68: note: uninitialized use occurs here return_value = curses_window_addch_impl(self, group_left_1, x, y, ch, group_right_1, attr); ^ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:624:13: note: remove the 'if' if its condition is always true if (!PyArg_ParseTuple(args, "Ol:addch", &ch, &attr)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:620:17: warning: variable 'y' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!PyArg_ParseTuple(args, "O:addch", &ch)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:643:68: note: uninitialized use occurs here return_value = curses_window_addch_impl(self, group_left_1, x, y, ch, group_right_1, attr); ^ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:620:13: note: remove the 'if' if its condition is always true if (!PyArg_ParseTuple(args, "O:addch", &ch)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:613:10: note: initialize the variable 'y' to silence this warning int y; ^ = 0 /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:629:17: warning: variable 'attr' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!PyArg_ParseTuple(args, "iiO:addch", &x, &y, &ch)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:643:90: note: uninitialized use occurs here return_value = curses_window_addch_impl(self, group_left_1, x, y, ch, group_right_1, attr); ^~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:629:13: note: remove the 'if' if its condition is always true if (!PyArg_ParseTuple(args, "iiO:addch", &x, &y, &ch)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:620:17: warning: variable 'attr' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!PyArg_ParseTuple(args, "O:addch", &ch)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:643:90: note: uninitialized use occurs here return_value = curses_window_addch_impl(self, group_left_1, x, y, ch, group_right_1, attr); ^~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:620:13: note: remove the 'if' if its condition is always true if (!PyArg_ParseTuple(args, "O:addch", &ch)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/bcannon/Repositories/cpython/default/Modules/_cursesmodule.c:616:14: note: initialize the variable 'attr' to silence this warning long attr; ^ = 0 6 warnings generated. ---------- assignee: larry components: Extension Modules messages: 201901 nosy: brett.cannon, larry priority: normal severity: normal status: open title: Argument Clinic causing compiler warnings about uninitialized variables versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:35:55 2013 From: report at bugs.python.org (Robert Xiao) Date: Fri, 01 Nov 2013 14:35:55 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1383316555.4.0.469547134164.issue18458@psf.upfronthosting.co.za> Changes by Robert Xiao : Removed file: http://bugs.python.org/file32320/readline.so _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:36:27 2013 From: report at bugs.python.org (Robert Xiao) Date: Fri, 01 Nov 2013 14:36:27 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1383316587.46.0.501625442215.issue18458@psf.upfronthosting.co.za> Robert Xiao added the comment: Russell, that's not related to readline. Please file a new bug report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:38:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 01 Nov 2013 14:38:05 +0000 Subject: [issue19410] Restore empty string special casing in importlib.machinery.FileFinder In-Reply-To: <1382801910.68.0.88492101144.issue19410@psf.upfronthosting.co.za> Message-ID: <3dB5bw21Dwz7LjY@mail.python.org> Roundup Robot added the comment: New changeset 17d730d37b2f by Brett Cannon in branch 'default': Issue #19410: Put back in special-casing of '' for http://hg.python.org/cpython/rev/17d730d37b2f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:38:27 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 14:38:27 +0000 Subject: [issue19410] Restore empty string special casing in importlib.machinery.FileFinder In-Reply-To: <1382801910.68.0.88492101144.issue19410@psf.upfronthosting.co.za> Message-ID: <1383316707.09.0.831668276645.issue19410@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:39:36 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 14:39:36 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <1383316776.98.0.558196022532.issue18810@psf.upfronthosting.co.za> Brett Cannon added the comment: Wrong issue ---------- dependencies: -Restore empty string special casing in importlib.machinery.FileFinder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:40:08 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 14:40:08 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <1383316808.23.0.544452768845.issue18810@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm going to go ahead and close this. I think the optimistic change is the only one worth making since it's backwards-compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:40:20 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 14:40:20 +0000 Subject: [issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder In-Reply-To: <1377182986.55.0.892405433608.issue18810@psf.upfronthosting.co.za> Message-ID: <1383316820.08.0.263848562883.issue18810@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:41:05 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 01 Nov 2013 14:41:05 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: Message-ID: Guido van Rossum added the comment: Hm. If you really are going to create 300 instances, you should probably use asyncio. Otherwise, how are you going to multiplex them? Create 300 threads each doing select() on 1 FD? That sounds like a poor architecture and I don't want to bend over backwards to support or encourage that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:45:39 2013 From: report at bugs.python.org (Tim Golden) Date: Fri, 01 Nov 2013 14:45:39 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1383317139.88.0.0102376973566.issue10197@psf.upfronthosting.co.za> Tim Golden added the comment: Patched according to Nick Coghlan's suggestion in http://bugs.python.org/issue9922#msg150093. Ad hoc tests look ok on Windows. I'll add tests & look at *nix later. ---------- Added file: http://bugs.python.org/file32450/issue10197.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:47:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 14:47:15 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383312228.69.0.592357970028.issue19437@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I don't have the gdb trace anymore but it was really a crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 15:49:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Nov 2013 14:49:12 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1383310186.54.0.0764014948489.issue16500@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: The PEP 446 does not offer any warranty on the atomicity on clearing the inheritable flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 16:13:03 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 01 Nov 2013 15:13:03 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: Of course, when I have 300 connections to remote nodes, I use poll() to multiplex between them. But there are times when you can have a large number of threads running concurrently, and if many of them call e.g. subprocess.check_output() at the same time (which does call subprocess.communicate() behind the scene, and thus calls select/poll), then one extra FD per instance could be an issue. For example, in http://bugs.python.org/issue18756, os.urandom() would start failing when multiple threads called it at the same time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 16:30:22 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 15:30:22 +0000 Subject: [issue19473] Expose cache validation check in FileFinder In-Reply-To: <1383311574.05.0.474186248833.issue19473@psf.upfronthosting.co.za> Message-ID: <1383319822.79.0.073192254793.issue19473@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> duplicate status: open -> closed superseder: -> Expose mtime check in importlib.machinery.FileFinder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 16:52:50 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 01 Nov 2013 15:52:50 +0000 Subject: [issue19439] Build _testembed on Windows In-Reply-To: <1383080293.2.0.31204430631.issue19439@psf.upfronthosting.co.za> Message-ID: <1383321170.58.0.32639401268.issue19439@psf.upfronthosting.co.za> Zachary Ware added the comment: That appears to be the case: """ P:\Projects\OSS\Python\cpython\ $ chcp Active code page: 437 P:\Projects\OSS\Python\cpython\ $ PCbuild\python_d.exe Python 3.4.0a4+ (default:995173ed248a+, Nov 1 2013, 09:12:43) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os, sys >>> rfd, wfd = os.pipe() >>> r = os.fdopen(rfd, 'r') >>> w = os.fdopen(wfd, 'w') >>> sys.stdin.encoding, sys.stdout.encoding ('cp437', 'cp437') >>> r.encoding, w.encoding ('cp1252', 'cp1252') """ The test passes as patched if I do 'chcp 1252' before running. Is it reasonable to patch the test to expect the default stdout and stderr encoding to equal ``os.fdopen(os.pipe[1], 'w').encoding``? Doing so passes on Windows, don't know about various Unixes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 17:28:52 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 01 Nov 2013 16:28:52 +0000 Subject: [issue16500] Add an 'atfork' module In-Reply-To: <1353252005.31.0.454056781872.issue16500@psf.upfronthosting.co.za> Message-ID: <1383323332.96.0.854990222022.issue16500@psf.upfronthosting.co.za> Richard Oudkerk added the comment: It is a recent kernel and does support pipe2(). After some debugging it appears that a pipe handle created in Popen.__init__() was being leaked to a forked process, preventing Popen.__init__() from completing before the forked process did. Previously the test passed because Popen.__init__() acquired the fork lock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 17:29:38 2013 From: report at bugs.python.org (paul j3) Date: Fri, 01 Nov 2013 16:29:38 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1383323378.22.0.0385563990928.issue19462@psf.upfronthosting.co.za> paul j3 added the comment: Just hang on the Action object that the `add_argument` returned, and change its `help` attribute. a = parser.add_argument('--foo', help='initial help') .... a.help = 'new help' If using a custom parser class and subclass, I'd do something like: self.changeablearg = self.parser.add_argument... in the class, and self.changeablearg.help = 'new help' in the subclass You can test the help message with print parser.format_help() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 17:57:05 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 01 Nov 2013 16:57:05 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1383325025.58.0.912966899198.issue19331@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Thanks Ethan, your latest patch is wonderful. Applied! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 17:57:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 01 Nov 2013 16:57:05 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <3dB8gv75MQz7Lk8@mail.python.org> Roundup Robot added the comment: New changeset 1a40d4eaa00b by Barry Warsaw in branch 'default': Ethan Furman's latest patch for Issue 19331. http://hg.python.org/peps/rev/1a40d4eaa00b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 17:57:15 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 01 Nov 2013 16:57:15 +0000 Subject: [issue19331] Revise PEP 8 recommendation for class names In-Reply-To: <1382364108.83.0.592480403248.issue19331@psf.upfronthosting.co.za> Message-ID: <1383325035.29.0.873391252258.issue19331@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: -python-dev resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 18:04:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 01 Nov 2013 17:04:16 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> Message-ID: <1383325456.48.0.384737434075.issue19448@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for the feed back! The new patch implements a class with two additional class methods. The low level functions are no longer part of the public API. ---------- Added file: http://bugs.python.org/file32451/ssl_asn1obj2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 18:05:21 2013 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 01 Nov 2013 17:05:21 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method Message-ID: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> New submission from Skip Montanaro: I have a CSV file. Here are a few rows: "2013-10-30 14:26:46.000528","1.36097023829" "2013-10-30 14:26:46.999755","1.36097023829" "2013-10-30 14:26:47.999308","1.36097023829" "2013-10-30 14:26:49.002472","1.36097023829" "2013-10-30 14:26:50","1.36097023829" "2013-10-30 14:26:51.000549","1.36097023829" "2013-10-30 14:26:51.999315","1.36097023829" "2013-10-30 14:26:52.999703","1.36097023829" "2013-10-30 14:26:53.999640","1.36097023829" "2013-10-30 14:26:54.999139","1.36097023829" I want to parse the strings in the first column as timestamps. I can, and often do, use dateutil.parser.parse(), but in situations like this where all the timestamps are of the same format, it can be incredibly slow. OTOH, there is no single format I can pass to datetime.datetime.strptime() that will parse all the above timestamps. Using "%Y-%m-%d %H:%M:%S" I get errors about the leftover microseconds. Using "%Y-%m-%d %H:%M:%S".%f" I get errors when I try to parse a timestamp which doesn't have microseconds. Alas, it is datetime itself which is to blame for this problem. The above timestamps were all printed from an earlier Python program which just dumps the str() of a datetime object to its output CSV file. Consider: >>> dt = dateutil.parser.parse("2013-10-30 14:26:50") >>> print dt 2013-10-30 14:26:50 >>> dt2 = dateutil.parser.parse("2013-10-30 14:26:51.000549") >>> print dt2 2013-10-30 14:26:51.000549 The same holds for isoformat(): >>> print dt.isoformat() 2013-10-30T14:26:50 >>> print dt2.isoformat() 2013-10-30T14:26:51.000549 Whatever happened to "be strict in what you send, but generous in what you receive"? If strptime() is going to complain the way it does, then str() should always generate a full timestamp, including microseconds. The above is from a Python 2.7 session, but I also confirmed that Python 3.3 behaves the same. I've checked 2.7 and 3.3 in the Versions list, but I don't think it can be fixed there. Can the __str__ and isoformat methods of datetime (and time) objects be modified for 3.4 to always include the microseconds? Alternatively, can the %S format character be modified to consume optional decimal point and microseconds? I rate this as "easy" considering the easiest fix is to modify __str__ and isoformat, which seems unchallenging. ---------- components: Extension Modules keywords: easy messages: 201917 nosy: skip.montanaro priority: normal severity: normal status: open title: Inconsistency between datetime's str()/isoformat() and its strptime() method type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 18:08:38 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 01 Nov 2013 17:08:38 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383325718.46.0.426392724326.issue19475@psf.upfronthosting.co.za> Ezio Melotti added the comment: See #7342. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 18:10:13 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 01 Nov 2013 17:10:13 +0000 Subject: [issue19471] pandas DataFrame access results in segfault In-Reply-To: <1383297462.98.0.184422006167.issue19471@psf.upfronthosting.co.za> Message-ID: <1383325813.05.0.808428819243.issue19471@psf.upfronthosting.co.za> Ned Deily added the comment: No, this does not fit the signature of Issue18458, which is fixed in 2.7.6rc1 anyway. On the other hand, it is not likely that this is a problem in Python or its standard library. Pandas uses numpy and other third-party packages that contain C code. It's much more likely there is a problem there. Russell, how did you install Python and Numpy and Pandas? ---------- resolution: duplicate -> stage: committed/rejected -> status: closed -> open superseder: interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 18:37:07 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 01 Nov 2013 17:37:07 +0000 Subject: [issue19471] pandas DataFrame access results in segfault In-Reply-To: <1383297462.98.0.184422006167.issue19471@psf.upfronthosting.co.za> Message-ID: <1383327427.26.0.999605441498.issue19471@psf.upfronthosting.co.za> Ned Deily added the comment: Googling around a bit, there was another report of this problem that includes OS X crash stack traces. The crash there occurred in umath.so, a part of Numpy and that leads to a now-resolved bug in Numpy. https://github.com/pydata/pandas/issues/5396 https://github.com/numpy/numpy/issues/3962 ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 18:47:22 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Nov 2013 17:47:22 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383328042.09.0.987924032217.issue19475@psf.upfronthosting.co.za> R. David Murray added the comment: It may be simple but as Ezio has pointed out, it has already been rejected :) The problem with being generous in what you accept in this context is that the parsing is using a specific format string, and the semantics of that format string are based on external "standards" and are pretty inflexible. The pythonic solution, IMO, is to have datetime's constructor accept what its str produces. And indeed, exactly this has been suggested by Alexander Belopolsky in issue 15873. So I'm going to close this one as a duplicate of that one. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected superseder: -> datetime: add ability to parse RFC 3339 dates and times _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 18:52:24 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 17:52:24 +0000 Subject: [issue19476] Add a dedicated specification for module "reloading" to the language reference Message-ID: <1383328344.74.0.699907316394.issue19476@psf.upfronthosting.co.za> New submission from Eric Snow: In recent PEP 451-related discussions, the subject of reloading has come up multiple times. Most recently, PJE suggested that reload semantics are under-specified (and under-tested). [1][2] It may be worth adding a dedicated section on reloading to the reference doc. As evidenced by that email thread (and issue #19413), there are some reload semantics that should be specified (and tested) but aren't. While reload has a less prominent place in Python 3 (no longer a builtin), it is still a long-standing feature of the import system which gets used at more than just the interactive prompt. I'd hate to see more issues like 19413 pop up later because of under-specification. Furthermore, it would likely help other implementations pre-3.3 (a.k.a. pre-importlib) cover reload corner cases. [1] https://mail.python.org/pipermail/python-dev/2013-October/129868.html [2] https://mail.python.org/pipermail/python-dev/2013-October/129971.html ---------- components: Interpreter Core messages: 201923 nosy: brett.cannon, eric.snow, ncoghlan, pje priority: normal severity: normal stage: needs patch status: open title: Add a dedicated specification for module "reloading" to the language reference type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 18:55:53 2013 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 01 Nov 2013 17:55:53 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383328553.21.0.141993618337.issue19475@psf.upfronthosting.co.za> Skip Montanaro added the comment: I don't accept your conclusion. I understand that making %S consume microseconds or ".%f" be "optional" would be a load. What's the problem with forcing __str__ and isoformat to emit microseconds in all cases though? That would allow you to parse what they produce using existing code. No new constructor needed. The issue of sometimes emitting microseconds, sometimes not, is annoying, even beyond this issue. I think for consistency's sake it makes sense for the string version of datetime and time objects to always be the same length. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:01:09 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Nov 2013 18:01:09 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383328869.55.0.552137808874.issue19475@psf.upfronthosting.co.za> R. David Murray added the comment: It's not my conclusion. It's Guido's and the other developers who designed datetime. Argue with them. (I'd guess it would be better argued on python-ideas rather than python-dev, but use your own judgement.) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:07:37 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 01 Nov 2013 18:07:37 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383329257.92.0.868931845742.issue19475@psf.upfronthosting.co.za> Tim Peters added the comment: The decision to omit microseconds when 0 was a Guido pronouncement, back when datetime was first written. The idea is that str() is supposed to be friendly, and for the vast number of applications that don't use microseconds at all, it's unfriendly to shove ".000000" in their face all the time. Much the same reason is behind why, e.g., str(2.0) doesn't produce "2.0000000000000000". I doubt this will change. If you want to use a single format, you could massage the data first, like if '.' not in dt: dt += ".000000" ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:08:06 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 18:08:06 +0000 Subject: [issue18809] Expose mtime check in importlib.machinery.FileFinder In-Reply-To: <1377182553.5.0.719157877901.issue18809@psf.upfronthosting.co.za> Message-ID: <1383329286.84.0.275876228364.issue18809@psf.upfronthosting.co.za> Brett Cannon added the comment: So I tried extracting out the check by implementing a path_mtime() method on FileFinder, but then I realized it would simply be easier to abstract out _os.stat() to _path_stat() and let people cache stat calls at the global level, which would have a side-effect of never refreshing the path cache. Otherwise all of the other experiments I tried with minimizing stat calls didn't buy me much according to the benchmarks. I have also attached a patch which abstracts all file system code that passed through _os into a class. It didn't buy me much plus added a little overhead thanks to the extra abstraction, so I did not bother to commit it. ---------- keywords: +patch resolution: -> rejected status: open -> closed Added file: http://bugs.python.org/file32452/OO_os.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:08:23 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 01 Nov 2013 18:08:23 +0000 Subject: [issue16113] SHA-3 (Keccak) support may need to be removed before 3.4 In-Reply-To: <1349233804.79.0.00772371618682.issue16113@psf.upfronthosting.co.za> Message-ID: <1383329303.39.0.254175564052.issue16113@psf.upfronthosting.co.za> Christian Heimes added the comment: New information on NIST's hash forum strongly suggest that NIST is going to standardize SHA-3 according to the original proposal with c=2n and Sakura padding as well as two SHAKEs with variable length output. SHA3-224 with c=448 SHA3-256 with c=512 SHA3-384 with c=768 SHA3-512 with c=1024 SHAKE128 with c=256 SHAKE256 with c=512 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:12:10 2013 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 01 Nov 2013 18:12:10 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383329530.14.0.740715272454.issue19475@psf.upfronthosting.co.za> Skip Montanaro added the comment: Okay, so no to __str__. What about isoformat? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:12:25 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Nov 2013 18:12:25 +0000 Subject: [issue17621] Create a lazy import loader mixin In-Reply-To: <1364925647.64.0.233663837419.issue17621@psf.upfronthosting.co.za> Message-ID: <1383329545.59.0.0952010938744.issue17621@psf.upfronthosting.co.za> Brett Cannon added the comment: Won't work until PEP 451 code lands and lets us drop __package__/__loader__ checking/setting post-load. ---------- dependencies: +Implementation for PEP 451 (importlib.machinery.ModuleSpec) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:25:32 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 01 Nov 2013 18:25:32 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383330332.25.0.575144406124.issue19475@psf.upfronthosting.co.za> Tim Peters added the comment: I don't know, Skip. Since `.isoformat()` and `str()` have *always* worked this way, and that was intentional, it's probably going to take a strong argument to change either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:40:37 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 01 Nov 2013 18:40:37 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383331237.96.0.659959471946.issue19475@psf.upfronthosting.co.za> Guido van Rossum added the comment: Well, I don't know if this sways anything, but I was probably responsible, and I think my argument was something about not all timestamp sources having microseconds, and not wanting to emit the ".000000" in that case. If I could go back I'd probably do something else; after all str(1.0) doesn't return '1' either. But that's water under the bridge; "fixing" this is undoubtedly going to break a lot of code. Maybe we can give isoformat() a flag parameter to force the inclusion or exclusion of the microseconds (with a default of None meaning the current behavior)? ---------- nosy: +gvanrossum resolution: duplicate -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:43:21 2013 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 01 Nov 2013 18:43:21 +0000 Subject: [issue19477] document tp_print() as being dead in Py3 Message-ID: <1383331401.83.0.986088466963.issue19477@psf.upfronthosting.co.za> New submission from Stefan Behnel: The "tp_print" slot is still documented as it was in Py2, although it is no longer used in Py3. http://docs.python.org/3.4/c-api/typeobj.html?highlight=tp_print#PyTypeObject.tp_print Given that it no longer serves any purpose, it should at least be deprecated and documented as unused/ignored (and eventually removed completely, at the same time as tp_reserved). ---------- assignee: docs at python components: Documentation messages: 201933 nosy: docs at python, scoder priority: normal severity: normal status: open title: document tp_print() as being dead in Py3 type: behavior versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:50:19 2013 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 01 Nov 2013 18:50:19 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383331819.3.0.0416567933751.issue19475@psf.upfronthosting.co.za> Skip Montanaro added the comment: The ultimate culprit here is actually the csv module. :-) It calls str() on every element it's about to write. In my applications which write to CSV files I can special case datetime objects. I will stop swimming upstream. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 19:55:55 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Nov 2013 18:55:55 +0000 Subject: [issue19475] Inconsistency between datetime's str()/isoformat() and its strptime() method In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383332155.95.0.689067483234.issue19475@psf.upfronthosting.co.za> R. David Murray added the comment: I suppose in an ideal world the csv module would have some sort of hookable serialization protocol, like the database modules do :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 20:33:38 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 01 Nov 2013 19:33:38 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383334418.73.0.522661975652.issue18864@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 20:53:28 2013 From: report at bugs.python.org (Marc Liyanage) Date: Fri, 01 Nov 2013 19:53:28 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module Message-ID: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> New submission from Marc Liyanage: I'm running Python 2.7 in a sandboxed OS X app. There are restrictions on the naming of POSIX semaphores when running in the sandbox. Specifically, there is a mandatory prefix. I would like the ability to inject this prefix into the part of the multiprocessing module that creates the semaphore, perhaps by way of an environment variable. I see that this is how the module generates the semaphore name: PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d", (long)getpid(), counter++); Apple's documentation about the restrictions are here: https://developer.apple.com/library/mac/documentation/security/conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW24 The relevant part: "POSIX semaphores and shared memory names must begin with the application group identifier, followed by a slash (/), followed by a name of your choosing." So if I could inject that string before the leasing slash, I could make this work. ---------- components: Extension Modules messages: 201936 nosy: Marc.Liyanage, jnoller, sbt priority: normal severity: normal status: open title: Add ability to prefix posix semaphore names created by multiprocessing module type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 20:54:33 2013 From: report at bugs.python.org (Marc Liyanage) Date: Fri, 01 Nov 2013 19:54:33 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module In-Reply-To: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> Message-ID: <1383335673.69.0.477063430677.issue19478@psf.upfronthosting.co.za> Marc Liyanage added the comment: "leasing" -> "leading" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 21:23:01 2013 From: report at bugs.python.org (Marc Liyanage) Date: Fri, 01 Nov 2013 20:23:01 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module In-Reply-To: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> Message-ID: <1383337381.08.0.647129482596.issue19478@psf.upfronthosting.co.za> Marc Liyanage added the comment: I'm thinking something along the lines of char *env = Py_GETENV("PYTHONSEMAPHOREPREFIX"); if (env && *env != '\0') { PyOS_snprintf(buffer, sizeof(buffer), "%s/mp%ld-%d", env, (long)getpid(), counter++); } else { PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d", (long)getpid(), counter++); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 21:26:14 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 01 Nov 2013 20:26:14 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module In-Reply-To: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> Message-ID: <1383337574.81.0.515539498126.issue19478@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 21:34:43 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 01 Nov 2013 20:34:43 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module In-Reply-To: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> Message-ID: <1383338083.16.0.579384628514.issue19478@psf.upfronthosting.co.za> Ned Deily added the comment: I don't have any experience using OS X sandboxing yet but I wonder whether there are other instances of semaphores or other resources used elsewhere in the standard library that would benefit from a common solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 21:39:09 2013 From: report at bugs.python.org (Marc Liyanage) Date: Fri, 01 Nov 2013 20:39:09 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module In-Reply-To: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> Message-ID: <1383338349.06.0.921725328742.issue19478@psf.upfronthosting.co.za> Marc Liyanage added the comment: >From the description above, I would guess shared memory names as well, but I don't know which parts of the Python library use those, if any. In general, it's easy to adjust the Python code to deal with the restriction of the sandboxed environment (mostly file-system releated), and I haven't encountered any other issues that require changes to the C code. The name generation for semaphores is one exception where it's not possible to work around it in pure Python code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 21:54:27 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 01 Nov 2013 20:54:27 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module In-Reply-To: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> Message-ID: <1383339267.88.0.966414858066.issue19478@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Although it is undocumented, in python 3.4 you can control the prefix used by doing multiprocessing.current_process()._config['semprefix'] = 'myprefix' in the main process at the beginning of the program. Unfortunately, this will make the full prefix '/myprefix', so it will still start with '/'. Changing this for 3.4 would be easy, but I don't know if it is a good idea to change 2.7. Note that your suggested change can cause a buffer overflow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 22:03:28 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 01 Nov 2013 21:03:28 +0000 Subject: [issue19385] dbm.dumb should be consistent when the database is closed In-Reply-To: <1382683121.03.0.174486602388.issue19385@psf.upfronthosting.co.za> Message-ID: <1383339808.05.0.781787456783.issue19385@psf.upfronthosting.co.za> Changes by Claudiu.Popa : Added file: http://bugs.python.org/file32453/dbm_dumb1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 22:13:33 2013 From: report at bugs.python.org (Marc Liyanage) Date: Fri, 01 Nov 2013 21:13:33 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module In-Reply-To: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> Message-ID: <1383340413.34.0.219453600168.issue19478@psf.upfronthosting.co.za> Marc Liyanage added the comment: Great to hear that this is mostly supported in 3.4. I would definitely like to see the small change added that lets me insert a string before the leading slash. It would also be helpful to have it in Python 2.7 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 22:48:16 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 01 Nov 2013 21:48:16 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1383342496.07.0.507552692102.issue15873@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:14:26 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Nov 2013 22:14:26 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383344066.06.0.492011981889.issue19475@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I understand Guido's message, he reopened this to consider adding a new parameter. Given an existing csv file like that given, either Tim's solution or try: parse with microseconds except ValueError: parse without should work. ---------- nosy: +terry.reedy title: Inconsistency between datetime's str()/isoformat() and its strptime() method -> Add microsecond flag to datetime isoformat() type: behavior -> enhancement versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:17:00 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 01 Nov 2013 22:17:00 +0000 Subject: [issue18039] dbm.open(..., flag="n") does not work and does not give a warning In-Reply-To: <1369269598.14.0.669972141851.issue18039@psf.upfronthosting.co.za> Message-ID: <1383344220.91.0.798085877397.issue18039@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Here's a patch which adds support for the `n` value of the flag. It makes the dbm consistent across implementations and it's thus more reliable. Also, attached a script which replicates the problem for Windows (where dbm.dumb is used). My output (after a couple of runs): D:\Projects\snippets\DBM>py -3 a.py u7 test [b'u3', b'u2', b'u5', b'u4', b'u7', b'u6'] test.dat exists? True test.dir exists? True b'u3' b'there' b'u2' b'there' b'u5' b'there' b'u4' b'there' b'u7' b'there' b'u6' b'there' ---------- nosy: +Claudiu.Popa Added file: http://bugs.python.org/file32454/test_dbm.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:17:23 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 01 Nov 2013 22:17:23 +0000 Subject: [issue18039] dbm.open(..., flag="n") does not work and does not give a warning In-Reply-To: <1369269598.14.0.669972141851.issue18039@psf.upfronthosting.co.za> Message-ID: <1383344243.47.0.208633239788.issue18039@psf.upfronthosting.co.za> Claudiu.Popa added the comment: And the patch. ---------- keywords: +patch Added file: http://bugs.python.org/file32455/dbm_dumb_open.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:21:21 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 22:21:21 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383344481.34.0.850472162919.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Here's a new patch that is mostly up to date with the PEP. I still need to work on Docs and add more tests. There are a few failing tests (due to the recent reload patch) that I need to fix when I get a minute. This patch also implements find_spec() on FileFinder and PathFinder. Left to do: * deprecations and removals * refactor importlib loaders to use the new Finder/Loader APIs * refactor pythonrun.c to make use of __spec__ * adjust other APIs to use __spec__ (pickle, etc.) ---------- Added file: http://bugs.python.org/file32456/modulespec-primary-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:25:55 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 22:25:55 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383344755.59.0.0461776182126.issue18864@psf.upfronthosting.co.za> Changes by Eric Snow : Added file: http://bugs.python.org/file32457/modulespec-primary-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:26:11 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 22:26:11 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383344771.01.0.480080181625.issue18864@psf.upfronthosting.co.za> Changes by Eric Snow : Removed file: http://bugs.python.org/file32456/modulespec-primary-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:26:18 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Nov 2013 22:26:18 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383344778.64.0.0397425043948.issue18864@psf.upfronthosting.co.za> Changes by Eric Snow : Removed file: http://bugs.python.org/file32408/modulespec-primary-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:39:42 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Nov 2013 22:39:42 +0000 Subject: [issue19398] test_trace fails with -S In-Reply-To: <1382730233.11.0.30990585871.issue19398@psf.upfronthosting.co.za> Message-ID: <1383345582.2.0.637239345456.issue19398@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The test should use the more specific assertXyz method: self.assertIn("pprint.cover", files) The error message would then be the more informative AssertionError: 'pprint.cover' not found in ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 1 23:59:09 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Nov 2013 22:59:09 +0000 Subject: [issue19417] Add tests for bdb (previously not tested) In-Reply-To: <1382896308.72.0.45441786626.issue19417@psf.upfronthosting.co.za> Message-ID: <1383346749.41.0.953928351071.issue19417@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is the patch against 3.4? I am not sure if we backport new test files. ---------- components: +Tests nosy: +terry.reedy stage: -> patch review title: bdb test coverage -> Add tests for bdb (previously not tested) type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 00:05:31 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Nov 2013 23:05:31 +0000 Subject: [issue19417] Add tests for bdb (previously not tested) In-Reply-To: <1382896308.72.0.45441786626.issue19417@psf.upfronthosting.co.za> Message-ID: <1383347131.35.0.942981575334.issue19417@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Does all of the code for say, BdbTestCase.setUp, need to be repeated for each test method, versus being put in a .setUpClass method to be executed just once for all the methods in BdbTestCase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 00:39:40 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Nov 2013 23:39:40 +0000 Subject: [issue19451] urlparse accepts invalid hostnames In-Reply-To: <1383138962.68.0.105445419369.issue19451@psf.upfronthosting.co.za> Message-ID: <1383349180.57.0.632966909102.issue19451@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The 3.4 urllib.parse.urlparse doc says "The module has been designed to match the Internet RFC on Relative Uniform Resource Locators. It supports the following URL schemes: ". To me, 'support' means 'accept every valid URL for the particular scheme' but not necessarily 'reject every URL that is invalid for the particular scheme'. The other RFCs references are these: "Following the syntax specifications in RFC 1808, urlparse recognizes a netloc only if it is properly introduced by ?//?." and " The fragment is now parsed for all URL schemes (unless allow_fragment is false), in accordance with RFC 3986." I currently see this, at best, as a request to deprecate 'over-acceptance', to be removed in the future. But if there are urls in the wild that use _s, then practicality says that this should be closed as invalid. ---------- nosy: +terry.reedy type: behavior -> enhancement versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 00:52:34 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 01 Nov 2013 23:52:34 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383349954.67.0.462385670935.issue19406@psf.upfronthosting.co.za> Ned Deily added the comment: Here are my review comments (sorry, no Rietveld): ensurepip/__init__.py --------------------- Why have the separate _run_pip function? It would be simpler and less confusing to just merge run_pip into bootstrap and eliminate the extra for loop. Both depend on the _PROJECTS list anyway. -- Ah, I see that the reason for the separation is for mocking purposes in test_ensurepip. How about constructing the list of paths to insert in bootstrap and passing that as the new second argument to _run_pip. Then the knowledge about the wheel names is only in one place. test_ensurepip.py ----------------- s/bootsraping/bootsrapping/g checkpip.py ----------- It would be useful if checkpip.py returned an non-zero exit status in the case any projects are out-of-date. Makefile.pre.in --------------- Need to add ensurepip and ensurepip/_bundled to LIBSUBDIRS so that they are installed. ensurepip/_bundeled ------------------- The actual wheel files are not in the patch. For other reviewers, Donald pointed me to their source here: https://github.com/dstufft/cpython/blob/ensurepip/Lib/ensurepip/_bundled/ Using those wheels, which, as Donald notes, are preliminary (especially the setuptools one), I did some installs using a non-standard --prefix for python. Here are the contents of the bin directory (what would be installed into /usr/local/bin by default) after "make altinstall". $ ls -l bin total 18760 -rwxr-xr-x 1 nad pyd 110 Nov 1 15:08 2to3-3.4* -rwxr-xr-x 1 nad pyd 108 Nov 1 15:08 idle3.4* -rwxr-xr-x 1 nad pyd 93 Nov 1 15:08 pydoc3.4* -rwxr-xr-x 2 nad pyd 4791296 Nov 1 15:08 python3.4* -rwxr-xr-x 2 nad pyd 4791296 Nov 1 15:08 python3.4dm* -rwxr-xr-x 1 nad pyd 2041 Nov 1 15:08 python3.4dm-config* -rwxr-xr-x 1 nad pyd 245 Nov 1 15:08 pyvenv-3.4* Now after python3.4 --ensurepip is run: -rwxr-xr-x 1 nad pyd 110 Nov 1 15:08 2to3-3.4* -rw-r----- 1 nad pyd 687 Nov 1 15:19 easy_install -rw-r----- 1 nad staff 355 Nov 1 15:19 easy_install-3.3.pya -rw-r----- 1 nad pyd 687 Nov 1 15:19 easy_install-3.4 -rw-r----- 1 nad staff 347 Nov 1 15:19 easy_install.pya -rwxr-xr-x 1 nad pyd 108 Nov 1 15:08 idle3.4* -rw-r----- 1 nad pyd 659 Nov 1 15:19 pip -rw-r----- 1 nad pyd 659 Nov 1 15:19 pip3 -rw-r----- 1 nad pyd 659 Nov 1 15:19 pip3.4 -rwxr-xr-x 1 nad pyd 93 Nov 1 15:08 pydoc3.4* -rwxr-xr-x 2 nad pyd 4791296 Nov 1 15:08 python3.4* -rwxr-xr-x 2 nad pyd 4791296 Nov 1 15:08 python3.4dm* -rwxr-xr-x 1 nad pyd 2041 Nov 1 15:08 python3.4dm-config* -rwxr-xr-x 1 nad pyd 245 Nov 1 15:08 pyvenv-3.4* Now after "make install" is run: lrwxr-x--- 1 nad pyd 8 Nov 1 15:21 2to3@ -> 2to3-3.4 -rwxr-xr-x 1 nad pyd 110 Nov 1 15:21 2to3-3.4* -rw-r----- 1 nad pyd 687 Nov 1 15:19 easy_install -rw-r----- 1 nad staff 355 Nov 1 15:19 easy_install-3.3.pya -rw-r----- 1 nad pyd 687 Nov 1 15:19 easy_install-3.4 -rw-r----- 1 nad staff 347 Nov 1 15:19 easy_install.pya lrwxr-x--- 1 nad pyd 7 Nov 1 15:21 idle3@ -> idle3.4 -rwxr-xr-x 1 nad pyd 108 Nov 1 15:21 idle3.4* -rw-r----- 1 nad pyd 659 Nov 1 15:19 pip -rw-r----- 1 nad pyd 659 Nov 1 15:19 pip3 -rw-r----- 1 nad pyd 659 Nov 1 15:19 pip3.4 lrwxr-x--- 1 nad pyd 8 Nov 1 15:21 pydoc3@ -> pydoc3.4 -rwxr-xr-x 1 nad pyd 93 Nov 1 15:21 pydoc3.4* lrwxr-x--- 1 nad pyd 9 Nov 1 15:21 python3@ -> python3.4 lrwxr-x--- 1 nad pyd 16 Nov 1 15:21 python3-config@ -> python3.4-config -rwxr-xr-x 2 nad pyd 4791296 Nov 1 15:20 python3.4* lrwxr-x--- 1 nad pyd 18 Nov 1 15:21 python3.4-config@ -> python3.4dm-config -rwxr-xr-x 2 nad pyd 4791296 Nov 1 15:20 python3.4dm* -rwxr-xr-x 1 nad pyd 2041 Nov 1 15:21 python3.4dm-config* lrwxr-x--- 1 nad pyd 10 Nov 1 15:21 pyvenv@ -> pyvenv-3.4 -rwxr-xr-x 1 nad pyd 245 Nov 1 15:21 pyvenv-3.4* The problem I see here is that pip is unconditionally installing both a pip and a pip3 script along with the versioned script (pip3.4). Setuptools also has the same issue (along with the wonky .pya scripts which I think should be Windows only). For system installs, pip, setuptools, and ensurepip should support the equivalent of "altinstall" and "install" options, with the former only installing fully-versioned names and the latter adding "3" names and, to be consistent, neither should install the totally unversioned links for Python 3, so no "pip" or "easy_install". Third-party packagers solve the conflict between Py2 and Py3 scripts in various ways, like providing some administrative command (e.g. debian "update-alternatives" or Macports "port select"). For virtual environments, the user has complete control over the bin directory and the current behavior of pip and easy_install is OK there (and would be introduce an incompatibility if the default were to change). ensurepip should be conservative about this. Perhaps the way to implement it is to introduce something like a non-default --alt (name TBD) option to both setuptools and pip (for backwards compatibility) and have ensurepip by default always install setuptools and pip with --alt unless installing into a virtual environment or with a "--makedefault" (name TBD) option? It would be rather nasty for the default ensurepip to wipe out already installed versions of pip and easy_install for Python 2 (yes, you would need to have the appropriate privilege as well) in a shared bin directory, like /usr/local/bin or /usr/bin. FTR, the OS X installer build script could work around the current behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 01:02:00 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 02 Nov 2013 00:02:00 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383350520.32.0.390545309056.issue19406@psf.upfronthosting.co.za> Ned Deily added the comment: I suppose the changes could be isolated to just ensurepip if it used a temporary dir for the scripts and then moved the appropriate ones itself to the standard scripts directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 01:05:25 2013 From: report at bugs.python.org (Martin Panter) Date: Sat, 02 Nov 2013 00:05:25 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present In-Reply-To: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> Message-ID: <1383350725.94.0.435949395517.issue19456@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 01:12:19 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 02 Nov 2013 00:12:19 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383351139.95.0.236197116838.issue19406@psf.upfronthosting.co.za> Ned Deily added the comment: Just for the record, here's what the installed ./lib/python3.4/site-packages looks like after ensurepip has run: -rw-r--r-- 1 nad pyd 119 Nov 1 15:20 README drwxr-x--- 2 nad pyd 204 Nov 1 15:21 __pycache__/ drwxr-x--- 3 nad pyd 170 Nov 1 15:21 _markerlib/ -rw-r----- 1 nad staff 126 Nov 1 15:19 easy_install.py drwxr-x--- 7 nad pyd 782 Nov 1 15:21 pip/ drwxr-x--- 2 nad pyd 306 Nov 1 15:19 pip-1.5.dev1.dist-info/ -rw-r----- 1 nad staff 101430 Nov 1 15:19 pkg_resources.py drwxr-x--- 6 nad pyd 1020 Nov 1 15:21 setuptools/ drwxr-x--- 2 nad pyd 374 Nov 1 15:19 setuptools-1.1.6.dist-info/ And, within pip/_vendor, the following additional projects are installed: -rw-r----- 1 nad staff 266 Nov 1 15:19 __init__.py drwxr-x--- 2 nad pyd 272 Nov 1 15:21 __pycache__/ drwxr-x--- 3 nad pyd 306 Nov 1 15:21 colorama/ drwxr-x--- 4 nad pyd 714 Nov 1 15:21 distlib/ drwxr-x--- 8 nad pyd 544 Nov 1 15:21 html5lib/ -rw-r----- 1 nad staff 773 Nov 1 15:19 re-vendor.py drwxr-x--- 4 nad pyd 646 Nov 1 15:21 requests/ -rw-r----- 1 nad staff 12415 Nov 1 15:19 six.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 01:16:30 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 02 Nov 2013 00:16:30 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383351390.86.0.763044327203.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: The .pya thing is an experimental extension type that setuptools added that just got missed during the new features to generate scripts during wheel install vs wheel build time. I opened a bug to remove that and it'll be gone before 1.5 is released. I can fix the typos and add those to the Makefile.pre.in. I agree the versioned scripts need some sort of resolution, I'm not entirely sure what that resolution is. This is coming from pip itself so it's not specific to ensurepip. So there are 4 cases that pip needs to handle. 1) Installation via the original bootstrapping methods into a pre Python 3.4 Python, including a 2.x Python. 2) Installation via ensurepip in Python 3.4+ 3) Installation via easy_install 4) Installation via pip install --upgrade pip So there's obviously a number of solutions that solve the problem in specifically the ensurepip case (adding a flag, temporary directory, etc). What I wonder is: A) Is it considered reasonable that if someone installs pip with ensurepip, but then later upgrades it with ``pip install --upgrade pip`` that they'll get "typical" pip behavior of installing pip, pipX, and pipX.Y or is this believed to be something that fundamentally needs to change in pip? B) What about in cases where there is *not* a third party distributor, is it reasonable that if there isn't already a ``pip`` command that pip would provide it, but if there is a pip command already pip *won't* ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 01:39:54 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 02 Nov 2013 00:39:54 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383352794.5.0.560263410395.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: Oh one thing, I can't move anything out of _run_pip because the part you're referring to is actually modifying the sys.path. If I move it then I can't prevent the tests from having side effects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 01:40:30 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 02 Nov 2013 00:40:30 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383352830.75.0.420524805285.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: Oh nevermind, I understand now. I misread the statement. I can do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 01:56:16 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 02 Nov 2013 00:56:16 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383353776.4.0.742788700407.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: Attached is the second combined2 patch with Ned's feedback incorporated. For anyone testing this the patch does not contain the binary files which can be found at https://github.com/dstufft/cpython/blob/ensurepip/Lib/ensurepip/_bundled/. ---------- Added file: http://bugs.python.org/file32458/combined2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 02:38:01 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 02 Nov 2013 01:38:01 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1383353776.4.0.742788700407.issue19406@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: The "install everything" approach is OK for Windows and virtual environments. The challenge is the shared bin directories on *nix systems. Perhaps pip itself could be updated such that it installs the bare "pip" only if sys.executable matches shutil.which("python")? At the very least, ensurepip should work that way, but setuptools actually has the same problem with respect to easy_install. Also, if we do the temp directory workaround then we need to copy and then delete the original rather than move (otherwise the file context will be wrong under SELinux) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 02:46:16 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 02 Nov 2013 01:46:16 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383356776.0.0.783416619967.issue19406@psf.upfronthosting.co.za> Ned Deily added the comment: Without digging deeper, I'd be a little cautious about using a test involving sys.executable and shutil.which. sys.executable in the past at least was not always what you might think in certain cases with OS X framework installs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 03:31:51 2013 From: report at bugs.python.org (Geraldo Xexeo) Date: Sat, 02 Nov 2013 02:31:51 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1383359511.86.0.41818685729.issue15809@psf.upfronthosting.co.za> Geraldo Xexeo added the comment: The same program will behave different in Windows and Mac. utf-8 works on Mac (10.6.8), cp1256 does not print some lines cp1256 works on Windows 7, utf-8 prints some characters in a wrong way For the record, I use accentuated letters from Portuguese alphabet ( ã ?, for example). ---------- nosy: +Geraldo.Xexeo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 03:55:46 2013 From: report at bugs.python.org (Martin Panter) Date: Sat, 02 Nov 2013 02:55:46 +0000 Subject: [issue19411] binascii.hexlify docs say it returns a string (it returns bytes) In-Reply-To: <1382807910.82.0.748740374727.issue19411@psf.upfronthosting.co.za> Message-ID: <1383360946.56.0.755031206403.issue19411@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 05:26:16 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 02 Nov 2013 04:26:16 +0000 Subject: [issue19411] binascii.hexlify docs say it returns a string (it returns bytes) In-Reply-To: <1382807910.82.0.748740374727.issue19411@psf.upfronthosting.co.za> Message-ID: <1383366376.41.0.298270798078.issue19411@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch to fix the doc. I also fix the module doc because I think bytes and str data types are matter of life and death in this binascii module. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32459/fix_doc_binascii.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 05:35:56 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 02 Nov 2013 04:35:56 +0000 Subject: [issue19398] test_trace fails with -S In-Reply-To: <1382730233.11.0.30990585871.issue19398@psf.upfronthosting.co.za> Message-ID: <1383366956.12.0.959345425316.issue19398@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch to accommodate Terry J. Reedy's request. ---------- Added file: http://bugs.python.org/file32460/remove_extra_slash_from_sys_path_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 05:42:35 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 02 Nov 2013 04:42:35 +0000 Subject: [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1383367355.25.0.645761279691.issue13637@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Antoine, I think you forgot to update the doc. http://docs.python.org/3.4/library/binascii.html#binascii.unhexlify Changed in version 3.2: Accept only bytestring or bytearray objects as input. Attached the patch to update the doc to reflect the changes in this ticket. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file32461/fix_doc_binascii_unhexlify.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 06:32:24 2013 From: report at bugs.python.org (eaducac) Date: Sat, 02 Nov 2013 05:32:24 +0000 Subject: [issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program In-Reply-To: <1366373912.56.0.138468709297.issue17797@psf.upfronthosting.co.za> Message-ID: <1383370344.34.0.460479492852.issue17797@psf.upfronthosting.co.za> eaducac added the comment: Hi all, I ran into this problem myself today with 3.3.2 and I thought I'd provide some more detail on what's going on. As has been described, prior to VC11, fileno(stdin) returned -2 in applications with no console, so is_valid_fd() was properly rejecting it and the standard streams were being set to None. With VC11, it now returns 0, and the NT handle that underlies the FILE object associated with file descriptor 0 is -2. The problem is that -2 is a pseudo-handle representing the current thread. dup() is simply a wrapper around the Windows API function DuplicateHandle(), so when dup() is called on file descriptor 0, it returns success because DuplicateHandle() is successfully creating a new handle referring to the current thread. It's not until the call to fstat() in check_fd() much later that the CRT realizes it's not dealing with a file. I see in Mercurial that 3.3.4 and 3.4 that the is_valid_fd() code hasn't been changed. This is definitely a Microsoft bug, but if (as it sounds) they're not going to be able to fix it anytime soon, I think it would be ideal to have a change for this in Python. Replacing this with check_fd() would fix it, or if you don't want to rely on fstat(), some Windows-specific code using GetStdHandle(): #ifdef MS_WINDOWS if (!is_valid_fd(fd) || GetStdHandle(STD_INPUT_HANDLE) == NULL) { #else if (!is_valid_fd(fd)) { #endif That would have to be repeated for stdout and stderr using GetStdHandle(STD_OUTPUT_HANDLE) and GetStdHandle(STD_ERROR_HANDLE), as those descriptors have the same problem. ---------- nosy: +eaducac versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 09:48:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 08:48:34 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dBYp95L4Bz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 92e268f2719e by Serhiy Storchaka in branch '3.3': Issue #19085: Added basic tests for all tkinter widget options. http://hg.python.org/cpython/rev/92e268f2719e New changeset ab7c2c1d349c by Serhiy Storchaka in branch 'default': Issue #19085: Added basic tests for all tkinter widget options. http://hg.python.org/cpython/rev/ab7c2c1d349c New changeset ced345326151 by Serhiy Storchaka in branch '2.7': Issue #19085: Added basic tests for all tkinter widget options. http://hg.python.org/cpython/rev/ced345326151 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 09:55:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 08:55:26 +0000 Subject: [issue10734] test_ttk test_heading_callback fails with newer Tk 8.5 In-Reply-To: <1292706922.45.0.208964037247.issue10734@psf.upfronthosting.co.za> Message-ID: <3dBYy532Z9z7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 0554e2d37bf8 by Serhiy Storchaka in branch '2.7': Issue #10734: Fix and re-enable test_ttk test_heading_callback. http://hg.python.org/cpython/rev/0554e2d37bf8 New changeset a58fce53e873 by Serhiy Storchaka in branch '3.3': Issue #10734: Fix and re-enable test_ttk test_heading_callback. http://hg.python.org/cpython/rev/a58fce53e873 New changeset f647a2c5f290 by Serhiy Storchaka in branch 'default': Issue #10734: Fix and re-enable test_ttk test_heading_callback. http://hg.python.org/cpython/rev/f647a2c5f290 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 09:56:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 Nov 2013 08:56:34 +0000 Subject: [issue10734] test_ttk test_heading_callback fails with newer Tk 8.5 In-Reply-To: <1292706922.45.0.208964037247.issue10734@psf.upfronthosting.co.za> Message-ID: <1383382594.92.0.890043535644.issue10734@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 10:53:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 Nov 2013 09:53:52 +0000 Subject: [issue6157] Tkinter.Text: changes for bbox, debug, and edit methods. In-Reply-To: <1243800373.79.0.587066766962.issue6157@psf.upfronthosting.co.za> Message-ID: <1383386032.42.0.178013205423.issue6157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch with tests. Only fix for tkinter.Text.debug() (and perhaps test_bbox) should be backported to maintenance releases. ---------- versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 11:06:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 Nov 2013 10:06:12 +0000 Subject: [issue19320] Tkinter tests ran with wantobjects is false In-Reply-To: <1382302056.06.0.500513298536.issue19320@psf.upfronthosting.co.za> Message-ID: <1383386772.29.0.896322575463.issue19320@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But because there are some other tkinter tests which fail when wantobjects is false, skipping these tests can be reasonable alternative. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 11:08:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 Nov 2013 10:08:37 +0000 Subject: [issue6157] Tkinter.Text: changes for bbox, debug, and edit methods. In-Reply-To: <1243800373.79.0.587066766962.issue6157@psf.upfronthosting.co.za> Message-ID: <1383386917.66.0.545924013824.issue6157@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32462/tkinter_text_changes_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 12:24:01 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 02 Nov 2013 11:24:01 +0000 Subject: [issue19467] asyncore documentation: redirect users to the new asyncio module In-Reply-To: <1383269804.3.0.264747393931.issue19467@psf.upfronthosting.co.za> Message-ID: <1383391441.03.0.365895475137.issue19467@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Personally I see little value in creating a section in the doc which explains how to port code from asyncore/chat to asyncio. Current asyncore/chat doc has just a couple of code samples which do not justify the effort, IMO. I think a deprecation warning with a link to the asyncio module will be just fine. ...and for the record, I'm not asyncore/chat author, just the current maintainer. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 13:34:12 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 02 Nov 2013 12:34:12 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <1383395652.94.0.665485404643.issue19437@psf.upfronthosting.co.za> Stefan Krah added the comment: Ok, I found it. It was an assert() in debug mode that the MemoryError from PyObject_IsInstance() was swallowed. In production mode AttributeError would have been raised. Program received signal SIGABRT, Aborted. 0x00007ffff71e0475 in *__GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) (gdb) bt #0 0x00007ffff71e0475 in *__GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007ffff71e36f0 in *__GI_abort () at abort.c:92 #2 0x00007ffff71d9621 in *__GI___assert_fail (assertion=0x688db8 "!PyErr_Occurred()", file=, line=1211, function=0x68a0c0 "PyEval_EvalFrameEx") at assert.c:81 #3 0x000000000058fe3a in PyEval_EvalFrameEx (f=0xb328d8, throwflag=0) at Python/ceval.c:1211 #4 0x00000000005a4192 in PyEval_EvalCodeEx (_co=0x7ffff05a3100, globals=0x7ffff0580d78, locals=0x0, args=0x7ffff059b288, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3570 #5 0x0000000000650efa in function_call (func=0x7fffef54de00, arg=0x7ffff059b260, kw=0x0) at Objects/funcobject.c:632 #6 0x000000000045e2af in PyObject_Call (func=0x7fffef54de00, arg=0x7ffff059b260, kw=0x0) at Objects/abstract.c:2087 #7 0x000000000045f3ea in PyObject_CallFunctionObjArgs (callable=0x7fffef54de00) at Objects/abstract.c:2379 #8 0x000000000064b101 in property_descr_get (self=0x7fffef53cc58, obj=0x7ffff05a25a0, type=0xae3778) at Objects/descrobject.c:1345 #9 0x00000000004c27cd in _PyObject_GenericGetAttrWithDict (obj=0x7ffff05a25a0, name=0x7ffff7faf9e0, dict=0x0) at Objects/object.c:1181 #10 0x00000000004c2b9c in PyObject_GenericGetAttr (obj=0x7ffff05a25a0, name=0x7ffff7faf9e0) at Objects/object.c:1241 #11 0x00000000004c201e in PyObject_GetAttr (v=0x7ffff05a25a0, name=0x7ffff7faf9e0) at Objects/object.c:1015 #12 0x00000000004c1ba3 in PyObject_GetAttrString (v=0x7ffff05a25a0, name=0x7fffef275987 "numerator") at Objects/object.c:914 #13 0x00007fffef2319ec in numerator_as_decimal (r=0x7ffff05a25a0, context=0x7fffef1e6430) at /home/stefan/hg/master3/Modules/_decimal/_decimal.c:2951 #14 0x00007fffef231e4e in convert_op_cmp (vcmp=0x7fffffffc670, wcmp=0x7fffffffc668, v=0x7fffefea9760, w=0x7ffff05a25a0, op=0, context=0x7fffef1e6430) at /home/stefan/hg/master3/Modules/_decimal/_decimal.c:3013 #15 0x00007fffef23d10e in dec_richcompare (v=0x7fffefea9760, w=0x7ffff05a25a0, op=0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 14:19:22 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 02 Nov 2013 13:19:22 +0000 Subject: [issue18996] unittest: more helpful truncating long strings In-Reply-To: <1378813907.09.0.280972244132.issue18996@psf.upfronthosting.co.za> Message-ID: <1383398362.13.0.511776400669.issue18996@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Serhiy, you still left debugging code there. Lib/unittest/test/test_case.py, line 879 and line 880. #print() #print(str(cm.exception)) ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 14:43:42 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 02 Nov 2013 13:43:42 +0000 Subject: [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1383399822.02.0.522002380045.issue13637@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is another patch to better the error message. Right now, the error message when wrong input sent to unhexlify is a little bit funny. >>> import binascii >>> binascii.unhexlify(3) Traceback (most recent call last): File "", line 1, in TypeError: argument should be bytes, buffer or ASCII string, not After patch: >>> import binascii >>> binascii.unhexlify(3) Traceback (most recent call last): File "", line 1, in TypeError: argument should be bytes, buffer or ASCII string, not int ---------- Added file: http://bugs.python.org/file32463/better_error_message_binascii.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 15:41:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 14:41:45 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dBjdh5Wdbz7LjT@mail.python.org> Roundup Robot added the comment: New changeset cee56ef59a6a by Serhiy Storchaka in branch 'default': Issue #19085. Try to fix tkinter tests on Windows. http://hg.python.org/cpython/rev/cee56ef59a6a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 15:45:39 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 02 Nov 2013 14:45:39 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1383403539.78.0.384311295595.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm going to close this as fixed then. If other people report problems I can always apply the patch and/or try to figure out something else. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 15:50:18 2013 From: report at bugs.python.org (Alexis Daboville) Date: Sat, 02 Nov 2013 14:50:18 +0000 Subject: [issue19479] textwrap.dedent doesn't work properly with strings containing CRLF Message-ID: <1383403818.41.0.713007913793.issue19479@psf.upfronthosting.co.za> New submission from Alexis Daboville: If a string contains an empty line and is using CRLF newlines instead of LF newlines textwrap.dedent doesn't work properly: it returns the original string w/o dedenting it. As far as I can tell it's because it considers the empty string to be the longest common indent (http://hg.python.org/cpython/file/2.7/Lib/textwrap.py#l372, '[^ \t\n]' matches '\r'). Expected behavior: textwrap.dedent should work the same way whether lines are separated by a single LF character or by CRLF. To repro: ? 15:26 dabovill @ morag in /tmp/dedent $ cat dedent.py import textwrap lf = '\ta\n\tb\n\n\tc' crlf = '\ta\r\n\tb\r\n\r\n\tc' print('- lf') print(lf) print('- dedent(lf)') print(textwrap.dedent(lf)) print('- crlf') print(crlf) print('- dedent(crlf)') print(textwrap.dedent(crlf)) ? 15:26 dabovill @ morag in /tmp/dedent $ python2.7 dedent.py - lf a b c - dedent(lf) a b c - crlf a b c - dedent(crlf) a b c ? 15:26 dabovill @ morag in /tmp/dedent $ python3.3 dedent.py - lf a b c - dedent(lf) a b c - crlf a b c - dedent(crlf) a b c ---------- components: Library (Lib) messages: 201975 nosy: alexis.d priority: normal severity: normal status: open title: textwrap.dedent doesn't work properly with strings containing CRLF type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 16:08:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 15:08:39 +0000 Subject: [issue15114] Deprecate strict mode of HTMLParser In-Reply-To: <1340185371.41.0.609283463083.issue15114@psf.upfronthosting.co.za> Message-ID: <3dBkDk2GVZz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 0a56709eb798 by Ezio Melotti in branch 'default': #15114: The html.parser module now raises a DeprecationWarning when the strict argument of HTMLParser or the HTMLParser.error method are used. http://hg.python.org/cpython/rev/0a56709eb798 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 16:28:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 15:28:23 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dBkgV5BvCz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 278d15021d9a by Serhiy Storchaka in branch '2.7': Issue #19085: Fix Tkinter tests with Tcl/Tk 8.4. http://hg.python.org/cpython/rev/278d15021d9a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 16:58:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 15:58:39 +0000 Subject: [issue19286] error: can't copy '': doesn't exist or not a regular file In-Reply-To: <1382123460.13.0.176528626985.issue19286@psf.upfronthosting.co.za> Message-ID: <3dBlL11b4yz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 22bac968e226 by Jason R. Coombs in branch '2.7': Issue #19286: Adding test demonstrating the failure when a directory is found in the package_data globs. http://hg.python.org/cpython/rev/22bac968e226 New changeset 0a1cf947eff6 by Jason R. Coombs in branch '2.7': Issue #19286: [distutils] Only match files in build_py.find_data_files. http://hg.python.org/cpython/rev/0a1cf947eff6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 17:54:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 16:54:16 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dBmZc0Hf4z7LjS@mail.python.org> Roundup Robot added the comment: New changeset f25679db52fb by Serhiy Storchaka in branch '3.3': Issue #19085: Fixed some Tkinter tests on Windows. http://hg.python.org/cpython/rev/f25679db52fb New changeset 4a2afda8f187 by Serhiy Storchaka in branch '2.7': Issue #19085: Fixed some Tkinter tests on Windows. http://hg.python.org/cpython/rev/4a2afda8f187 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 17:57:52 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 02 Nov 2013 16:57:52 +0000 Subject: [issue19480] HTMLParser fails to handle some characters in the starttag Message-ID: <1383411472.4.0.242370272088.issue19480@psf.upfronthosting.co.za> New submission from Ezio Melotti: HTMLParser fails to handle some characters in the starttag, e.g. should see 'a$b' as name but currently stops at $. The attached patch fixes the issue. ---------- assignee: ezio.melotti files: starttag.diff keywords: patch messages: 201980 nosy: ezio.melotti priority: normal severity: normal stage: patch review status: open title: HTMLParser fails to handle some characters in the starttag type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32464/starttag.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 18:05:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 17:05:31 +0000 Subject: [issue19286] error: can't copy '': doesn't exist or not a regular file In-Reply-To: <1382123460.13.0.176528626985.issue19286@psf.upfronthosting.co.za> Message-ID: <3dBmq55PG1z7Lk2@mail.python.org> Roundup Robot added the comment: New changeset d80207d15294 by Jason R. Coombs in branch '3.2': Issue #19286: Adding test demonstrating the failure when a directory is found in the package_data globs. http://hg.python.org/cpython/rev/d80207d15294 New changeset 265d369ad3b9 by Jason R. Coombs in branch '3.2': Issue #19286: [distutils] Only match files in build_py.find_data_files. http://hg.python.org/cpython/rev/265d369ad3b9 New changeset 69f8288056eb by Jason R. Coombs in branch '3.3': Merge with 3.2 for Issue #19286. http://hg.python.org/cpython/rev/69f8288056eb New changeset 9eafe31251b4 by Jason R. Coombs in branch 'default': Merge with 3.3 for Issue #19286. http://hg.python.org/cpython/rev/9eafe31251b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 18:06:33 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 02 Nov 2013 17:06:33 +0000 Subject: [issue19286] error: can't copy '': doesn't exist or not a regular file In-Reply-To: <1382123460.13.0.176528626985.issue19286@psf.upfronthosting.co.za> Message-ID: <1383411993.93.0.342758242799.issue19286@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 18:09:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 02 Nov 2013 17:09:36 +0000 Subject: [issue19478] Add ability to prefix posix semaphore names created by multiprocessing module In-Reply-To: <1383335608.62.0.190972038385.issue19478@psf.upfronthosting.co.za> Message-ID: <3dBmvt44Y3z7LkW@mail.python.org> Roundup Robot added the comment: New changeset 1b5506fc6a50 by Richard Oudkerk in branch 'default': Issue #19478: Make choice of semaphore prefix more flexible. http://hg.python.org/cpython/rev/1b5506fc6a50 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 18:11:24 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 02 Nov 2013 17:11:24 +0000 Subject: [issue19480] HTMLParser fails to handle some characters in the starttag In-Reply-To: <1383411472.4.0.242370272088.issue19480@psf.upfronthosting.co.za> Message-ID: <1383412284.15.0.71718267879.issue19480@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached a patch for 2.7. The patch removes a "public" name/regex (tagfind_tolerant). The name is not documented and it's supposed to be private like all the other top-level names on HTMLParser, and even creating an alias with tagfind_tolerant = tagfind won't work because the groups in the regex changed. ---------- nosy: +r.david.murray stage: patch review -> commit review Added file: http://bugs.python.org/file32465/starttag27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 20:51:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 Nov 2013 19:51:06 +0000 Subject: [issue6160] Tkinter.Spinbox: fix for bbox and removed some uninteresting returns In-Reply-To: <1243826530.3.0.945381049334.issue6160@psf.upfronthosting.co.za> Message-ID: <1383421866.99.0.301683542858.issue6160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated to tip and added test. Terry, do you think this patch should be applied to maintenance release? It change a behavior. However current behavior doesn't look desirable. ---------- Added file: http://bugs.python.org/file32466/Spinbox_fixes_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 21:49:24 2013 From: report at bugs.python.org (Nicolas Frattaroli) Date: Sat, 02 Nov 2013 20:49:24 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1383425364.75.0.972787207133.issue16472@psf.upfronthosting.co.za> Nicolas Frattaroli added the comment: I had the same issue. It wouldn't just crash, it would crash sometimes, and not other times. About 50% of the time. The solution to remove msvcr as suggested by Marek did work. I didn't apply his patch, however, because I'm using a MinGW64Compiler definition instead of the standard mingw32 one, which I got from a different distutils bug with a submitted patch that hasn't been reviewed yet. Great work, gents. ---------- nosy: +fratti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 21:54:38 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Nov 2013 20:54:38 +0000 Subject: [issue19480] HTMLParser fails to handle some characters in the starttag In-Reply-To: <1383411472.4.0.242370272088.issue19480@psf.upfronthosting.co.za> Message-ID: <1383425678.46.0.530849841624.issue19480@psf.upfronthosting.co.za> R. David Murray added the comment: In the maintenance releases you should leave tagfind_tolerant defined with its old value, with a comment that it is internal, no longer used, and has been removed in 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 2 22:02:09 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Sat, 02 Nov 2013 21:02:09 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1383426129.29.0.223953278778.issue17762@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: New patch. Added tests and fixed uncaught OSError. ---------- Added file: http://bugs.python.org/file32467/add_os_release_support_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 03:01:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 03 Nov 2013 02:01:33 +0000 Subject: [issue6160] Tkinter.Spinbox: fix bbox method In-Reply-To: <1243826530.3.0.945381049334.issue6160@psf.upfronthosting.co.za> Message-ID: <1383444093.51.0.13702428995.issue6160@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The bbox fix and the return change are unrelated issues. Let us separate them. There are bbox methods for Grid, Canvax, Listbox, Text, and Spinbox. All are documented as returning tuples of (4) ints, though there are two different interpretations. The first 4 end with return self._getints(self.tk.call(...)) or None Spinbox.bbox should be fixed in all versions to do the same. (The current patch leave off 'or None'. I am not sure if it is ever 'triggered', but let's be consistent.) The new test looks good. I thought of checking that they are all non-negative, but that would really be a tk test and would not catch tk being off by 1, which I think is more likely than tk completely blundering by returning a negative int. Grepping tkinter.__init__.py for 'an empty string' gives multiple hits that indicate to me (without detailed examination) that there are about 7 methods that return such. This is slightly odd in a Python context, but it is documented, hence not wrong. It does not seem to cause a problem; hence it should only be changed in the future after a deprecation period. (At least, I would not do so without pydev discussion, even though no sane code I can think of other than a complete test should depend on the return.) Moreover, no deprecation warning would be possible. So I would reject the idea unless someone wants to open a new issue and examine all such returns for possible change in Python 4. Anyway, I removed '' returns from the title to make this issue just about Spinbox.bbox. With the patch (and news item) limited to bbox and its test and 'or None' added, I think this would be ready to push. ---------- title: Tkinter.Spinbox: fix for bbox and removed some uninteresting returns -> Tkinter.Spinbox: fix bbox method _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 04:28:27 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 03:28:27 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1383449306.99.0.805620918383.issue17883@psf.upfronthosting.co.za> Zachary Ware added the comment: If there are no objections, I'd like to commit both of these in the next day or two (which is nice to be able to say :)). ---------- nosy: +brian.curtin stage: committed/rejected -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 04:32:11 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 03:32:11 +0000 Subject: [issue19440] Clean up test_capi In-Reply-To: <1383081712.17.0.162713378456.issue19440@psf.upfronthosting.co.za> Message-ID: <1383449531.65.0.379255900723.issue19440@psf.upfronthosting.co.za> Zachary Ware added the comment: If there are no objections, I'd like to commit this one soon. ---------- nosy: +brian.curtin stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 04:33:42 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 03:33:42 +0000 Subject: [issue19440] Clean up test_capi In-Reply-To: <1383081712.17.0.162713378456.issue19440@psf.upfronthosting.co.za> Message-ID: <1383449622.79.0.36403980544.issue19440@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- assignee: -> zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 04:34:26 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 03:34:26 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383449666.87.0.568709042362.issue19391@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- assignee: docs at python -> zach.ware stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 05:29:16 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 03 Nov 2013 04:29:16 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass Message-ID: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> New submission from Tim Peters: This showed up on StackOverflow: http://stackoverflow.com/questions/19749757/print-is-blocking-forever-when-printing-unicode-subclass-instance-from-idle They were using 32-bit Python 2.7.5 on Windows 7; I reproduced using the same Python on Windows Vista. To reproduce, open IDLE, and enter >>> class Foo(unicode): pass >>> foo = Foo('bar') >>> print foo IDLE hangs then, and Ctrl+C is ignored. Stranger, these variants do *not* hang: >>> foo >>> print str(foo) >>> print repr(foo) Those all work as expected. Cute :-) And none of these hang in a DOS-box session. ---------- components: IDLE messages: 201991 nosy: tim.peters priority: normal severity: normal status: open title: IDLE hangs while printing instance of Unicode subclass versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 05:48:53 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 03 Nov 2013 04:48:53 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383454133.55.0.924675194227.issue19391@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Zachary, perharps you could make a diff with mercurial so we can have Rietveld review link. I don't know whether git can do that or not. ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 06:07:55 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 05:07:55 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383455275.33.0.722938717162.issue19391@psf.upfronthosting.co.za> Zachary Ware added the comment: These diffs are produced by `hg diff --git`. If I'm not mistaken, the reason there is no review link is because these patches are not against default branch. Here's one without the `--git` option though, just to see if I'm wrong :). If I am, I'll replace all of them. ---------- Added file: http://bugs.python.org/file32468/pcbuild_readme-2.7.diff-w-no-git _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 06:11:42 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 05:11:42 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383455502.21.0.370172556774.issue19391@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file32356/pcbuild_readme-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 06:11:57 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 05:11:57 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383455517.05.0.724541350496.issue19391@psf.upfronthosting.co.za> Zachary Ware added the comment: How wrong I was... ---------- Added file: http://bugs.python.org/file32469/pcbuild_readme-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 06:13:40 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 05:13:40 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383455620.87.0.354849917208.issue19391@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file32354/pcbuild_readme-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 06:13:53 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 05:13:53 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383455633.25.0.408603106427.issue19391@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file32470/pcbuild_readme-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 06:15:35 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 05:15:35 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383455735.17.0.761006943084.issue19391@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file32468/pcbuild_readme-2.7.diff-w-no-git _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 06:25:42 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 05:25:42 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383456342.48.0.109113727568.issue19391@psf.upfronthosting.co.za> R. David Murray added the comment: With the --git option, the rietveld service only tries against the default branch. Without the --git option, it can figure out the changeset the patch is based against and use that. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 07:20:18 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 03 Nov 2013 06:20:18 +0000 Subject: [issue19439] Build _testembed on Windows In-Reply-To: <1383080293.2.0.31204430631.issue19439@psf.upfronthosting.co.za> Message-ID: <1383459618.89.0.0917859463369.issue19439@psf.upfronthosting.co.za> Zachary Ware added the comment: This patch's changes to test_capi seem to work for Windows and keeps at least Gentoo and FreeBSD 10 happy. ---------- stage: -> patch review Added file: http://bugs.python.org/file32471/issue19439.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 07:31:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 06:31:23 +0000 Subject: [issue19482] _pickle build warnings on Fedora 19 Message-ID: <1383460283.32.0.964490197084.issue19482@psf.upfronthosting.co.za> New submission from Nick Coghlan: Currently getting build warnings from _pickle.c: ========================== building '_pickle' extension gcc -pthread -fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./Include -I. -IInclude -I/usr/local/include -I/home/ncoghlan/devel/py3k/Include -I/home/ncoghlan/devel/py3k -c /home/ncoghlan/devel/py3k/Modules/_pickle.c -o build/temp.linux-x86_64-3.4/home/ncoghlan/devel/py3k/Modules/_pickle.o /home/ncoghlan/devel/py3k/Modules/_pickle.c: In function ?load_counted_long?: /home/ncoghlan/devel/py3k/Modules/_pickle.c:4143:15: warning: ?pdata? may be used uninitialized in this function [-Wmaybe-uninitialized] value = _PyLong_FromByteArray((unsigned char *)pdata, (size_t)size, ^ /home/ncoghlan/devel/py3k/Modules/_pickle.c: In function ?load?: /home/ncoghlan/devel/py3k/Modules/_pickle.c:5330:25: warning: ?s? may be used uninitialized in this function [-Wmaybe-uninitialized] i = (unsigned char)s[0]; ^ /home/ncoghlan/devel/py3k/Modules/_pickle.c:5324:11: note: ?s? was declared here char *s; ^ /home/ncoghlan/devel/py3k/Modules/_pickle.c:4995:30: warning: ?s? may be used uninitialized in this function [-Wmaybe-uninitialized] idx = Py_CHARMASK(s[0]); ^ /home/ncoghlan/devel/py3k/Modules/_pickle.c:4986:11: note: ?s? was declared here char *s; ^ /home/ncoghlan/devel/py3k/Modules/_pickle.c:4005:20: warning: ?s? may be used uninitialized in this function [-Wmaybe-uninitialized] x |= (size_t) s[3] << 24; ^ /home/ncoghlan/devel/py3k/Modules/_pickle.c:4858:11: note: ?s? was declared here char *s; ^ gcc -pthread -shared build/temp.linux-x86_64-3.4/home/ncoghlan/devel/py3k/Modules/_pickle.o -L/usr/local/lib -o build/lib.linux-x86_64-3.4/_pickle.cpython-34m.so ========================== ---------- components: Extension Modules messages: 201997 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: _pickle build warnings on Fedora 19 type: compile error versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 07:43:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 06:43:01 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <3dC6yR2YmWz7Ljs@mail.python.org> Roundup Robot added the comment: New changeset 46d3c5539981 by Nick Coghlan in branch 'default': Issue #4331: Added functools.partialmethod http://hg.python.org/cpython/rev/46d3c5539981 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 07:43:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 06:43:44 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383461024.15.0.696570647194.issue19481@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +kbk, roger.serwy, serhiy.storchaka, terry.reedy type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 07:43:39 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 06:43:39 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383461019.63.0.610249691318.issue4331@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 07:54:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 06:54:59 +0000 Subject: [issue19439] Build _testembed on Windows In-Reply-To: <1383080293.2.0.31204430631.issue19439@psf.upfronthosting.co.za> Message-ID: <3dC7Df4c17z7Lm0@mail.python.org> Roundup Robot added the comment: New changeset c8c6c007ade3 by Nick Coghlan in branch 'default': Close #19439: execute embedding tests on Windows http://hg.python.org/cpython/rev/c8c6c007ade3 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 07:56:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 06:56:48 +0000 Subject: [issue19439] Build _testembed on Windows In-Reply-To: <1383080293.2.0.31204430631.issue19439@psf.upfronthosting.co.za> Message-ID: <1383461808.14.0.505445381304.issue19439@psf.upfronthosting.co.za> Nick Coghlan added the comment: I checked that test_capi still passed on Fedora as well. Only tweak I made before committing was to ensure that the read end of the test pipe used to determine the default pipe encoding was also closed. ---------- resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 07:57:07 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 06:57:07 +0000 Subject: [issue19439] Build _testembed on Windows In-Reply-To: <1383080293.2.0.31204430631.issue19439@psf.upfronthosting.co.za> Message-ID: <1383461827.09.0.212979526494.issue19439@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 08:02:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 07:02:23 +0000 Subject: [issue19403] Make contextlib.redirect_stdout reentrant In-Reply-To: <1382769830.57.0.0645984337848.issue19403@psf.upfronthosting.co.za> Message-ID: <3dC7Np1nWtz7Lm9@mail.python.org> Roundup Robot added the comment: New changeset 87d49e2cdd34 by Nick Coghlan in branch 'default': Close #19403: make contextlib.redirect_stdout reentrant http://hg.python.org/cpython/rev/87d49e2cdd34 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 08:05:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 07:05:02 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1349355495.01.0.406130423626.issue16129@psf.upfronthosting.co.za> Message-ID: <1383462302.07.0.403372612206.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: Bastien, did you get a chance to try embedding Python 3.4a4 in Blender yet? If that works for you, we can mark this one as closed. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 08:27:15 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 03 Nov 2013 07:27:15 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383463635.26.0.435786282998.issue19481@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Win 7, console 2.7.5+, 32 bit, compiled Aug 24, does not have the problem. Idle started with 'import idlelib.idle' does, but only for 'print foo', as Tim reported. When I close the hung process with [X], there is no error message in the console. Installed 64bit 2.7.5 fails with 'print foo' also. I actually used F and f instead of Foo and foo, so it is not name specific. A subclass of str works fine. Current 3.4a4 Idle works fine. The SO OP also reported that there is no problem is the class is imported from another file. We need a test on something other than Windows, preferably both mac and linux. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 08:37:22 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Sun, 03 Nov 2013 07:37:22 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1383464242.64.0.500436980237.issue17762@psf.upfronthosting.co.za> Changes by Andrei Dorian Duma : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 08:45:40 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 03 Nov 2013 07:45:40 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383464740.73.0.388631381055.issue19481@psf.upfronthosting.co.za> Ned Deily added the comment: It's reproducible on OS X as well with a 32-bit Python 2.7.5 and a 64-bit Python 2.7.6rc1. However, the example works OK if I start IDLE with no subprocess (-n). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 09:19:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 08:19:01 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383466741.43.0.649786441622.issue19481@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This patch fixes symptoms. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file32472/idle_print_unicode_subclass.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 10:14:56 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 03 Nov 2013 09:14:56 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383470096.3.0.808074443474.issue19085@psf.upfronthosting.co.za> Ned Deily added the comment: With Cocoa Tk 8.5.15 or Cocoa Tk 8.6.1 on OS X 10.8.5, test_widgets.ButtonTest crashes Tk: test_image (tkinter.test.test_tkinter.test_widgets.ButtonTest) ... 2013-11-03 01:52:53.498 pytest_10.8[82465:f07] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /SourceCache/AppKit/AppKit-1187.40/AppKit.subproj/NSBitmapImageRep.m:1242 2013-11-03 01:52:53.499 pytest_10.8[82465:f07] An uncaught exception was raised 2013-11-03 01:52:53.499 pytest_10.8[82465:f07] Invalid parameter not satisfying: cgImage != NULL 2013-11-03 01:52:53.502 pytest_10.8[82465:f07] ( 0 CoreFoundation 0x965eae8b __raiseError + 219 1 libobjc.A.dylib 0x956d152e objc_exception_throw + 230 2 CoreFoundation 0x9654a698 +[NSException raise:format:arguments:] + 136 3 Foundation 0x966a5364 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116 4 AppKit 0x98a34525 -[NSBitmapImageRep initWithCGImage:] + 145 5 Tk 0x00725a48 CreateNSImageWithPixmap + 151 6 Tk 0x00725b1c TkMacOSXGetNSImageWithTkImage + 149 7 Tk 0x0071eb2f TkpComputeButtonGeometry + 2550 8 Tk 0x0069849d TkButtonWorldChanged + 470 9 Tk 0x00698e99 ConfigureButton + 1981 10 Tk 0x0069980f ButtonWidgetObjCmd + 440 11 Tcl 0x00579c2f TclEvalObjvInternal + 770 12 Tcl 0x0057ac1a Tcl_EvalObjv + 72 13 _tkinter.so 0x0055db81 Tkapp_Call + 673 [...] With Carbon Tk 8.4.20 on OS X 10.8.5, two test_insertborderwidth failures: ====================================================================== FAIL: test_insertborderwidth (tkinter.test.test_tkinter.test_widgets.EntryTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd32/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py", line 327, in test_insertborderwidth self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, -2) File "/py/dev/3x/root/fwd32/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 158, in checkPixelsParam conv=conv1, **kwargs) File "/py/dev/3x/root/fwd32/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 48, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd32/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 32, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 0 != 1 ====================================================================== FAIL: test_insertborderwidth (tkinter.test.test_tkinter.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd32/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py", line 327, in test_insertborderwidth self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, -2) File "/py/dev/3x/root/fwd32/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 158, in checkPixelsParam conv=conv1, **kwargs) File "/py/dev/3x/root/fwd32/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 48, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/py/dev/3x/root/fwd32/Library/Frameworks/pytest_10.8.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 32, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 0 != 1 ---------------------------------------------------------------------- Ran 536 tests in 1.149s FAILED (failures=2, skipped=10) ---------- priority: high -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 10:53:54 2013 From: report at bugs.python.org (Bastien Montagne) Date: Sun, 03 Nov 2013 09:53:54 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1349355495.01.0.406130423626.issue16129@psf.upfronthosting.co.za> Message-ID: <1383472434.12.0.278580700083.issue16129@psf.upfronthosting.co.za> Bastien Montagne added the comment: Wow? Good thing you remind me that. Just tested it here (linux with ASCII terminal), works perfectly. Thanks again for all the integration work, Nick! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 11:07:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 10:07:00 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383473220.73.0.754090177368.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, I know. Here is a list of broken buildbots: http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.3 http://buildbot.python.org/all/builders/x86%20Tiger%203.3 http://buildbot.python.org/all/builders/x86%20Windows7%202.7 http://buildbot.python.org/all/builders/x86%20XP-4%202.7 http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%202.7 http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%202.7 On Tiger only two tests failed, on other buildbots multiple tests failed and symptoms look as differences between 8.5 and 8.4 or 8.5 (Tk version is wrongly detected?). I'm working on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 11:07:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 10:07:15 +0000 Subject: [issue19320] Tkinter tests ran with wantobjects is false In-Reply-To: <1382302056.06.0.500513298536.issue19320@psf.upfronthosting.co.za> Message-ID: <1383473235.97.0.249161094786.issue19320@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Failed buildbots: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%202.7 http://buildbot.python.org/all/builders/AMD64%20Windows%20Server%202008%20%5BSB%5D%202.7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 11:32:07 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 03 Nov 2013 10:32:07 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383474727.98.0.897973693064.issue18345@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hello. Patch attached. ---------- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file32473/logging.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 11:58:40 2013 From: report at bugs.python.org (Brecht Machiels) Date: Sun, 03 Nov 2013 10:58:40 +0000 Subject: [issue19483] Pure-Python ElementTree classes no longer available since 3.3 Message-ID: <1383476320.61.0.0930927196631.issue19483@psf.upfronthosting.co.za> New submission from Brecht Machiels: With Python 3.2, I subclassed ElementTree.XMLParser to set ExternalEntityRefHandler on the XMLParser's (expat) 'parser' member. I understand the 'parser' member is not part of the public API, but this was the only way to customize the parser without having to write a parser from scratch. With 3.3, cElementTree replaces the Python implementation by default. Its XMLParser class has no accessible 'parser' member to configure. Unfortunately, there does not seem to be a way to use the pure-Python XMLParser, which would still allow for customization of the parser. Why is the Python version still in the library if it can't be accessed? Only for platforms where the C extension is not available? I see two possible solutions: 1) Have XMLParser (both the C and Python versions) accept an optional parser argument, so that a custom parser can be passed in. 2) Make the Python version of ElementTree available again. My other option is to copy the Python XMLParser version into my project. I would like to avoid this, as this would duplicate a lot of perfectly good code. Perhaps there are other solutions? ---------- components: XML messages: 202011 nosy: brechtm, eli.bendersky, scoder priority: normal severity: normal status: open title: Pure-Python ElementTree classes no longer available since 3.3 type: behavior versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 12:19:17 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 03 Nov 2013 11:19:17 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383477557.17.0.24128747877.issue18345@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Added documentation and the chown parameter for the friends of FileHandler. Should tests be added for those classes as well or is it enough to test FileHandler? ---------- Added file: http://bugs.python.org/file32474/logging.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 12:21:29 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 03 Nov 2013 11:21:29 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383477689.18.0.537510452866.issue18345@psf.upfronthosting.co.za> Changes by Claudiu.Popa : Added file: http://bugs.python.org/file32475/logging.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 12:55:25 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 03 Nov 2013 11:55:25 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <1383479725.85.0.704992551315.issue19424@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Py_ssize_t is signed long. size_it is unsigned long. In this case, I suppose we should avoid unsigned as much as possible in comparison with signed. So I think Zachary's patch is reasonable. What do you think, Victor? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:02:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 12:02:06 +0000 Subject: [issue19464] Remove warnings from Windows buildbot "clean" script In-Reply-To: <1383246934.8.0.971910154804.issue19464@psf.upfronthosting.co.za> Message-ID: <3dCG2c1j7Pz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset dbff708e393f by Tim Golden in branch '3.3': Issue #19464 Suppress compiler warnings during clean. Patch by Zachary Ware. http://hg.python.org/cpython/rev/dbff708e393f New changeset 6e592d972b86 by Tim Golden in branch 'default': Issue #19464 Null merge with 3.3 http://hg.python.org/cpython/rev/6e592d972b86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:04:54 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 03 Nov 2013 12:04:54 +0000 Subject: [issue19464] Remove warnings from Windows buildbot "clean" script In-Reply-To: <1383246934.8.0.971910154804.issue19464@psf.upfronthosting.co.za> Message-ID: <1383480294.35.0.844763638114.issue19464@psf.upfronthosting.co.za> Tim Golden added the comment: Applied to 3.3 & 3.4. Thanks for the patch. ---------- resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:12:35 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 03 Nov 2013 12:12:35 +0000 Subject: [issue19464] Remove warnings from Windows buildbot "clean" script In-Reply-To: <1383246934.8.0.971910154804.issue19464@psf.upfronthosting.co.za> Message-ID: <1383480755.4.0.906957599717.issue19464@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:15:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 12:15:26 +0000 Subject: [issue6160] Tkinter.Spinbox: fix bbox method In-Reply-To: <1243826530.3.0.945381049334.issue6160@psf.upfronthosting.co.za> Message-ID: <3dCGLP6R7zz7Ljl@mail.python.org> Roundup Robot added the comment: New changeset 91453ba40b30 by Serhiy Storchaka in branch '2.7': Issue #6160: The bbox() method of Tkinter.Spinbox now returns a tuple of http://hg.python.org/cpython/rev/91453ba40b30 New changeset 5bdbf2258563 by Serhiy Storchaka in branch '3.3': Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of http://hg.python.org/cpython/rev/5bdbf2258563 New changeset 75d8b9136fa6 by Serhiy Storchaka in branch 'default': Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of http://hg.python.org/cpython/rev/75d8b9136fa6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:23:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 12:23:10 +0000 Subject: [issue16129] No good way to set 'PYTHONIOENCODING' when embedding python. In-Reply-To: <1349355495.01.0.406130423626.issue16129@psf.upfronthosting.co.za> Message-ID: <1383481390.9.0.497737120728.issue16129@psf.upfronthosting.co.za> Nick Coghlan added the comment: Excellent! Zachary Ware got the embedding tests running and passing on Windows in issue 19439 (previously they were only executed on *nix systems), so Python 3.4 should resolve this problem on all platforms. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:35:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 12:35:14 +0000 Subject: [issue6157] Tkinter.Text: changes for bbox, debug, and edit methods. In-Reply-To: <1243800373.79.0.587066766962.issue6157@psf.upfronthosting.co.za> Message-ID: <3dCGnF4Z7jz7LjT@mail.python.org> Roundup Robot added the comment: New changeset b3178d03871b by Serhiy Storchaka in branch '2.7': Issue #6157: Fixed Tkinter.Text.debug(). Original patch by Guilherme Polo. http://hg.python.org/cpython/rev/b3178d03871b New changeset 3f5e35b766ac by Serhiy Storchaka in branch '3.3': Issue #6157: Fixed tkinter.Text.debug(). Original patch by Guilherme Polo. http://hg.python.org/cpython/rev/3f5e35b766ac New changeset c40b573c9f7a by Serhiy Storchaka in branch 'default': Issue #6157: Fixed tkinter.Text.debug(). tkinter.Text.bbox() now raises http://hg.python.org/cpython/rev/c40b573c9f7a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:36:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 12:36:15 +0000 Subject: [issue12029] Catching virtual subclasses in except clauses In-Reply-To: <1304844823.89.0.48444500115.issue12029@psf.upfronthosting.co.za> Message-ID: <1383482175.66.0.921738404914.issue12029@psf.upfronthosting.co.za> Nick Coghlan added the comment: A point on the safety/correctness front: I remembered we already run arbitrary code at roughly this point in the eval loop, as we have to invoke __iter__ to get the exceptions to check when an iterable is used in except clause. That means allowing the subclass check hooks to run here isn't as radical a change as I first thought. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:37:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 12:37:43 +0000 Subject: [issue17400] ipaddress should make it easy to identify rfc6598 addresses In-Reply-To: <1363052217.02.0.113831391012.issue17400@psf.upfronthosting.co.za> Message-ID: <1383482263.3.0.309237632671.issue17400@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just updating the issue state to reflect the fact Peter committed this a while ago. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:41:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 12:41:16 +0000 Subject: [issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args In-Reply-To: <1243887092.8.0.492821608561.issue6167@psf.upfronthosting.co.za> Message-ID: <1383482476.78.0.892342053887.issue6167@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:52:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 12:52:34 +0000 Subject: [issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns In-Reply-To: <1243812482.01.0.481805459937.issue6159@psf.upfronthosting.co.za> Message-ID: <1383483154.98.0.982246682938.issue6159@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated to tip and added deprecation warning. ---------- nosy: +terry.reedy versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:53:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 12:53:11 +0000 Subject: [issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns In-Reply-To: <1243812482.01.0.481805459937.issue6159@psf.upfronthosting.co.za> Message-ID: <1383483191.09.0.41383182668.issue6159@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32476/PanedWindow_docstring_and_return_fixes_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:56:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 12:56:27 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <3dCHFk3z5pz7LkT@mail.python.org> Roundup Robot added the comment: New changeset 2ed8d500e113 by Victor Stinner in branch 'default': Issue #19424: Fix a compiler warning on comparing signed/unsigned size_t http://hg.python.org/cpython/rev/2ed8d500e113 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:57:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 12:57:16 +0000 Subject: [issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args In-Reply-To: <1243887092.8.0.492821608561.issue6167@psf.upfronthosting.co.za> Message-ID: <1383483436.9.0.698449088989.issue6167@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file32391/Scrollbar_fixes_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 13:57:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 12:57:31 +0000 Subject: [issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args In-Reply-To: <1243887092.8.0.492821608561.issue6167@psf.upfronthosting.co.za> Message-ID: <1383483451.91.0.95335911767.issue6167@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32477/Scrollbar_fixes_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 14:07:01 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 03 Nov 2013 13:07:01 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383484021.43.0.506156243327.issue19085@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Serhiy, In Python3.4, Windows Vista 32 bit, Release Mode, Tcl/Tk 8.5.15, I got a lot of errors. However, if I set _conv_pixels to round in Lib/tkinter/test/widget_tests.py, everything works fine. In Python 3.4, Fedora 18, Debug Mode, Tcl/Tk 8.5.13, I got a lot of errors. However, if I set _conv_pixels to round in Lib/tkinter/test/widget_tests.py, I got two errors only. ====================================================================== FAIL: test_insertwidth (__main__.EntryTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/tkinter/test/test_tkinter/test_widgets.py", line 335, in test_insertwidth self.checkParam(widget, 'insertwidth', 0.9, expected=2) File "/home/sky/Code/python/programming_language/cpython/Lib/tkinter/test/widget_tests.py", line 49, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/home/sky/Code/python/programming_language/cpython/Lib/tkinter/test/widget_tests.py", line 33, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 1 != 2 Other error is same. Hope that helps! ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 14:28:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 03 Nov 2013 13:28:00 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1383485280.59.0.873202515769.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch to the latest implementation: 65e72bf01246.patch The developement is now done in the start branch of http://hg.python.org/features/tracemalloc ---------- Added file: http://bugs.python.org/file32478/65e72bf01246.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 14:33:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 13:33:44 +0000 Subject: [issue6160] Tkinter.Spinbox: fix bbox method In-Reply-To: <1243826530.3.0.945381049334.issue6160@psf.upfronthosting.co.za> Message-ID: <1383485624.49.0.671759376271.issue6160@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Terry. > The new test looks good. This is a copy of a test for ttk.Entry. > Grepping tkinter.__init__.py for 'an empty string' gives multiple hits that indicate to me (without detailed examination) that there are about 7 methods that return such. This is slightly odd in a Python context, but it is documented, hence not wrong. Actually there are methods which always return empty string without documenting it. I removed such changes from other Guilherme's patches. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 14:35:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 13:35:01 +0000 Subject: [issue6157] Tkinter.Text: changes for bbox, debug, and edit methods. In-Reply-To: <1243800373.79.0.587066766962.issue6157@psf.upfronthosting.co.za> Message-ID: <1383485701.71.0.701902211723.issue6157@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: -Add tkinter basic options tests resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 15:23:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 14:23:35 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <3dCK9t0962zMRc@mail.python.org> Roundup Robot added the comment: New changeset c34e163c0086 by Tim Golden in branch '3.3': Issue #10197 Rework subprocess.get[status]output to use subprocess functionality and thus to work on Windows. Patch by Nick Coghlan. http://hg.python.org/cpython/rev/c34e163c0086 New changeset 05ce1bd1a4c2 by Tim Golden in branch 'default': Issue #10197 Rework subprocess.get[status]output to use subprocess functionality and thus to work on Windows. Patch by Nick Coghlan. http://hg.python.org/cpython/rev/05ce1bd1a4c2 New changeset b6efaa97ee0e by Tim Golden in branch '3.3': Issue #10197: merge heads http://hg.python.org/cpython/rev/b6efaa97ee0e New changeset 28a0ae3dcb16 by Tim Golden in branch 'default': Issue #10197: merge heads http://hg.python.org/cpython/rev/28a0ae3dcb16 New changeset fe828884a077 by Tim Golden in branch 'default': Issue #10197: merge 3.3 http://hg.python.org/cpython/rev/fe828884a077 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 15:52:54 2013 From: report at bugs.python.org (Annika Schiefner) Date: Sun, 03 Nov 2013 14:52:54 +0000 Subject: [issue19484] Idle crashes when opening file Message-ID: <1383490374.07.0.903795655927.issue19484@psf.upfronthosting.co.za> New submission from Annika Schiefner: Whenever I try opening a .py file, Idle crashes. Mac OS X, 10.6.8 ---------- components: IDLE messages: 202027 nosy: Schiefna priority: normal severity: normal status: open title: Idle crashes when opening file type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 16:03:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Nov 2013 15:03:32 +0000 Subject: [issue19378] Clean up Python 3.4 API additions in the dis module In-Reply-To: <1382622276.63.0.652986128148.issue19378@psf.upfronthosting.co.za> Message-ID: <1383491012.63.0.815723672299.issue19378@psf.upfronthosting.co.za> Nick Coghlan added the comment: While working on this, I noticed a number of other issues with the dis API additions for Python 3.4 from issue 11816. Specifically: - the file output redirection API didn't work in some cases that resulted in calls to other disassembly functions - Bytecode.show_info() replicates a bad module level API that shouldn't be perpetuated - Bytecode.display_code() is better converted to a dis() method that returns a string rather than writing directly to an output stream ---------- keywords: +patch nosy: +larry, rfk, rhettinger priority: normal -> release blocker title: Rename "line_offset" parameter in dis.get_instructions to "first_line" -> Clean up Python 3.4 API additions in the dis module versions: +Python 3.4 Added file: http://bugs.python.org/file32479/issue19378_dis_module_fixes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 16:12:10 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 03 Nov 2013 15:12:10 +0000 Subject: [issue19485] Slightly incorrect doc for get_param method in Lib/email/message.py Message-ID: <1383491530.88.0.114432864855.issue19485@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Lib/email/message.py, line 665 & 666: param = msg.get_param('foo') param = email.utils.collapse_rfc2231_value(rawparam) Where does rawparam come from? On top of that, sending the result of get_param to collapse_rfc2231_value can make it chokes if the result of get_param is None. I already proposed the change in collapse_rfc2231_value to handle None gracefully in another ticket #19063, though. ---------- assignee: docs at python components: Documentation files: fix_doc_get_param_in_email_message.patch keywords: patch messages: 202029 nosy: docs at python, vajrasky priority: normal severity: normal status: open title: Slightly incorrect doc for get_param method in Lib/email/message.py versions: Python 3.4 Added file: http://bugs.python.org/file32480/fix_doc_get_param_in_email_message.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 16:12:23 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 03 Nov 2013 15:12:23 +0000 Subject: [issue19485] Slightly incorrect doc for get_param method in Lib/email/message.py In-Reply-To: <1383491530.88.0.114432864855.issue19485@psf.upfronthosting.co.za> Message-ID: <1383491543.62.0.441514160369.issue19485@psf.upfronthosting.co.za> Changes by Vajrasky Kok : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 16:30:01 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 03 Nov 2013 15:30:01 +0000 Subject: [issue19486] Bump up version of Tcl/Tk in building Python in Windows platform Message-ID: <1383492601.4.0.567246282787.issue19486@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Right now, at November 3rd 2013, the latest minor version of Tcl/Tk 8.5 is 8.5.15. http://www.activestate.com/activetcl/downloads http://www.tcl.tk/ When building Python in Windows in release mode (not debug mode), I had to download the Tcl/Tk binary build from ActiveState which only offers 8.5.15 version. To download the older version, you have to buy business license from them. So maybe it's the time to bump up the version? Of course we have to update the svn repository as well. http://svn.python.org/projects/external/ ---------- components: Tkinter files: bump_up_tcl_version_windows.patch keywords: patch messages: 202030 nosy: vajrasky, zach.ware priority: normal severity: normal status: open title: Bump up version of Tcl/Tk in building Python in Windows platform versions: Python 3.4 Added file: http://bugs.python.org/file32481/bump_up_tcl_version_windows.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 17:01:09 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 03 Nov 2013 16:01:09 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1383494469.53.0.0632221345052.issue10197@psf.upfronthosting.co.za> Tim Golden added the comment: Code & tests now work on Windows. Applied to 3.3 & 3.4. ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 17:10:04 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 16:10:04 +0000 Subject: [issue19485] Slightly incorrect doc for get_param method in Lib/email/message.py In-Reply-To: <1383491530.88.0.114432864855.issue19485@psf.upfronthosting.co.za> Message-ID: <1383495004.52.0.0499663232476.issue19485@psf.upfronthosting.co.za> R. David Murray added the comment: Vajrasky: FYI, you can select the 'email' component for tickets like this, and I'll be automatically made nosy (as will Barry Warsaw). ---------- components: +email nosy: +barry type: -> behavior versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 17:26:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 16:26:28 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dCMvf6cN5z7LjT@mail.python.org> Roundup Robot added the comment: New changeset a34889a30d52 by Serhiy Storchaka in branch '2.7': Issue #19085: Fixed pixels rounding for last Tk patchlevels. http://hg.python.org/cpython/rev/a34889a30d52 New changeset dfdf47a9aad4 by Serhiy Storchaka in branch '3.3': Issue #19085: Fixed pixels rounding for last Tk patchlevels. http://hg.python.org/cpython/rev/dfdf47a9aad4 New changeset e7be7aceab77 by Serhiy Storchaka in branch 'default': Issue #19085: Fixed pixels rounding for last Tk patchlevels. http://hg.python.org/cpython/rev/e7be7aceab77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 17:26:38 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 16:26:38 +0000 Subject: [issue19483] Pure-Python ElementTree classes no longer available since 3.3 In-Reply-To: <1383476320.61.0.0930927196631.issue19483@psf.upfronthosting.co.za> Message-ID: <1383495998.47.0.714156178827.issue19483@psf.upfronthosting.co.za> R. David Murray added the comment: It is there so that Python implementations (other than cPython) that do not have ElementTree accelerator modules can fall back on the pure python version. You can import the pure python version in cPython by blocking the import of the C accelerator: import sys sys.modules['_elementtree'] = None import xml.etree.ElementTree I'll leave this open to see what the xml experts think about the custom parser idea. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 17:28:19 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 03 Nov 2013 16:28:19 +0000 Subject: [issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError In-Reply-To: <1285193199.71.0.119462884073.issue9922@psf.upfronthosting.co.za> Message-ID: <1383496098.99.0.189824354773.issue9922@psf.upfronthosting.co.za> Tim Golden added the comment: This has nearly been fixed by the rewrite of the get[status]output code under issue10197. There is an issue, though, with the use there of universal_newlines mode, which forces check_output to return a string rather than bytes. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 17:32:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Nov 2013 16:32:51 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383496371.86.0.519370359545.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Vajrasky. Now I see that this is a bug in Tk 8.5 which was fixed in 8.5.12. We should use round() to conform with last Tk patchlevels. However this breaks tests on Ubuntu 12.04 LTS which uses 8.5.11. Here is a patch which adds workaround for this bug. ---------- Added file: http://bugs.python.org/file32482/pixels_round.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 17:43:48 2013 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 03 Nov 2013 16:43:48 +0000 Subject: [issue19483] Pure-Python ElementTree classes no longer available since 3.3 In-Reply-To: <1383476320.61.0.0930927196631.issue19483@psf.upfronthosting.co.za> Message-ID: <52767D03.3040202@behnel.de> Stefan Behnel added the comment: Brecht Machiels, 03.11.2013 11:58: > With Python 3.2, I subclassed ElementTree.XMLParser to set ExternalEntityRefHandler on the XMLParser's (expat) 'parser' member This sounds like a request for a missing feature to me. Here is how lxml handles it: http://lxml.de/resolvers.html > I understand the 'parser' member is not part of the public API Correct, although the fact that it is not prefixed with an underscore is rather unfortunate. IMHO, there is no guarantee that the underlying parser will always be expat, and in fact, it is not in lxml. > I see two possible solutions: > 1) Have XMLParser (both the C and Python versions) accept an optional parser argument, so that a custom parser can be passed in. -1. IMHO, the underlying parser should not be made a part of the API. Instead, whatever features it provides that are needed on user side should be mapped and abstracted in one way or another. Resolving external entity references is something that should not be done as low-level as expat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:08:39 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 17:08:39 +0000 Subject: [issue18985] Improve the documentation in fcntl module In-Reply-To: <1378722919.93.0.901392318122.issue18985@psf.upfronthosting.co.za> Message-ID: <1383498519.95.0.575345723804.issue18985@psf.upfronthosting.co.za> R. David Murray added the comment: Vajrasky: what do you think of my version? Is it clear enough? I wonder if we want to document the constants someday. ---------- stage: -> patch review versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:19:21 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 03 Nov 2013 17:19:21 +0000 Subject: [issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError In-Reply-To: <1285193199.71.0.119462884073.issue9922@psf.upfronthosting.co.za> Message-ID: <1383499161.51.0.311586658377.issue9922@psf.upfronthosting.co.za> Tim Golden added the comment: The code I've just committed to issue10197 means that the get[status]output functions now pass their (few) tests on all platforms. More by chance than judgement, that change employed universal_newlines which has the effect of forcing the output of check_output to string rather than bytes. Having just re-read all the comments, we have three positions: a) Do nothing: these are outdated functions and anyone who has a problem with undecodable bytes will have to use one of the other functions where they have more control. b) Use the surrogateescape encoding in every case to produce *some* kind of output rather than an exception. c) Tweak the code to produce bytes in every case. This is actually simple: removing universal_newlines support will do this. (I already have working code for this). I think (b) is more trouble than it's worth. So (a) Do Nothing; or (c) Produce Bytes. Going by the law of "Status Quo wins", if no-one chimes in with a strong case for switching to bytes in a few days, I propose to close this as Won't Fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:19:48 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 03 Nov 2013 17:19:48 +0000 Subject: [issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError In-Reply-To: <1285193199.71.0.119462884073.issue9922@psf.upfronthosting.co.za> Message-ID: <1383499188.66.0.668826391256.issue9922@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: -> tim.golden versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:23:34 2013 From: report at bugs.python.org (Brecht Machiels) Date: Sun, 03 Nov 2013 17:23:34 +0000 Subject: [issue19483] Pure-Python ElementTree classes no longer available since 3.3 In-Reply-To: <1383476320.61.0.0930927196631.issue19483@psf.upfronthosting.co.za> Message-ID: <1383499414.35.0.562410514039.issue19483@psf.upfronthosting.co.za> Brecht Machiels added the comment: > You can import the pure python version in cPython by blocking the import > of the C accelerator: > > import sys > sys.modules['_elementtree'] = None > import xml.etree.ElementTree This will not work if xml.etree.ElementTree was already imported by another module, I think. Of course, you can take care of that case, but it doesn't get any prettier (I have done this for now). Any objections to making the pure Python versions available under a different name? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:23:51 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 03 Nov 2013 17:23:51 +0000 Subject: [issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError In-Reply-To: <1285193199.71.0.119462884073.issue9922@psf.upfronthosting.co.za> Message-ID: <1383499431.66.0.426679817781.issue9922@psf.upfronthosting.co.za> Changes by Tim Golden : Added file: http://bugs.python.org/file32483/issue9922.34.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:33:22 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 03 Nov 2013 17:33:22 +0000 Subject: [issue19417] Add tests for bdb (previously not tested) In-Reply-To: <1382896308.72.0.45441786626.issue19417@psf.upfronthosting.co.za> Message-ID: <1383500002.56.0.200815998255.issue19417@psf.upfronthosting.co.za> Xavier de Gaye added the comment: A less invasive alternative could be to instrument Bdb with a subclass that processes send-expect sequences. This is what does http://code.google.com/p/pdb-clone/source/browse/Lib/test/test_bdb.py This code could be adapted to run with python bdb. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:34:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 17:34:03 +0000 Subject: [issue19485] Slightly incorrect doc for get_param method in Lib/email/message.py In-Reply-To: <1383491530.88.0.114432864855.issue19485@psf.upfronthosting.co.za> Message-ID: <3dCPPd2kFhz7LjR@mail.python.org> Roundup Robot added the comment: New changeset c574951deadd by R David Murray in branch '3.3': #19485: clarify get_param example. http://hg.python.org/cpython/rev/c574951deadd New changeset e3180c58a78c by R David Murray in branch 'default': Merge #19485: clarify get_param example. http://hg.python.org/cpython/rev/e3180c58a78c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:35:49 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 17:35:49 +0000 Subject: [issue19485] Slightly incorrect doc for get_param method in Lib/email/message.py In-Reply-To: <1383491530.88.0.114432864855.issue19485@psf.upfronthosting.co.za> Message-ID: <1383500149.8.0.0635281413426.issue19485@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Vajrasky. Looks like this was a cut and paste error when Barry updated the docs for 3.3, since it is correct in the 2.7 module. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:38:46 2013 From: report at bugs.python.org (iMom0) Date: Sun, 03 Nov 2013 17:38:46 +0000 Subject: [issue19487] Correct the error of the example given in the doc of partialmethod Message-ID: <1383500326.46.0.871927825617.issue19487@psf.upfronthosting.co.za> Changes by iMom0 : ---------- assignee: docs at python components: Documentation files: partialmethod-doc-fix.patch keywords: patch nosy: docs at python, imom0 priority: normal severity: normal status: open title: Correct the error of the example given in the doc of partialmethod type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32484/partialmethod-doc-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:39:43 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 03 Nov 2013 17:39:43 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1383500383.32.0.325410463159.issue10197@psf.upfronthosting.co.za> Gregory P. Smith added the comment: The documentation needs updating to state that these are available on Windows (currently it says UNIX) with a versionchanged annotation. http://docs.python.org/3.3/library/subprocess.html#legacy-shell-invocation-functions ---------- nosy: +gregory.p.smith status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 18:41:31 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 03 Nov 2013 17:41:31 +0000 Subject: [issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError In-Reply-To: <1285193199.71.0.119462884073.issue9922@psf.upfronthosting.co.za> Message-ID: <1383500491.48.0.230564115056.issue9922@psf.upfronthosting.co.za> Gregory P. Smith added the comment: If anybody using them in Python 3.3 is already depending upon them returning strings, changing it to return bytes will break their code... so that ship as unfortunately sailed. Changing that only in 3.4 would just cause churn and make code using this more difficult to be compatible across both. Updating the documentation to state the utf-8 decoding behavior and the caveats of that is important. That documentation note should also mention what people should use instead if they want binary data instead of text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 19:22:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 18:22:44 +0000 Subject: [issue19411] binascii.hexlify docs say it returns a string (it returns bytes) In-Reply-To: <1382807910.82.0.748740374727.issue19411@psf.upfronthosting.co.za> Message-ID: <3dCQVC3cDqz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 25d89a4faede by R David Murray in branch '3.3': #19411: Clarify that b2a_hex/hexlify returns a bytes object. http://hg.python.org/cpython/rev/25d89a4faede New changeset ac190d03aed5 by R David Murray in branch 'default': Merge #19411: Clarify that b2a_hex/hexlify returns a bytes object. http://hg.python.org/cpython/rev/ac190d03aed5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 19:23:42 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 18:23:42 +0000 Subject: [issue19411] binascii.hexlify docs say it returns a string (it returns bytes) In-Reply-To: <1382807910.82.0.748740374727.issue19411@psf.upfronthosting.co.za> Message-ID: <1383503022.66.0.574533389341.issue19411@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Vajrasky. I modified the patch slightly since I prefer the term "bytes object" to just "bytes" (I think it reads better in English). ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 19:28:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 18:28:13 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <3dCQcX5SgBz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 2924a63aab73 by Tim Golden in branch '3.3': Issue #10197: Indicate availability of subprocess.get[status]output on Windows and add a note about the effects of universal newlines http://hg.python.org/cpython/rev/2924a63aab73 New changeset effad2bda4cb by Tim Golden in branch 'default': Issue #10197: Indicate availability of subprocess.get[status]output on Windows and add a note about the effects of universal newlines http://hg.python.org/cpython/rev/effad2bda4cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 19:30:49 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 18:30:49 +0000 Subject: [issue19483] Pure-Python ElementTree classes no longer available since 3.3 In-Reply-To: <1383476320.61.0.0930927196631.issue19483@psf.upfronthosting.co.za> Message-ID: <1383503449.78.0.86570819013.issue19483@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, you have to do the sys.modules set at the start of your application. The python module is what gets imported, it is just that the C classes override some of the classes from the Python module when they are imported. So no, there's no way to make the pure python available in cPython other than blocking the _elementtree import at application startup. If you want to discuss changing this fact, it would be a broader discussion in the context of PEP 399, and should take place on the python-dev mailing list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 19:32:51 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 03 Nov 2013 18:32:51 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1383500383.32.0.325410463159.issue10197@psf.upfronthosting.co.za> Message-ID: <527696CF.9070804@timgolden.me.uk> Tim Golden added the comment: Good point. I've added the versionchanged tag. The issue with bytes-string encoding goes all the way back to Popen.communicate if universal newlines mode is used so I've simply put in a reference to the existing notes on the subject higher up in the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 19:37:32 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 18:37:32 +0000 Subject: [issue19487] Correct the error of the example given in the doc of partialmethod Message-ID: <1383503852.66.0.371545982777.issue19487@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: docs at python -> nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 19:50:51 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 03 Nov 2013 18:50:51 +0000 Subject: [issue19484] Idle crashes when opening file In-Reply-To: <1383490374.07.0.903795655927.issue19484@psf.upfronthosting.co.za> Message-ID: <1383504651.74.0.291500411886.issue19484@psf.upfronthosting.co.za> Ned Deily added the comment: OS X 10.6 Snow Leopard shipped with a new version of Tk 8.5 that is mostly unusable with IDLE and other Tkinter applications. If you are using the Apple-supplied system Python on OS X, you should install a new version of Python that allows use of a different version of Tk. If you are using a python.org installer, install a third-party version of Tk or the latest installers which include their own built-in copies of Tk. See http://www.python.org/download/mac/tcltk/ for detailed information. If this does not solve your problem, please reopen this issue and supply more information. ---------- nosy: +ned.deily resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 20:12:39 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Sun, 03 Nov 2013 19:12:39 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present In-Reply-To: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> Message-ID: <1383505959.46.0.855695467905.issue19456@psf.upfronthosting.co.za> Changes by Andrei Dorian Duma : ---------- nosy: +andrei.duma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 20:15:54 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Nov 2013 19:15:54 +0000 Subject: [issue19454] devguide: Document what a "platform support" is In-Reply-To: <1383159116.46.0.184690879028.issue19454@psf.upfronthosting.co.za> Message-ID: <1383506154.94.0.720060354228.issue19454@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 20:32:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 19:32:19 +0000 Subject: [issue18702] Report skipped tests as skipped In-Reply-To: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za> Message-ID: <3dCS2V5Y91z7Lk6@mail.python.org> Roundup Robot added the comment: New changeset 1feeeb8992f8 by Serhiy Storchaka in branch '3.3': Issue #18702: All skipped tests now reported as skipped. http://hg.python.org/cpython/rev/1feeeb8992f8 New changeset 09105051b9f4 by Serhiy Storchaka in branch 'default': Issue #18702: All skipped tests now reported as skipped. http://hg.python.org/cpython/rev/09105051b9f4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 20:38:29 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 03 Nov 2013 19:38:29 +0000 Subject: [issue19378] Clean up Python 3.4 API additions in the dis module In-Reply-To: <1382622276.63.0.652986128148.issue19378@psf.upfronthosting.co.za> Message-ID: <1383507509.44.0.213764156557.issue19378@psf.upfronthosting.co.za> Larry Hastings added the comment: Would this be a good time for me to ask about publishing the stack effect info? I had to write my own parallel implementation of it for my assembler, so I found it irritating that Python doesn't provide it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 21:32:55 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 03 Nov 2013 20:32:55 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present In-Reply-To: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> Message-ID: <1383510775.64.0.45571535031.issue19456@psf.upfronthosting.co.za> Guido van Rossum added the comment: Looking at this some more, I think one of the reasons is that isabs() does not consider paths consisting of *just* a drive (either c: or \\host\share) to be absolute, but it considers a path without a drive but starting with a \ as absolute. So perhaps it's all internally inconsistent. I'm hoping Bruce has something to say to this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 21:35:10 2013 From: report at bugs.python.org (Jerry Barrington) Date: Sun, 03 Nov 2013 20:35:10 +0000 Subject: [issue19484] Idle crashes when opening file In-Reply-To: <1383490374.07.0.903795655927.issue19484@psf.upfronthosting.co.za> Message-ID: <1383510910.28.0.0842384176831.issue19484@psf.upfronthosting.co.za> Jerry Barrington added the comment: I installed python-2.7.6rc1-macosx10.6_rev1.dmg, which says it has it's own Tk builtin, on OSX 10.6.8. Idle crashes when I double-click a *.py file. If I try to open a file from within Idle, a blank window opens that I can't close. ---------- nosy: +Jerry.Barrington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 21:41:44 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 03 Nov 2013 20:41:44 +0000 Subject: [issue19484] Idle crashes when opening file In-Reply-To: <1383490374.07.0.903795655927.issue19484@psf.upfronthosting.co.za> Message-ID: <1383511304.77.0.883424750363.issue19484@psf.upfronthosting.co.za> Ned Deily added the comment: Double-clicking on a .py may not be opening the file with the right version of IDLE. OS X maintains the associations between file types, based on file characteristics like the extension (e.g. ".py"), and applications. To select exactly which application to open a file, rather than double-clicking on it, click on it once to select it then use control-click to being up a context menu and use "Open With" to select the 2.7.6 version of IDLE. You can also use the Finder's Get Info command to change application associations for a particular file or for all files of a particular type. The details of all of this vary slightly depending on OS X release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 21:45:58 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 03 Nov 2013 20:45:58 +0000 Subject: [issue19484] Idle crashes when opening file In-Reply-To: <1383490374.07.0.903795655927.issue19484@psf.upfronthosting.co.za> Message-ID: <1383511558.31.0.099850593268.issue19484@psf.upfronthosting.co.za> Ned Deily added the comment: My apologies! What I just wrote is accurate but not the problem you are seeing. I forgot that there is a problem with IDLE's Open command that was discovered after the release of 2.7.6rc1. See Issue19426 It will be fixed in the final release of 2.7.6 which should be available sometime this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 21:51:27 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Sun, 03 Nov 2013 20:51:27 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present In-Reply-To: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> Message-ID: <1383511887.48.0.416112026359.issue19456@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I'm willing to fix this. ntpath.join behaves weird in other situations too: >>> ntpath.join('C:/a/b', 'D:x/y') 'C:/a/b\\D:x/y' In fact, I don't know what the above should return. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 22:02:40 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 03 Nov 2013 21:02:40 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present In-Reply-To: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> Message-ID: <1383512560.24.0.248459234357.issue19456@psf.upfronthosting.co.za> Guido van Rossum added the comment: PEP 428 offers a reasonable view. Search http://www.python.org/dev/peps/pep-0428/ for "anchored" and read on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 22:16:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 21:16:12 +0000 Subject: [issue18702] Report skipped tests as skipped In-Reply-To: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za> Message-ID: <3dCVLM3dmnz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 2d330f7908e7 by Serhiy Storchaka in branch '2.7': Issue #18702: All skipped tests now reported as skipped. http://hg.python.org/cpython/rev/2d330f7908e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 22:26:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 21:26:33 +0000 Subject: [issue18702] Report skipped tests as skipped In-Reply-To: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za> Message-ID: <3dCVZJ3w9dz7Lk7@mail.python.org> Roundup Robot added the comment: New changeset 0d8f0526813f by Serhiy Storchaka in branch '2.7': Fix test_os (issue #18702). http://hg.python.org/cpython/rev/0d8f0526813f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 22:27:05 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 03 Nov 2013 21:27:05 +0000 Subject: [issue19484] Idle crashes when opening file In-Reply-To: <1383490374.07.0.903795655927.issue19484@psf.upfronthosting.co.za> Message-ID: <1383514025.86.0.99228876082.issue19484@psf.upfronthosting.co.za> Ned Deily added the comment: P.S. If you feel comfortable with using the command line, you *could* install the fix for Issue19426 yourself into 2.7.6rc1 if you can't wait for the final release. For the OS X python.org installers, something like this should work from a user login with administrator privileges (sudo may ask for your password): cd ~/Downloads curl -O http://hg.python.org/cpython/raw-file/7fde94ad5df4/Lib/idlelib/IOBinding.py cd /Library/Frameworks/Python.framework/Versions/2.7 cd ./lib/python2.7/idlelib diff ~/Downloads/IOBinding.py ./IOBinding.py sudo cp -p ./IOBinding.py ./IOBinding.py.ORIGINAL sudo cp ~/Downloads/IOBinding.py ./IOBinding.py sudo rm -f ./IOBinding.pyc ./IOBinding.pyo sudo chmod 664 ./IOBinding.py The output from the diff command should look like this: $ diff ~/Downloads/IOBinding.py IOBinding.py 128c128 < lst = str.split("\n", 2)[:2] --- > str = str.split("\n", 2)[:2] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 22:30:02 2013 From: report at bugs.python.org (Colin Williams) Date: Sun, 03 Nov 2013 21:30:02 +0000 Subject: [issue19417] Add tests for bdb (previously not tested) In-Reply-To: <1382896308.72.0.45441786626.issue19417@psf.upfronthosting.co.za> Message-ID: <1383514202.05.0.181099898718.issue19417@psf.upfronthosting.co.za> Colin Williams added the comment: I've updated the patch to consolidate some duplicated code. Unfortunately, I wasn't able to move anything to setUpClass without messing even more with the internals. I haven't had a chance to refine the code further based on xdegaye's suggestions, but I wanted to make sure I was getting feedback on the most up-to-date code. ---------- Added file: http://bugs.python.org/file32485/bdb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 22:31:09 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 03 Nov 2013 21:31:09 +0000 Subject: [issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns In-Reply-To: <1243812482.01.0.481805459937.issue6159@psf.upfronthosting.co.za> Message-ID: <1383514269.36.0.0689531719916.issue6159@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Shipman and Lundh References: http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/panedwindow.html http://effbot.org/tkinterbook/panedwindow.htm#Tkinter.PanedWindow-class Let us separate the different issues with the PanedWindow code and docstrings. 0. .proxy is specified as 'Internal function'. The 3 .proxy_xyz methods are not but I believe they should be. (Without further examination) they make no sense to me otherwise. Lundh includes these 3 (but not .proxy); Shipman omits all 4. If they were to be marked 'internal', the return could be changed without worry, but it is low priority in any case. If anything, this should be a separate tracker issue. 1. The revision of the .identify docstring agrees with Shipman. However, while the revision describes how the Python wrapper should behave, I am dubious that tk.call itself returns either a list or a tuple, rather than a string such as '{0 sash}' unless verifed with a test. If there is none in test_widgets, I will try using sash_coord to get inputs that hit a sash and handle. 2. The 'proper' name for the required .paneconfigure parameter is 'child', which is the name used for all other functions and in both Shipman and Lundh. As long as we are revising, I much prefer the current standard docstrings, which is to use the imperative 'return' rather than 'returns' or 'is returned'. 3. After and before options are after and before a child *widget*, not window. I may do a revised patch (or two) later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 3 23:54:15 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Sun, 03 Nov 2013 22:54:15 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present In-Reply-To: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> Message-ID: <1383519255.06.0.952255110845.issue19456@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: Added a possible fix for ntpath.join. Didn't touch isabs yet. ---------- keywords: +patch Added file: http://bugs.python.org/file32486/fix_ntpath_join.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 00:18:43 2013 From: report at bugs.python.org (Brian Curtin) Date: Sun, 03 Nov 2013 23:18:43 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1383520723.72.0.252218144536.issue17883@psf.upfronthosting.co.za> Brian Curtin added the comment: The changes look fine to me. ---------- assignee: terry.reedy -> zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 00:35:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 03 Nov 2013 23:35:47 +0000 Subject: [issue18702] Report skipped tests as skipped In-Reply-To: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za> Message-ID: <3dCYRQ22r9z7Lk9@mail.python.org> Roundup Robot added the comment: New changeset a699550bc73b by Ned Deily in branch 'default': Issue #18702 null merge http://hg.python.org/cpython/rev/a699550bc73b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 00:52:09 2013 From: report at bugs.python.org (Brian Curtin) Date: Sun, 03 Nov 2013 23:52:09 +0000 Subject: [issue19440] Clean up test_capi In-Reply-To: <1383081712.17.0.162713378456.issue19440@psf.upfronthosting.co.za> Message-ID: <1383522729.28.0.292576017902.issue19440@psf.upfronthosting.co.za> Brian Curtin added the comment: Your patch for 3.3 won't fly: subTest is new for 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 00:56:39 2013 From: report at bugs.python.org (Brian Curtin) Date: Sun, 03 Nov 2013 23:56:39 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383522999.71.0.43409104692.issue19391@psf.upfronthosting.co.za> Brian Curtin added the comment: Both patches look fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 01:21:43 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 00:21:43 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383524503.84.0.906947930506.issue19481@psf.upfronthosting.co.za> Ned Deily added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 01:27:10 2013 From: report at bugs.python.org (Bruce Leban) Date: Mon, 04 Nov 2013 00:27:10 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present In-Reply-To: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> Message-ID: <1383524830.07.0.240203386535.issue19456@psf.upfronthosting.co.za> Bruce Leban added the comment: A non-UNC windows path consists of two parts: a drive and a conventional path. If the drive is left out, it's relative to the current drive. If the path part does not have a leading \ then it's relative to the current path on that drive. Note that Windows has a different working dir for every drive. x\y.txt # in dir x in current dir on current drive \x\y.txt # in dir x at root of current drive E:x\y.txt # in dir in current dir on drive E E:\x\y.txt # in dir x at root of drive E UNC paths are similar except \\server\share is used instead of X: and there are no relative paths, since the part after share always starts with a \. Thus when joining paths, if the second path specifies a drive, then the result should include that drive, otherwise the drive from the first path should be used. The path parts should be combined with the standard logic. Some additional test cases tester("ntpath.join(r'C:/a/b/c/d', '/e/f')", 'C:\e\f') tester("ntpath.join('//a/b/c/d', '/e/f')", '//a/b/e/f') tester("ntpath.join('C:x/y', r'z')", r'C:x/y/z') tester("ntpath.join('C:x/y', r'/z')", r'C:/z') Andrei notes that the following is wrong but wonders what the correct answer is: >>> ntpath.join('C:/a/b', 'D:x/y') 'C:/a/b\\D:x/y' The /a/b part of the path is an absolute path on drive C and isn't "transferable" to another drive. So a reasonable result is simply 'D:x/y'. This matches Windows behavior. If on Windows you did $ cd /D C:\a\b $ cat D:x\y it would ignore the current drive on C set by the first command and use the current drive on D. tester("ntpath.join('C:/a/b', 'D:x/y')", r'D:x/y') tester("ntpath.join('//c/a/b', 'D:x/y')", r'D:x/y') ---------- nosy: +Bruce.Leban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 01:28:28 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 04 Nov 2013 00:28:28 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383524908.85.0.34855257948.issue19481@psf.upfronthosting.co.za> Tim Peters added the comment: Do we have a theory for _why_ IDLE goes nuts? I'd like to know whether the patch is fixing the real problem, or just happens to work in this particular test case ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 01:38:43 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 Nov 2013 00:38:43 +0000 Subject: [issue19456] ntpath doesn't join paths correctly when a drive is present In-Reply-To: <1383174757.86.0.861423882665.issue19456@psf.upfronthosting.co.za> Message-ID: <1383525523.38.0.53480553091.issue19456@psf.upfronthosting.co.za> Guido van Rossum added the comment: Do we even have a way to get the current directory for a given drive? (I guess this is only needed for C: style drives.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 01:50:22 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Mon, 04 Nov 2013 00:50:22 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383526222.62.0.641060392239.issue19475@psf.upfronthosting.co.za> Changes by Andrei Dorian Duma : ---------- nosy: +andrei.duma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 01:54:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 00:54:27 +0000 Subject: [issue18678] Wrong struct members name for spwd module In-Reply-To: <1375887000.77.0.620898445025.issue18678@psf.upfronthosting.co.za> Message-ID: <3dCbBB230Hz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 1b0ca1a7a3ca by R David Murray in branch 'default': #18678: Correct names of spwd struct members. http://hg.python.org/cpython/rev/1b0ca1a7a3ca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 01:57:03 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 04 Nov 2013 00:57:03 +0000 Subject: [issue18678] Wrong struct members name for spwd module In-Reply-To: <1375887000.77.0.620898445025.issue18678@psf.upfronthosting.co.za> Message-ID: <1383526623.0.0.701142455836.issue18678@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Vajrasky. I elected to apply this only to default, since it hasn't caused any real-world problems. The (small but non-zero) chance of breaking someone's code in the maintenance releases doesn't seem justified by the nature of the fix. ---------- resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 01:57:14 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 04 Nov 2013 00:57:14 +0000 Subject: [issue18678] Wrong struct members name for spwd module In-Reply-To: <1375887000.77.0.620898445025.issue18678@psf.upfronthosting.co.za> Message-ID: <1383526634.03.0.335459719622.issue18678@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 03:52:24 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 02:52:24 +0000 Subject: [issue19378] Clean up Python 3.4 API additions in the dis module In-Reply-To: <1382622276.63.0.652986128148.issue19378@psf.upfronthosting.co.za> Message-ID: <1383533544.82.0.523810560298.issue19378@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think it's a good idea in principle, but unrelated to this patch :) This one started as reworking line_offset as a more intuitive "first_line" parameter, and then testing and documenting that change proceeded to reveal a number of other issues with the 3.4 API additions :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 03:56:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 02:56:55 +0000 Subject: [issue19378] Clean up Python 3.4 API additions in the dis module In-Reply-To: <1382622276.63.0.652986128148.issue19378@psf.upfronthosting.co.za> Message-ID: <1383533815.33.0.926707448366.issue19378@psf.upfronthosting.co.za> Nick Coghlan added the comment: There was another change implemented as part of this: trailing whitespace is now stripped from the lines emitted by the disassembler, which made it possible to simplify the tests a bit (since they no longer have to strip that whitespace themselves, they can just do normal string comparisons) I rediscovered this existing issue, since the new more comprehensive tests for correct handling of the file parameter didn't have the extra operations to strip the trailing whitespace from each line. Rather than adding it, I just fixed the dissassembler to avoid emitting it in the first place (that was a lot easier now that Instruction._disassemble was the sole place responsible for emitting each line) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 04:23:18 2013 From: report at bugs.python.org (Jerry Barrington) Date: Mon, 04 Nov 2013 03:23:18 +0000 Subject: [issue19484] Idle crashes when opening file In-Reply-To: <1383490374.07.0.903795655927.issue19484@psf.upfronthosting.co.za> Message-ID: <1383535398.63.0.242025948462.issue19484@psf.upfronthosting.co.za> Jerry Barrington added the comment: Thank you, that fix worked perfectly. Only one weird thing. I have IDLE's preferences set to "At Startup: Open Shell Window". If I double click a *.py file while IDLE isn't running, the shell pops up, then the py file pops up, then the shell goes away. Not a problem, but kind of weird behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 04:30:58 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 04 Nov 2013 03:30:58 +0000 Subject: [issue19440] Clean up test_capi In-Reply-To: <1383081712.17.0.162713378456.issue19440@psf.upfronthosting.co.za> Message-ID: <1383535858.24.0.218735908324.issue19440@psf.upfronthosting.co.za> Zachary Ware added the comment: Well, this is embarrassing. I'm so used to there not being much difference between 3.3 and 3.4; I didn't even think about subTest being new, and obviously I didn't test it as I should have. Here's a new patch for 3.3 (tested this time!) that just removes the subTest usage of the old patch, leaving all of the _testcapi tests in a single test method. It's still an improvement over the old situation, but not as good as it is in 3.4. ---------- Added file: http://bugs.python.org/file32487/test_capi_cleanup-3.3.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 04:53:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 03:53:10 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <3dCg8P2Pwgz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 7b6ac858bb17 by Zachary Ware in branch '2.7': Issue #19391: Clean up PCbuild/readme.txt http://hg.python.org/cpython/rev/7b6ac858bb17 New changeset f28a2d072767 by Zachary Ware in branch '3.3': Issue #19391: Clean up PCbuild/readme.txt http://hg.python.org/cpython/rev/f28a2d072767 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 04:58:45 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 04 Nov 2013 03:58:45 +0000 Subject: [issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3 In-Reply-To: <1382718870.17.0.951198917656.issue19391@psf.upfronthosting.co.za> Message-ID: <1383537525.69.0.669867832273.issue19391@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the lesson, Vajrasky and David, and thank you for the review Brian. The final commit did have a couple changes not in the posted patch, just fixes of the same two obvious typos in both branches (avalible -> available, lniked -> linked). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 05:05:16 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 04:05:16 +0000 Subject: [issue19488] idlelib tests are silently skipped by test.regrtest on 2.7 Message-ID: <1383537916.61.0.84173881768.issue19488@psf.upfronthosting.co.za> New submission from Ned Deily: Running test_idle is supposed to cause the tests in Lib/idlelib/idle_test to be run. Unfortunately, under 2.7, when test.regrtest is used as the test runner, either directly or via "make test" (which buildbots use), the idlelib tests are currently silently skipped. This can be seen by running with -v and observing that nothing is run: python -m test.regrtest -v -uall test_idle The problem is that test_idle.py is depending on regrtest support of the load_tests protocol; that support was only added to regrtest in 3.3. Without changes to regrtest for 2.7, test_idle needs to define test_main as other tests do. The attached patch seems to fix the problem. ---------- components: IDLE files: test_idle_regrtest_27.patch keywords: patch messages: 202082 nosy: ned.deily, terry.reedy priority: normal severity: normal stage: patch review status: open title: idlelib tests are silently skipped by test.regrtest on 2.7 versions: Python 2.7 Added file: http://bugs.python.org/file32488/test_idle_regrtest_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 05:10:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 04:10:21 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <3dCgXD2LRjz7LkN@mail.python.org> Roundup Robot added the comment: New changeset dac6aea39814 by Ned Deily in branch '2.7': Issue #15392: Install idlelib/idle_test. http://hg.python.org/cpython/rev/dac6aea39814 New changeset e52dad892521 by Ned Deily in branch '3.3': Issue #15392: Install idlelib/idle_test. http://hg.python.org/cpython/rev/e52dad892521 New changeset 06239fe781fe by Ned Deily in branch 'default': Issue #15392: merge from 3.3 http://hg.python.org/cpython/rev/06239fe781fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 05:27:13 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 04 Nov 2013 04:27:13 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383539233.96.0.0606822102768.issue4331@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Should we add partialmethod to __all__ for consistency? ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 05:27:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 04:27:50 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <3dCgwP6nm6z7LjN@mail.python.org> Roundup Robot added the comment: New changeset 358496e67a89 by Zachary Ware in branch '2.7': Issue #17883: Backport test.test_support._is_gui_available() http://hg.python.org/cpython/rev/358496e67a89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 05:52:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 04:52:47 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <3dChTB3NF4z7LjS@mail.python.org> Roundup Robot added the comment: New changeset 72c3ca3ed22a by Zachary Ware in branch '2.7': Issue #17883: Tweak test_tcl testLoadWithUNC to skip the test in the http://hg.python.org/cpython/rev/72c3ca3ed22a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 05:56:51 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 04 Nov 2013 04:56:51 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1383541011.78.0.842300465598.issue17883@psf.upfronthosting.co.za> Zachary Ware added the comment: I'll leave this open until the buildbots prove happy. I did make a couple extra changes to the patch to TclTest.testLoadWithUNC to make a couple of skip conditions actually report a skip instead of just returning, and to remove a superfluous 'import sys'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 06:04:21 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 04 Nov 2013 05:04:21 +0000 Subject: [issue19488] idlelib tests are silently skipped by test.regrtest on 2.7 In-Reply-To: <1383537916.61.0.84173881768.issue19488@psf.upfronthosting.co.za> Message-ID: <1383541461.42.0.259092337167.issue19488@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Good catch. I confirmed the non-function, the silence, and the fix. Ned, because the patch included a commit message, hg import immediately committed the patch with the incomplete message. This surprised me since it has never happened before. Since the patch tested out ok, the only problem is the message, but if it had not been... Please leave such messages off of posted patches. Since it is committed, and worked on Mac and Windows, I went ahead and pushed. ---------- assignee: -> terry.reedy components: +Tests resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 06:19:35 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 04 Nov 2013 05:19:35 +0000 Subject: [issue19486] Bump up version of Tcl/Tk in building Python in Windows platform In-Reply-To: <1383492601.4.0.567246282787.issue19486@psf.upfronthosting.co.za> Message-ID: <1383542375.25.0.206920671248.issue19486@psf.upfronthosting.co.za> Zachary Ware added the comment: Vajrasky Kok wrote: > When building Python in Windows in release mode (not debug mode), I had > to download the Tcl/Tk binary build from ActiveState It is a bit of a hassle, but you can build your own Release mode Tcl/Tk; there are instructions in the newly clarified (hopefully) PCbuild/readme.txt. As far as upgrading our included Tcl/Tk, I've been thinking the same thing since we started including 8.5.15 with the Mac installers; I think we should ship the same version on any platform where we ship it at all. I'll do some testing with 8.5.15 as soon as I get a chance. I don't have enough experience with svn (or access to svn.python.org, as far as I can tell) to actually do the upgrade if we decide to do it, though. ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 07:08:50 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 04 Nov 2013 06:08:50 +0000 Subject: [issue18985] Improve the documentation in fcntl module In-Reply-To: <1378722919.93.0.901392318122.issue18985@psf.upfronthosting.co.za> Message-ID: <1383545330.89.0.570565058746.issue18985@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Except for the typo noticed by Victor, your patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 07:28:30 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 04 Nov 2013 06:28:30 +0000 Subject: [issue19489] move quick search box above TOC Message-ID: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> New submission from Georg Brandl: >From Mark Summerfield:, The Quick search box is really useful, but it is annoying that its position varies from page to page. On pages with long tables of contents it is often out of sight. Why not put it above the Table of Contents. That way it is always in the same place and easily accessible. ---------- assignee: docs at python components: Documentation messages: 202091 nosy: docs at python, georg.brandl priority: normal severity: normal status: open title: move quick search box above TOC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 07:35:05 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 06:35:05 +0000 Subject: [issue19488] idlelib tests are silently skipped by test.regrtest on 2.7 In-Reply-To: <1383537916.61.0.84173881768.issue19488@psf.upfronthosting.co.za> Message-ID: <1383546905.71.0.0246005626511.issue19488@psf.upfronthosting.co.za> Ned Deily added the comment: Terry, sorry the patch was confusing. Just FYI, if you are using "hg import" particularly when reviewing patches, you should always be using "hg import --no-commit" as explained in the devguide to avoid unintended changes. Whether or not a message is included in the patch has no effect on whether it is committed. If you do commit a patch by mistake, you can use "hg backout" or, with care, "hg strip" to remove it before pushing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 07:55:59 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 04 Nov 2013 06:55:59 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383548159.84.0.0302739780272.issue19481@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am curious too, so I traced through the call chain. In PyShell.py 1343: PseudoOutputFile.write(s) calls: self.shell.write(s, self.tags) 914: shell is an instance of PyShell and self.tags is 'stdout', 'stderr', or 'console'. 1291: PyShell.write(s,tags) calls: OutputWindow.write(self, s, tags, "iomark") (where 'iomark' must have been defined elsewhere, and the 'gravity' calls should not matter) In OutputWindow.py 46: OutputWindow(EditorWindow).write(s,tags,mark='insert') calls: self.text.insert(mark, s, tags) after trying to encode s if isinstance(s, str). It follows with: self.text.see(mark) self.text.update() but if the insert succeeds, these should not care about the source of the inserted chars. In EditorWindow.py 187: self.text = MultiCallCreator(Text)(text_frame, **text_options) In MultiCall.py, 304: MultiCallCreator wraps a tk widget in a MultiCall instance that adds event methods but otherwise passes calls to the tk widget. So PseudoOutputFile(s) becomes tk.Text().insert('iomark', s, 'stdout'). which becomes (lib-tk/tkinter.py, 3050) self.tk.call((self._w, 'insert', 'iomark', s) + args) Tk handles either Latin-1 bytes or BMP unicode. It seems fine with a unicode subclass: >>> import Tkinter as tk >>> t = tk.Text() >>> class F(unicode): pass >>> f = F('foo') >>> t.insert('1.0', u'abc', 'stdout') # 'iomark' is not defined >>> t.insert('1.0', f, 'stdout') >>> t.get('1.0', 'end') u'abcfoo\n' I remain puzzled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 09:04:31 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 04 Nov 2013 08:04:31 +0000 Subject: [issue19488] idlelib tests are silently skipped by test.regrtest on 2.7 In-Reply-To: <1383537916.61.0.84173881768.issue19488@psf.upfronthosting.co.za> Message-ID: <1383552271.62.0.793454992616.issue19488@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I explained on the checkins list, I am do "hg import --no-commit" indirectly though TortoiseHg Workbench Repository/import. It normally brings up an edit box for a commit message after patching and if that is left blank, it does not commit. With a message in the patch (non-comment text above 'diff'), it skips the edit box and just commits. I just verified this behavior difference with your patch on a local repository with test_idle.py. I first imported without the message, left the edit box blank, reverted, and then imported with a message added back. Since the patch says it is a changeset patch, I assume you committed it in and transferred it from a separate repository. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 09:34:11 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 04 Nov 2013 08:34:11 +0000 Subject: [issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket In-Reply-To: <1382965011.03.0.394041339056.issue19422@psf.upfronthosting.co.za> Message-ID: <1383554051.71.0.160016992974.issue19422@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch to raise error when using sock dgram in wrap_socket. I am still unsure whether I should put the validation in C code (private function _wrap_socket) or not. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32489/raises_error_on_wrap_socket_with_sock_dgram.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 09:40:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Nov 2013 08:40:45 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383554445.59.0.532584449316.issue19481@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suppose this is related to pickling. I were puzzled why it works with bytearray subclasses. But now I investigated that print() implicitly converts str and bytearray subclasses to str and left unicode subclasses as is. You can reproduce this bug for str and bytearray subclasses if use sys.stdout.write() instead of print(). Here is a patch for 2.7 which fixes the issue for str and bytearray subclasses too. 3.x needs patch too. >>> class U(unicode): pass >>> class S(str): pass >>> class BA(bytearray): pass >>> import sys >>> sys.stdout.write(u'\u20ac') ? >>> sys.stdout.write('\xe2\x82\xac') ? >>> sys.stdout.write(bytearray('\xe2\x82\xac')) ? >>> sys.stdout.write(U(u'\u20ac')) ? >>> sys.stdout.write(S('\xe2\x82\xac')) ? >>> sys.stdout.write(BA('\xe2\x82\xac')) ? ---------- versions: +Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32490/idle_write_string_subclass-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 09:41:48 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 08:41:48 +0000 Subject: [issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 Message-ID: <1383554508.21.0.868746765749.issue19490@psf.upfronthosting.co.za> New submission from Ned Deily: Piet van Oostrum (on python-dev and elsewhere) wrote: I tried to install matplotlib 1.3.1 on the release candidates of Python 2.7.6 and 3.3.3. I am on Mac OS X 10.6.8. Although the installation gave no problems, there is a problem with Tcl/Tk. The new Pythons have their own embedded Tcl/Tk, but when installing matplotlib it links to the Frameworks version of Tcl and TK, not to the embedded version. This causes confusion when importing matplotlib.pyplot: objc[70648]: Class TKApplication is implemented in both /Library/Frameworks/Python.framework/Versions/2.7/lib/libtk8.5.dylib and /Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. objc[70648]: Class TKMenu is implemented in both /Library/Frameworks/Python.framework/Versions/2.7/lib/libtk8.5.dylib and /Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. objc[70648]: Class TKContentView is implemented in both /Library/Frameworks/Python.framework/Versions/2.7/lib/libtk8.5.dylib and /Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. objc[70648]: Class TKWindow is implemented in both /Library/Frameworks/Python.framework/Versions/2.7/lib/libtk8.5.dylib and /Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. And then later it gives a lot of error messages. So I think it should be linked to the embedded version. For this the matplotlib setupext.py should be adapted to find out if there is an embedded Tcl/Tk in the Python installation and set the link parameters accordingly. However, the installed Python versions (from the DMG's) do not contain the Tcl/Tk header files, only the shared library and the tcl files. So I thing the distributed Python should also include the Tcl/Tk header files. https://mail.python.org/pipermail/python-dev/2013-November/129993.html ---------- assignee: ned.deily components: Installation, Macintosh messages: 202097 nosy: benjamin.peterson, georg.brandl, larry, ned.deily, pietvo priority: release blocker severity: normal status: open title: Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 09:50:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Nov 2013 08:50:34 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383555034.81.0.150066489069.issue19481@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And here is a patch for 3.x. Without it following code hangs. >>> class S(str): pass >>> import sys >>> sys.stdout.write('\u20ac') ?1 >>> sys.stdout.write(S('\u20ac')) ?1 ---------- Added file: http://bugs.python.org/file32491/idle_write_string_subclass-3.x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 10:28:17 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 09:28:17 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1383557297.77.0.73687239763.issue17827@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, I just noticed an interesting issue here in drafting the 2.7 backport: as near as I can tell, these aren't tested, so other implementations that failed to provide them would pass the 2.7 and 3.3 test suites. ---------- Added file: http://bugs.python.org/file32492/issue17827_docs_py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 10:31:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 09:31:43 +0000 Subject: [issue17827] Document and test codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1383557503.51.0.0455227110042.issue17827@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- title: Document codecs.encode and codecs.decode -> Document and test codecs.encode and codecs.decode versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 10:37:09 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 09:37:09 +0000 Subject: [issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 In-Reply-To: <1383554508.21.0.868746765749.issue19490@psf.upfronthosting.co.za> Message-ID: <1383557829.26.0.523796226452.issue19490@psf.upfronthosting.co.za> Ned Deily added the comment: That's unfortunate. It looks like matplotlib on OS X (darwin) has cpp code that interfaces directly with Tk and, hence, needs Tk headers. Further, for OS X (darwin), its setup.py assumes that Tkinter is linked with Tcl and Tk installed as frameworks in /Library/Frameworks (for third-party installs) or /System/Library/Frameworks (the Apple-supplied ones). It also appears that matplotlib borrowed these assumptions from PIL (the Python Imaging Library project) and which have been carried into its fork, Pillow. The current implementation of the built-in Tcl/Tk for the python OS X installers was designed to be standalone for Tkinter's use only. So it currently does not install Tcl and Tk header files. It also does not install Tcl and Tk into /Library/Frameworks so that it will not conflict with existing installations, like from ActiveState, that might have additional packages installed for real Tcl/Tk applications. As Piet noted for matplotlib, just including header files would not by itself solve the problem for these projects. Their setup*.py files would need to change as well to understand the new locations. (Sidenote: I see that at least one of the third-party OS X packagers, MacPorts, has a similar problem and patches these files in order for their ports of these projects to use the MacPorts-installed Tcl and Tk.) In anticipation of some problems like this, the rc1 installers ship with two versions of _tkinter.so: one linked with the new built-in Tcl/Tk libs and the other linked as before with Tcl and Tk frameworks in /Library/Frameworks falling back to /System/Library/Frameworks. The latter _tkinter.so is not on the default search path. It is possible for the user administrator to change the installation to always use the old-style _tkinter.so by copying it into lib-dynload. This is documented, although rather obscurely, in the installer BuildScript README. It is also possible to dynamically override at execution time by manipulating the Python search path, either by setting PYTHONPATH or prepending to sys.path the path to the directory with old-style _tkinter.so. This is even more obscurely documented. The hope was that neither would be routinely needed except by expert users for some corner cases. But matplotlib and PIL/Pillow do not fit that category. There are various options. I want to ponder them for a bit; I'll have an update within 24 hours. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 10:47:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 09:47:21 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1383558441.13.0.728179256022.issue17827@psf.upfronthosting.co.za> Nick Coghlan added the comment: Oops, never mind - the tests are already there (and have been since MAL's original commit prior to Python 2.4), I just fail at searching code. ---------- title: Document and test codecs.encode and codecs.decode -> Document codecs.encode and codecs.decode versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 10:53:59 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 09:53:59 +0000 Subject: [issue19481] IDLE hangs while printing instance of Unicode subclass In-Reply-To: <1383452956.07.0.644121763839.issue19481@psf.upfronthosting.co.za> Message-ID: <1383558839.77.0.527511797122.issue19481@psf.upfronthosting.co.za> Ned Deily added the comment: Pickling for the RPC protocol between the GUI process and the interpreter subprocess, which would explain why there is no problem when running idle -n (no subproces)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 10:55:41 2013 From: report at bugs.python.org (Carolyn Reed) Date: Mon, 04 Nov 2013 09:55:41 +0000 Subject: [issue19491] Python Crashing When Saving Documents Message-ID: <1383558941.35.0.744248647996.issue19491@psf.upfronthosting.co.za> New submission from Carolyn Reed: The ICT teacher at the school I work at has reported that frequently students are experiencing their Python software crashing when they attempt to save files. No error message is reported, the software just freezes. They are using the IDLE GUI Python v 3.2.4 on Windows 7 Professional 32-bit. Please advise. ---------- components: IDLE messages: 202103 nosy: carolyn.reed at talktalk.net priority: normal severity: normal status: open title: Python Crashing When Saving Documents type: crash versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 10:57:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 09:57:06 +0000 Subject: [issue19491] Python Crashing When Saving Documents In-Reply-To: <1383558941.35.0.744248647996.issue19491@psf.upfronthosting.co.za> Message-ID: <1383559026.52.0.28551489306.issue19491@psf.upfronthosting.co.za> STINNER Victor added the comment: Could you try to collect more information, like an error message, or better a traceback? Do you get a Windows popup like "program crashed"? Try to run IDLE from the command line, not from the icon, to get the traceback. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 10:57:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 09:57:51 +0000 Subject: [issue19491] Python Crashing When Saving Documents In-Reply-To: <1383558941.35.0.744248647996.issue19491@psf.upfronthosting.co.za> Message-ID: <1383559071.0.0.354369705816.issue19491@psf.upfronthosting.co.za> STINNER Victor added the comment: By the way, Python 3.2.4 is "old", you should try to reproduce your issue with a newer Python version, like Python 3.3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:00:43 2013 From: report at bugs.python.org (Carolyn Reed) Date: Mon, 04 Nov 2013 10:00:43 +0000 Subject: [issue19491] Python Crashing When Saving Documents In-Reply-To: <1383558941.35.0.744248647996.issue19491@psf.upfronthosting.co.za> Message-ID: <1383559243.51.0.573583944977.issue19491@psf.upfronthosting.co.za> Carolyn Reed added the comment: Unfortunately we are unable to run it from the command line - as we are a school this is locked down for students. There are no error messages at all, the program just freezes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:01:38 2013 From: report at bugs.python.org (Carolyn Reed) Date: Mon, 04 Nov 2013 10:01:38 +0000 Subject: [issue19491] Python Crashing When Saving Documents In-Reply-To: <1383558941.35.0.744248647996.issue19491@psf.upfronthosting.co.za> Message-ID: <1383559298.92.0.402099254836.issue19491@psf.upfronthosting.co.za> Carolyn Reed added the comment: Okay, we'll see if we can go to V 3.3.2 and see what difference this makes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:08:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 10:08:46 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <3dCqTn5PDGz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset bdb30bdf60a5 by Nick Coghlan in branch '2.7': Close #17827: Document codecs.encode & codecs.decode http://hg.python.org/cpython/rev/bdb30bdf60a5 ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:11:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 10:11:11 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <3dCqXZ38LMz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 536a7c09c7fd by Victor Stinner in branch 'default': Issue #16286: write a new subfunction bytes_compare_eq() http://hg.python.org/cpython/rev/536a7c09c7fd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:13:36 2013 From: report at bugs.python.org (Carolyn Reed) Date: Mon, 04 Nov 2013 10:13:36 +0000 Subject: [issue19491] Python Crashing When Saving Documents In-Reply-To: <1383558941.35.0.744248647996.issue19491@psf.upfronthosting.co.za> Message-ID: <1383560016.55.0.801356073265.issue19491@psf.upfronthosting.co.za> Carolyn Reed added the comment: There doesn't seem to be a Pygame version for 3.3 on the pygame webpage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:24:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 10:24:52 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <3dCqrN0HDzz7Ll6@mail.python.org> Roundup Robot added the comment: New changeset 5fa291435740 by Victor Stinner in branch 'default': Issue #16286: optimize PyUnicode_RichCompare() for identical strings (same http://hg.python.org/cpython/rev/5fa291435740 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:26:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Nov 2013 10:26:16 +0000 Subject: [issue18702] Report skipped tests as skipped In-Reply-To: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za> Message-ID: <1383560776.18.0.72344512665.issue18702@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I forgot to merge branches? Thanks Ned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:29:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 10:29:10 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <3dCqxK6fFTz7LjP@mail.python.org> Roundup Robot added the comment: New changeset da9c6e4ef301 by Victor Stinner in branch 'default': Issue #16286: remove duplicated identity check from unicode_compare() http://hg.python.org/cpython/rev/da9c6e4ef301 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:29:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 10:29:10 +0000 Subject: [issue19424] _warnings: patch to avoid conversions from/to UTF-8 In-Reply-To: <1382982202.33.0.652166752386.issue19424@psf.upfronthosting.co.za> Message-ID: <3dCqxK1Dr2z7LjP@mail.python.org> Roundup Robot added the comment: New changeset 494f736f5945 by Victor Stinner in branch 'default': Issue #19424: PyUnicode_CompareWithASCIIString() normalizes memcmp() result http://hg.python.org/cpython/rev/494f736f5945 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:30:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 10:30:24 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1383561024.85.0.121889033141.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: I applied changes unrelated to the hash. ---------- Added file: http://bugs.python.org/file32493/compare_hash-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:47:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 10:47:29 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1383562049.79.0.285967293438.issue19466@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 11:56:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 10:56:50 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1383562610.53.0.948661058956.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: Results of benchmarks using compare_hash-3.patch: $ time ../benchmarks/perf.py -r -b default ./pythonorig ./pythonhash INFO:root:Skipping benchmark slowspitfire; not compatible with Python 3.4 INFO:root:Skipping benchmark slowpickle; not compatible with Python 3.4 INFO:root:Skipping benchmark slowunpickle; not compatible with Python 3.4 INFO:root:Skipping benchmark spambayes; not compatible with Python 3.4 Running 2to3... Running django_v2... Report on Linux smithers 3.9.4-200.fc18.x86_64 #1 SMP Fri May 24 20:10:49 UTC 2013 x86_64 x86_64 Total CPU cores: 8 ### 2to3 ### Min: 6.358000 -> 6.055000: 1.05x faster Avg: 6.407600 -> 6.179800: 1.04x faster Significant (t=3.53) Stddev: 0.04311 -> 0.13785: 3.1979x larger ### nbody ### Min: 0.219029 -> 0.212477: 1.03x faster Avg: 0.224940 -> 0.219248: 1.03x faster Significant (t=10.13) Stddev: 0.00373 -> 0.00420: 1.1288x larger The following not significant results are hidden, use -v to show them: django_v2. At least, Python is not slower with the patch :-) I'm surprised that the benchmark shows a difference. nbody benchmark is focused on float numbers. I checked with gdb, nbody benchmark does not call any Unicode comparison function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 12:02:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 11:02:09 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1383562929.32.0.59201041111.issue7442@psf.upfronthosting.co.za> STINNER Victor added the comment: @Stefan: Did you my comments on Rietveld? http://bugs.python.org/review/7442/#ps1473 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 12:04:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 11:04:55 +0000 Subject: [issue18931] new selectors module should support devpoll on Solaris In-Reply-To: <1378378715.64.0.328227872693.issue18931@psf.upfronthosting.co.za> Message-ID: <1383563095.61.0.844035239103.issue18931@psf.upfronthosting.co.za> STINNER Victor added the comment: @Giampaolo: Your patch doesn't apply cleanly anymore. Could you update it? Issue #19172 has been fixed, selectors now have a get_map() method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 12:07:13 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 04 Nov 2013 11:07:13 +0000 Subject: [issue19480] HTMLParser fails to handle some characters in the starttag In-Reply-To: <1383411472.4.0.242370272088.issue19480@psf.upfronthosting.co.za> Message-ID: <1383563233.19.0.257609127606.issue19480@psf.upfronthosting.co.za> Ezio Melotti added the comment: For 2.7 that sounds like a reasonable option, for 3.3/3.4 however I'm keeping the name but I change the regex groups, so it might break if someone is using it with groups. In theory I could add a third name and leave that unchanged, but I'm not sure it's worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 12:07:34 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 11:07:34 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1383563254.23.0.741082415456.issue19251@psf.upfronthosting.co.za> STINNER Victor added the comment: "You got me, Antoine! I'm working on a Python-only implementation of PBKDF2_HMAC. It involves XOR of two bytes in one place." If you want super-fast code, you should probably reimplement it in C. Python is not designed for performances... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 12:15:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 11:15:31 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1383563731.64.0.926595656056.issue18874@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file32494/022955935ba3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 12:17:21 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 11:17:21 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1383563841.28.0.799147296154.issue18874@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file32478/65e72bf01246.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 12:17:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 11:17:19 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1383563839.41.0.192364370672.issue18874@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file32211/57ae01bf96cb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 12:38:13 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 04 Nov 2013 11:38:13 +0000 Subject: [issue19480] HTMLParser fails to handle some characters in the starttag In-Reply-To: <1383411472.4.0.242370272088.issue19480@psf.upfronthosting.co.za> Message-ID: <1383565093.03.0.591571481361.issue19480@psf.upfronthosting.co.za> R. David Murray added the comment: Then for 3.3 you are bug fixing the regex, so anyone using it ought to want the change, right? :) If the same is true for 2.7, then creating an alias would probably be fine. I haven't looked at the details, so I'll leave it to your judgment. I just don't want the name going away in 2.7, it might be a gratuitous breaking of someone's code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 13:54:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 12:54:01 +0000 Subject: [issue19017] selectors: towards uniform EBADF handling In-Reply-To: <1379156518.11.0.97134012587.issue19017@psf.upfronthosting.co.za> Message-ID: <1383569641.95.0.548674543851.issue19017@psf.upfronthosting.co.za> STINNER Victor added the comment: What is the status of this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 13:57:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Nov 2013 12:57:44 +0000 Subject: [issue19492] Report skipped distutils tests as skipped Message-ID: <1383569864.94.0.187586889245.issue19492@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Some skipped distutils tests are reported as passed. Arfrever pointed out on some of these tests on IRC. Proposed patch adds explicit reporting them as skipped. See also issue18702. ---------- assignee: eric.araujo components: Distutils, Tests messages: 202123 nosy: eric.araujo, serhiy.storchaka, tarek priority: normal severity: normal stage: patch review status: open title: Report skipped distutils tests as skipped type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 13:57:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Nov 2013 12:57:58 +0000 Subject: [issue19493] Report skipped ctypes tests as skipped Message-ID: <1383569878.45.0.454771857446.issue19493@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Some skipped ctypes tests are reported as passed. Proposed patch adds explicit reporting them as skipped. See also issue18702. ---------- components: Tests, ctypes files: skip_tests_ctypes.patch keywords: patch messages: 202124 nosy: amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Report skipped ctypes tests as skipped type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32495/skip_tests_ctypes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:00:08 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 13:00:08 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1383570008.89.0.743487195803.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: Updated patch. The results of this suggests to me that the input wrappers are likely infeasible at this point in time, but improving the errors for the wrong *output* type is entirely feasible. Since the main conversion we need to prompt is things like "binary_object.decode(binary_codec)" -> "codecs.decode(binary_object, binary_codec)", I suggest we limit the scope of this issue to that part of the problem. >>> import codecs >>> codecs.encode(b"hello", "bz2_codec").decode("bz2_codec") Traceback (most recent call last): File "", line 1, in TypeError: 'bz2_codec' decoder returned 'bytes' instead of 'str'; use codecs.decode to decode to arbitrary types >>> "hello".encode("bz2_codec") TypeError: 'str' does not support the buffer interface The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in TypeError: invalid input type for 'bz2_codec' codec (TypeError: 'str' does not support the buffer interface) >>> "hello".encode("rot_13") TypeError: 'rot_13' encoder returned 'str' instead of 'bytes'; use codecs.encode to encode to arbitrary types The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in TypeError: invalid input type for 'rot_13' codec (TypeError: 'rot_13' encoder returned 'str' instead of 'bytes'; use codecs.encode to encode to arbitrary types) ---------- Added file: http://bugs.python.org/file32496/issue17828_improved_codec_errors.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:03:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Nov 2013 13:03:33 +0000 Subject: [issue18702] Report skipped tests as skipped In-Reply-To: <1376132966.91.0.713996712724.issue18702@psf.upfronthosting.co.za> Message-ID: <1383570213.39.0.976488597374.issue18702@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Related issues: issue19492 and issue19493. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:09:39 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 04 Nov 2013 13:09:39 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1383562929.32.0.59201041111.issue7442@psf.upfronthosting.co.za> Message-ID: <20131104130938.GA896@sleipnir.bytereef.org> Stefan Krah added the comment: Yes, I saw the comments. I'm still wondering if we should just write an mbstowcs_l() function instead. Even then, there would still be a small chance that a C extension that creates its own thread picks up the wrong LC_CTYPE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:19:03 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 04 Nov 2013 13:19:03 +0000 Subject: [issue19492] Report skipped distutils tests as skipped In-Reply-To: <1383569864.94.0.187586889245.issue19492@psf.upfronthosting.co.za> Message-ID: <1383571143.8.0.586145945389.issue19492@psf.upfronthosting.co.za> Vajrasky Kok added the comment: You forgot to upload the "proposed patch", Serhiy. ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:20:19 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 13:20:19 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1383571219.14.0.86891011904.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, came up with a relatively simple solution based on an internal helper function with an optional output flag: >>> import codecs >>> codecs.encode(b"hello", "bz2_codec").decode("bz2_codec") Traceback (most recent call last): File "", line 1, in TypeError: 'bz2_codec' decoder returned 'bytes' instead of 'str'; use codecs.decode to decode to arbitrary types >>> "hello".encode("bz2_codec") TypeError: 'str' does not support the buffer interface The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in TypeError: invalid input type for 'bz2_codec' codec (TypeError: 'str' does not support the buffer interface) >>> "hello".encode("rot_13") Traceback (most recent call last): File "", line 1, in TypeError: 'rot_13' encoder returned 'str' instead of 'bytes'; use codecs.encode to encode to arbitrary types ---------- Added file: http://bugs.python.org/file32497/issue17828_improved_codec_errors_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:21:33 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 13:21:33 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1383571293.21.0.89981111664.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: For anyone interested, I have a patch up on issue 17828 that produces the following output for various codec usage errors: >>> import codecs >>> codecs.encode(b"hello", "bz2_codec").decode("bz2_codec") Traceback (most recent call last): File "", line 1, in TypeError: 'bz2_codec' decoder returned 'bytes' instead of 'str'; use codecs.decode to decode to arbitrary types >>> "hello".encode("bz2_codec") TypeError: 'str' does not support the buffer interface The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in TypeError: invalid input type for 'bz2_codec' codec (TypeError: 'str' does not support the buffer interface) >>> "hello".encode("rot_13") Traceback (most recent call last): File "", line 1, in TypeError: 'rot_13' encoder returned 'str' instead of 'bytes'; use codecs.encode to encode to arbitrary types ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:27:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 13:27:10 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1383571630.36.0.0251229416495.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: The other thing is that this patch doesn't wrap AttributeError. I'm OK with that, since I believe the only codec in the standard library that currently throws that for a bad input type is rot_13. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:27:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 13:27:41 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1383571661.9.0.000888768429155.issue7442@psf.upfronthosting.co.za> STINNER Victor added the comment: What is this locale_t type used for the locale parameter of mbstowcs_l()? Are you sure that it is a string? According to this patch, it looks like a structure: http://www.winehq.org/pipermail/wine-cvs/2010-May/067264.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:30:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 13:30:01 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1383571801.66.0.832325527862.issue17828@psf.upfronthosting.co.za> STINNER Victor added the comment: It would be simpler to just drop these custom codecs (rot13, bz2, hex, etc.) instead of helping to use them :-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:34:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 13:34:21 +0000 Subject: [issue19487] Correct the error of the example given in the doc of partialmethod Message-ID: <1383572061.25.0.822641144667.issue19487@psf.upfronthosting.co.za> New submission from Nick Coghlan: Thanks for the report, this has now been fixed in http://hg.python.org/cpython/rev/ac1685661b07 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:34:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 13:34:43 +0000 Subject: [issue4331] Add functools.partialmethod In-Reply-To: <1226817180.09.0.841012218041.issue4331@psf.upfronthosting.co.za> Message-ID: <1383572083.93.0.565836609838.issue4331@psf.upfronthosting.co.za> Nick Coghlan added the comment: Indeed, added to __all__ in http://hg.python.org/cpython/rev/ac1685661b07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:35:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 13:35:23 +0000 Subject: [issue19378] Clean up Python 3.4 API additions in the dis module In-Reply-To: <1382622276.63.0.652986128148.issue19378@psf.upfronthosting.co.za> Message-ID: <1383572123.42.0.579596517508.issue19378@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:46:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Nov 2013 13:46:20 +0000 Subject: [issue19492] Report skipped distutils tests as skipped In-Reply-To: <1383569864.94.0.187586889245.issue19492@psf.upfronthosting.co.za> Message-ID: <1383572780.28.0.276312071208.issue19492@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Vajrasky. ---------- keywords: +patch Added file: http://bugs.python.org/file32498/skip_tests_distutils.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:53:30 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 13:53:30 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383573210.32.0.288950518846.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: I created https://github.com/pypa/pip/issues/1294 for the script versioning issue on the pip side, as I'd prefer not to be doing the temporary directory dance if we don't need to. How do we want to handle this for beta 1? Is it OK to do an initial commit that has the installation of non-versioned scripts as a known defect so we can make progress on the rest of the changes in the meantime? Alternatively, we could perhaps tweak the embedded wheels as an interim fix until the problem is addressed upstream. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 14:58:22 2013 From: report at bugs.python.org (Donald Stufft) Date: Mon, 04 Nov 2013 13:58:22 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383573502.58.0.785195522484.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: Tweaking the Wheels won't work. The scripts are generated at install time. We need to fix it in pip, I was waiting on answers to http://bugs.python.org/issue19406#msg201954 before coming up with a solution and making a PR request as that will influence the proposal/PR I make to pip. Basically we need to figure out what is considered reasonable during the initial ensurepip, and subsequent pip install --upgrade pip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 15:06:56 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 04 Nov 2013 14:06:56 +0000 Subject: [issue19017] selectors: towards uniform EBADF handling In-Reply-To: <1383569641.95.0.548674543851.issue19017@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > What is the status of this issue? AFAICT, we haven't reached a consensus yet on the best way to handle EBADF. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 15:14:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 14:14:34 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1383574474.62.0.277616494587.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm OK with an unqualified "pip install --upgrade pip" retaining pip's current behaviour of always writing the unqualified script versions. However, running "pip3 install --upgrade pip" would ideally leave the "pip" and "easy_install" scripts alone. For "make altinstall" compatibility, we definitely need a "--altinstall" flag that only installs the fully qualified versions of pip and easy_install. Finally, there needs to be some way to explicitly request the "pip3" style behaviour when running via -m so we can use it from ensurepip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 15:29:13 2013 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 04 Nov 2013 14:29:13 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383575353.2.0.493839771866.issue18345@psf.upfronthosting.co.za> Vinay Sajip added the comment: This issue had dropped off my radar, thanks for bringing it back into view. I see that the patch follows Antoine's suggestion of a "chown" parameter, but I'm not sure that's the best way to provide this functionality. What concerns me about a "chown" parameter: 1. It's POSIX only, which makes me not want to add it to the API for all users (even though they don't need to specify it, as it's defaulted). It's not a really common use case, even on POSIX. 2. It makes the argument list for the rotating handlers even more unwieldy than it is at present. While it's not pretty now, I don't want to make it uglier. 3. If other things like this are requested in the future (e.g. "chmod" as mentioned in the original post), then it makes the argument lists longer and longer if this approach is used to satisfy those requirements. Instead, a mixin which redefined _open would seem to fulfil the requirements, and the same strategy could be used to cater for other requirements without any stdlib changes. Of course it requires the developer to do a little bit more work than having the work done for them in the stdlib, but I think it's reasonable to meet the requirement this way as it's relatively uncommon. I don't mind adding an working example of this to the cookbook, making it even less work for developers to adopt this approach. While the _open method is technically private as it begins with an underscore, I have no problem letting subclasses override it. Also, ISTM that your patch would fail at the shutil.chown call if the log file didn't already exist, which is a not uncommon scenario. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 15:35:22 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Mon, 04 Nov 2013 14:35:22 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383575722.96.0.774976465181.issue18345@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Sure, thanks for the review, it's really insightful regarding API design. I will try to contribute an example for the cookbook later this day. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 15:46:13 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 04 Nov 2013 14:46:13 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1383571801.66.0.832325527862.issue17828@psf.upfronthosting.co.za> Message-ID: <5277B331.3030804@egenix.com> Marc-Andre Lemburg added the comment: On 04.11.2013 14:30, STINNER Victor wrote: > > It would be simpler to just drop these custom codecs (rot13, bz2, hex, etc.) instead of helping to use them :-) -1 for the same reasons I keep repeating over and over and over again :-) The codec system was designed to work obj->obj. Python 3 limits the types for the bytes/str helper methods, but that limitation does not extend to the codec design. +1 on having better error messages. In the long run, we should add supported input/output type information to codecs, so that error reporting and codec introspection becomes easier. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 04 2013) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2013-11-19: Python Meeting Duesseldorf ... 15 days to go ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 16:00:19 2013 From: report at bugs.python.org (Matej Cepl) Date: Mon, 04 Nov 2013 15:00:19 +0000 Subject: [issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar Message-ID: <1383577219.47.0.139805262488.issue19494@psf.upfronthosting.co.za> New submission from Matej Cepl: GitHub API v3 is intentionally broken (see http://developer.github.com/v3/auth/): > The main difference is that the RFC requires unauthenticated requests to be answered with 401 Unauthorized responses. In many places, this would disclose the existence of user data. Instead, the GitHub API responds with 404 Not Found. This may cause problems for HTTP libraries that assume a 401 Unauthorized response. The solution is to manually craft the Authorization header. Unfortunately, urllib2.HTTPBasicAuthHandler relies on the standard-conformant behavior. So a naive programmer (like me) who wants to program against GitHub API using urllib2 (and foolishly ignores this comment about the API non-conformance, because he thinks GitHub wouldn't be that stupid and break all Python applications) uses for authentication something like the example script on http://docs.python.org/2/howto/urllib2.html#id6, spends couple of hours hitting this issue, until he tries python-requests (which work) and his (mistaken) conclusion is that urllib2 is a piece of crap which should never be used again. I am not sure how widespread is this breaking of RFC, but it seems to me that quite a lot (e.g., http://stackoverflow.com/a/9698319/164233 which just en passant expects urllib2 authentication stuff to be useless), and the question is whether it shouldn't be documented somehow and/or urllib2.HTTPBasicAuthHandler shouldn't be modified to try add Authenticate header first. ---------- components: Library (Lib) messages: 202144 nosy: mcepl priority: normal severity: normal status: open title: urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar versions: Python 2.6, Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 16:39:02 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 04 Nov 2013 15:39:02 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1383571661.9.0.000888768429155.issue7442@psf.upfronthosting.co.za> Message-ID: <20131104153901.GA1877@sleipnir.bytereef.org> Stefan Krah added the comment: STINNER Victor wrote: > What is this locale_t type used for the locale parameter of mbstowcs_l()? > Are you sure that it is a string? According to this patch, it looks like a structure: > http://www.winehq.org/pipermail/wine-cvs/2010-May/067264.html Yes, the string was mainly for benchmarking. FreeBSD seems to have thread safe versions (xlocale.h), that take a locale_t as the extra parameter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 16:48:01 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 Nov 2013 15:48:01 +0000 Subject: [issue19017] selectors: towards uniform EBADF handling In-Reply-To: Message-ID: Guido van Rossum added the comment: > AFAICT, we haven't reached a consensus yet on the best way to handle EBADF. By which you mean that you still don't agree with my proposal? Which is to fix it for most syscalls but not for select(), poll() and similar (anything that the new selectors module interfaces to). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 17:16:09 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 04 Nov 2013 16:16:09 +0000 Subject: [issue19017] selectors: towards uniform EBADF handling In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > By which you mean that you still don't agree with my proposal? Which is to > fix it for most syscalls but not for select(), poll() and similar (anything > that the new selectors module interfaces to). I agree with your proposal, but that's another issue :-) (this thread is about EBADF in selectors, not EINTR). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 17:48:39 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 04 Nov 2013 16:48:39 +0000 Subject: [issue19492] Report skipped distutils tests as skipped In-Reply-To: <1383569864.94.0.187586889245.issue19492@psf.upfronthosting.co.za> Message-ID: <1383583719.2.0.265057853502.issue19492@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: > Lib/distutils/tests/test_build_ext.py ... > - ALREADY_TESTED = True > + ALREADY_TESTED = type(self).__name__ Why this change? > Lib/distutils/tests/test_build_ext.py ... > + @unittest.skipIf(sys.version < '2.6', > + 'site.USER_SITE was introduced in 2.6') > def test_user_site(self): > - # site.USER_SITE was introduced in 2.6 > - if sys.version < '2.6': > - return This check probably could be deleted. ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 18:01:48 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 04 Nov 2013 17:01:48 +0000 Subject: [issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 In-Reply-To: <1383554508.21.0.868746765749.issue19490@psf.upfronthosting.co.za> Message-ID: <1383584508.74.0.152055835206.issue19490@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 18:02:47 2013 From: report at bugs.python.org (Gereon Kremer) Date: Mon, 04 Nov 2013 17:02:47 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1383584567.9.0.650859481223.issue11245@psf.upfronthosting.co.za> Gereon Kremer added the comment: I stumbled about this issue again and would really like to see it fixed. I see the possibility to create a test case in combination with the first test sequence which creates a temporary mail. Would it be enough, that we just call IDLE in some folder, create a temporary mail in this folder and check if it returns? Unfortuantely, I have not been able to write code for such a test case yet, as the whole test routine fails with "[PRIVACYREQUIRED] Plaintext authentication disallowed on non-secure (SSL/TLS) connections". This is using 3.2.3, but I guess it will not be any different with the current release... (as it is the same with 2.7.3) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 18:42:58 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 Nov 2013 17:42:58 +0000 Subject: [issue19017] selectors: towards uniform EBADF handling In-Reply-To: <1379156518.11.0.97134012587.issue19017@psf.upfronthosting.co.za> Message-ID: <1383586978.48.0.819263809806.issue19017@psf.upfronthosting.co.za> Guido van Rossum added the comment: Eww, sorry. That's the second time I mistook this thread for the other. I re-read the original description and I now think that we should follow your original advice. There are two separate cases: (1) Registering an invalid FD; this succeeds for select/poll, fails for epoll/kqueue. (2) Registering a valid FD, then closing it, then calling .select(); this raises for select, returns a special event for poll, and is silently ignored for epoll/kqueue. I agree on making all selectors do the same thing for (2), and I agree that the best thing is to be silent and unregister the bad FD if we can (IIUC epoll/kqueue don't even tell us this happened?). We then need to make unregister() be silent when the FD isn't registered. Maybe make it return True when it actually unregistered something and False when there's nothing? An alternative would be to put the bad FD into a separate "quarantine" set so that it won't be used by the select() method but will still be recognized by unregister(). (And register() should look there too.) This still leaves case (1), where the FD is already bad when we register it. I am actually fine with sometimes raising and sometimes not; I don't want to pay the extra overhead of doing an fstat() or some other syscall just to verify that it is valid. (Although this would make the argument about wanting to choose a selector class that doesn't make extra syscalls less compelling. :-) And neither do I want to ignore the error in register() and pretend success. I guess we should in any case make it consistent so that if you successfully register() an FD you can always unregister() it without raising. I really wish there was an event to tell us that an FD has become invalid, but if epoll/kqueue really don't support that, i don't think it's worth it to introduce that only for select/poll. IOW let's do what those other systems you mention do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 19:07:31 2013 From: report at bugs.python.org (Damien Moore) Date: Mon, 04 Nov 2013 18:07:31 +0000 Subject: [issue19495] Enhancement for timeit: measure time to run blocks of code using 'with' Message-ID: <1383588451.25.0.545990193953.issue19495@psf.upfronthosting.co.za> New submission from Damien Moore: It would be useful if timeit had a class like `timeblock` below that would allow one to easily time code inside a `with` block: import time class timeblock: def __init__(self,descr=''): self.descr=descr def __enter__(self): self.t0=time.time() return self def __exit__(self, type, value, traceback): self.t1=time.time() self.elapsed = self.t1-self.t0 if self.descr: print self.descr,'took',self.elapsed,'seconds' This would be used as follows: with timeblock('cumsum') as t: a=0 for x in range(10000000): a+=x and would output: cumsum took 2.39 seconds This is useful when trying to find bottlenecks in large programs without interfering with their operation, which would be harder to do with timeit.timeit and more verbose with time. ---------- components: Library (Lib) messages: 202151 nosy: dmoore priority: normal severity: normal status: open title: Enhancement for timeit: measure time to run blocks of code using 'with' type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 19:09:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 04 Nov 2013 18:09:10 +0000 Subject: [issue19495] Enhancement for timeit: measure time to run blocks of code using 'with' In-Reply-To: <1383588451.25.0.545990193953.issue19495@psf.upfronthosting.co.za> Message-ID: <1383588550.27.0.793122490208.issue19495@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, georg.brandl, giampaolo.rodola stage: -> needs patch versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 19:28:50 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 04 Nov 2013 18:28:50 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1383589730.96.0.492054570858.issue17883@psf.upfronthosting.co.za> Zachary Ware added the comment: The buildbots appear to be happy, no more hanging and no more testLoadWithUNC failure. There is a failure in test_tcl on one bot, but it is not related to this issue. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 19:38:54 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 04 Nov 2013 18:38:54 +0000 Subject: [issue19495] Enhancement for timeit: measure time to run blocks of code using 'with' In-Reply-To: <1383588451.25.0.545990193953.issue19495@psf.upfronthosting.co.za> Message-ID: <1383590334.18.0.120122520788.issue19495@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I think I have already proposed something similar in past but I can't find any reference on the tracker (so maybe I didn't after all). BTW I have something like this [1] in a "utils" module I use across different projects and I would definitively welcome an inclusion in the stdlib. [1] a modified version of http://dabeaz.blogspot.it/2010/02/function-that-works-as-context-manager.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 20:04:37 2013 From: report at bugs.python.org (Sergey) Date: Mon, 04 Nov 2013 19:04:37 +0000 Subject: [issue19496] Website link Message-ID: <1383591877.41.0.929815000655.issue19496@psf.upfronthosting.co.za> New submission from Sergey: Wrong ling following to Windows help file on the Python 2.7.6 RC 1 Web page. It is the following: http://www.python.org/ftp/python/2.7.6/python275.chm And should be: http://www.python.org/ftp/python/2.7.6/python276rc1.chm ---------- components: Build messages: 202154 nosy: MolotoFF priority: normal severity: normal status: open title: Website link versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 20:07:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 04 Nov 2013 19:07:31 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1383592051.36.0.722933204545.issue19466@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it possible to write a test for this behavior? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 20:11:31 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 04 Nov 2013 19:11:31 +0000 Subject: [issue19496] Website link In-Reply-To: <1383591877.41.0.929815000655.issue19496@psf.upfronthosting.co.za> Message-ID: <1383592291.89.0.434483739324.issue19496@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +benjamin.peterson, brian.curtin, terry.reedy, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 20:12:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Nov 2013 19:12:17 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1383592337.06.0.220241455615.issue19466@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm afraid clearing thread states is a bit too brutal. What if some destructor relies on contents of the thread states (e.g. thread locals)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 20:24:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Nov 2013 19:24:05 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383593045.98.0.88556449528.issue18345@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Instead, a mixin which redefined _open would seem to fulfil the > requirements, and the same strategy could be used to cater for other > requirements without any stdlib changes. One desireable aspect is to still be able to configure logging using dictConfig(). I don't know if a mixin could enable this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 20:26:53 2013 From: report at bugs.python.org (Matej Cepl) Date: Mon, 04 Nov 2013 19:26:53 +0000 Subject: [issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar In-Reply-To: <1383577219.47.0.139805262488.issue19494@psf.upfronthosting.co.za> Message-ID: <1383593213.58.0.82920866423.issue19494@psf.upfronthosting.co.za> Matej Cepl added the comment: Also let me add from RFC 2617, end of section 2: > A client MAY preemptively send the corresponding Authorization > header with requests for resources in that space without > receipt of another challenge from the server. Similarly, when > a client sends a request to a proxy, it may reuse a userid and > password in the Proxy-Authorization header field without > receiving another challenge from the proxy server. See section > 4 for security considerations associated with Basic > authentication. So sending "Authorization" in the introductory request is not only performance hack, but it is also anticipated by RFC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 20:48:53 2013 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 04 Nov 2013 19:48:53 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383594533.65.0.728302734815.issue18345@psf.upfronthosting.co.za> Vinay Sajip added the comment: If you are using dictConfig(), you don't need to specify a class for your handler: you can specify a callable which configures and returns a handler, and the callable could be a function which created a file with appropriate ownership and then returned a FileHandler or subclass thereof which used that file. I can update the cookbook with suitable examples, with and without using a mixin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 20:55:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Nov 2013 19:55:20 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1383594533.65.0.728302734815.issue18345@psf.upfronthosting.co.za> Message-ID: <1383594918.2883.4.camel@fsol> Antoine Pitrou added the comment: > If you are using dictConfig(), you don't need to specify a class for > your handler: you can specify a callable which configures and returns > a handler, and the callable could be a function which created a file > with appropriate ownership and then returned a FileHandler or subclass > thereof which used that file. But can I pass the file owner in the config dict? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:02:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 20:02:44 +0000 Subject: [issue19017] selectors: towards uniform EBADF handling In-Reply-To: <1379156518.11.0.97134012587.issue19017@psf.upfronthosting.co.za> Message-ID: <1383595364.76.0.900125170014.issue19017@psf.upfronthosting.co.za> STINNER Victor added the comment: To find an invalid FD when select() fails with EBAD, we can use something like: http://ufwi.org/projects/nufw/repository/revisions/b4f66edc5d4dc837f75857f8bffe9015454fdebc/entry/src/nuauth/tls_nufw.c#L408 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:02:57 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 20:02:57 +0000 Subject: [issue19496] Website link In-Reply-To: <1383591877.41.0.929815000655.issue19496@psf.upfronthosting.co.za> Message-ID: <1383595377.0.0.984288784661.issue19496@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. The link is now fixed. ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:12:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 20:12:52 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dD4tq2Sbhz7LjP@mail.python.org> Roundup Robot added the comment: New changeset c3fa22d04fb2 by Serhiy Storchaka in branch '2.7': Issue #19085: Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.12. http://hg.python.org/cpython/rev/c3fa22d04fb2 New changeset 583347b79aa0 by Serhiy Storchaka in branch '3.3': Issue #19085: Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.12. http://hg.python.org/cpython/rev/583347b79aa0 New changeset fe5a829bd645 by Serhiy Storchaka in branch 'default': Issue #19085: Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.12. http://hg.python.org/cpython/rev/fe5a829bd645 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:22:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 20:22:12 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383592337.06.0.220241455615.issue19466@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/11/4 Antoine Pitrou : > I'm afraid clearing thread states is a bit too brutal. What if some destructor relies on contents of the thread states (e.g. thread locals)? When Py_Finalize() is called, only one Python thread hold the GIL. After _Py_Finalizing=tstate is set, no other thread can hold the GIL. If another Python tries to lock the GIL, it is "killed" by PyEval_RestoreThread(). Is that correct? If yes, in which thread would the destructor be called? Would it read Python thread locals without holding the GIL? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:24:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 20:24:01 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383592051.36.0.722933204545.issue19466@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/11/4 Serhiy Storchaka : > Is it possible to write a test for this behavior? It is possible to test it manually using warn_shutdown.py attached to #19442. The warnings module may be used to test the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:28:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Nov 2013 20:28:21 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1383596901.14.0.130178946733.issue19466@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I am referring to the following part of your patch: + /* Clear the state of the current thread */ + PyThreadState_Clear(tstate); You are clearing the thread state of the currently executing thread, which doesn't sound right. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:40:21 2013 From: report at bugs.python.org (Arnaud Faure) Date: Mon, 04 Nov 2013 20:40:21 +0000 Subject: [issue19497] selectors and modify() Message-ID: <1383597621.34.0.405182296639.issue19497@psf.upfronthosting.co.za> Changes by Arnaud Faure : ---------- files: modify_data.patch keywords: patch nosy: Arnaud.Faure priority: normal severity: normal status: open title: selectors and modify() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32499/modify_data.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:47:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 04 Nov 2013 20:47:39 +0000 Subject: [issue19498] IDLE is behaving badly in Python 2.7.6rc1 Message-ID: <1383598059.38.0.633189194104.issue19498@psf.upfronthosting.co.za> New submission from Raymond Hettinger: IDLE is behaving badly in Python 2.7.6rc1 with a fresh install. The problem occurs with a sequence of creating a new window, pasting code, and running the code: Cmd-N, Cmd-V, Cmd-S, F5 The visible effect in IDLE is that a new window named "idle" is created and is unresponsive. Behind the scenes, the following tracebacks occur. ----------------------------------------- Python 2.7.6rc1 (v2.7.6rc1:4913d0e9be30+, Oct 27 2013, 20:52:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin ------------------------------------------ ~/tmp $ python2.7 -m idlelib.idle Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py", line 222, in open flist.open(filename) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/FileList.py", line 36, in open return self.EditorWindow(self, filename, key) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 131, in __init__ EditorWindow.__init__(self, *args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 323, in __init__ io.loadfile(filename) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py", line 258, in loadfile chars = self.decode(chars) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py", line 296, in decode enc = coding_spec(chars) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/IOBinding.py", line 129, in coding_spec for line in lst: NameError: global name 'lst' is not defined Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/idle.py", line 11, in idlelib.PyShell.main() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 1582, in main root.mainloop() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1068, in mainloop self.tk.mainloop(n) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/FileList.py", line 48, in close_all_callback reply = edit.close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1025, in close self._close() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/PyShell.py", line 302, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1032, in _close self.unload_extensions() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/EditorWindow.py", line 1053, in unload_extensions for ins in self.extensions.values(): AttributeError: 'PyShellEditorWindow' object has no attribute 'extensions' ---------- components: IDLE messages: 202167 nosy: benjamin.peterson, rhettinger priority: release blocker severity: normal stage: needs patch status: open title: IDLE is behaving badly in Python 2.7.6rc1 type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:54:19 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 20:54:19 +0000 Subject: [issue19498] IDLE is behaving badly in Python 2.7.6rc1 In-Reply-To: <1383598059.38.0.633189194104.issue19498@psf.upfronthosting.co.za> Message-ID: <1383598459.71.0.0402854739259.issue19498@psf.upfronthosting.co.za> Ned Deily added the comment: This is a duplicate of Issue19426. The fix for it will be in 2.7.6 final. ---------- nosy: +ned.deily resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Opening a file in IDLE causes a crash or hang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:56:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 04 Nov 2013 20:56:45 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1383598605.02.0.101410764978.issue19466@psf.upfronthosting.co.za> STINNER Victor added the comment: > You are clearing the thread state of the currently executing > thread, which doesn't sound right. Oh, I didn't realize that PyThreadState_Clear() clears also Python thread locals. Here is a new patch without PyThreadState_Clear(tstate) and with two unit tests: - ensure that Python thread locals are not destroyed before destructors are called - ensure that object destructors are called before Python thread states are destroyed ---------- Added file: http://bugs.python.org/file32500/finalize_threads-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 21:58:38 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 Nov 2013 20:58:38 +0000 Subject: [issue19497] selectors and modify() Message-ID: <1383598718.81.0.893326115321.issue19497@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: +gvanrossum, neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 22:00:02 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 04 Nov 2013 21:00:02 +0000 Subject: [issue19498] IDLE is behaving badly in Python 2.7.6rc1 In-Reply-To: <1383598059.38.0.633189194104.issue19498@psf.upfronthosting.co.za> Message-ID: <1383598802.52.0.130122153961.issue19498@psf.upfronthosting.co.za> Ned Deily added the comment: P.S. For users comfortable with the command line, there is an procedure documented here for applying the fix to 2.7.6rc1 (2.7.6 final is expected soon): http://bugs.python.org/issue19484#msg202062 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 22:07:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 04 Nov 2013 21:07:25 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dD65m2yR4z7LjT@mail.python.org> Roundup Robot added the comment: New changeset fe7aaf14b129 by Serhiy Storchaka in branch '2.7': Issue #19085: Fix running test_ttk_textonly on displayless host. http://hg.python.org/cpython/rev/fe7aaf14b129 New changeset 47d3714dcb33 by Serhiy Storchaka in branch '3.3': Issue #19085: Fix running test_ttk_textonly on displayless host. http://hg.python.org/cpython/rev/47d3714dcb33 New changeset 713cc4908a96 by Serhiy Storchaka in branch 'default': Issue #19085: Fix running test_ttk_textonly on displayless host. http://hg.python.org/cpython/rev/713cc4908a96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 22:09:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 Nov 2013 21:09:56 +0000 Subject: [issue19497] selectors and modify() Message-ID: <1383599396.27.0.656600469462.issue19497@psf.upfronthosting.co.za> New submission from Guido van Rossum: The patch doesn't actually apply, not just because the pathnames are different, but because the unittests in Lib/test/test_selectors.py have a different structure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 22:10:32 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 04 Nov 2013 21:10:32 +0000 Subject: [issue10652] test___all_ + test_tcl fails (Windows installed binary) In-Reply-To: <1291819198.8.0.493152862608.issue10652@psf.upfronthosting.co.za> Message-ID: <1383599432.3.0.661148893402.issue10652@psf.upfronthosting.co.za> Zachary Ware added the comment: Having another chance to look at this one, my previous message was incorrect; Terry's patch does not fix the issue for an installed Python 2.7. The only change it needs to work, though, is to replace 'Tkinter' with 'FixTk' in the import_fresh_module call. ---------- components: +Tkinter versions: -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32501/issue10652-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 22:11:23 2013 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 04 Nov 2013 21:11:23 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383599483.37.0.670632068969.issue18345@psf.upfronthosting.co.za> Vinay Sajip added the comment: > But can I pass the file owner in the config dict? You should be able to; I'll address that in the example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 22:13:09 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 04 Nov 2013 21:13:09 +0000 Subject: [issue10652] test___all_ + test_tcl fails (Windows installed binary) In-Reply-To: <1291819198.8.0.493152862608.issue10652@psf.upfronthosting.co.za> Message-ID: <1383599589.46.0.129809326066.issue10652@psf.upfronthosting.co.za> Zachary Ware added the comment: An alternative that works and also removes repeated "Warning -- os.environ was modified by test_*" is to import FixTk at the top of test_support, allowing the environment to be set up and to persist throughout all of the tests. I'm not sure if this is the right way to go about the problem, though. ---------- Added file: http://bugs.python.org/file32502/issue10652-2.7-alternate.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 23:35:31 2013 From: report at bugs.python.org (Arnaud Faure) Date: Mon, 04 Nov 2013 22:35:31 +0000 Subject: [issue19497] selectors and modify() In-Reply-To: <1383599396.27.0.656600469462.issue19497@psf.upfronthosting.co.za> Message-ID: <1383604531.08.0.501236094589.issue19497@psf.upfronthosting.co.za> Arnaud Faure added the comment: Didn't thaught about that :( .... Did my way throught the developper tutorial, got the default cpython repo, did the modif, run patchcheck then the tests with ./python -m test -j3. Thanks for your patience ;) ---------- Added file: http://bugs.python.org/file32503/modify_data.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 4 23:48:56 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 04 Nov 2013 22:48:56 +0000 Subject: [issue19497] selectors and modify() In-Reply-To: <1383599396.27.0.656600469462.issue19497@psf.upfronthosting.co.za> Message-ID: <1383605336.22.0.826942008044.issue19497@psf.upfronthosting.co.za> Guido van Rossum added the comment: Check out my review: http://bugs.python.org/review/19497/#ps9821 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 00:39:59 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Nov 2013 23:39:59 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1383608399.47.0.441378809477.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think I figured out a better way to structure this that avoids the need for the output flag and is more easily expanded to whitelist additional exception types as safe to wrap. I'll try to come up with a new patch tonight. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 00:45:27 2013 From: report at bugs.python.org (Julian Taylor) Date: Mon, 04 Nov 2013 23:45:27 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1383608727.96.0.100856609146.issue19308@psf.upfronthosting.co.za> Julian Taylor added the comment: I tested the latest patch (python27-gdb_py3.patch) with ubuntu 13.10 gdb compiled against python3.3, while it fixes the syntax errors it does not fix the functionality. E.g. one gets this error on breakpoints: Python Exception There is no member named length.: Breakpoint 3, PyTuple_Size (op=) at ../Objects/tupleobject.c:127 and the objects are not printed in their string representation as they should be with the plugin. ---------- nosy: +jtaylor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 01:05:14 2013 From: report at bugs.python.org (Arnaud Faure) Date: Tue, 05 Nov 2013 00:05:14 +0000 Subject: [issue19497] selectors and modify() In-Reply-To: <1383599396.27.0.656600469462.issue19497@psf.upfronthosting.co.za> Message-ID: <1383609914.35.0.81759815714.issue19497@psf.upfronthosting.co.za> Arnaud Faure added the comment: patch updated ---------- Added file: http://bugs.python.org/file32504/modify_data.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 01:08:44 2013 From: report at bugs.python.org (Martin Panter) Date: Tue, 05 Nov 2013 00:08:44 +0000 Subject: [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1383610124.34.0.299854271127.issue13637@psf.upfronthosting.co.za> Martin Panter added the comment: The a2b_qp() function also documents a byte string restriction for 3.2, and now 3.3 also seems to support ASCII-compatible text strings. Maybe the documentation should reflect this also? ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 01:11:41 2013 From: report at bugs.python.org (Julian Taylor) Date: Tue, 05 Nov 2013 00:11:41 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1383610301.34.0.657038894529.issue19308@psf.upfronthosting.co.za> Julian Taylor added the comment: on further investigation I seem to have screwed up patching the files. Patching properly they do work. Sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 02:55:02 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 Nov 2013 01:55:02 +0000 Subject: [issue19499] "import this" is cached in sys.modules Message-ID: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> New submission from Raymond Hettinger: The "this" module doesn't import functions; instead, it prints directly to stdout. Accordingly, there is no reason to cache this module in sys.modules. Ideally, a learner should be able to type "import this" more than once in a Python session. ---------- components: Library (Lib) messages: 202183 nosy: rhettinger priority: low severity: normal status: open title: "import this" is cached in sys.modules type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 02:59:25 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 05 Nov 2013 01:59:25 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383616765.97.0.856756906562.issue19499@psf.upfronthosting.co.za> Tim Peters added the comment: "Special cases aren't special enough to break the rules." ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 03:27:26 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 02:27:26 +0000 Subject: [issue19397] test_pydoc fails with -S In-Reply-To: <1382730203.09.0.761692334901.issue19397@psf.upfronthosting.co.za> Message-ID: <1383618446.02.0.0907205241367.issue19397@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> terry.reedy nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 03:43:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 02:43:40 +0000 Subject: [issue19397] test_pydoc fails with -S In-Reply-To: <1382730203.09.0.761692334901.issue19397@psf.upfronthosting.co.za> Message-ID: <3dDFYl3RBcz7LlK@mail.python.org> Roundup Robot added the comment: New changeset 2c191b0b5e7a by Terry Jan Reedy in branch '3.3': Issue #19397: test_pydoc now works with -S (help not added to builtins). http://hg.python.org/cpython/rev/2c191b0b5e7a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 03:45:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 02:45:50 +0000 Subject: [issue19397] test_pydoc fails with -S In-Reply-To: <1382730203.09.0.761692334901.issue19397@psf.upfronthosting.co.za> Message-ID: <3dDFcB0jFKz7LpM@mail.python.org> Roundup Robot added the comment: New changeset 92022b45e60b by Terry Jan Reedy in branch '2.7': Issue #19397: test_pydoc now works with -S (help not added to builtins). http://hg.python.org/cpython/rev/92022b45e60b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 03:48:43 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 02:48:43 +0000 Subject: [issue19397] test_pydoc fails with -S In-Reply-To: <1382730203.09.0.761692334901.issue19397@psf.upfronthosting.co.za> Message-ID: <1383619723.23.0.713558448653.issue19397@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 03:54:49 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 02:54:49 +0000 Subject: [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed. In-Reply-To: <1380820358.99.0.777618727237.issue19154@psf.upfronthosting.co.za> Message-ID: <1383620089.58.0.280592871581.issue19154@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:09:31 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 03:09:31 +0000 Subject: [issue10375] 2to3 print(single argument) In-Reply-To: <1289311942.35.0.609245522343.issue10375@psf.upfronthosting.co.za> Message-ID: <1383620971.35.0.373561030995.issue10375@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Benjamin, is the idea even feasible, or should this be closed? ---------- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:11:57 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 05 Nov 2013 03:11:57 +0000 Subject: [issue10375] 2to3 print(single argument) In-Reply-To: <1383620971.35.0.373561030995.issue10375@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: Probably, but I'm not going to do it. 2013/11/4 Terry J. Reedy : > > Terry J. Reedy added the comment: > > Benjamin, is the idea even feasible, or should this be closed? > > ---------- > versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:13:03 2013 From: report at bugs.python.org (Neil Hooey) Date: Tue, 05 Nov 2013 03:13:03 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1383621183.07.0.331323013413.issue2504@psf.upfronthosting.co.za> Neil Hooey added the comment: Can someone review the patch and consider its inclusion? ---------- nosy: +nhooey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:16:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 03:16:14 +0000 Subject: [issue10544] yield expression inside generator expression does nothing In-Reply-To: <1290799279.15.0.89740732651.issue10544@psf.upfronthosting.co.za> Message-ID: <1383621374.48.0.787405897294.issue10544@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -terry.reedy versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:21:34 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 03:21:34 +0000 Subject: [issue10375] 2to3 print(single argument) In-Reply-To: <1289311942.35.0.609245522343.issue10375@psf.upfronthosting.co.za> Message-ID: <1383621694.14.0.480464853274.issue10375@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I'll close this then, as it will never happen. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:26:12 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 03:26:12 +0000 Subject: [issue10685] trace does not ignore --ignore-module In-Reply-To: <1292157270.73.0.200325030661.issue10685@psf.upfronthosting.co.za> Message-ID: <1383621972.46.0.970171249407.issue10685@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:26:17 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 05 Nov 2013 03:26:17 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383621977.65.0.345829676656.issue19499@psf.upfronthosting.co.za> Eric Snow added the comment: You could add the following to the bottom of this.py: import sys del sys.modules['this'] ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:32:50 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 03:32:50 +0000 Subject: [issue1069092] segfault on printing deeply nested structures (2.7 only) Message-ID: <1383622370.61.0.158372572739.issue1069092@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Verified with fresh 2.7.6 build ---------- title: segfault on printing nested sequences of None/Ellipsis -> segfault on printing deeply nested structures (2.7 only) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 04:57:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Nov 2013 03:57:33 +0000 Subject: [issue11096] Multiple turtle tracers In-Reply-To: <1296622965.34.0.0682804917272.issue11096@psf.upfronthosting.co.za> Message-ID: <1383623853.05.0.823951429168.issue11096@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 05:02:11 2013 From: report at bugs.python.org (Ye Wang) Date: Tue, 05 Nov 2013 04:02:11 +0000 Subject: [issue19500] Error when connecting to FTPS servers not supporting SSL session resuming Message-ID: <1383624130.64.0.185541289049.issue19500@psf.upfronthosting.co.za> New submission from Ye Wang: According to RFC4217 (Securing FTP with TLS, aka the FTPS spec), http://tools.ietf.org/html/rfc4217.html#section-10.2 " It is reasonable for the server to insist that the data connection uses a TLS cached session. This might be a cache of a previous data connection or of a cleared control connection. If this is the reason for the refusal to allow the data transfer, then the '522' reply should indicate this. Note: This has an important impact on client design, but allows servers to minimize the cycles used during TLS negotiation by refusing to perform a full negotiation with a previously authenticated client." It appears that vsftpd server implemented exactly that by enforcing the "SSL session reuse between the control and data connection". http://scarybeastsecurity.blogspot.com/2009/02/vsftpd-210-released.html Looking at the source of Python core library ftplib.py, there isn't any regard to the idea of SSL session reuse between data connection vs. control connection (correct me if I am wrong here. I've tried FTP_TLS.transfercmd(cmd[, rest])?, didn't work). This issue is well documented on other FTP clients that supports FTPS, I.E. WinSCP: http://winscp.net/tracker/show_bug.cgi?id=668 See test log file attached. A vsftpd server with "require_ssl_reuse" set to true in vsftpd.conf would do the trick and can be reproduced. ---------- components: Library (Lib) files: ftplib-FTPS-bug.txt messages: 202193 nosy: Ye.Wang priority: normal severity: normal status: open title: Error when connecting to FTPS servers not supporting SSL session resuming type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file32505/ftplib-FTPS-bug.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 05:24:24 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 05 Nov 2013 04:24:24 +0000 Subject: [issue19501] Buildbot testing of 3.2 broken Message-ID: <1383625464.91.0.832501203458.issue19501@psf.upfronthosting.co.za> New submission from Zachary Ware: After the recent commits to 3.2, I noticed that the only non-red 3.2 buildbots are the Windows bots; all other 3.2 bots are failing on `make touch`, which doesn't exist in 3.2. The simplest fix seems to me to be to add a fake 'touch' target to the Makefile, but I'm not sure where that falls on the 'security fix only' policy. How long will we continue buildbot testing of 3.2? ---------- components: Build files: make_touch-3.2.diff keywords: buildbot, patch messages: 202194 nosy: georg.brandl, pitrou, zach.ware priority: normal severity: normal status: open title: Buildbot testing of 3.2 broken versions: Python 3.2 Added file: http://bugs.python.org/file32506/make_touch-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 06:56:59 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 Nov 2013 05:56:59 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383631019.49.0.00922786341146.issue19499@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, a question about "this" has come up on multiple occasions when I teach Python classes. ---------- assignee: -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 07:10:45 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 05 Nov 2013 06:10:45 +0000 Subject: [issue1069092] segfault on printing deeply nested structures (2.7 only) Message-ID: <1383631845.12.0.208633114744.issue1069092@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is wont fix in Python 2. ---------- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 07:25:05 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 05 Nov 2013 06:25:05 +0000 Subject: [issue19501] Buildbot testing of 3.2 broken In-Reply-To: <1383625464.91.0.832501203458.issue19501@psf.upfronthosting.co.za> Message-ID: <1383632705.51.0.685393560853.issue19501@psf.upfronthosting.co.za> Georg Brandl added the comment: I haven't looked at 3.2 buildbots since the last point release. There will be only security releases in the future, still it'd be nice to be able to test on different bots. Antoine, can you fix this on the buildmaster or need I apply the patch in the 3.2 branch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 08:01:22 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 05 Nov 2013 07:01:22 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383634882.16.0.706072392726.issue19499@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'd take their question as an educational opportunity. reload(this) ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 08:23:19 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 05 Nov 2013 07:23:19 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383636199.87.0.994469586496.issue19499@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 09:11:37 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 05 Nov 2013 08:11:37 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383639097.44.0.0520340770375.issue19499@psf.upfronthosting.co.za> Georg Brandl added the comment: Whatever we decide to do here, it **must** also be done for antigravity.py. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 10:01:32 2013 From: report at bugs.python.org (=?utf-8?q?Pawe=C5=82_Wroniszewski?=) Date: Tue, 05 Nov 2013 09:01:32 +0000 Subject: [issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time Message-ID: <1383642092.47.0.283452068876.issue19502@psf.upfronthosting.co.za> New submission from Pawe? Wroniszewski: I encountered the problem in logging module, but it is broader then that. Have a look at the following code: ==== import time DATE_FORMAT = '%d/%b/%Y %H:%M:%S%z %Z' print(time.strftime(DATE_FORMAT)) print(time.strftime(DATE_FORMAT,time.localtime())) ==== The first print statement prints the correct time zone offset (in the place of %z), while the second prints +0000. It is important, because the logging module passes a predifined time_struct to time.strftime to format it - the timezone offset is not usable in such case. The documentation for time.strftime(format[, t]) reads: "If t is not provided, the current time as returned by localtime() is used" but apparently there must be something extra going on under the hood. I checked that the problem is present in Python 2.7 and 3.2, probably in other version as well. Maybe it is platform dependent - I use Ubuntu 12.04 64 bit. If you want to change the time zone for testing, just run e.g.: === import os os.environ['TZ'] = 'Asia/Kolkata' import time time.tzset() === ---------- messages: 202200 nosy: pwronisz priority: normal severity: normal status: open title: Wrong time zone offset, when using time.strftime() with a given struct_time type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 11:03:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 10:03:34 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <3dDRKK5lRFz7LpQ@mail.python.org> Roundup Robot added the comment: New changeset 5636366db039 by Vinay Sajip in branch '3.3': Issue #18345: Added cookbook example illustrating handler customisation. http://hg.python.org/cpython/rev/5636366db039 New changeset 388cc713ad33 by Vinay Sajip in branch 'default': Closes #18345: Merged documentation update from 3.3. http://hg.python.org/cpython/rev/388cc713ad33 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 11:06:08 2013 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 05 Nov 2013 10:06:08 +0000 Subject: [issue18345] logging: file creation options with FileHandler and friends In-Reply-To: <1372754466.44.0.0217730014706.issue18345@psf.upfronthosting.co.za> Message-ID: <1383645968.35.0.144412796085.issue18345@psf.upfronthosting.co.za> Vinay Sajip added the comment: When the online docs update, the cookbook entry should appear at http://docs.python.org/dev/howto/logging-cookbook.html#customising-handlers-with-dictconfig ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 11:08:47 2013 From: report at bugs.python.org (Christoph Baumgartner) Date: Tue, 05 Nov 2013 10:08:47 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1383646127.85.0.247191833506.issue2889@psf.upfronthosting.co.za> Changes by Christoph Baumgartner : ---------- nosy: +christoph.baumgartner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 11:33:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Nov 2013 10:33:12 +0000 Subject: [issue19501] Buildbot testing of 3.2 broken In-Reply-To: <1383625464.91.0.832501203458.issue19501@psf.upfronthosting.co.za> Message-ID: <1383647592.5.0.714676287995.issue19501@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 11:35:42 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Nov 2013 10:35:42 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383647742.71.0.909620986837.issue19475@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 11:51:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 10:51:52 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3dDSP405JTz7Lqn@mail.python.org> Roundup Robot added the comment: New changeset fc8f19b4b662 by Ned Deily in branch '2.7': Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6. http://hg.python.org/cpython/rev/fc8f19b4b662 New changeset 268dc81c2527 by Ned Deily in branch '3.3': Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.3.3. http://hg.python.org/cpython/rev/268dc81c2527 New changeset f89beccd470c by Ned Deily in branch 'default': Issue #15663: merge build-installer.py changes http://hg.python.org/cpython/rev/f89beccd470c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 11:56:48 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 05 Nov 2013 10:56:48 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1383649008.54.0.859473629981.issue15663@psf.upfronthosting.co.za> Ned Deily added the comment: Due to incompatibilities with some key third-party projects as documented in Issue 19490 and the urgency of getting new maintenance releases out, the best course of action is to revert built-in Tcl/Tk support for 3.3.3 and 2.7.6. With the knowledge gained, I will try to implement a compatible solution for 3.4.0b1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 11:58:48 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 05 Nov 2013 10:58:48 +0000 Subject: [issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 In-Reply-To: <1383554508.21.0.868746765749.issue19490@psf.upfronthosting.co.za> Message-ID: <1383649128.0.0.84522905249.issue19490@psf.upfronthosting.co.za> Ned Deily added the comment: After further investigation and deliberation, I believe that we need to revert the built-in Tcl/Tk from the OS X installers for 2.7.6 and 3.3.3. The contributing factors: 1. As implemented, we now know that the built-in Tcl/Tk breaks source installs and/or binary package installers for PIL/Pillow, matplotlib, and, by extension, pandas. These are all widely-used projects and are important customers of the OS X 10.6+ installers. 2. With the recent release of OS X 10.9 Mavericks, there is now a critical problem (Issue18458) preventing interactive use of the current maintenance release installers (3.3.2 / 2.7.5) on 10.9. New releases are needed as soon as possible to provide fixes for this, a few less critical 10.9 issues, and general bug and security fixes for all platforms. So it is not appropriate to delay 3.3.3 or 2.7.6 to attempt to fix the incompatibility issue. (Fixing the built-in Tcl/Tk for 3.4.0b1 or for future maintenance releases are separate open items to be tracked on Issue15663.) 3. Updated Tcl/Tk 8.5 installers for OS X are now available from ActiveState (8.5.15.1) which include the Tk patch for the 10.9 "screen refresh" problem originally seen with IDLE and patched in the built-in Tks of the 2.7.6rc1_rev1 and 3.3.3rc1_rev1 installers. One positive outcome of this is that we are more aware of the interdependencies of some of the projects using the python.org installers. As a result, I am adding to the python.org OS X installer testing and release processes additional "quicklook" regression testing using some of these projects so we have a better chance of catching issues like this one earlier. Another positive is that it shows that there are members of the community who are taking the time to try pre-releases and that such testing *is* really important. Thank you to all of you who have been doing so and reporting issues. And a particular thank you to Piet for calling attention to this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 12:14:05 2013 From: report at bugs.python.org (martenjan) Date: Tue, 05 Nov 2013 11:14:05 +0000 Subject: [issue19503] does gc_list_merge merge properly? Message-ID: <1383650045.9.0.887861923874.issue19503@psf.upfronthosting.co.za> New submission from martenjan: The code for gc_list_merge is given in gcmodule.c. I retrieved it from http://hg.python.org/cpython/file/tip/Modules/gcmodule.c#l287 The code seems to merge list `from` incompletely: the first entry of `from` is omitted in the merged list. The issue is in line 295: tail->gc.gc_next = from->gc.gc_next; I fixed it as : tail->gc.gc_next = from; Please check if my analysis is correct. See below for the context. Original: lines 287 to 301 /* append list `from` onto list `to`; `from` becomes an empty list */ static void gc_list_merge(PyGC_Head *from, PyGC_Head *to) { PyGC_Head *tail; assert(from != to); if (!gc_list_is_empty(from)) { tail = to->gc.gc_prev; tail->gc.gc_next = from->gc.gc_next; tail->gc.gc_next->gc.gc_prev = tail; to->gc.gc_prev = from->gc.gc_prev; to->gc.gc_prev->gc.gc_next = to; } gc_list_init(from); } Fix: /* append list `from` onto list `to`; `from` becomes an empty list */ static void gc_list_merge(PyGC_Head *from, PyGC_Head *to) { PyGC_Head *tail; assert(from != to); if (!gc_list_is_empty(from)) { tail = to->gc.gc_prev; tail->gc.gc_next = from; tail->gc.gc_next->gc.gc_prev = tail; to->gc.gc_prev = from->gc.gc_prev; to->gc.gc_prev->gc.gc_next = to; } gc_list_init(from); } ---------- components: Interpreter Core messages: 202206 nosy: martenjan priority: normal severity: normal status: open title: does gc_list_merge merge properly? type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 12:47:29 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 05 Nov 2013 11:47:29 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1383652049.67.0.583800212219.issue15663@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't think you can provide a solution that's compatible with existing 3th-party extensions that use Tk and includes a private copy of Tcl/Tk. IMHO the best solution would be to provide the Tcl/Tk headers in the Python framework as well, to make it possible to link 3th party extension with the Tk that's provided with the Python installer. That should be an acceptable solution for 3.4 because that's a new feature release. A possible pain-point are 3th-party extensions that use the limited ABI, link with Tk and are used with Tkinter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 12:53:49 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Tue, 05 Nov 2013 11:53:49 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1383652429.39.0.388207546247.issue19347@psf.upfronthosting.co.za> Changes by Bohuslav "Slavek" Kabrda : ---------- nosy: +bkabrda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 13:58:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 12:58:40 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <3dDWCM6mKmz7Lp3@mail.python.org> Roundup Robot added the comment: New changeset 0aa2aedc6a21 by Tim Golden in branch 'default': Issue #10197 Tweak docs for subprocess.getstatusoutput and align the documentation, the module docstring, and the function docstring. http://hg.python.org/cpython/rev/0aa2aedc6a21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 14:26:55 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 05 Nov 2013 13:26:55 +0000 Subject: [issue19503] does gc_list_merge merge properly? In-Reply-To: <1383650045.9.0.887861923874.issue19503@psf.upfronthosting.co.za> Message-ID: <1383658015.1.0.083491773977.issue19503@psf.upfronthosting.co.za> Mark Dickinson added the comment: The current code is correct. Note that `from` is the list header, and is not attached to a gc-tracked object. We want to splice the last non-header element of `to` (`to->gc.gc_prev`) to the first non-header element of `from` (`from->gc.gc_next`). Did you try running the test suite with your change? It would be quite a feat for a bug this fundamental to have made it this far in 2.7 without anyone noticing. :-) Closing as invalid. ---------- nosy: +mark.dickinson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 14:46:41 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 05 Nov 2013 13:46:41 +0000 Subject: [issue19504] Change "customise" to "customize". Message-ID: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> New submission from Eric V. Smith: The python source code usually uses "customiz*" (341 instances) over "customis*" (19 instance, 8 of which are in logging). I realize "foolish consistency", and all that, but I think the documentation should all use the same conventions. I'd be happy to change the documentation. Most of these changes are in documentation or docstrings, but some are in comments. Which is why I'm assigning to docs at . I didn't change 2.0.rst, because that seemed like a historical document. ---------- assignee: docs at python components: Documentation files: customise.diff keywords: easy, patch messages: 202210 nosy: docs at python, eric.smith priority: low severity: normal stage: patch review status: open title: Change "customise" to "customize". versions: Python 3.4 Added file: http://bugs.python.org/file32507/customise.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 14:48:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 05 Nov 2013 13:48:40 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1383659320.87.0.979046638305.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: New and improved implementation attached that extracts the exception chaining to a helper functions and calls it only when it is the call in to the codecs machinery that failed (eliminating the need for the output flag, and covering decoding as well as encoding). TypeError, AttributeError and ValueError are all wrapped with chained exceptions that mention the codec that failed. (Annoyingly, bz2_codec throws OSError instead of ValueError for bad input data, but wrapping OSError safely is a pain due to the extra state potentially carried on instances. So letting it escape unwrapped is the simpler and more conservative option at this point) >>> import codecs >>> codecs.encode(b"hello", "bz2_codec").decode("bz2_codec") Traceback (most recent call last): File "", line 1, in TypeError: 'bz2_codec' decoder returned 'bytes' instead of 'str'; use codecs.decode to decode to arbitrary types >>> b"hello".decode("rot_13") AttributeError: 'memoryview' object has no attribute 'translate' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in AttributeError: decoding with 'rot_13' codec failed (AttributeError: 'memoryview' object has no attribute 'translate') >>> "hello".encode("bz2_codec") TypeError: 'str' does not support the buffer interface The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in TypeError: encoding with 'bz2_codec' codec failed (TypeError: 'str' does not support the buffer interface) >>> "hello".encode("rot_13") Traceback (most recent call last): File "", line 1, in TypeError: 'rot_13' encoder returned 'str' instead of 'bytes'; use codecs.encode to encode to arbitrary types ---------- Added file: http://bugs.python.org/file32508/issue17828_improved_codec_errors_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 15:16:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 05 Nov 2013 14:16:55 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1383661015.85.0.761977763134.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: Checking the other binary<->binary and str<->str codecs with input type and value restrictions: - they all throw TypeError and get wrapped appropriately when asked to encode str input (rot_13 throws the output type error) - rot_13 throws an appropriately wrapped AttributeError when asked to decode bytes or bytearray object For bad value input, "uu_codec" is the only one that throws a normal ValueError, I couldn't figure out a way to get "quopri_codec" to complain about the input value and the others throw a module specific error: binascii (base64_codec, hex_codec) throws binascii.Error (a custom ValueError subclass) zlib (zlib_codec) throws zlib.error (inherits directly from Exception) As with the OSError that escapes from bz2_codec, I think the simplest and most conservative option is to not worry about those at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 15:42:21 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Nov 2013 14:42:21 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383662541.54.0.658647983876.issue19499@psf.upfronthosting.co.za> R. David Murray added the comment: It seems to me that having import this work more than once would teach a beginner the *wrong* lesson about how python import works. So I agree that it should be a teaching moment, not a bug to be fixed. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 15:46:47 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Nov 2013 14:46:47 +0000 Subject: [issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time In-Reply-To: <1383642092.47.0.283452068876.issue19502@psf.upfronthosting.co.za> Message-ID: <1383662807.34.0.467232578952.issue19502@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +belopolsky, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 16:07:22 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 05 Nov 2013 15:07:22 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1383664042.02.0.234750179081.issue15216@psf.upfronthosting.co.za> Nick Coghlan added the comment: It would be good to have this addressed in Python 3.4 (I'm following up on a few other encoding related issues at the moment). Is that a reasonable possibility before beta 1, or do we need to bump this one to 3.5? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 16:08:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 05 Nov 2013 15:08:34 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1383664114.09.0.894183661691.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: Updated patch adds systematic tests for the new error handling to test_codecs.TransformTests I also moved the codecs changes up to a "Codec handling improvements" section. My rationale for doing that is that this is actually a pretty significant usability enhancement and Python 3 codec model clarification for heavy users of binary codecs coming from Python 2, and because I also plan to follow up on this issue by bringing back the shorthand aliases for these codecs that were removed in issue 10807 (thus closing issue 7475). If issue 15216 gets finished (changing stream encodings after creation) that would also be a substantial enhancement worth mentioning here. ---------- Added file: http://bugs.python.org/file32509/issue17828_improved_codec_errors_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 16:09:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 15:09:59 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3dDZ6t3VPZz7Lnv@mail.python.org> Roundup Robot added the comment: New changeset ba31940588b6 by Ned Deily in branch '2.7': Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6. http://hg.python.org/cpython/rev/ba31940588b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 16:25:54 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Nov 2013 15:25:54 +0000 Subject: [issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time In-Reply-To: <1383642092.47.0.283452068876.issue19502@psf.upfronthosting.co.za> Message-ID: <1383665154.14.0.888045144275.issue19502@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I cannot reproduce this and I suspect that the problem shows up only in certain times. I believe this is related to the long-standing issue that was fixed in 3.3. See issue 1667546. In Python prior to 3.3, time_struct did not store timezone information: Python 2.7.5 (default, Aug 13 2013, 01:04:43) >>> import time >>> time.localtime().tm_zone Traceback (most recent call last): File "", line 1, in AttributeError: 'time.struct_time' object has no attribute 'tm_zone' Python 3.3.2 (default, Aug 13 2013, 00:57:00) >>> import time >>> time.localtime().tm_zone 'EST' Since this cannot be fixed without backporting new features, I don't think we can fix this in 2.7 or 3.2. Those affected by this problem should upgrade to 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 16:29:22 2013 From: report at bugs.python.org (martenjan) Date: Tue, 05 Nov 2013 15:29:22 +0000 Subject: [issue19503] does gc_list_merge merge properly? In-Reply-To: <1383650045.9.0.887861923874.issue19503@psf.upfronthosting.co.za> Message-ID: <1383665362.59.0.603744219086.issue19503@psf.upfronthosting.co.za> martenjan added the comment: Thanks for your explanation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 16:30:49 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Nov 2013 15:30:49 +0000 Subject: [issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time In-Reply-To: <1383642092.47.0.283452068876.issue19502@psf.upfronthosting.co.za> Message-ID: <1383665449.74.0.495652973508.issue19502@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > The documentation for time.strftime(format[, t]) reads: > "If t is not provided, the current time as returned by localtime() is used" > but apparently there must be something extra going on under the hood. Yes, the C implementation uses tm_zone and tm_gmtoff fields on the platforms that support them. I won't be unreasonable to document this fact in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 16:38:32 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Nov 2013 15:38:32 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383665912.11.0.403763920634.issue19475@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 16:48:38 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Nov 2013 15:48:38 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383666518.52.0.0521934023032.issue19475@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: +1 on adding an option to isoformat(). We already have an optional argument, so the symmetry with __str__ is not complete. To make this option more useful, rather than implementing always_emit_microseconds=False flag, I would add a keyword argument 'precision' that would take ('hour'|'minute'|'second'|millisecond'|'microsecond') value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 17:17:58 2013 From: report at bugs.python.org (ThiefMaster) Date: Tue, 05 Nov 2013 16:17:58 +0000 Subject: [issue19505] OrderedDict views don't implement __reversed__ Message-ID: <1383668278.19.0.898064141243.issue19505@psf.upfronthosting.co.za> New submission from ThiefMaster: The view objects for `collections.OrderedDict` do not implement `__reversed__` so something like this fails: >>> from collections import OrderedDict >>> od = OrderedDict() >>> reversed(od.viewvalues()) Traceback (most recent call last): File "", line 1, in TypeError: argument to reversed() must be a sequence ---------- components: Library (Lib) messages: 202221 nosy: ThiefMaster priority: normal severity: normal status: open title: OrderedDict views don't implement __reversed__ versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 17:28:04 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 05 Nov 2013 16:28:04 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383668884.0.0.704941646877.issue19499@psf.upfronthosting.co.za> Mark Lawrence added the comment: If it ain't broke don't fix it. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 17:48:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Nov 2013 16:48:24 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1383670104.36.0.972041983721.issue15216@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is that a reasonable possibility before beta 1, or do we need to bump this one to 3.5? My patch was not reviewed yet and must be reimplemented in C. I will not have time before the beta1 to finish the work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 17:55:48 2013 From: report at bugs.python.org (Cameron Allan) Date: Tue, 05 Nov 2013 16:55:48 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <1383670548.62.0.175715316802.issue19504@psf.upfronthosting.co.za> Cameron Allan added the comment: Done using Notepad++ and regex as needed. Also changed file name appropriately. ---------- nosy: +c3n9 Added file: http://bugs.python.org/file32510/customize.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 18:07:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 17:07:59 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3dDcl20DcMz7LpQ@mail.python.org> Roundup Robot added the comment: New changeset b93614f7ed83 by Victor Stinner in branch 'default': Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, handle http://hg.python.org/cpython/rev/b93614f7ed83 New changeset 00ee08fac522 by Victor Stinner in branch 'default': Issue #19437: Fix pysqlite_connection_call() of sqlite3, return NULL when http://hg.python.org/cpython/rev/00ee08fac522 New changeset 374635037b0a by Victor Stinner in branch 'default': Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, when the row factory http://hg.python.org/cpython/rev/374635037b0a New changeset 35fdb15b4939 by Victor Stinner in branch 'default': Issue #19437: Fix _threading.RLock constructor (rlock_new), call http://hg.python.org/cpython/rev/35fdb15b4939 New changeset ea373a14f9e9 by Victor Stinner in branch 'default': Issue #19437: Fix compiler_class(), handle compiler_lookup_arg() failure http://hg.python.org/cpython/rev/ea373a14f9e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 18:08:25 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Tue, 05 Nov 2013 17:08:25 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1383671305.94.0.758983591125.issue15745@psf.upfronthosting.co.za> Changes by Claudiu.Popa : ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 18:09:43 2013 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 05 Nov 2013 17:09:43 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <1383671383.55.0.00662939347319.issue19504@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Not a foolish consistency; Guido ruled long ago that American spellings should be used. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 18:42:53 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 05 Nov 2013 17:42:53 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383673373.76.0.138963255017.issue19499@psf.upfronthosting.co.za> Eric Snow added the comment: +0 to just doing a reload. At the point you show someone "import this", it may be premature to be explaining reloading to them. Python is great because you usually don't have to hand-wave through some concepts in order to explain others. [1] Also, under Python 3 you have to import reload() separately: from imp import reload reload(this) [1] http://www.boredomandlaziness.org/2011/08/scripting-languages-and-suitable.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 18:58:59 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 05 Nov 2013 17:58:59 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383674339.3.0.02234336499.issue19085@psf.upfronthosting.co.za> Zachary Ware added the comment: Looks like the last commit broke 8.5.15 on Windows; in particular, on line 25 of widget_tests.py, int_round doesn't exist. Replacing 'int_round' with 'round' allows most tests to pass, but I still get these two failures: ====================================================================== FAIL: test_insertwidth (tkinter.test.test_tkinter.test_widgets.EntryTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\test_tkinter\test_widget s.py", line 336, in test_insertwidth self.checkParam(widget, 'insertwidth', 0.9, expected=2) File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py", line 6 6, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py", line 5 0, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 1 != 2 ====================================================================== FAIL: test_insertwidth (tkinter.test.test_tkinter.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\test_tkinter\test_widget s.py", line 336, in test_insertwidth self.checkParam(widget, 'insertwidth', 0.9, expected=2) File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py", line 6 6, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py", line 5 0, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 1 != 2 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 19:04:27 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 05 Nov 2013 18:04:27 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383674667.31.0.680372074296.issue19499@psf.upfronthosting.co.za> Georg Brandl added the comment: IMO the fact that importing happens only once is also a very important one, so much the better this helps in learning it early. The bad thing is that opening this.py to see what's happening will not really enlighten the beginner :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 19:18:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 18:18:57 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dDfJv6hkYz7Ljk@mail.python.org> Roundup Robot added the comment: New changeset d5d0356ba5ac by Serhiy Storchaka in branch '3.3': Fix typo in tkinter tests (issue #19085). http://hg.python.org/cpython/rev/d5d0356ba5ac New changeset fc4ef17c7db8 by Serhiy Storchaka in branch 'default': Fix typo in tkinter tests (issue #19085). http://hg.python.org/cpython/rev/fc4ef17c7db8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 19:20:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 Nov 2013 18:20:28 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383675628.45.0.851153587169.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Zachary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 20:12:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 19:12:40 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dDgVv4zlpz7Lp9@mail.python.org> Roundup Robot added the comment: New changeset eb126f976fa2 by Serhiy Storchaka in branch '2.7': Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel >= 8.5.12 (issue #19085). http://hg.python.org/cpython/rev/eb126f976fa2 New changeset 21fbe3ec90dc by Serhiy Storchaka in branch '3.3': Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel >= 8.5.12 (issue #19085). http://hg.python.org/cpython/rev/21fbe3ec90dc New changeset ce08158e3f6c by Serhiy Storchaka in branch 'default': Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel >= 8.5.12 (issue #19085). http://hg.python.org/cpython/rev/ce08158e3f6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 20:32:56 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 05 Nov 2013 19:32:56 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383679976.49.0.810682757969.issue19085@psf.upfronthosting.co.za> Zachary Ware added the comment: Working from ce08158e3f6c with 8.5.15 on Windows, I get the same failures with a different AssertionError: ====================================================================== FAIL: test_insertwidth (tkinter.test.test_tkinter.test_widgets.EntryTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\test_tkinter\test_widget s.py", line 340, in test_insertwidth self.checkParam(widget, 'insertwidth', 0.9) File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py", line 6 6, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py", line 5 0, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 1 != 0.9 ====================================================================== FAIL: test_insertwidth (tkinter.test.test_tkinter.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\test_tkinter\test_widget s.py", line 340, in test_insertwidth self.checkParam(widget, 'insertwidth', 0.9) File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py", line 6 6, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py", line 5 0, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 1 != 0.9 By the way, thank you for all the work you're doing on this, Serhiy! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 20:40:37 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 05 Nov 2013 19:40:37 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <1383680437.85.0.867322454474.issue18923@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Here's an updated patch with a better logic: in the previous version - based on current poll-based implementation, the FD was inferred from the event (i.e. read ready -> stdout/stderr, write ready -> stderr). The new version directly checks the ready file object instead. I also added an extra safety in case an unknown FD is returned (which should never happen). ---------- nosy: +pitrou Added file: http://bugs.python.org/file32511/subprocess_selectors-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 20:44:50 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 05 Nov 2013 19:44:50 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383680690.13.0.11352428331.issue19085@psf.upfronthosting.co.za> Zachary Ware added the comment: FTR, both 8.5.11 and 8.6.1 pass all tests on Windows from ce08158e3f6c (with unrelated modifications required to build and use 8.6.1). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 21:04:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 05 Nov 2013 20:04:33 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dDhfm09wmz7Lp9@mail.python.org> Roundup Robot added the comment: New changeset c97600bdd726 by Serhiy Storchaka in branch '2.7': Revert wrong change in previous commit (issue #19085). http://hg.python.org/cpython/rev/c97600bdd726 New changeset bec6df56c053 by Serhiy Storchaka in branch '3.3': Revert wrong change in previous commit (issue #19085). http://hg.python.org/cpython/rev/bec6df56c053 New changeset 545feebd58fb by Serhiy Storchaka in branch 'default': Revert wrong change in previous commit (issue #19085). http://hg.python.org/cpython/rev/545feebd58fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 21:04:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 Nov 2013 20:04:55 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1383681895.11.0.614887553961.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My fault. I missed that here is simple checkParam() instead of checkPixelsParam(). Thank you Zachary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 21:14:15 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Tue, 05 Nov 2013 20:14:15 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383682455.12.0.87988130142.issue19475@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I would like to implement this feature. I already wrote the Python part. Is there anything else to decide? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 21:31:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Nov 2013 20:31:16 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383666518.52.0.0521934023032.issue19475@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/11/5 Alexander Belopolsky : > +1 on adding an option to isoformat(). We already have an optional argument, so the symmetry with __str__ is not complete. To make this option more useful, rather than implementing always_emit_microseconds=False flag, I would add a keyword argument 'precision' that would take ('hour'|'minute'|'second'|millisecond'|'microsecond') value. Hour precision is not part of the ISO 8601 standard. "resolution" is maybe a better name for the new parameter than "precision": http://www.python.org/dev/peps/pep-0418/#glossary The new parameter should be added to datetime.datetime.isoformat() but also datetime.time.isoformat(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 21:34:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Nov 2013 20:34:46 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview Message-ID: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> New submission from STINNER Victor: The following code copies data, whereas the copy can be avoided using a memory view: chunk = self._input[self._input_offset:self._input_offset + _PIPE_BUF] self._input_offset += os.write(key.fd, chunk) It should be replaced with: input_view = memoryview(self._input) ... chunk = input_view[self._input_offset:self._input_offset + _PIPE_BUF] self._input_offset += os.write(key.fd, chunk) This issue is a reminder for one of my comment of issue #18923. ---------- messages: 202240 nosy: haypo, neologix priority: normal severity: normal status: open title: subprocess.communicate() should use a memoryview versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 21:35:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Nov 2013 20:35:40 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1383683740.43.0.372419901025.issue19506@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 21:36:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Nov 2013 20:36:33 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1383680437.85.0.867322454474.issue18923@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: subprocess_selectors-3.diff looks good to me (this patch does not remove any test :-)) I created the issue #19506 for the memoryview optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 21:45:55 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 05 Nov 2013 20:45:55 +0000 Subject: [issue19505] OrderedDict views don't implement __reversed__ In-Reply-To: <1383668278.19.0.898064141243.issue19505@psf.upfronthosting.co.za> Message-ID: <1383684355.43.0.487642051723.issue19505@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 22:07:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 05 Nov 2013 21:07:27 +0000 Subject: [issue19505] OrderedDict views don't implement __reversed__ In-Reply-To: <1383668278.19.0.898064141243.issue19505@psf.upfronthosting.co.za> Message-ID: <1383685647.89.0.763425688292.issue19505@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka, stutzbach versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 22:10:40 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 05 Nov 2013 21:10:40 +0000 Subject: [issue15411] os.chmod() does not follow symlinks on Windows In-Reply-To: <1342859484.11.0.980886642738.issue15411@psf.upfronthosting.co.za> Message-ID: <1383685840.05.0.742105256388.issue15411@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 22:13:29 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 05 Nov 2013 21:13:29 +0000 Subject: [issue9949] os.path.realpath on Windows does not follow symbolic links In-Reply-To: <1285426994.28.0.192028764756.issue9949@psf.upfronthosting.co.za> Message-ID: <1383686009.48.0.259139991852.issue9949@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware stage: needs patch -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 22:24:47 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Nov 2013 21:24:47 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383686687.39.0.777489179079.issue19475@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: +1 on all Victor's points. I like 'resolution' because this is the term that datetime module uses already: >>> from datetime import * >>> datetime.resolution datetime.timedelta(0, 0, 1) There is a slight chance of confusion stemming from the fact that datetime.resolution is timedelta, but proposed parameter is a string. I believe ISO 8601 uses the word "accuracy" to describe this kind of format variations. I am leaning towards "resolution", but would like to hear from others. Here are the candidates: 1. resolution 2. accuracy 3. precision (Note that "accuracy" is the shortest but "resolution" is the most correct.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 22:32:18 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 05 Nov 2013 21:32:18 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: Message-ID: <527963DD.6010007@egenix.com> Marc-Andre Lemburg added the comment: On 05.11.2013 21:31, STINNER Victor wrote: > > 2013/11/5 Alexander Belopolsky : >> +1 on adding an option to isoformat(). We already have an optional argument, so the symmetry with __str__ is not complete. To make this option more useful, rather than implementing always_emit_microseconds=False flag, I would add a keyword argument 'precision' that would take ('hour'|'minute'|'second'|millisecond'|'microsecond') value. > > Hour precision is not part of the ISO 8601 standard. > > "resolution" is maybe a better name for the new parameter than "precision": > http://www.python.org/dev/peps/pep-0418/#glossary > > The new parameter should be added to datetime.datetime.isoformat() but > also datetime.time.isoformat(). Since this ticket is about being able to remove the seconds fraction part, I think it's better to use a name that is not already overloaded with other meanings, e.g. show_us=False or show_microseconds=False. BTW: Have you thought about the rounding/truncation issues associated with not showing microseconds ? A safe bet is truncation, but this can lead to inaccuracies of up to a second. Rounding is difficult, since it can lead to a "60" second value showing up for e.g. 11:00:59.95 seconds, or the need to return "12:00:00" for 11:59:59.95. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 23:47:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 Nov 2013 22:47:30 +0000 Subject: [issue19507] ssl.wrap_socket() with server_hostname should imply match_hostname() Message-ID: <1383691650.31.0.697174756225.issue19507@psf.upfronthosting.co.za> New submission from Christian Heimes: I find it surprising that wrap_socket() doesn't verify the server name with match_hostname() when it is called with a server_name argument. The check should be done by default. I suggest: - add validate_hostname=True flag to wrap_socket() and functions that call wrap_socket() - add SSLSocket.match_hostname(hostname=None) to validate hostname with current cert. hostname shall default to server_hostname ---------- messages: 202244 nosy: christian.heimes, giampaolo.rodola, janssen, pitrou priority: normal severity: normal stage: test needed status: open title: ssl.wrap_socket() with server_hostname should imply match_hostname() type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 23:52:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 Nov 2013 22:52:08 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default Message-ID: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> New submission from Christian Heimes: Developers are still surprised that Python's ssl library doesn't validate SSL certs by default. We should add a *big* warning to the SSL module as well as to all consumers (http, ftp, imap, pop, smtp, nntp ...) that neither the CA cert chain nor the hostname are validated by default. (AFAIK only http.client does match_hostname()). ---------- assignee: docs at python components: Documentation messages: 202245 nosy: christian.heimes, docs at python, giampaolo.rodola, janssen, pitrou priority: high severity: normal stage: needs patch status: open title: Add warning that Python doesn't verify SSL certs by default type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 5 23:57:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 05 Nov 2013 22:57:12 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules Message-ID: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> New submission from Christian Heimes: None of the TLS/SSL classes for ftp, imap, nntp, pop and smtp have support for match_hostname() in order to verify that the SSL cert matches the host name. I'm not sure how we can handle the problem without creating backwards incompatibilities. ---------- messages: 202246 nosy: christian.heimes, giampaolo.rodola, janssen, pitrou priority: high severity: normal stage: needs patch status: open title: No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules type: security versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 00:41:08 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 05 Nov 2013 23:41:08 +0000 Subject: [issue19505] OrderedDict views don't implement __reversed__ In-Reply-To: <1383668278.19.0.898064141243.issue19505@psf.upfronthosting.co.za> Message-ID: <1383694868.37.0.785878748738.issue19505@psf.upfronthosting.co.za> Eric Snow added the comment: The view objects aren't sequences. od.items() and od.keys() implement Set. od.values() doesn't even do that much, only implementing __len__(), __iter__(), and __contains__(). The glossary implies that you should use "reversed(list(view))". [1] More information on mapping views is located in the docs for collections.ABC and for dict. [2][3] The source for the Mapping views is also helpful. [4] Keep in mind that OrderedDict is not a sequence-like dict. It is essentially just a dict with a well-defined iteration order (by insertion order). [5] Just like its views, it should not used as a sequence. [1] http://docs.python.org/3/glossary.html#term-view [2] http://docs.python.org/3/library/stdtypes.html#dict-views [3] http://docs.python.org/3/library/collections.abc.html#collections.abc.MappingView [4] http://hg.python.org/cpython/file/3.3/Lib/collections/abc.py#l435 [5] http://docs.python.org/3.3/library/collections.html#collections.OrderedDict ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 01:27:39 2013 From: report at bugs.python.org (Augie Fackler) Date: Wed, 06 Nov 2013 00:27:39 +0000 Subject: [issue19510] lib2to3.fixes.fix_import gets confused if implicit relative imports and absolute imports are on the same line Message-ID: <1383697659.1.0.717023788788.issue19510@psf.upfronthosting.co.za> New submission from Augie Fackler: While tinkering (again) with Mercurial Python 3 messes, I ran across this gem: import error, osutil, encoding, collections (http://selenic.com/hg/file/e1317d3e59e1/mercurial/util.py#l17) That import statement contains 3 relative imports (that is, mercurial.error, mercurial.osutil, and mercurial.encoding), and one standard library import (collections). Because of the standard lib import on that line, lib2to3 doesn't rewrite any of the imports. If I instead move collections to its own line, then the first three imports get correctly rewritten to the "from . import error" form. I've got Python 3.3.2 locally, and the lib2to3 is the one from that stdlib. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 202248 nosy: durin42, twouters priority: normal severity: normal status: open title: lib2to3.fixes.fix_import gets confused if implicit relative imports and absolute imports are on the same line versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 01:40:58 2013 From: report at bugs.python.org (Arnaud Faure) Date: Wed, 06 Nov 2013 00:40:58 +0000 Subject: [issue19497] selectors and modify() In-Reply-To: <1383599396.27.0.656600469462.issue19497@psf.upfronthosting.co.za> Message-ID: <1383698458.79.0.427170305546.issue19497@psf.upfronthosting.co.za> Arnaud Faure added the comment: Corrected and cleaned ---------- Added file: http://bugs.python.org/file32512/modify_data_use_a_shortcut.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 01:44:59 2013 From: report at bugs.python.org (Chris Cooper) Date: Wed, 06 Nov 2013 00:44:59 +0000 Subject: [issue18840] Tutorial recommends pickle module without any warning of insecurity In-Reply-To: <1377520678.97.0.369666733509.issue18840@psf.upfronthosting.co.za> Message-ID: <1383698699.58.0.488507550786.issue18840@psf.upfronthosting.co.za> Chris Cooper added the comment: Here's a patch that focuses on the json module, with a smaller pickle section including the warning from the pickle docs. ---------- nosy: +ChrisCooper Added file: http://bugs.python.org/file32513/issue18840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 03:02:11 2013 From: report at bugs.python.org (Piet van Oostrum) Date: Wed, 06 Nov 2013 02:02:11 +0000 Subject: [issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 In-Reply-To: <1383554508.21.0.868746765749.issue19490@psf.upfronthosting.co.za> Message-ID: <1383703331.22.0.727744758824.issue19490@psf.upfronthosting.co.za> Piet van Oostrum added the comment: I think future versions of Python should add the relevant information about how they are linked to Tcl/Tk in sysconfig. This would include the path of the include files, the shared libraries and the tcl files. Or a framework location on OS X if this is used. The setup.py for extensions that need to link to Tcl/Tk can then interrogate this information, and fall back to the current way, if it is not available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 03:06:15 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 Nov 2013 02:06:15 +0000 Subject: [issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 In-Reply-To: <1383554508.21.0.868746765749.issue19490@psf.upfronthosting.co.za> Message-ID: <1383703575.21.0.78539591432.issue19490@psf.upfronthosting.co.za> Ned Deily added the comment: Piet, yes, I've been thinking of how to do that. Unfortunately, it can only be a hint since, in the case of an "installer" Python, there is no guarantee that the header files on the build machine are available on the installed machine in the same location or even at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 04:18:30 2013 From: report at bugs.python.org (Jason Myers) Date: Wed, 06 Nov 2013 03:18:30 +0000 Subject: [issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period In-Reply-To: <1376427240.14.0.584954211651.issue18730@psf.upfronthosting.co.za> Message-ID: <1383707910.04.0.0725909373829.issue18730@psf.upfronthosting.co.za> Jason Myers added the comment: This is a patch based on terry.reedy 's suggestion ---------- keywords: +patch nosy: +Jason.Myers Added file: http://bugs.python.org/file32514/docstring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 05:03:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 Nov 2013 04:03:51 +0000 Subject: [issue19439] Build _testembed on Windows In-Reply-To: <1383080293.2.0.31204430631.issue19439@psf.upfronthosting.co.za> Message-ID: <3dDvHp5BxMz7Lqv@mail.python.org> Roundup Robot added the comment: New changeset 99640494ca7f by Zachary Ware in branch 'default': #19439: Update PCbuild/readme.txt with new sub-project http://hg.python.org/cpython/rev/99640494ca7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 09:51:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 06 Nov 2013 08:51:03 +0000 Subject: [issue19507] ssl.wrap_socket() with server_hostname should imply match_hostname() In-Reply-To: <1383691650.31.0.697174756225.issue19507@psf.upfronthosting.co.za> Message-ID: <1383727863.37.0.383267199422.issue19507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure why it's surprising. SNI and certificate validation are two different things. Besides, this is adding a new level of complication to the wrap_socket() signature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 09:54:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 06 Nov 2013 08:54:56 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default In-Reply-To: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> Message-ID: <1383728096.32.0.681470653398.issue19508@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There is already an entire section about this: http://docs.python.org/dev/library/ssl.html#security-considerations It's up to consumers of the API to choose their security policy, the ssl module merely provides building blocks to implement it. I think the ssl docs are sufficiently explicit about it right now, we're not going to add warnings every time we think something is important to read. As for "developers [who] are still surprised", well, most of them shouldn't use the ssl module directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 10:29:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 09:29:15 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default In-Reply-To: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> Message-ID: <1383730155.36.0.854902089148.issue19508@psf.upfronthosting.co.za> STINNER Victor added the comment: > There is already an entire section about this: > http://docs.python.org/dev/library/ssl.html#security-considerations So we just need to add a link from http, ftp, imap, ... to this section? Using only http://docs.python.org/dev/library/ftplib.html#ftp-tls-objects documentation, I don't see how to plug my own SSL validation code. I don't see any SSL context object or things like that. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 11:41:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 06 Nov 2013 10:41:27 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1383734486.99.0.62599172672.issue15216@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just reviewed Victor's patch - aside from a trivial typo and not covering the C implementation or documentation yet, it looks good to me. Most importantly, the tests in that patch could be used to validate a C implementation as well. I'll see if I can find anyone interested in creating a patch for the C io implementation, otherwise we can postpone the addition until 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 12:09:24 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Wed, 06 Nov 2013 11:09:24 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1383736164.33.0.296369648249.issue15216@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I am interested in working on this, but I might need guidance at times. Is that acceptable? If yes, I'm willing to start as soon as possible. ---------- nosy: +andrei.duma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:03:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 06 Nov 2013 12:03:11 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1383739391.3.0.715965213658.issue15216@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks, Andrei, that would be great. The tests and the Python version in Victor's patch show the desired API and behaviour. In theory, the C version should just be a matter of adding an equivalent textiowrapper_set_encoding method as a static function in hg.python.org/cpython/file/default/Modules/_io/textio.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:08:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 Nov 2013 12:08:50 +0000 Subject: [issue19378] Clean up Python 3.4 API additions in the dis module In-Reply-To: <1382622276.63.0.652986128148.issue19378@psf.upfronthosting.co.za> Message-ID: <3dF63P61pCz7LlL@mail.python.org> Roundup Robot added the comment: New changeset ce8dd299cdc4 by Nick Coghlan in branch 'default': Close #19378: address flaws in the new dis module APIs http://hg.python.org/cpython/rev/ce8dd299cdc4 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:23:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 06 Nov 2013 12:23:43 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1383740623.72.0.649334321274.issue17823@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:32:11 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 06 Nov 2013 12:32:11 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1383741131.97.0.923423978678.issue19332@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Duplicate of this: http://bugs.python.org/issue6017 ---------- nosy: +stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:32:40 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 06 Nov 2013 12:32:40 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1383741160.15.0.600393256265.issue19332@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- nosy: -stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:40:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 06 Nov 2013 12:40:42 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1383741642.38.0.6142950053.issue17823@psf.upfronthosting.co.za> Nick Coghlan added the comment: Switch direction of dependency to make this fixer rely on restoring the codec aliases in issue 7475 first. ---------- dependencies: +codecs missing: base64 bz2 hex zlib hex_codec ... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:41:41 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 06 Nov 2013 12:41:41 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1383741701.51.0.862419096982.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: Providing the 2to3 fixers in issue 17823 now depends on this issue rather than the other way around (since not having to translate the names simplifies the fixer a bit). ---------- dependencies: -2to3 fixers for missing codecs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:46:21 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 06 Nov 2013 12:46:21 +0000 Subject: [issue13674] crash in datetime.strftime In-Reply-To: <1325149457.99.0.374098273588.issue13674@psf.upfronthosting.co.za> Message-ID: <1383741981.95.0.791670992429.issue13674@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: -> tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:46:47 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 06 Nov 2013 12:46:47 +0000 Subject: [issue13674] crash in datetime.strftime In-Reply-To: <1325149457.99.0.374098273588.issue13674@psf.upfronthosting.co.za> Message-ID: <1383742007.02.0.946392470984.issue13674@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- components: +Windows versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 13:56:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 06 Nov 2013 12:56:51 +0000 Subject: [issue19511] lib2to3 Grammar file is no longer a Python 3 superset Message-ID: <1383742611.34.0.802324885429.issue19511@psf.upfronthosting.co.za> New submission from Nick Coghlan: In writing some new fixers for issue 17823, I noticed the 2/3 bridge grammar in lib2to3 was never updated to handle "yield from". This item is also missing from the checklist in the devguide: http://docs.python.org/devguide/grammar.html ---------- components: Devguide, Library (Lib) messages: 202265 nosy: ezio.melotti, ncoghlan priority: low severity: normal status: open title: lib2to3 Grammar file is no longer a Python 3 superset type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 15:06:22 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 06 Nov 2013 14:06:22 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1383746782.01.0.102999603203.issue17823@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attached diff shows a proof of concept fixer for the encode case. It could be adjusted fairly easily to also handle decode methods (by including an alternative in the pattern and also capturing the method name) I'm sure how useful such a fixer would be in practice, though, since it only triggers when the codec name is passed as a literal - passing in a variable instead keeps it from firing. ---------- keywords: +patch Added file: http://bugs.python.org/file32515/issue17823_lib2to3_fixer_for_binary_codecs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 15:10:29 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Wed, 06 Nov 2013 14:10:29 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1383747029.79.0.443580268665.issue9216@psf.upfronthosting.co.za> Changes by Bohuslav "Slavek" Kabrda : ---------- nosy: +bkabrda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 15:18:45 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 06 Nov 2013 14:18:45 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1383746782.01.0.102999603203.issue17823@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On 7 November 2013 00:06, Nick Coghlan wrote: > I'm sure how useful such a fixer would be in practice, though, since it only triggers when the codec name is passed as a literal - passing in a variable instead keeps it from firing. Oops, that should say "I'm *not* sure" :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 16:02:54 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 06 Nov 2013 15:02:54 +0000 Subject: [issue13674] crash in datetime.strftime In-Reply-To: <1325149457.99.0.374098273588.issue13674@psf.upfronthosting.co.za> Message-ID: <1383750174.56.0.139677925078.issue13674@psf.upfronthosting.co.za> Tim Golden added the comment: Attached is a patch with tests ---------- keywords: +patch Added file: http://bugs.python.org/file32516/issue13674.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 16:17:28 2013 From: report at bugs.python.org (Meador Inge) Date: Wed, 06 Nov 2013 15:17:28 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1383751048.52.0.45932801513.issue17823@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 16:18:24 2013 From: report at bugs.python.org (Meador Inge) Date: Wed, 06 Nov 2013 15:18:24 +0000 Subject: [issue19511] lib2to3 Grammar file is no longer a Python 3 superset In-Reply-To: <1383742611.34.0.802324885429.issue19511@psf.upfronthosting.co.za> Message-ID: <1383751104.46.0.0589884938403.issue19511@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 16:23:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 15:23:14 +0000 Subject: [issue13674] crash in datetime.strftime In-Reply-To: <1325149457.99.0.374098273588.issue13674@psf.upfronthosting.co.za> Message-ID: <1383751394.62.0.474557070523.issue13674@psf.upfronthosting.co.za> STINNER Victor added the comment: + if (strchr("y", outbuf[1]) && buf.tm_year < 0) hum... why not simply outbuf[1] == 'y' ? It would be more explicit and less surprising. For the unit test, it would be nice to test also asctime(), even if time.asctime() doesn't use asctime() of the C library. And it's better to run tests on all platforms. Only test_y_before_1900() should behave differently on other platforms, but it would be nice to run test_y_before_1900() on platforms supporting "%y" with year < 1900. In my experience, other operating systems have also their own issues. For example, time.strftime() has a specific test to Windows, but also Solaris and AIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 16:51:03 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 06 Nov 2013 15:51:03 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383753063.04.0.488049844969.issue19475@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: MAL: Have you thought about the rounding/truncation issues associated with not showing microseconds ? I believe it has to be the truncation. Rounding is better left to the user code where it can be done either using timedelta arithmetics or at the time source. I would expect that in the majority of cases where lower resolution printing is desired the times will be already at lower resolution at the source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 17:19:42 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 06 Nov 2013 16:19:42 +0000 Subject: [issue13674] crash in datetime.strftime In-Reply-To: <1383751394.62.0.474557070523.issue13674@psf.upfronthosting.co.za> Message-ID: <527A6C15.7090602@timgolden.me.uk> Tim Golden added the comment: On 06/11/2013 15:23, STINNER Victor wrote: > + if (strchr("y", outbuf[1]) && buf.tm_year < 0) > > hum... why not simply outbuf[1] == 'y' ? It would be more explicit > and less surprising. Ummm. I have no idea what I was thinking about there. I think it was somehow connected with the strchr check a few lines earlier. Anyhow, fixed now, thanks. > For the unit test, it would be nice to test also asctime(), even if > time.asctime() doesn't use asctime() of the C library. And it's > better to run tests on all platforms. Only test_y_before_1900() > should behave differently on other platforms, but it would be nice to > run test_y_before_1900() on platforms supporting "%y" with year < > 1900. In my experience, other operating systems have also their own > issues. For example, time.strftime() has a specific test to Windows, > but also Solaris and AIX. I'm not sure where time.asctime comes into it. The implementation doesn't use time.strftime, but even if it did, I don't see the need to add a test under this issue: the unit test for strftime should be enough to cover any direct or indirect use of the function. I'm happy to open up the other tests. TJG ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 17:25:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 Nov 2013 16:25:33 +0000 Subject: [issue18582] PBKDF2 support In-Reply-To: <1375024279.36.0.0953079533445.issue18582@psf.upfronthosting.co.za> Message-ID: <3dFClc2LGpz7Ljw@mail.python.org> Roundup Robot added the comment: New changeset 07fa1ed0d551 by Christian Heimes in branch 'default': Issue #18582: fix memory leak in pbkdf2 code http://hg.python.org/cpython/rev/07fa1ed0d551 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 18:05:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 17:05:05 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode Message-ID: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> New submission from STINNER Victor: In interactive mode, when I run python in gdb, I see that PyUnicode_DecodeUTF8Stateful() is called a lot of times. Calls come from PyDict_GetItemString() or PySys_GetObject() for example. Allocating a temporary Unicode string and decode a byte string from UTF-8 is inefficient: the memory allocator is stressed and the byte string is decoded at each call. I propose to reuse the _Py_IDENTIFIER API in most common places to limit calls to the memory allocator and to PyUnicode_DecodeUTF8Stateful(). ---------- messages: 202273 nosy: haypo priority: normal severity: normal status: open title: Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 18:05:25 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 06 Nov 2013 17:05:25 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383753063.04.0.488049844969.issue19475@psf.upfronthosting.co.za> Message-ID: <527A76CF.8000002@egenix.com> Marc-Andre Lemburg added the comment: On 06.11.2013 16:51, Alexander Belopolsky wrote: > > MAL: Have you thought about the rounding/truncation issues > associated with not showing microseconds ? Sure, otherwise I wouldn't have mentioned it :-) mxDateTime always uses 2 digit fractions when displaying date/time values. This has turned out to be a good compromise between accuracy and usability. In early version, I used truncation, but that caused (too many) roundtrip problems, so I started using careful rounding in later versions: /* Fix a second value for display as string. Seconds are rounded to the nearest microsecond in order to avoid cases where e.g. 3.42 gets displayed as 03.41 or 3.425 is diplayed as 03.42. Special care is taken for second values which would cause rounding to 60.00 -- these values are truncated to 59.99 to avoid the value of 60.00 due to rounding to show up even when the indicated time does not point to a leap second. The same is applied for rounding towards 61.00 (leap seconds). The second value returned by this function should be formatted using '%05.2f' (which rounds to 2 decimal places). */ This approach has worked out well, though YMMV. > I believe it has to be the truncation. Rounding is better left to the user code where it can be done either using timedelta arithmetics or at the time source. I would expect that in the majority of cases where lower resolution printing is desired the times will be already at lower resolution at the source. In practice you often don't know the resolution of the timing source. Nowadays, the reverse of what you said is usually true: the source resolution is higher than the precision you use to print it. MS SQL Server datetime is the exception to that rule, with a resolution of 333ms and weird input "rounding": http://msdn.microsoft.com/en-us/library/ms187819.aspx For full seconds, truncation will add an error of +/- 1 second, whereas rounding only adds +/- 0.5 seconds. This is what convinced me to use rounding instead of truncation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 18:08:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 17:08:33 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383757713.39.0.242860083759.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: pysys_getobjectid.patch: - add _PySys_GetObjectId() and _PyDict_GetItemId() functions - add global identifiers for most common strings: "argv", "path", "stdin", "stdout", "stderr" - use these new functions and identifiers ---------- keywords: +patch Added file: http://bugs.python.org/file32517/pysys_getobjectid.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 18:20:54 2013 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 06 Nov 2013 17:20:54 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383325521.57.0.024650274045.issue19475@psf.upfronthosting.co.za> Message-ID: <1383758454.87.0.712458886436.issue19475@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am afraid that the rounding issues may kill this proposal. Can we start with something simple? For example, we can start with show=None keyword argument and allow a single value 'microseconds' (or 'us'). This will solve the issue at hand with a reasonable syntax: t.isoformat(show='us'). If other resolutions will be required, we can later add more values and may even allow t.isoformat(show=2) to show 2 decimal digits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 18:29:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 06 Nov 2013 17:29:43 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383758983.49.0.839050057458.issue19512@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PySys_GetObject() is called with followed literal strings: argv, displayhook, excepthook, modules, path, path_hooks, path_importer_cache, ps1, ps2, stderr, stdin, stdout, tracebacklimit. PyDict_GetItemString() is called with followed literal strings: __abstractmethods__, __builtins__, __file__, __loader__, __module__, __name__, __warningregistry__, _abstract_, _argtypes_, _errcheck_, _fields_, _flags_, _iterdump, _needs_com_addref_, _restype_, _type_, builtins, decimal_point, default_int_handler, displayhook, excepthook, fillvalue, grouping, imp, metaclass, options, sys, thousands_sep. Are any of these calls performance critical? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 18:42:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 17:42:37 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383759757.06.0.87591099149.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: > Are any of these calls performance critical? I'm trying to focus on the interactive interpreter. I didn't touch literal strings used once, for example at module initialization. Well, if it doesn't make the code much uglier or much slower, it's maybe not a big deal to replace all string literals with identifiers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 18:45:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 Nov 2013 17:45:51 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <3dFFXG5sR5z7LpQ@mail.python.org> Roundup Robot added the comment: New changeset a2f42d57b91d by Victor Stinner in branch 'default': Issue #19512: sys_displayhook() now uses an identifier for "builtins" http://hg.python.org/cpython/rev/a2f42d57b91d New changeset 55517661a053 by Victor Stinner in branch 'default': Issue #19512: _print_total_refs() now uses an identifier to get "showrefcount" http://hg.python.org/cpython/rev/55517661a053 New changeset af822a6c9faf by Victor Stinner in branch 'default': Issue #19512: Add PyRun_InteractiveOneObject() function http://hg.python.org/cpython/rev/af822a6c9faf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 18:47:32 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 17:47:32 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383760052.75.0.302007276974.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, by the way, identifiers have a nice side effect: they are interned, and so dict lookup should be faster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 19:06:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 Nov 2013 18:06:22 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <3dFFzx5KxDz7LpQ@mail.python.org> Roundup Robot added the comment: New changeset 8a6a920d8eae by Victor Stinner in branch 'default': Issue #19512: Py_ReprEnter() and Py_ReprLeave() now use an identifier for the http://hg.python.org/cpython/rev/8a6a920d8eae New changeset 69071054b42f by Victor Stinner in branch 'default': Issue #19512: Add a new _PyDict_DelItemId() function, similar to http://hg.python.org/cpython/rev/69071054b42f New changeset 862a62e61553 by Victor Stinner in branch 'default': Issue #19512: type_abstractmethods() and type_set_abstractmethods() now use an http://hg.python.org/cpython/rev/862a62e61553 New changeset e5476ecb8b57 by Victor Stinner in branch 'default': Issue #19512: eval() and exec() now use an identifier for "__builtins__" string http://hg.python.org/cpython/rev/e5476ecb8b57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 19:22:31 2013 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 06 Nov 2013 18:22:31 +0000 Subject: [issue19475] Add microsecond flag to datetime isoformat() In-Reply-To: <1383758454.87.0.712458886436.issue19475@psf.upfronthosting.co.za> Message-ID: Skip Montanaro added the comment: > I am afraid that the rounding issues may kill this proposal. Can we start with something simple? For example, we can start with show=None keyword argument and allow a single value 'microseconds' (or 'us'). This will solve the issue at hand with a reasonable syntax: t.isoformat(show='us'). If other resolutions will be required, we can later add more values and may even allow t.isoformat(show=2) to show 2 decimal digits. I don't think the meaning of this proposed show keyword argument should be overloaded as you suggest. If you show microseconds, just show all of them. Furthermore... If we go far enough back, my original problem was really that the inclusion of microseconds in csv module output was inconsistent, making it impossible for me to later parse those values in another script using a fixed strptime format. Since the csv module uses str() to convert input values for output, nothing you do to isoformat() will have any effect on my original problem. In my own code (where I first noticed the problem) I acquiesced, and changed this d["time"] = now to this: d["time"] = now.strftime("%Y-%m-%dT%H:%M:%S.%f") where "now" is a datetime object. I thus guarantee that I can parse these timestamps later using the same format. I realize the inclusion of "T" means my fields changed in other ways, but that was intentional, and not germane to this discussion. So, fiddle all you want with isoformat(), but do it right. I vote that if you want to add a show parameter it should simply include all fields down to that level, omitting any lower down. If people want to round or truncate things you can give them that option, returning a suitably adjusted, new datetime object. I don't think rounding, truncation, or other numeric operations should be an element of conversion to string form. This does not happen today: >>> import datetime >>> x = datetime.datetime.now() >>> x datetime.datetime(2013, 11, 6, 12, 19, 5, 759020) >>> x.strftime("%Y-%m-%d %H:%M:%S") '2013-11-06 12:19:05' (%S doesn't produce "06") Skip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 19:51:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 06 Nov 2013 18:51:59 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383763919.14.0.989878818576.issue19512@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think these changes are required. The interactive interpreter is not a bottleneck. And definitely adding new public functions to API needs more discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 20:16:20 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 19:16:20 +0000 Subject: [issue3849] FUD in documentation for urllib.urlopen() In-Reply-To: <1221246343.23.0.128587140594.issue3849@psf.upfronthosting.co.za> Message-ID: <1383765380.61.0.641487653501.issue3849@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 20:28:12 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 19:28:12 +0000 Subject: [issue626452] Support RFC 2392 in email package Message-ID: <1383766092.95.0.714037345293.issue626452@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 20:28:59 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 19:28:59 +0000 Subject: [issue634412] RFC 2387 in email package Message-ID: <1383766139.72.0.314234177939.issue634412@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 20:35:42 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 19:35:42 +0000 Subject: [issue8799] Hang in lib/test/test_threading.py In-Reply-To: <1274694258.02.0.421667436928.issue8799@psf.upfronthosting.co.za> Message-ID: <1383766542.8.0.24806123345.issue8799@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 20:37:27 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 19:37:27 +0000 Subject: [issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True In-Reply-To: <1265137684.99.0.487285282872.issue7839@psf.upfronthosting.co.za> Message-ID: <1383766647.71.0.962884957255.issue7839@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 20:47:54 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 19:47:54 +0000 Subject: [issue11965] Simplify context manager in os.popen In-Reply-To: <1304178570.81.0.335603645525.issue11965@psf.upfronthosting.co.za> Message-ID: <1383767274.7.0.299308502768.issue11965@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Closing this issue; I agree with Ronald's assessment. ---------- nosy: +akuchling resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 20:50:36 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 19:50:36 +0000 Subject: [issue1348] httplib closes socket, then tries to read from it In-Reply-To: <1193532553.16.0.237482805264.issue1348@psf.upfronthosting.co.za> Message-ID: <1383767436.11.0.153461852924.issue1348@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 21:18:48 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 20:18:48 +0000 Subject: [issue1671676] test_mailbox is hanging while doing gmake test on HP-UX v3 Message-ID: <1383769128.87.0.870431651769.issue1671676@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 21:22:48 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 20:22:48 +0000 Subject: [issue834840] Unhelpful error message from cgi module Message-ID: <1383769368.85.0.638192952451.issue834840@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 21:23:25 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 20:23:25 +0000 Subject: [issue7593] Computed-goto patch for RE engine In-Reply-To: <1262052691.46.0.772398622751.issue7593@psf.upfronthosting.co.za> Message-ID: <1383769405.73.0.760788847705.issue7593@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 21:26:09 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 Nov 2013 20:26:09 +0000 Subject: [issue19505] OrderedDict views don't implement __reversed__ In-Reply-To: <1383668278.19.0.898064141243.issue19505@psf.upfronthosting.co.za> Message-ID: <1383769569.51.0.0695643283574.issue19505@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low type: -> enhancement versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 21:32:53 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 20:32:53 +0000 Subject: [issue8003] Fragile and unexpected error-handling in asyncore In-Reply-To: <1266948464.33.0.330812797821.issue8003@psf.upfronthosting.co.za> Message-ID: <1383769973.81.0.747819260425.issue8003@psf.upfronthosting.co.za> A.M. Kuchling added the comment: asyncore is no longer maintained, so this will not get fixed. ---------- nosy: +akuchling resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 21:36:15 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 Nov 2013 20:36:15 +0000 Subject: [issue19441] itertools.tee improve documentation In-Reply-To: <1383087333.66.0.191656186181.issue19441@psf.upfronthosting.co.za> Message-ID: <1383770175.2.0.144446553169.issue19441@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't want to recommend overwriting the variable name but will add a note for the rest: "Copied iterators depend the original iterator. If the original advances, then so do the copies. After teeing the iterators, the usual practice is to stop working with the original iterator and operate only on the new tee-ed iterators." FWIW, the situation is analogous to str.upper(). We note that string methods produce new strings. We don't state that a best practice is to overwrite the variable with "s = s.upper()". That is sometimes what you want and sometimes not. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 21:56:30 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 06 Nov 2013 20:56:30 +0000 Subject: [issue19332] Guard against changing dict during iteration In-Reply-To: <1382364174.9.0.836332683158.issue19332@psf.upfronthosting.co.za> Message-ID: <1383771390.14.0.227269568933.issue19332@psf.upfronthosting.co.za> Raymond Hettinger added the comment: A few thoughts: * No existing, working code will benefit from this patch; however, almost all code will pay a price for it -- bigger size for an empty dict and a runtime cost (possibly very small) on the critical path (every time a value is stored in a dict). * The sole benefit of the patch is provide an earlier warning that someone is doing something weird. For most people, this will never come up (we have 23 years of Python history indicating that there isn't a real problem to that needs to be solved). * The normal rule (not just for Python) is that a data structures have undefined behavior for mutating while iterating, unless there is a specific guarantee (for example, we guarantee that the dicts are allowed to mutate values but not keys during iteration and we guarantee the behavior of list iteration while iterating). * It is not clear that other implementations such as IronPython and Jython would be able to implement this behavior (Jython wraps the Java ConcurrentHashMap). * The current patch second guesses a decision that was made long ago to only detect size changes (because it is cheap, doesn't take extra memory, isn't on the critical path, and handles the common case). * The only case whether we truly need a stronger protection is when it is needed to defend against a segfault. That is why collections.deque() implement a change counter. It has a measureable cost that slows down deque operations (increasing the number of memory accesses per append, pop, or next) but it is needed to prevent the iterator from spilling into freed memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 22:10:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 21:10:23 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383772223.88.0.905903910248.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't think these changes are required. The interactive interpreter is not a bottleneck. What is the problem with these changes? Identifiers have different advantages. Errors become more unlikely because objects are only initialized once, near startup. So it put also less pressure on code handling errors :) (it is usually the least tested part of the code) > And definitely adding new public functions to API needs more discussion. You mean for PyRun_InteractiveOneObject()? Oh, it can be made private, but what is the problem of adding yet another PyRun_Interactive*() function? There are already a lot of them :-) I also worked hard to support unencodable filenames: using char*, you cannot support arbitrary Unicode filename on Windows. That's why a added many various functions with "Object" suffix. Some examples: PyWarn_ExplicitObject(), PyParser_ParseStringObject(), PyImport_AddModuleObject(), etc. Some users complained that they were not able to run Python scripts on Windows with unencodable filenames (like russian characters on an english setup). I can try to find the related issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 22:20:53 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 21:20:53 +0000 Subject: [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1383772853.18.0.73515312839.issue7061@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Is there anything left to do for this issue? ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 22:29:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 06 Nov 2013 21:29:54 +0000 Subject: [issue19505] OrderedDict views don't implement __reversed__ In-Reply-To: <1383668278.19.0.898064141243.issue19505@psf.upfronthosting.co.za> Message-ID: <1383773394.52.0.713267867568.issue19505@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We can't add __reversed__() to the Set or MappingView protocols without breaking third party code, but we can add it to concrete implementations of mapping views. In particular for views of OrderedDict which itself already have __reversed__(). Here is a patch which makes OrderedDict's views reversible. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file32518/OrderedDict_reversed_views.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 22:46:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 Nov 2013 21:46:26 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <3dFLss3gQ9z7LtT@mail.python.org> Roundup Robot added the comment: New changeset 5e402c16a74c by Victor Stinner in branch 'default': Issue #19512: Add _PySys_GetObjectId() and _PySys_SetObjectId() functions http://hg.python.org/cpython/rev/5e402c16a74c New changeset cca13dd603a9 by Victor Stinner in branch 'default': Issue #19512: PRINT_EXPR bytecode now uses an identifier to get sys.displayhook http://hg.python.org/cpython/rev/cca13dd603a9 New changeset 6348764bacdd by Victor Stinner in branch 'default': Issue #19512: pickle now uses an identifier to only create the Unicode string http://hg.python.org/cpython/rev/6348764bacdd New changeset 954167ce92a3 by Victor Stinner in branch 'default': Issue #19512: add some common identifiers to only create common strings once, http://hg.python.org/cpython/rev/954167ce92a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 23:17:49 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 06 Nov 2013 22:17:49 +0000 Subject: [issue6868] Check errno of epoll_ctrl In-Reply-To: <1252462391.45.0.469283463386.issue6868@psf.upfronthosting.co.za> Message-ID: <1383776269.39.0.876238911747.issue6868@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I don't understand the bug being reported. The code you quote should probably be written as "if (result < 0 && errno == EBADF)", but the block's net effect is to ignore an error by resetting result and errno. It doesn't matter if we occasionally set result and errno to 0 when result is already zero, but errno happens to be set to EBADF from some earlier operation. The open('xxx', O_RDONLY) would raise an exception, not return a fd of -1, so I don't see how that can be used to trigger a problem. Therefore I'll close this issue, but am willing to re-open it if someone can explain a way this code could actually cause problems. ---------- nosy: +akuchling resolution: -> wont fix stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 23:43:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 22:43:12 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383777792.71.0.0610895554804.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: Another problem is that PyUnicode_FromString() failure is not handled correctly in some cases. PyUnicode_FromString() can fail because an decoder error, but also because of a MemoryError. For example, PyDict_GetItemString() returns NULL as if the entry does not exist if PyUnicode_FromString() failed :-( --- PyObject * PyDict_GetItemString(PyObject *v, const char *key) { PyObject *kv, *rv; kv = PyUnicode_FromString(key); if (kv == NULL) { PyErr_Clear(); return NULL; } rv = PyDict_GetItem(v, kv); Py_DECREF(kv); return rv; } --- While working on failmalloc issues (#18048, #19437), I found some places where MemoryError caused tricky bugs because of this. Example of such issue: --- changeset: 84684:af18829a7754 user: Victor Stinner date: Wed Jul 17 01:22:45 2013 +0200 files: Objects/structseq.c Python/pythonrun.c description: Close #18469: Replace PyDict_GetItemString() with _PyDict_GetItemId() in structseq.c _PyDict_GetItemId() is more efficient: it only builds the Unicode string once. Identifiers (dictionary keys) are now created at Python initialization, and if the creation failed, Python does exit with a fatal error. Before, PyDict_GetItemString() failure was not handled: structseq_new() could call PyObject_GC_NewVar() with a negative size, and structseq_dealloc() could also crash. --- So moving from PyDict_GetItemString() to _PyDict_GetItemId() is for perfomances, but the main motivation is to handle better errors. I hope that the identifier will be initialized quickly at startup, and if its initialization failed, the failure is handled better... There is also a _PyDict_GetItemIdWithError() function. But it is not used currently (it was in changeset 2dd046be2c88). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 6 23:43:42 2013 From: report at bugs.python.org (Alexis Daboville) Date: Wed, 06 Nov 2013 22:43:42 +0000 Subject: [issue19479] textwrap.dedent doesn't work properly with strings containing CRLF In-Reply-To: <1383403818.41.0.713007913793.issue19479@psf.upfronthosting.co.za> Message-ID: <1383777822.48.0.179060593782.issue19479@psf.upfronthosting.co.za> Alexis Daboville added the comment: Added patch. ---------- keywords: +patch Added file: http://bugs.python.org/file32519/dedent.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 00:02:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 06 Nov 2013 23:02:59 +0000 Subject: [issue19512] Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <3dFNZB4Hfkz7Ljr@mail.python.org> Roundup Robot added the comment: New changeset 40c73ccaee95 by Victor Stinner in branch 'default': Issue #19512: __build_class() builtin now uses an identifier for the "metaclass" string http://hg.python.org/cpython/rev/40c73ccaee95 New changeset 7177363d8c5c by Victor Stinner in branch 'default': Issue #19512: fileio_init() reuses PyId_name identifier instead of "name" http://hg.python.org/cpython/rev/7177363d8c5c New changeset dbee50619259 by Victor Stinner in branch 'default': Issue #19512: _count_elements() of _collections reuses PyId_get identifier http://hg.python.org/cpython/rev/dbee50619259 New changeset 6a1ce1fd1fc0 by Victor Stinner in branch 'default': Issue #19512: builtin print() function uses an identifier instead of literal http://hg.python.org/cpython/rev/6a1ce1fd1fc0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 00:03:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 06 Nov 2013 23:03:48 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383779028.93.0.773498470142.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: I changed the issue title to make it closer to the real changesets related to the issue. ---------- title: Avoid most calls to PyUnicode_DecodeUTF8Stateful() in Python interactive mode -> Avoid temporary Unicode strings, use identifiers to only create the string once _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 01:12:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 07 Nov 2013 00:12:37 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <3dFQ6X5LRBz7LnV@mail.python.org> Roundup Robot added the comment: New changeset 77bebcf5c4cf by Victor Stinner in branch 'default': Issue #19512: add _PyUnicode_CompareWithId() function http://hg.python.org/cpython/rev/77bebcf5c4cf New changeset 3f9f2cfae53b by Victor Stinner in branch 'default': Issue #19512: Use the new _PyId_builtins identifier http://hg.python.org/cpython/rev/3f9f2cfae53b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 01:33:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 00:33:00 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) Message-ID: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> New submission from STINNER Victor: PyUnicodeWriter is (a little bit) more efficient than PyAccu to build Unicode strings. Attached patch list_repr_writer.patch modify list_repr() to use PyUnicodeWriter. ---------- files: list_repr_writer.patch keywords: patch messages: 202298 nosy: haypo, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) versions: Python 3.4 Added file: http://bugs.python.org/file32520/list_repr_writer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 01:41:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 00:41:01 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383784861.98.0.27166180978.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: bench_list_repr.py: benchmark script. It would be interesting to run it on Windows, performances of realloc() may be different. Result on my Linux box: Common platform: Python unicode implementation: PEP 393 Platform: Linux-3.9.4-200.fc18.x86_64-x86_64-with-fedora-18-Spherical_Cow Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, resolution=1e-09) Timer: time.perf_counter CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Bits: int=32, long=64, long long=64, size_t=64, void*=64 CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Platform of campaign pyaccu: SCM: hg revision=fafe20297927 tag=tip branch=default date="2013-11-07 00:53 +0100" Date: 2013-11-07 01:40:23 Python version: 3.4.0a4+ (default:fafe20297927, Nov 7 2013, 01:40:19) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] Timer precision: 36 ns Platform of campaign writer: Timer precision: 40 ns SCM: hg revision=fafe20297927+ tag=tip branch=default date="2013-11-07 00:53 +0100" Date: 2013-11-07 01:39:59 Python version: 3.4.0a4+ (default:fafe20297927+, Nov 7 2013, 01:38:30) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] -----------------------------+-------------+--------------- Tests??????????????????????? | ?????pyaccu | ????????writer -----------------------------+-------------+--------------- list("a")??????????????????? | ?308 ns (*) | ?259 ns (-16%) list("abc")????????????????? | ?489 ns (*) | ????????468 ns ["a"]*(100)????????????????? | 8.17 us (*) | ????????7.8 us ["abc"]*(100)??????????????? | 8.46 us (*) | ???????8.88 us ["a" * 100]*(100)??????????? | 35.2 us (*) | ???????36.2 us ["a"]*(10**6)??????????????? | 91.4 ms (*) | 77.3 ms (-15%) ["abc"]*(10**6)????????????? | 96.3 ms (*) | 85.2 ms (-11%) ["a" * 100]*(10**5)????????? | 46.8 ms (*) | 35.1 ms (-25%) list(range(10**6))?????????? | ?105 ms (*) | ?96.9 ms (-8%) list(map(str, range(10**6))) | ?108 ms (*) | 88.7 ms (-18%) -----------------------------+-------------+--------------- Total??????????????????????? | ?448 ms (*) | ?383 ms (-14%) -----------------------------+-------------+--------------- ---------- Added file: http://bugs.python.org/file32521/bench_list_repr.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 02:02:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 01:02:53 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code Message-ID: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> New submission from STINNER Victor: Some C files use more than once the same _Py_IDENTIFIER identifier. It would be more efficient to merge duplicated identifiers. Just move the definition to the top of the file. _Py_IDENTIFIER(as_integer_ratio): Modules/_datetimemodule.c:1569 _Py_IDENTIFIER(as_integer_ratio): Modules/_datetimemodule.c:1668 _Py_IDENTIFIER(cursor): Modules/_sqlite/connection.c:1282 _Py_IDENTIFIER(cursor): Modules/_sqlite/connection.c:1312 _Py_IDENTIFIER(cursor): Modules/_sqlite/connection.c:1342 _Py_IDENTIFIER(fromutc): Modules/_datetimemodule.c:4210 _Py_IDENTIFIER(fromutc): Modules/_datetimemodule.c:4249 _Py_IDENTIFIER(fromutc): Modules/_datetimemodule.c:4812 _Py_IDENTIFIER(__len__): Objects/typeobject.c:5071 _Py_IDENTIFIER(__len__): Objects/typeobject.c:5235 _Py_IDENTIFIER(insert): Modules/_bisectmodule.c:198 _Py_IDENTIFIER(insert): Modules/_bisectmodule.c:93 _Py_IDENTIFIER(isoformat): Modules/_datetimemodule.c:2638 _Py_IDENTIFIER(isoformat): Modules/_datetimemodule.c:3596 _Py_IDENTIFIER(isoformat): Modules/_datetimemodule.c:4532 _Py_IDENTIFIER(strftime): Modules/_datetimemodule.c:1280 _Py_IDENTIFIER(strftime): Modules/_datetimemodule.c:2679 ---------- keywords: easy messages: 202300 nosy: haypo priority: normal severity: normal status: open title: Merge duplicated _Py_IDENTIFIER identifiers in C code versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 02:08:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 01:08:17 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code Message-ID: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> New submission from STINNER Victor: I started to share some common identifiers in Python/pythonrun.c, extract: /* Common identifiers */ _Py_Identifier _PyId_argv = _Py_static_string_init("argv"); _Py_Identifier _PyId_builtins = _Py_static_string_init("builtins"); ... Do you think it would be interesting to continue to share such identifier somewhere? Maybe in a new file? We might do the same for some common strings like empty string, single character (like "\n"), etc. See also issue #19514. Duplicated identifiers in the io module: _Py_IDENTIFIER(_dealloc_warn): Modules/_io/bufferedio.c:17 _Py_IDENTIFIER(_dealloc_warn): Modules/_io/textio.c:15 _Py_IDENTIFIER(__IOBase_closed): Modules/_io/iobase.c:183 _Py_IDENTIFIER(__IOBase_closed): Modules/_io/iobase.c:62 _Py_IDENTIFIER(read1): Modules/_io/bufferedio.c:24 _Py_IDENTIFIER(read1): Modules/_io/textio.c:25 _Py_IDENTIFIER(readable): Modules/_io/bufferedio.c:25 _Py_IDENTIFIER(readable): Modules/_io/textio.c:26 _Py_IDENTIFIER(readall): Modules/_io/fileio.c:590 _Py_IDENTIFIER(readall): Modules/_io/iobase.c:802 _Py_IDENTIFIER(seek): Modules/_io/iobase.c:101 _Py_IDENTIFIER(seek): Modules/_io/textio.c:29 _Py_IDENTIFIER(writable): Modules/_io/bufferedio.c:27 _Py_IDENTIFIER(writable): Modules/_io/textio.c:33 Duplicated identifiers in other files: _Py_IDENTIFIER(append): Modules/_elementtree.c:2373 _Py_IDENTIFIER(append): Modules/_pickle.c:5056 _Py_IDENTIFIER(__bases__): Objects/abstract.c:2417 _Py_IDENTIFIER(__bases__): Objects/typeobject.c:2813 _Py_IDENTIFIER(builtins): pythonrun.c _Py_IDENTIFIER(builtins): Python/sysmodule.c:169 _Py_IDENTIFIER(__bytes__): Objects/bytesobject.c:2458 _Py_IDENTIFIER(__bytes__): Objects/object.c:563 _Py_IDENTIFIER(__class__): Objects/abstract.c:2492 _Py_IDENTIFIER(__class__): Objects/typeobject.c:42 _Py_IDENTIFIER(__class__): Python/codecs.c:470 _Py_IDENTIFIER(__class__): Python/compile.c:553 _Py_IDENTIFIER(close): Modules/_io/bufferedio.c:16 _Py_IDENTIFIER(close): Modules/_io/fileio.c:129 _Py_IDENTIFIER(close): Modules/_io/textio.c:14 _Py_IDENTIFIER(close): Modules/mmapmodule.c:707 _Py_IDENTIFIER(close): Modules/ossaudiodev.c:540 _Py_IDENTIFIER(close): Modules/selectmodule.c:1513 _Py_IDENTIFIER(close): Objects/genobject.c:173 _Py_IDENTIFIER(close): Python/traceback.c:235 _Py_IDENTIFIER(__delitem__): Objects/typeobject.c:5132 _Py_IDENTIFIER(__delitem__): Objects/typeobject.c:5183 _Py_IDENTIFIER(__dict__): Modules/arraymodule.c:2040 _Py_IDENTIFIER(__dict__): Modules/_collectionsmodule.c:894 _Py_IDENTIFIER(__dict__): Modules/_pickle.c:5204 _Py_IDENTIFIER(__dict__): Objects/bytearrayobject.c:2704 _Py_IDENTIFIER(__dict__): Objects/moduleobject.c:479 _Py_IDENTIFIER(__dict__): Objects/setobject.c:1946 _Py_IDENTIFIER(__dict__): Objects/typeobject.c:43 _Py_IDENTIFIER(__dict__): Parser/asdl_c.py:702 _Py_IDENTIFIER(__dict__): Python/bltinmodule.c:1942 _Py_IDENTIFIER(__dict__): Python/ceval.c:4660 _Py_IDENTIFIER(__dict__): Python/Python-ast.c:544 _Py_IDENTIFIER(__doc__): Objects/descrobject.c:1443 _Py_IDENTIFIER(__doc__): Objects/typeobject.c:44 _Py_IDENTIFIER(enable): Modules/faulthandler.c:1050 _Py_IDENTIFIER(enable): Modules/_posixsubprocess.c:50 _Py_IDENTIFIER(encoding): Python/bltinmodule.c:1716 _Py_IDENTIFIER(encoding): Python/pythonrun.c:1359 _Py_IDENTIFIER(encoding): Python/sysmodule.c:107 _Py_IDENTIFIER(filename): Python/errors.c:932 _Py_IDENTIFIER(filename): Python/pythonrun.c:1634 _Py_IDENTIFIER(fileno): Modules/faulthandler.c:133 _Py_IDENTIFIER(fileno): Modules/_io/_iomodule.c:238 _Py_IDENTIFIER(fileno): Modules/_io/textio.c:17 _Py_IDENTIFIER(fileno): Objects/fileobject.c:200 _Py_IDENTIFIER(fileno): Python/bltinmodule.c:35 _Py_IDENTIFIER(flush): Modules/faulthandler.c:134 _Py_IDENTIFIER(flush): Modules/_io/bufferedio.c:18 _Py_IDENTIFIER(flush): Modules/_io/textio.c:18 _Py_IDENTIFIER(flush): Python/bltinmodule.c:1550 _Py_IDENTIFIER(flush): Python/bltinmodule.c:36 _Py_IDENTIFIER(flush): Python/pythonrun.c:2120 _Py_IDENTIFIER(flush): Python/pythonrun.c:519 _Py_IDENTIFIER(__getinitargs__): Modules/_datetimemodule.c:3075 _Py_IDENTIFIER(__getinitargs__): Modules/_pickle.c:4501 _Py_IDENTIFIER(TextIOWrapper): Python/pythonrun.c:1005 _Py_IDENTIFIER(TextIOWrapper): Python/traceback.c:237 _Py_IDENTIFIER(__getstate__): Modules/_datetimemodule.c:3076 _Py_IDENTIFIER(__getstate__): Objects/typeobject.c:3448 _Py_IDENTIFIER(__import__): Python/ceval.c:2428 _Py_IDENTIFIER(__import__): Python/import.c:1230 _Py_IDENTIFIER(__module__): Objects/typeobject.c:48 _Py_IDENTIFIER(__module__): Python/errors.c:840 _Py_IDENTIFIER(__module__): Python/pythonrun.c:1916 _Py_IDENTIFIER(__name__): Objects/classobject.c:17 _Py_IDENTIFIER(__name__): Objects/typeobject.c:49 _Py_IDENTIFIER(__name__): Objects/weakrefobject.c:159 _Py_IDENTIFIER(__name__): Python/_warnings.c:260 _Py_IDENTIFIER(__name__): Python/codecs.c:471 _Py_IDENTIFIER(__name__): Python/import.c:1234 _Py_IDENTIFIER(__new__): Modules/_ctypes/callproc.c:1643 _Py_IDENTIFIER(__new__): Modules/_pickle.c:4511 _Py_IDENTIFIER(__new__): Objects/typeobject.c:50 _Py_IDENTIFIER(__new__): Objects/typeobject.c:5637 _Py_IDENTIFIER(__qualname__): Objects/descrobject.c:367 _Py_IDENTIFIER(__qualname__): Objects/methodobject.c:191 _Py_IDENTIFIER(__qualname__): Objects/typeobject.c:2032 _Py_IDENTIFIER(__setitem__): Modules/_collectionsmodule.c:1767 _Py_IDENTIFIER(__setitem__): Objects/typeobject.c:5133 _Py_IDENTIFIER(__setitem__): Objects/typeobject.c:5184 _Py_IDENTIFIER(__setstate__): Modules/_ctypes/callproc.c:1644 _Py_IDENTIFIER(__setstate__): Modules/_pickle.c:5147 _Py_IDENTIFIER(__trunc__): Modules/mathmodule.c:1464 _Py_IDENTIFIER(__trunc__): Objects/abstract.c:1273 _Py_IDENTIFIER(get): Modules/_collectionsmodule.c:1766 _Py_IDENTIFIER(get): Objects/descrobject.c:793 _Py_IDENTIFIER(isatty): Modules/_io/_iomodule.c:237 _Py_IDENTIFIER(isatty): Modules/_io/bufferedio.c:19 _Py_IDENTIFIER(isatty): Modules/_io/textio.c:20 _Py_IDENTIFIER(isatty): Python/pythonrun.c:1004 _Py_IDENTIFIER(items): Modules/_collectionsmodule.c:1566 _Py_IDENTIFIER(items): Modules/_pickle.c:2569 _Py_IDENTIFIER(items): Objects/abstract.c:2039 _Py_IDENTIFIER(items): Objects/descrobject.c:817 _Py_IDENTIFIER(items): Objects/typeobject.c:3537 _Py_IDENTIFIER(items): Python/Python-ast.c:108 _Py_IDENTIFIER(keys): Objects/abstract.c:2022 _Py_IDENTIFIER(keys): Objects/descrobject.c:803 _Py_IDENTIFIER(keys): Objects/dictobject.c:1792 _Py_IDENTIFIER(keys): Python/Python-ast.c:201 _Py_IDENTIFIER(lineno): Python/Python-ast.c:29 _Py_IDENTIFIER(lineno): Python/errors.c:933 _Py_IDENTIFIER(lineno): Python/pythonrun.c:1635 _Py_IDENTIFIER(mode): Modules/_io/_iomodule.c:239 _Py_IDENTIFIER(mode): Modules/_io/bufferedio.c:20 _Py_IDENTIFIER(mode): Modules/_io/textio.c:21 _Py_IDENTIFIER(mode): Python/pythonrun.c:1007 _Py_IDENTIFIER(msg): Python/Python-ast.c:130 _Py_IDENTIFIER(msg): Python/errors.c:934 _Py_IDENTIFIER(msg): Python/pythonrun.c:1633 _Py_IDENTIFIER(name): Modules/_io/bufferedio.c:21 _Py_IDENTIFIER(name): Modules/_io/fileio.c:62 _Py_IDENTIFIER(name): Modules/_io/textio.c:22 _Py_IDENTIFIER(name): Python/Python-ast.c:37 _Py_IDENTIFIER(name): Python/pythonrun.c:1006 _Py_IDENTIFIER(name): Python/pythonrun.c:222 _Py_IDENTIFIER(offset): Python/errors.c:935 _Py_IDENTIFIER(offset): Python/pythonrun.c:1636 _Py_IDENTIFIER(open): Objects/fileobject.c:33 _Py_IDENTIFIER(open): Parser/tokenizer.c:476 _Py_IDENTIFIER(open): Python/pythonrun.c:1003 _Py_IDENTIFIER(open): Python/traceback.c:155 _Py_IDENTIFIER(open): Python/traceback.c:236 _Py_IDENTIFIER(peek): Modules/_io/bufferedio.c:22 _Py_IDENTIFIER(peek): Modules/_io/iobase.c:453 _Py_IDENTIFIER(peek): Modules/_pickle.c:1181 _Py_IDENTIFIER(print_file_and_line): Python/errors.c:936 _Py_IDENTIFIER(print_file_and_line): Python/pythonrun.c:1865 _Py_IDENTIFIER(raw): Modules/_io/textio.c:23 _Py_IDENTIFIER(raw): Python/pythonrun.c:1029 _Py_IDENTIFIER(read): Modules/_cursesmodule.c:2336 _Py_IDENTIFIER(read): Modules/_io/bufferedio.c:23 _Py_IDENTIFIER(read): Modules/_io/bufferedio.c:55 _Py_IDENTIFIER(read): Modules/_io/iobase.c:452 _Py_IDENTIFIER(read): Modules/_io/iobase.c:846 _Py_IDENTIFIER(read): Modules/_io/textio.c:24 _Py_IDENTIFIER(read): Modules/_pickle.c:1182 _Py_IDENTIFIER(read): Modules/arraymodule.c:1267 _Py_IDENTIFIER(read): Modules/pyexpat.c:898 _Py_IDENTIFIER(read): Python/marshal.c:1595 _Py_IDENTIFIER(readinto): Modules/_io/bufferedio.c:26 _Py_IDENTIFIER(readinto): Python/marshal.c:621 _Py_IDENTIFIER(readline): Modules/_pickle.c:1183 _Py_IDENTIFIER(readline): Objects/fileobject.c:62 _Py_IDENTIFIER(readline): Parser/tokenizer.c:477 _Py_IDENTIFIER(replace): Modules/_datetimemodule.c:1071 _Py_IDENTIFIER(replace): Modules/_io/textio.c:27 _Py_IDENTIFIER(replace): Modules/zipimport.c:563 _Py_IDENTIFIER(replace): Modules/zipimport.c:70 _Py_IDENTIFIER(text): Modules/_elementtree.c:2357 _Py_IDENTIFIER(text): Python/errors.c:937 _Py_IDENTIFIER(text): Python/pythonrun.c:1637 _Py_IDENTIFIER(time): Modules/_datetimemodule.c:1309 _Py_IDENTIFIER(time): Modules/gcmodule.c:890 _Py_IDENTIFIER(upper): Modules/_sqlite/connection.c:1500 _Py_IDENTIFIER(upper): Modules/_sqlite/cursor.c:144 _Py_IDENTIFIER(upper): Modules/_sqlite/module.c:190 _Py_IDENTIFIER(upper): Python/Python-ast.c:329 _Py_IDENTIFIER(values): Objects/abstract.c:2056 _Py_IDENTIFIER(values): Objects/descrobject.c:810 _Py_IDENTIFIER(values): Python/Python-ast.c:170 _Py_IDENTIFIER(write): Modules/_csv.c:1374 _Py_IDENTIFIER(write): Modules/_cursesmodule.c:1792 _Py_IDENTIFIER(write): Modules/_io/bufferedio.c:28 _Py_IDENTIFIER(write): Modules/_pickle.c:831 _Py_IDENTIFIER(write): Modules/arraymodule.c:1340 _Py_IDENTIFIER(write): Modules/cjkcodecs/multibytecodec.c:1572 _Py_IDENTIFIER(write): Modules/cjkcodecs/multibytecodec.c:1642 _Py_IDENTIFIER(write): Objects/fileobject.c:131 _Py_IDENTIFIER(write): Python/marshal.c:1566 _Py_IDENTIFIER(write): Python/sysmodule.c:129 _Py_IDENTIFIER(write): Python/sysmodule.c:2007 ---------- messages: 202301 nosy: haypo priority: normal severity: normal status: open title: Share duplicated _Py_IDENTIFIER identifiers in C code versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 02:08:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 01:08:36 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383786516.81.0.291734267464.issue19514@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #19515 which is more general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 03:30:54 2013 From: report at bugs.python.org (Michael Merickel) Date: Thu, 07 Nov 2013 02:30:54 +0000 Subject: [issue19516] segmentation fault using a dict as a key Message-ID: <1383791454.4.0.286950370994.issue19516@psf.upfronthosting.co.za> New submission from Michael Merickel: I assume there is some incompatibility in the maverick's C runtime, but getting a segfault only on the python binaries from python.org. Version shipped by Apple OS X 10.9 Mavericks: ~? python2.7 Python 2.7.5 (default, Sep 12 2013, 21:33:34) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> foo = {} >>> foo[{}] = 1 Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'dict' >>> 2.7 binary installed from python.org: ~? /Library/Frameworks/Python.framework/Versions/2.7/bin/python Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> foo = {} >>> foo[{}] = 1 [1] 4517 segmentation fault /Library/Frameworks/Python.framework/Versions/2.7/bin/python 3.3 binary installed from python.org: Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> foo = {} >>> foo[{}] = 1 [1] 1898 segmentation fault python ---------- assignee: ronaldoussoren components: Macintosh messages: 202303 nosy: mmerickel, ronaldoussoren priority: normal severity: normal status: open title: segmentation fault using a dict as a key type: crash versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 04:47:17 2013 From: report at bugs.python.org (Philip Jenvey) Date: Thu, 07 Nov 2013 03:47:17 +0000 Subject: [issue19516] segmentation fault using a dict as a key In-Reply-To: <1383791454.4.0.286950370994.issue19516@psf.upfronthosting.co.za> Message-ID: <1383796037.37.0.972490506408.issue19516@psf.upfronthosting.co.za> Changes by Philip Jenvey : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 04:48:44 2013 From: report at bugs.python.org (Tim Peters) Date: Thu, 07 Nov 2013 03:48:44 +0000 Subject: [issue19516] segmentation fault using a dict as a key In-Reply-To: <1383791454.4.0.286950370994.issue19516@psf.upfronthosting.co.za> Message-ID: <1383796124.16.0.847806565934.issue19516@psf.upfronthosting.co.za> Tim Peters added the comment: Sure looks like the bug where virtually _any_ two lines entered in the shell cause a segfault. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 04:49:40 2013 From: report at bugs.python.org (Tim Peters) Date: Thu, 07 Nov 2013 03:49:40 +0000 Subject: [issue19516] segmentation fault using a dict as a key In-Reply-To: <1383791454.4.0.286950370994.issue19516@psf.upfronthosting.co.za> Message-ID: <1383796180.36.0.395355690989.issue19516@psf.upfronthosting.co.za> Tim Peters added the comment: Betting this is a duplicate of: http://bugs.python.org/issue18458 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 04:51:08 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 07 Nov 2013 03:51:08 +0000 Subject: [issue19516] segmentation fault using a dict as a key In-Reply-To: <1383791454.4.0.286950370994.issue19516@psf.upfronthosting.co.za> Message-ID: <1383796268.41.0.294219233128.issue19516@psf.upfronthosting.co.za> Ned Deily added the comment: It is a duplicate. Fixed in 3.3.3 and 2.7.6. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 04:52:35 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 07 Nov 2013 03:52:35 +0000 Subject: [issue19516] segmentation fault using a dict as a key In-Reply-To: <1383791454.4.0.286950370994.issue19516@psf.upfronthosting.co.za> Message-ID: <1383796355.33.0.82926742379.issue19516@psf.upfronthosting.co.za> Ned Deily added the comment: P.S. See that issue for a workaround. Also release candidate installers for 3.3.3 and 2.7.6 are now available with final releases very soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 06:35:32 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Thu, 07 Nov 2013 05:35:32 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383802532.01.0.222349652842.issue19514@psf.upfronthosting.co.za> Changes by Andrei Dorian Duma : ---------- nosy: +andrei.duma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 08:47:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 07:47:43 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383810463.51.0.308269677439.issue19514@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I forgot: _Py_IDENTIFIER(__delitem__): Objects/typeobject.c:5132 _Py_IDENTIFIER(__delitem__): Objects/typeobject.c:5183 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 08:48:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 07:48:14 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383810494.23.0.617620604008.issue19515@psf.upfronthosting.co.za> STINNER Victor added the comment: > _Py_IDENTIFIER(__delitem__): Objects/typeobject.c:5132 > _Py_IDENTIFIER(__delitem__): Objects/typeobject.c:5183 I moved this one to #19514. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 09:05:50 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Thu, 07 Nov 2013 08:05:50 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383811550.99.0.612078885356.issue19514@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I'll provide a patch later tonight. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 09:06:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 08:06:11 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383811571.65.0.650784389462.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: Results on Windows 7. Common platform: Python unicode implementation: PEP 393 Timer info: namespace(adjustable=False, implementation='QueryPerformanceCounter( )', monotonic=True, resolution=1e-08) Timer: time.perf_counter Platform: Windows-7-6.1.7601-SP1 CFLAGS: None Bits: int=32, long=32, long long=64, size_t=32, void*=32 Platform of campaign pyaccu: Date: 2013-11-07 08:55:58 Python version: 3.4.0a3+ (default, Nov 7 2013, 08:55:41) [MSC v.1600 32 bit (Int el)] Timer precision: 4.59 us SCM: hg revision=97675195997e branch=default date="2013-10-11 23:50 +0200" Platform of campaign writer: Date: 2013-11-07 08:55:12 Python version: 3.4.0a3+ (default, Nov 7 2013, 08:53:13) [MSC v.1600 32 bit (Int el)] Timer precision: 4.55 us SCM: hg revision=97675195997e+ branch=default date="2013-10-11 23:50 +0200" -----------------------------+-------------+--------------- Tests??????????????????????? | ?????pyaccu | ????????writer -----------------------------+-------------+--------------- list("a")??????????????????? | ?713 ns (*) | ?588 ns (-17%) list("abc")????????????????? | ?984 ns (*) | ?844 ns (-14%) ["a"]*(100)????????????????? | ??12 us (*) | ?9.3 us (-23%) ["abc"]*(100)??????????????? | 12.6 us (*) | 10.3 us (-18%) ["a" * 100]*(100)??????????? | 38.7 us (*) | ???????39.1 us ["a"]*(10**6)??????????????? | ?111 ms (*) | 91.2 ms (-18%) ["abc"]*(10**6)????????????? | ?120 ms (*) | ?103 ms (-14%) ["a" * 100]*(10**5)????????? | 51.9 ms (*) | 58.8 ms (+13%) list(range(10**6))?????????? | ?165 ms (*) | ??152 ms (-8%) list(map(str, range(10**6))) | ?139 ms (*) | ?124 ms (-11%) -----------------------------+-------------+--------------- Total??????????????????????? | ?588 ms (*) | ?530 ms (-10%) -----------------------------+-------------+--------------- The following test is probably worse because of the bad performances of realloc() on Windows: ["a" * 100]*(10**5) | 51.9 ms (*) | 58.8 ms (+13%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 09:10:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 08:10:44 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383811844.24.0.137620728341.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: I tried different overallocator factors: * writer (current factor): 25% (1/4) * writer50: 50% (1/2) * writer100: 100% (double the buffer) -----------------------------+-------------+----------------+--------------- Tests??????????????????????? | ?????writer | ??????writer50 | ?????writer100 -----------------------------+-------------+----------------+--------------- list("a")??????????????????? | ?588 ns (*) | ????????571 ns | ??640 ns (+9%) list("abc")????????????????? | ?844 ns (*) | ????????842 ns | ????????806 ns ["a"]*(100)????????????????? | ?9.3 us (*) | ???????9.13 us | ???????9.31 us ["abc"]*(100)??????????????? | 10.3 us (*) | ???????10.1 us | ???????9.86 us ["a" * 100]*(100)??????????? | 39.1 us (*) | ???????38.4 us | ???????38.3 us ["a"]*(10**6)??????????????? | 91.2 ms (*) | ???????88.4 ms | ???????91.8 ms ["abc"]*(10**6)????????????? | ?103 ms (*) | ???????99.7 ms | ?95.6 ms (-8%) ["a" * 100]*(10**5)????????? | 58.8 ms (*) | 49.4 ms (-16%) | 46.7 ms (-21%) list(range(10**6))?????????? | ?152 ms (*) | ??144 ms (-5%) | ??142 ms (-7%) list(map(str, range(10**6))) | ?124 ms (*) | ??112 ms (-9%) | ??114 ms (-8%) -----------------------------+-------------+----------------+--------------- Total??????????????????????? | ?530 ms (*) | ??494 ms (-7%) | ??490 ms (-8%) -----------------------------+-------------+----------------+--------------- The best factor looks to be 50%. With a factor lower than 25%, performances are worse : * writer: 25% (1/4) * writer12: 12.5% (1/8) -----------------------------+-------------+--------------- Tests??????????????????????? | ?????writer | ??????writer12 -----------------------------+-------------+--------------- list("a")??????????????????? | ?588 ns (*) | ????????565 ns list("abc")????????????????? | ?844 ns (*) | ????????814 ns ["a"]*(100)????????????????? | ?9.3 us (*) | ????????9.5 us ["abc"]*(100)??????????????? | 10.3 us (*) | ???????10.8 us ["a" * 100]*(100)??????????? | 39.1 us (*) | ?42.4 us (+8%) ["a"]*(10**6)??????????????? | 91.2 ms (*) | ???96 ms (+5%) ["abc"]*(10**6)????????????? | ?103 ms (*) | ??112 ms (+8%) ["a" * 100]*(10**5)????????? | 58.8 ms (*) | 78.5 ms (+33%) list(range(10**6))?????????? | ?152 ms (*) | ??160 ms (+5%) list(map(str, range(10**6))) | ?124 ms (*) | ?137 ms (+10%) -----------------------------+-------------+--------------- Total??????????????????????? | ?530 ms (*) | ?583 ms (+10%) -----------------------------+-------------+--------------- PyAccu vs PyUnicodeWriter (overallocate 50%): -----------------------------+-------------+--------------- Tests??????????????????????? | ?????pyaccu | ??????writer50 -----------------------------+-------------+--------------- list("a")??????????????????? | ?713 ns (*) | ?571 ns (-20%) list("abc")????????????????? | ?984 ns (*) | ?842 ns (-14%) ["a"]*(100)????????????????? | ??12 us (*) | 9.13 us (-24%) ["abc"]*(100)??????????????? | 12.6 us (*) | 10.1 us (-20%) ["a" * 100]*(100)??????????? | 38.7 us (*) | ???????38.4 us ["a"]*(10**6)??????????????? | ?111 ms (*) | 88.4 ms (-21%) ["abc"]*(10**6)????????????? | ?120 ms (*) | 99.7 ms (-17%) ["a" * 100]*(10**5)????????? | 51.9 ms (*) | ???????49.4 ms list(range(10**6))?????????? | ?165 ms (*) | ?144 ms (-13%) list(map(str, range(10**6))) | ?139 ms (*) | ?112 ms (-19%) -----------------------------+-------------+--------------- Total??????????????????????? | ?588 ms (*) | ?494 ms (-16%) -----------------------------+-------------+--------------- So using 50%, PyUnicodeWriter is always faster on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 09:13:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 08:13:35 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383812015.4.0.24954372889.issue19513@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You shouldn't cache Py_SIZE(v) because it can be changed during iteration. Due to benchmark results in issue15381 I afraid this patch will be much slower on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 09:13:53 2013 From: report at bugs.python.org (Seydou Dia) Date: Thu, 07 Nov 2013 08:13:53 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383812033.44.0.943407833059.issue19514@psf.upfronthosting.co.za> Changes by Seydou Dia : ---------- nosy: +seydou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 09:15:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 08:15:43 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383812143.77.0.700067137563.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: > You shouldn't cache Py_SIZE(v) because it can be changed during iteration. Oops, I fixed the code on my PC, but I generated the patch before fixing this issue. I agree that Py_SIZE(v) should not be cached. > Due to benchmark results in issue15381 I afraid this patch will be much slower on Windows. See my results on Windows 7 below, the benchmark is faster is most cases. PyUnicodeWriter is always faster than PyAccu if I change the overallocation factor to 50%. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 09:37:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 08:37:47 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383813467.17.0.780410038063.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, writer.min_length was not computed correctly :-/ The separator length is 2 characters (", "), not 1. ---------- Added file: http://bugs.python.org/file32522/list_repr_writer-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 09:47:42 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 08:47:42 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383814062.87.0.870047377007.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: writer_overallocate_factor.patch: patch for change the overallocation factor from 25% to 50% on Windows. See also issues #14716 and #14744 which contains various benchmarks on string formatting functions. ---------- Added file: http://bugs.python.org/file32523/writer_overallocate_factor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 10:05:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 07 Nov 2013 09:05:01 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383815101.9.0.187283159821.issue19513@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Please open a separate issue for the overallocation factor patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 10:07:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 09:07:05 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1383815225.63.0.353788640747.issue19513@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about longer elements (10**3 or 10**6 characters)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 10:18:57 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 07 Nov 2013 09:18:57 +0000 Subject: [issue8799] Hang in lib/test/test_threading.py In-Reply-To: <1274694258.02.0.421667436928.issue8799@psf.upfronthosting.co.za> Message-ID: <1383815937.46.0.548925140197.issue8799@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ah, here we are some 18 months later. Let me have another go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 10:19:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 09:19:06 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383815946.74.0.807893460299.issue19512@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > What is the problem with these changes? Usually CPython team avoids code churn without serious reasons. Performance reasons for the change PySys_GetObject("stdout") to _PySys_GetObjectId(&_PyId_stdout) are ridiculous. You changed hundreds lines of code for speed up interactive mode by perhaps several microseconds. > Errors become more unlikely because objects are only initialized once, near startup. So it put also less pressure on code handling errors :) (it is usually the least tested part of the code) If there are bugs in code handling errors, they should be fixed in maintenance releases too. > You mean for PyRun_InteractiveOneObject()? Oh, it can be made private, but what is the problem of adding yet another PyRun_Interactive*() function? There are already a lot of them :-) And this is a problem. Newly added function is not even documented. > I also worked hard to support unencodable filenames: using char*, you cannot support arbitrary Unicode filename on Windows. That's why a added many various functions with "Object" suffix. Some examples: PyWarn_ExplicitObject(), PyParser_ParseStringObject(), PyImport_AddModuleObject(), etc. "One bug per bug report" as Martin says. > Another problem is that PyUnicode_FromString() failure is not handled correctly in some cases. PyUnicode_FromString() can fail because an decoder error, but also because of a MemoryError. It can't fail on "stdout" because an decoder error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 10:42:50 2013 From: report at bugs.python.org (Yury V. Zaytsev) Date: Thu, 07 Nov 2013 09:42:50 +0000 Subject: [issue19517] sysconfig variables introduced by PEP-3149 are currently undocumented Message-ID: <1383817370.06.0.832101604134.issue19517@psf.upfronthosting.co.za> New submission from Yury V. Zaytsev: PEP-3149 (issue9193) introduces new variables (SO and SOABI) so that one can find out what are the supported extension suffixes. Quote from the PEP: >>> sysconfig.get_config_var('SO') '.cpython-32mu.so' >>> sysconfig.get_config_var('SOABI') 'cpython-32mu' Later, in issue16754, doko introduced EXT_SUFFIX & SHLIB_SUFFIX and planned to update the PEP, but this didn't happen. This caused discrepancy in the news (issue11234), and the news item was fixed: http://docs.python.org/3.4/whatsnew/3.2.html?highlight=soabi >>> sysconfig.get_config_var('SOABI') # find the version tag 'cpython-32mu' >>> sysconfig.get_config_var('EXT_SUFFIX') # find the full filename extension '.cpython-32mu.so' However, the PEP is still not up-to-date and is in conflict with the implementation. In an IRC discussion with Barry he suggested that PEPs shouldn't be considered documentation, so updating the PEP is not the right way to go. My proposal is then to document the intent behind SO, SOABI, EXT_SUFFIX & SHLIB_SUFFIX on the sysconfig documentation page and mention that they are platform-specific, and maybe add a link to this page to the PEP. As of now, I find the situation highly confusing... Any opinions or suggestions please? Thanks, Z. ---------- assignee: docs at python components: Documentation messages: 202321 nosy: barry, docs at python, doko, zaytsev priority: normal severity: normal status: open title: sysconfig variables introduced by PEP-3149 are currently undocumented type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 11:17:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 10:17:18 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1383819438.5.0.827661663911.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: I added recently a new _PyUnicode_CompareWithId() function: changeset 77bebcf5c4cf (issue #19512). This function can be used instead of PyUnicode_CompareWithASCIIString() when the right parameter is a common string. It is interesting when the right string is probably present in a dictionary. For example, "path" is always present as "sys.path". So interning the string doesn't eat more memory. _PyUnicode_CompareWithId() would be more efficient with compare_hash-3.patch. The function is not used yet in critical path. It is now used in type_new() for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 11:30:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 10:30:08 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1383820208.13.0.0874325426816.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy, Gregory, Raymond, Antoine: so what is your feeling on this issue? Is it worth it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 11:35:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 10:35:40 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383815946.74.0.807893460299.issue19512@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: >> Another problem is that PyUnicode_FromString() failure is not handled correctly in some cases. PyUnicode_FromString() can fail because an decoder error, but also because of a MemoryError. > It can't fail on "stdout" because an decoder error. It can fail on "stdout" because of a memory allocation failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 12:39:47 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 07 Nov 2013 11:39:47 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383824387.41.0.286030400738.issue19512@psf.upfronthosting.co.za> Georg Brandl added the comment: >> You mean for PyRun_InteractiveOneObject()? Oh, it can be made private, but what is the problem of adding yet another PyRun_Interactive*() function? There are already a lot of them :-) > And this is a problem. Newly added function is not even documented. Serhiy is right. You have to be responsible with the Py* namespace, and keep new functions private unless they are useful enough to the outside and you document them. In general, you changed lots of code without a single review. Can you slow down a bit? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 12:48:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 11:48:00 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename Message-ID: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> New submission from STINNER Victor: The changeset af822a6c9faf of the issue #19512 added the function PyRun_InteractiveOneObject(). By the way, I forgot to document this function. This issue is also a reminder for that. The purpose of the new function is to avoid creation of temporary Unicode strings and useless call to Unicode encoder/decoder. I propose to generalize the change to other PyRun_xxx() functions. Attached patch adds the following functions: - PyRun_AnyFileObject() - PyRun_SimpleFileObject() - PyRun_InteractiveLoopObject() - PyRun_FileObject() On Windows, these changes should allow to pass an unencodable filename on the command line (ex: japanese script name on an english setup). TODO: I should document all these new functions. ---------- files: pyrun_object.patch keywords: patch messages: 202326 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Add new PyRun_xxx() functions to not encode the filename versions: Python 3.4 Added file: http://bugs.python.org/file32524/pyrun_object.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:06:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 12:06:10 +0000 Subject: [issue18162] Add index attribute to IndexError In-Reply-To: <1370638259.99.0.240698145167.issue18162@psf.upfronthosting.co.za> Message-ID: <1383825970.73.0.484655430191.issue18162@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue1534607. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:23:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 07 Nov 2013 12:23:12 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1383751048.58.0.892493895597.issue17823@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: After thinking about this some more, perhaps a -3 warning in 2.7 would be a better solution? That would be more robust, as it could complain any time unicode.encode produced unicode and str.decode produced str and point users to the codecs module level functions as a forward compatible alternative. Producing Py3k warnings when calling unicode.decode and str.encode under -3 would also be appropriate (although those warnings may already exist). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:30:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 12:30:46 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383827446.05.0.696464573624.issue19518@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Interpreter Core stage: -> test needed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:32:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 12:32:41 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383827561.54.0.303353586467.issue19518@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > On Windows, these changes should allow to pass an unencodable filename on the command line (ex: japanese script name on an english setup). Doesn't the surrogateescape error handler solve this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:34:26 2013 From: report at bugs.python.org (Ian Cordasco) Date: Thu, 07 Nov 2013 12:34:26 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383827666.12.0.814798826905.issue19514@psf.upfronthosting.co.za> Changes by Ian Cordasco : ---------- nosy: +icordasc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:37:06 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 07 Nov 2013 12:37:06 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1383827826.46.0.34967491033.issue17823@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:40:50 2013 From: report at bugs.python.org (Sunny K) Date: Thu, 07 Nov 2013 12:40:50 +0000 Subject: [issue1820] Enhance Object/structseq.c to match namedtuple and tuple api In-Reply-To: <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za> Message-ID: <1383828050.29.0.384870861534.issue1820@psf.upfronthosting.co.za> Sunny K added the comment: New patch for 3.4 adds the following: 1. _fields 2. _replace() 3. _asdict() 4. eval(repr(s)) == s Now the issues: 1. _asdict() returns a normal dictionary. I don't know if this is what is required. 2. Both _asdict() and _replace() assume that unnamed visible fields are at the end of the visible sequence. A comment at the beginning says they are allowed for indices < n_visible_fields. Is there another way to map members to values? Because tp->members is (visible named fields + invisible named fields) whereas values array is (visible named fields + visible unnamed fields + invisible named fields) 3. The mismatch mentioned above is present in the current implementation of repr: In os.stat_result, the last three visible fields are unnamed (i.e integer a_time, m_time and c_time). However they are present in the repr output with keys which are the first three keys from the invisible part(float a_time, m_time and c_time). Was this intentional? Also, the above logic causes duplicate keys when invisible fields are included in the repr output as per issue11629. In my patch for that issue, i put invisible fields under the 'dict' keyword argument. This output format utilises code already present in structseq_new and makes eval work as expected when invisible fields are present in repr. Also, it sidesteps the question of duplicated keys because they are present inside a dict. 4. Raymond stated that _fields should contain only the visible positional fields. So _fields of os.stat_result contains only 7 fields because of the three unnamed fields. Is this the expected implementation? 5. Is there a way to declare a member function in C that accepts only keyword arguments(like _replace())? I could not find one. This is my first real C patch. So some of the issues might just be a lack of understanding. Apologies. ---------- keywords: +patch nosy: +sunfinite Added file: http://bugs.python.org/file32525/structseq_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:40:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 12:40:55 +0000 Subject: [issue19519] Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8 Message-ID: <1383828055.35.0.303135915018.issue19519@psf.upfronthosting.co.za> New submission from STINNER Victor: Python parser (Parser/tokenizer.c) has a translate_into_utf8() function to decode a string from the input encoding and encode it to UTF-8. This function is unnecessary if the input string is already encoded to UTF-8, which is something common nowadays. Linux, Mac OS X and many other operating systems are now using UTF-8 as the default locale encoding, UTF-8 is the default encoding for Python scripts, etc. compile(), eval() and exec() functions pass UTF-8 encoded strings to the parser. Attached patch adds an input_is_utf8 flag to the tokenizer to skip translate_into_utf8() if the input string is already encoded to UTF-8. ---------- files: input_is_utf8.patch keywords: patch messages: 202331 nosy: benjamin.peterson, haypo, serhiy.storchaka priority: normal severity: normal status: open title: Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8 type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32526/input_is_utf8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:42:36 2013 From: report at bugs.python.org (Sunny K) Date: Thu, 07 Nov 2013 12:42:36 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1383828156.45.0.409079079446.issue11698@psf.upfronthosting.co.za> Changes by Sunny K : Removed file: http://bugs.python.org/file32265/structseq.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:43:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 12:43:31 +0000 Subject: [issue19519] Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8 In-Reply-To: <1383828055.35.0.303135915018.issue19519@psf.upfronthosting.co.za> Message-ID: <1383828211.8.0.787871251657.issue19519@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file32526/input_is_utf8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:45:28 2013 From: report at bugs.python.org (Sunny K) Date: Thu, 07 Nov 2013 12:45:28 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1383828328.24.0.17208407036.issue11698@psf.upfronthosting.co.za> Sunny K added the comment: The previous patch had a wrong mapping between keys and values. The current implementation of repr means that duplicated keys will be present when invisible fields are included. See points 2 and 3 in http://bugs.python.org/issue1820#msg202330 for more explanation. I have sidestepped that issue by placing invisible fields under the dict argument. This also plays well with the current code in structseq_new and eval(repr(obj)) works. The output with the patch is: $./python -c "import os; print(os.stat('LICENSE'))" os.stat_result(st_mode=33188, st_ino=577299, st_dev=64512, st_nlink=1, st_uid=33616, st_gid=600, st_size=12749, st_atime=1382696747, st_mtime=1382361968, st_ctime=1382361968, dict={'st_atime':1382696747.0, 'st_mtime':1382361968.0, 'st_ctime':1382361968.0, 'st_atime_ns':1382696747000000000, 'st_mtime_ns':1382361968000000000, 'st_ctime_ns':1382361968000000000, 'st_blksize':4096, 'st_blocks':32, 'st_rdev':0}) ---------- Added file: http://bugs.python.org/file32527/structseq_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:49:00 2013 From: report at bugs.python.org (Sunny K) Date: Thu, 07 Nov 2013 12:49:00 +0000 Subject: [issue1820] Enhance Object/structseq.c to match namedtuple and tuple api In-Reply-To: <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za> Message-ID: <1383828540.15.0.453230478815.issue1820@psf.upfronthosting.co.za> Sunny K added the comment: Oops, the correct issue for improving the repr is issue11698. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:56:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 12:56:52 +0000 Subject: [issue19519] Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8 In-Reply-To: <1383828055.35.0.303135915018.issue19519@psf.upfronthosting.co.za> Message-ID: <1383829012.7.0.694719459058.issue19519@psf.upfronthosting.co.za> STINNER Victor added the comment: The patch has an issue, importing test.bad_coding2 (UTF-8 with a BOM) does not raise a SyntaxError anymore. ---------- Added file: http://bugs.python.org/file32528/input_is_utf8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:58:04 2013 From: report at bugs.python.org (Yuri Bochkarev) Date: Thu, 07 Nov 2013 12:58:04 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1383829084.41.0.45431550868.issue8844@psf.upfronthosting.co.za> Changes by Yuri Bochkarev : ---------- nosy: +Yuri.Bochkarev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 13:59:22 2013 From: report at bugs.python.org (Yuri Bochkarev) Date: Thu, 07 Nov 2013 12:59:22 +0000 Subject: [issue9634] Add timeout parameter to Queue.join() In-Reply-To: <1282153581.83.0.092560551276.issue9634@psf.upfronthosting.co.za> Message-ID: <1383829162.7.0.411505888344.issue9634@psf.upfronthosting.co.za> Changes by Yuri Bochkarev : ---------- nosy: +Yuri.Bochkarev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 14:01:02 2013 From: report at bugs.python.org (Yuri Bochkarev) Date: Thu, 07 Nov 2013 13:01:02 +0000 Subject: [issue1175] .readline() has bug WRT nonblocking files In-Reply-To: <1190111854.34.0.00279281221972.issue1175@psf.upfronthosting.co.za> Message-ID: <1383829262.46.0.142264069458.issue1175@psf.upfronthosting.co.za> Changes by Yuri Bochkarev : ---------- nosy: +Yuri.Bochkarev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 14:01:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 13:01:19 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383827561.54.0.303353586467.issue19518@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/11/7 Serhiy Storchaka : >> On Windows, these changes should allow to pass an unencodable filename on the command line (ex: japanese script name on an english setup). > > Doesn't the surrogateescape error handler solve this issue? surrogateescape is very specific to UNIX, or more generally systems using bytes filenames. Windows native type for filename is Unicode. To support any Unicode filename on Windows, you must never encode a filename. surrogateescape avoids decoding errors, here is the problem is an encoding error. For example, "ab?" cannot be encoded to ASCII. "ab?".encode("ascii", "surrogateescape") doesn't help here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 14:02:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 13:02:54 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383829374.36.0.764276881913.issue19518@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 14:03:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 13:03:50 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383829430.65.0.905319113158.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: > Serhiy is right. You have to be responsible with the Py* namespace, and keep new functions private unless they are useful enough to the outside and you document them. I created the issue #19518 to discuss this part (but also to propose other enhancements related to Unicode). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 14:10:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 13:10:30 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383829830.77.0.0277465498254.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Errors become more unlikely because objects are only initialized once, near startup. So it put also less pressure on code handling errors :) (it is usually the least tested part of the code) > If there are bugs in code handling errors, they should be fixed in maintenance releases too. Well, using identifiers doesn't solve directly all issues. For example, _PyDict_GetItemId() should be replaced with _PyDict_GetItemIdWithError() to be complelty safe. It just reduces the probability of bugs. Using identifiers might add regressions for a minor gain (handling MemoryError better). As I did for issues #18048 and #19437 (related to issues found by failmalloc), I prefer to not backport such minor bugfixes to not risk a regression. > You changed hundreds lines of code for speed up interactive mode by perhaps several microseconds. Again, performance is not the main motivation, please read again msg202293. Or maybe you disagree with this message? Sorry, I didn't explain my changes in first messages of this issue. I created the issue to group my changesets to an issue, to explain why I did them. I didn't expect any discussion :-) But thank you for all your remarks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 14:31:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 13:31:46 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383831106.62.0.998190738934.issue19518@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added some comments on Rietveld. Please do not commit without documentation and tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 14:48:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 13:48:31 +0000 Subject: [issue19519] Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8 In-Reply-To: <1383828055.35.0.303135915018.issue19519@psf.upfronthosting.co.za> Message-ID: <1383832111.38.0.889875651063.issue19519@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The parser should check that the input is actually valid UTF-8 data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 15:03:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 14:03:11 +0000 Subject: [issue19519] Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8 In-Reply-To: <1383832111.38.0.889875651063.issue19519@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > The parser should check that the input is actually valid UTF-8 data. Ah yes, correct. It looks like input data is still checked for valid UTF-8 data. I suppose that the byte strings should be decoded from UTF-8 because Python 3 manipulates Unicode strings, not byte strings. The patch only skips calls to translate_into_utf8(str, tok->encoding), calls to translate_into_utf8(str, tok->enc) are unchanged (notice: encoding != enc :-)). But it looks like translate_into_utf8(str, tok->enc) is not called if tok->enc is NULL. If tok->encoding is "utf-8" and tok->enc is NULL, maybe the input string is not decoded from UTF-8. But it sounds strange, because Python uses Unicode strings. Don't trust me, I would prefer an explanation of Benjamin who knows better than me the parser internals :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:17:59 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 07 Nov 2013 15:17:59 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1383837479.5.0.249681947163.issue1294959@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Is this issue still relevant? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:35:24 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 07 Nov 2013 15:35:24 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1383838524.8.0.748757789826.issue11245@psf.upfronthosting.co.za> R. David Murray added the comment: What do you mean by the whole test routine failing? The test suite is currently passing on the buildbots, so are you speaking of the new test you are trying to write? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:40:04 2013 From: report at bugs.python.org (jan matejek) Date: Thu, 07 Nov 2013 15:40:04 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1383838804.74.0.419435874456.issue1294959@psf.upfronthosting.co.za> jan matejek added the comment: Yes. We still have a patch for two things: 1. fix setup.py script to look for libraries in correct (lib64) prefixes, and 2. fix values returned from sysconfig, to reflect that python resides in lib64 "$prefix/lib" is hardcoded in many places. Lib64 is probably not going away anytime soon, so it would be nice if this was solved once and for all ;) The good thing is that with sysconfig, we don't have to do much beyond teaching sysconfig about the right values. To reiterate, our current solution is to introduce "sys.lib" (and "sys.arch", but that is never used anymore) that is either "lib" or "lib64", and use this in place of the string "lib" wherever appropriate. We find the value for sys.lib through configure magic. ---------- Added file: http://bugs.python.org/file32529/Python-3.3.0b2-multilib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:41:52 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 07 Nov 2013 15:41:52 +0000 Subject: [issue19520] Win32 compiler warning in _sha3 Message-ID: <1383838912.21.0.108258927136.issue19520@psf.upfronthosting.co.za> New submission from Zachary Ware: There is only one remaining compiler warning on 32-bit Windows, see [1] (buildbot doubles warning counts on the Windows bots). The warning is coming from Modules/_sha3/keccak/KeccakF-1600-opt32.c#l497, which uses extractLanes as defined on line 213. The attached patch fixes the compiler warning, doesn't add any new ones, compiles, and doesn't break anything obvious. I don't know enough about it to be confident in whether this is the right fix, so I'll leave it up to you, Christian :) Thanks, Zach [1] http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/1682/steps/compile/logs/warnings%20%282%29 ---------- components: Build, Windows files: sha3_compile_warning.diff keywords: patch messages: 202344 nosy: christian.heimes, zach.ware priority: normal severity: normal stage: needs patch status: open title: Win32 compiler warning in _sha3 type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32530/sha3_compile_warning.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:42:58 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 07 Nov 2013 15:42:58 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1383838978.64.0.65643677729.issue11245@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. Looking at this again, it appears as though there's no way to interrupt IDLE if you want to, say, send an email. If you are actually using this in code, how are you handling that situation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:44:39 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 07 Nov 2013 15:44:39 +0000 Subject: [issue19519] Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8 In-Reply-To: <1383828055.35.0.303135915018.issue19519@psf.upfronthosting.co.za> Message-ID: <1383839079.21.0.924978731001.issue19519@psf.upfronthosting.co.za> Martin v. L?wis added the comment: tok->enc and tok->encoding should always have the same value, except that tok->enc gets set earlier. tok->enc is used when parsing from strings, to remember what codec to use. For file based parsing, the codec object created knows what encoding to use; for string-based parsing, tok->enc stores the encoding. If the code is to be simplified, unifying the cases of string-based parsing and file-based parsing might be a worthwhile goal. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:51:25 2013 From: report at bugs.python.org (fhahn) Date: Thu, 07 Nov 2013 15:51:25 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383839485.96.0.89310053938.issue19514@psf.upfronthosting.co.za> fhahn added the comment: I've merged the _Py_IDENTIFIER identifiers mentioned above. I stumbled over anohter instance where _Py_IDENTIFIER is used more than once: _Py_IDENTIFIER(__setitem__) : Objects/typeobject.c#l5133 _Py_IDENTIFIER(__setitem__) : Objects/typeobject.c#l5184 ---------- keywords: +patch nosy: +fhahn Added file: http://bugs.python.org/file32531/patch_19514.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:52:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 07 Nov 2013 15:52:06 +0000 Subject: [issue19520] Win32 compiler warning in _sha3 In-Reply-To: <1383838912.21.0.108258927136.issue19520@psf.upfronthosting.co.za> Message-ID: <1383839526.23.0.103366774498.issue19520@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! I'll look into it. I'd rather not change the reference implementation but in this case practicality beats purity. :) ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:52:42 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 07 Nov 2013 15:52:42 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383839562.55.0.063202031925.issue19514@psf.upfronthosting.co.za> Martin v. L?wis added the comment: As a matter of style, I suggest that all identifiers are moved to the top of a file if some of them live there. IOW, it's (IMO) unstylish to have some at the top, and some in the middle (although this works perfectly fine, of course). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:53:22 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 07 Nov 2013 15:53:22 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383839602.5.0.287975004031.issue19514@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Another matter of style: I suggest alphabetical order for the identifiers, at least when the list gets long. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:53:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 07 Nov 2013 15:53:52 +0000 Subject: [issue18985] Improve the documentation in fcntl module In-Reply-To: <1378722919.93.0.901392318122.issue18985@psf.upfronthosting.co.za> Message-ID: <3dFq0c0cp1zR3q@mail.python.org> Roundup Robot added the comment: New changeset 0e0dded5d616 by R David Murray in branch '3.3': #18985: Improve fcntl documentation. http://hg.python.org/cpython/rev/0e0dded5d616 New changeset ddf6da99b3cd by R David Murray in branch 'default': Merge #18985: Improve fcntl documentation. http://hg.python.org/cpython/rev/ddf6da99b3cd New changeset 645aa4f44aa4 by R David Murray in branch '2.7': backport #18985: Improve fcntl documentation. http://hg.python.org/cpython/rev/645aa4f44aa4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:54:34 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Thu, 07 Nov 2013 15:54:34 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383839674.67.0.409550162409.issue19514@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: The patch I promised above. ---------- Added file: http://bugs.python.org/file32532/merge_py_identifiers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:54:48 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 07 Nov 2013 15:54:48 +0000 Subject: [issue18985] Improve the documentation in fcntl module In-Reply-To: <1378722919.93.0.901392318122.issue18985@psf.upfronthosting.co.za> Message-ID: <1383839688.0.0.825605417713.issue18985@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Vajrasky (and Victor :) ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:56:17 2013 From: report at bugs.python.org (Matthias Klose) Date: Thu, 07 Nov 2013 15:56:17 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1383839777.52.0.367648220743.issue1294959@psf.upfronthosting.co.za> Matthias Klose added the comment: the patch in msg202343 is wrong, hardcoding lib64 on Debian/Ubuntu. At least the configure check should check for lib64 as a directory and not a symlink, and only then default to lib64. two other issues with the patch: - I would like to see any new OS-dependent locations in the sysconfig module, not the sys module. - Please don't depend on uname for the autoconf check, but on the gnu host triplet. - Please don't add another `arch' attribute to sys. We already have enough of these in sysconfig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 16:59:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 15:59:28 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383839968.79.0.119858821088.issue19515@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +andrei.duma, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:01:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 16:01:38 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383840098.58.0.194615327375.issue19515@psf.upfronthosting.co.za> STINNER Victor added the comment: If most identifiers are stored in the same place, it would become possible to have a "cleanup" function to clear all identifiers. Such function could be called at Python shutdown to release as much memory as possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:01:58 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Thu, 07 Nov 2013 16:01:58 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383840118.09.0.620289876533.issue19514@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I added a new patch with sorted _Py_IDENTIFIERs. Regarding all identifiers at the top, I guess it might be more stylish, but it might affect performance. I'm not sure, though. ---------- Added file: http://bugs.python.org/file32533/merge_py_identifiers_sorted.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:04:54 2013 From: report at bugs.python.org (Michael Haubenwallner) Date: Thu, 07 Nov 2013 16:04:54 +0000 Subject: [issue19521] parallel build race condition on AIX since python-3.2 Message-ID: <1383840294.95.0.0890053719997.issue19521@psf.upfronthosting.co.za> New submission from Michael Haubenwallner: Since python-3.2, there is a race condition building in parallel on AIX: Consider these Makefile(.pre.in) rules: $(BUILDPYTHON): ... $(LINKCC) ... $(LINKFORSHARED) ... Modules/_testembed: ... $(LINKCC) ... $(LINKFORSHARED) ... Modules/_freeze_importlib: ... $(LINKCC) ... On AIX, the variables get these values: LINKCC = $(srcdir)/Modules/makexp_aix Modules/python.exp ... LINKFORSHARED = -Wl,-bE:Modules/python.exp ... Now $(BUILDPYTHON) and Modules/_testembed may run in parallel, causing Modules/python.exp to be created by two instances of makexp_aix eventually running at the same time. Attached patch fixes this problem for cpython tip (doubt supporting AIX 4.1 and earlier still is necessary). Thank you! ---------- components: Build files: python-tip-aix-parallel.patch keywords: patch messages: 202357 nosy: haubi priority: normal severity: normal status: open title: parallel build race condition on AIX since python-3.2 versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file32534/python-tip-aix-parallel.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:05:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 16:05:39 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383840118.09.0.620289876533.issue19514@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: merge_py_identifiers_sorted.patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:05:54 2013 From: report at bugs.python.org (jan matejek) Date: Thu, 07 Nov 2013 16:05:54 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. In-Reply-To: <1383839777.52.0.367648220743.issue1294959@psf.upfronthosting.co.za> Message-ID: <527BBA5D.709@suse.cz> jan matejek added the comment: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dne 7.11.2013 16:56, Matthias Klose napsal(a): > > Matthias Klose added the comment: > > the patch in msg202343 is wrong, hardcoding lib64 on Debian/Ubuntu. This patch is provided for reference only - it works for us at SUSE. I'll be happy to spend some time improving it for general usage, if this has any chance of being commited. > At least the configure check should check for lib64 as a directory and not > a symlink, and only then default to lib64. Maybe this should be detected differently altogether. Perhaps by working with LIBDIR, which is known to configure? > > two other issues with the patch: > > - I would like to see any new OS-dependent locations in the sysconfig > module, not the sys module. how would you propose to put the value into sysconfig in the first place? It seems to rely heavily on existing attributes from sys. > > - Please don't depend on uname for the autoconf check, but on the gnu host > triplet. > > - Please don't add another `arch' attribute to sys. We already have enough > of these in sysconfig. We don't use this one anymore, and i'm not entirely sure that we ever did. I am happy to drop it. > > ---------- > > _______________________________________ Python tracker > > _______________________________________ > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSe7pdAAoJEIskb84DCy7LvwcP/2n74K2XDsRu7K6OV9S4SzDa v7vpDVhAgTBQlHglY+wavUQU2WLBlGyVEk2xHDV8WdI4zU7rAbn7XAW5URxznctq t/Ptvt0IsDAqONrF8ezg8/eTUkcP3nV2Hk90RNe0gliDH6uc0wekKUZzVaTObO1L 3vM8XfEtTQstmK1VxQVpYolUPZm8n7Fe8NEPA6A8bu8CU736cg+wWdbDrr6Mjowo OuO4b56J1P3BIQkBcOLe3mH20Bv8O03P9iNADwYHUOayvgthFWCmoDzh0Y1dQa9/ ynT+G9BuYyXOli6Yr15W0L8OFU+nwxByK81lEClz6UonCvoStnEWnXIN3JYW15Yb rNwb5HKNmKB16yx/RuV3WCvlKbg6ziMlfWGW6qTA1g0P0ivU+sRVQXv5gI8NHcQ9 /4jmaUh7Dr1T4KHujI57Z99kLQHvSlHEM3v4aT96IZNaPghkA+e7TjhMdHmvYtQz YoY75FIy0xVStdXzw8zbM2LVlKp8vxncrjYbuzJYgG1jiYwmF6gDoztXRVP/zwei PypIiui4QaQc32V5dCwpQYpAvpgCVHm6sGSO0HbLWSUK71M8f1YU2BPwvglHb6jh N9tmYfmahvQSyIFOZdb4C6HLlzEezENdYYIf7oMW07z8SOOLU+8eKP13dp6NWINP HCSU34LLYTfwnQ+27aMk =raBO -----END PGP SIGNATURE----- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:25:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 07 Nov 2013 16:25:10 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383841510.87.0.0972713451822.issue19515@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What are you trying to achieve exactly? I don't think "sharing" identifier structs will gain anything significant. Please don't make the source code less readable in search for some mythical "efficiency". ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:35:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 07 Nov 2013 16:35:57 +0000 Subject: [issue19480] HTMLParser fails to handle some characters in the starttag In-Reply-To: <1383411472.4.0.242370272088.issue19480@psf.upfronthosting.co.za> Message-ID: <3dFqx855hsz7Ljj@mail.python.org> Roundup Robot added the comment: New changeset 695f988824bb by Ezio Melotti in branch '2.7': #19480: HTMLParser now accepts all valid start-tag names as defined by the HTML5 standard. http://hg.python.org/cpython/rev/695f988824bb New changeset 9b9d188ed549 by Ezio Melotti in branch '3.3': #19480: HTMLParser now accepts all valid start-tag names as defined by the HTML5 standard. http://hg.python.org/cpython/rev/9b9d188ed549 New changeset 7d8a37020db9 by Ezio Melotti in branch 'default': #19480: merge with 3.3. http://hg.python.org/cpython/rev/7d8a37020db9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:36:51 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 07 Nov 2013 16:36:51 +0000 Subject: [issue19480] HTMLParser fails to handle some characters in the starttag In-Reply-To: <1383411472.4.0.242370272088.issue19480@psf.upfronthosting.co.za> Message-ID: <1383842211.75.0.0991889596079.issue19480@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the feedback! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:43:58 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 07 Nov 2013 16:43:58 +0000 Subject: [issue15114] Deprecate strict mode of HTMLParser In-Reply-To: <1340185371.41.0.609283463083.issue15114@psf.upfronthosting.co.za> Message-ID: <1383842638.67.0.485774399.issue15114@psf.upfronthosting.co.za> Ezio Melotti added the comment: 3.4 is done. 3.5 strict arg removed and strict code removed HTMLParseError removed HTMLParser.error and calls to HTMLParser.error removed ---------- Added file: http://bugs.python.org/file32535/issue15114-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:44:28 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 07 Nov 2013 16:44:28 +0000 Subject: [issue11698] Improve repr for structseq objects to show named, but unindexed fields In-Reply-To: <1301264097.04.0.982421975108.issue11698@psf.upfronthosting.co.za> Message-ID: <1383842668.78.0.901961624732.issue11698@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: IMHO '*' could be used as a separator, since relation between indexable fields and named, unindexable fields is similar to relation between positional-or-keyword parameters and keyword-only parameters. $./python -c "import os; print(os.stat('LICENSE'))" os.stat_result(st_mode=33188, st_ino=577299, st_dev=64512, st_nlink=1, st_uid=33616, st_gid=600, st_size=12749, st_atime=1382696747, st_mtime=1382361968, st_ctime=1382361968, *, st_atime=1382696747.0, st_mtime=1382361968.0, st_ctime=1382361968.0, st_atime_ns=1382696747000000000, st_mtime_ns=1382361968000000000, st_ctime_ns=1382361968000000000, st_blksize=4096, st_blocks=32, st_rdev=0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:48:16 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 07 Nov 2013 16:48:16 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1383842896.32.0.818198026768.issue19512@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:48:24 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 07 Nov 2013 16:48:24 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383842904.41.0.1422458198.issue19518@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:51:09 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 07 Nov 2013 16:51:09 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. In-Reply-To: <527BBA5D.709@suse.cz> Message-ID: <20131107115106.59e4fbc8@anarchist> Barry A. Warsaw added the comment: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On Nov 07, 2013, at 04:05 PM, jan matejek wrote: >> - I would like to see any new OS-dependent locations in the sysconfig >> module, not the sys module. > >how would you propose to put the value into sysconfig in the first place? It >seems to rely heavily on existing attributes from sys. Actually, I think it mostly parses these values from the installed Makefile. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBCAAGBQJSe8T6AAoJEBJutWOnSwa/6oAQAJM3IksGydXk9CEp7rbSrHea DvYUccmyon1xrmu5RjWnz6ZbJdWlFwx8ouFpbzmZvfAF8E2m0HliNzW+/w28sik5 F37p5/7hScQ2x/AcmdnVrzDotMkvcvMILsCDIhSy/nPIWkI4hAuRGLdPJmgiE3HE b3hjQDCgsVDrp8arJioepx6xWSMpE1dQ/KsL6DDuNl3rUNVR1E1jTYEqY12+fOjc Mcgz6lVndyZreY958iQE/UR7MKoW5lcLnin44PtMYrizwWv82kgwhkqU5tubnTBD m9tD16uCz7xvATM5XI8nmXeLcLMSMfUdaG+4ny//cIjDKYIC6XXoZvCgE7iSEws1 pEIQCmrs6mpk6d83Yz/XDXc4OqjqC+tUPY1TGNqAI/nm416uoKUuO/f1eU397EV+ 2RqJqev8Ho8Sgk7skFJGwcCfTO4yDR40+0wm3u2BiM9bTcnGiJaC7z2TAp9eb4Qs jo/cmYi3BbqPu9Xx3P4oX11NHmjTPBUcZjqsJa8w8q3lf9r5haE5EqlLaNgDnGtL efu7OMom2yQHXdwIJ2efmefjoby812uNFSbTiMvDxZTVCCUyBczBT/Q7gu/4S9Ks Mv3oY1bkq6qAXKKOwzKoblzHJ6VW+A3Rn15Lh6Tb2kj1pTbdS9fFJASWr6CprjWi XbCdez4dMhd+PGwgxHs6 =/r/D -----END PGP SIGNATURE----- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:53:50 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 07 Nov 2013 16:53:50 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. In-Reply-To: <1383838804.74.0.419435874456.issue1294959@psf.upfronthosting.co.za> Message-ID: <20131107115347.47123c1f@anarchist> Barry A. Warsaw added the comment: On Nov 07, 2013, at 03:40 PM, jan matejek wrote: >To reiterate, our current solution is to introduce "sys.lib" (and "sys.arch", >but that is never used anymore) that is either "lib" or "lib64", and use this >in place of the string "lib" wherever appropriate. We find the value for >sys.lib through configure magic. PEP 421 added sys.implementation, which contains provisions for implementation-specific additions. So a better place to put these non-standard values is sys.implementation._lib and sys.implementation._arch, either instead of or in addition to sysconfig variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:56:50 2013 From: report at bugs.python.org (Matthias Klose) Date: Thu, 07 Nov 2013 16:56:50 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1383843410.93.0.855136657304.issue1294959@psf.upfronthosting.co.za> Matthias Klose added the comment: I disagree about sys.implementation. It's useless and wrong for cross builds. Please use sysconfig instead. What sysconfig is maybe missing is a set of variables which you can rely on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 17:59:02 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 07 Nov 2013 16:59:02 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1383843542.92.0.649706638464.issue1294959@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: configure.ac should accept an option, which allows to set any custom libdir. Examples (architecture: libdir) in Gentoo: x32: libx32 mips o32: lib mips n32: lib32 mips n64: lib64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:13:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 07 Nov 2013 17:13:54 +0000 Subject: [issue19497] selectors and modify() In-Reply-To: <1383599396.27.0.656600469462.issue19497@psf.upfronthosting.co.za> Message-ID: <1383844434.97.0.755426621749.issue19497@psf.upfronthosting.co.za> Guido van Rossum added the comment: Fixed by revision 9c976f1b17e9. ---------- assignee: -> gvanrossum resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:18:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 07 Nov 2013 17:18:52 +0000 Subject: [issue17080] A better error message for float() In-Reply-To: <1359534793.39.0.291653711097.issue17080@psf.upfronthosting.co.za> Message-ID: <3dFrtg6J11z7Lll@mail.python.org> Roundup Robot added the comment: New changeset a73c47c1d374 by Ezio Melotti in branch 'default': #17080: improve error message of float/complex when the wrong type is passed. http://hg.python.org/cpython/rev/a73c47c1d374 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:19:23 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 07 Nov 2013 17:19:23 +0000 Subject: [issue17080] A better error message for float() In-Reply-To: <1359534793.39.0.291653711097.issue17080@psf.upfronthosting.co.za> Message-ID: <1383844763.71.0.412620226414.issue17080@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the review. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:28:38 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 07 Nov 2013 17:28:38 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383845318.46.0.550072156296.issue19515@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Victor: There already *is* a cleanup function that clears all allocated identifier memory at interpreter shutdown. Please read the source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:33:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 17:33:17 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383845318.46.0.550072156296.issue19515@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Victor: There already *is* a cleanup function that clears all allocated identifier memory at interpreter shutdown. Please read the source. Oh, great! I never noticed _PyUnicode_ClearStaticStrings(). Call trace: Py_Finalize() -> _PyUnicode_ClearStaticStrings() -> _PyUnicode_Fini(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:33:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 07 Nov 2013 17:33:44 +0000 Subject: [issue15381] Optimize BytesIO to do less reallocations when written, similarly to StringIO In-Reply-To: <1342527166.53.0.694574948468.issue15381@psf.upfronthosting.co.za> Message-ID: <1383845624.0.0.689943188818.issue15381@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch uses large overallocation factor (1/2 instead 1/8), it may increase the speed on Windows. Fixed implementation of __sizeof__() and some minor bugs. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file32536/bytesio_resized_bytes-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:47:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 07 Nov 2013 17:47:10 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <3dFsWK2yHbz7Lwm@mail.python.org> Roundup Robot added the comment: New changeset 4a09cc62419b by Martin v. L?wis in branch 'default': Issue #19514: Deduplicate some _Py_IDENTIFIER declarations. http://hg.python.org/cpython/rev/4a09cc62419b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:48:57 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 07 Nov 2013 17:48:57 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <1383846537.15.0.134880973813.issue19514@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Note: moving all identifiers would not have made a difference. They are static variables, so from a run-time point of view, there is no difference whether they are inside or outside of functions. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:50:45 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 07 Nov 2013 17:50:45 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383846645.65.0.491489019806.issue19515@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Well, that was one of the motivations of introducing this Py_IDENTIFIER machinery: to be able to cleanup at the end (unlike the static variables that were used before, which couldn't be cleaned up). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 18:55:15 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 07 Nov 2013 17:55:15 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. In-Reply-To: <1383843410.93.0.855136657304.issue1294959@psf.upfronthosting.co.za> Message-ID: <20131107125512.52e254f4@anarchist> Barry A. Warsaw added the comment: On Nov 07, 2013, at 04:56 PM, Matthias Klose wrote: >I disagree about sys.implementation. It's useless and wrong for cross builds. >Please use sysconfig instead. What sysconfig is maybe missing is a set of >variables which you can rely on. Agreed that sysconfig is a better place for more general values. My point was that if OpenSUSE wants to carry deltas that are specific only to its platform, then sys.implementation._ is the standard place to put it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 19:01:12 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 07 Nov 2013 18:01:12 +0000 Subject: [issue19521] parallel build race condition on AIX since python-3.2 In-Reply-To: <1383840294.95.0.0890053719997.issue19521@psf.upfronthosting.co.za> Message-ID: <1383847272.16.0.24477609173.issue19521@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Wouldn't it be better if linking _testembed generated _testembed.exp instead of generating python.exp? I hope using $@.exp somehow could help. Hard-coding the name of the export file sounds like a flaw in the first place. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 19:22:48 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 07 Nov 2013 18:22:48 +0000 Subject: [issue1534607] IndexError: Add bad index to msg Message-ID: <1383848568.81.0.529046869462.issue1534607@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- superseder: -> Add index attribute to IndexError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 19:22:57 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 07 Nov 2013 18:22:57 +0000 Subject: [issue1534607] IndexError: Add bad index to msg Message-ID: <1383848577.0.0.111831126288.issue1534607@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 21:51:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 07 Nov 2013 20:51:13 +0000 Subject: [issue19514] Merge duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786173.17.0.938161811283.issue19514@psf.upfronthosting.co.za> Message-ID: <3dFxbh5VLYz7Lmg@mail.python.org> Roundup Robot added the comment: New changeset cb4c964800af by Victor Stinner in branch 'default': Issue #19514: Add Andrei Dorian Duma to Misc/ACKS for changeset 4a09cc62419b http://hg.python.org/cpython/rev/cb4c964800af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 21:54:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 20:54:41 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383857681.24.0.506695118221.issue19515@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine, Martin: So, what do you think? Is it worth to move most common identifiers to a single place to not duplicate them? If identifiers are already cleared at exit, the advantage would be to initialize duplicated identifiers more quickly, and don't initialize duplicated identifiers multiple times (once per copy). If we choose to not share common identifiers, _PyId_xxx identifiers from pythonrun.c must be removed. There are also some identifiers duplicated in the same file which can be moved at the top to remove at least duplicates in a single file, as it was done for other identifiers in issue #19514. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 22:00:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 07 Nov 2013 21:00:30 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383857681.24.0.506695118221.issue19515@psf.upfronthosting.co.za> Message-ID: <527BFF8A.9060006@free.fr> Antoine Pitrou added the comment: > Antoine, Martin: So, what do you think? Is it worth to move most common identifiers > to a single place to not duplicate them? Well, worth what? :) If you don't tell us what it brings (numbers?), I'm against it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 22:02:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 21:02:51 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383858171.92.0.834869513593.issue19515@psf.upfronthosting.co.za> STINNER Victor added the comment: > If you don't tell us what it brings (numbers?), I'm against it. For performances, it's probably very close to zero speed up. For the memory, it's a few bytes per duplicated identifier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 22:08:18 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 07 Nov 2013 21:08:18 +0000 Subject: [issue18454] distutils crashes when uploading to PyPI having only the username (no pw) defined In-Reply-To: <1373822688.67.0.938925989206.issue18454@psf.upfronthosting.co.za> Message-ID: <1383858498.33.0.878669372766.issue18454@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Same problem here. I'm currently uploading .exe files for psutil by hand. Interestingly the problem occurs with certain versions of python only (2.4, 2.5, 2.7, 3.2). ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 22:17:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 07 Nov 2013 21:17:10 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383858171.92.0.834869513593.issue19515@psf.upfronthosting.co.za> Message-ID: <527C0378.7060403@free.fr> Antoine Pitrou added the comment: >> If you don't tell us what it brings (numbers?), I'm against it. > > For performances, it's probably very close to zero speed up. For > the memory, it's a few bytes per duplicated identifier. Well, then IMHO it's not worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 22:18:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 21:18:37 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383859117.78.0.256746807112.issue19515@psf.upfronthosting.co.za> STINNER Victor added the comment: > Well, then IMHO it's not worth it. Ok, you are probably right :-) @Andrei: Are you interested to work on a patch to remove identifiers duplicated in the same file? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 22:34:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 21:34:52 +0000 Subject: [issue19431] Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError() In-Reply-To: <1383040535.91.0.284405039579.issue19431@psf.upfronthosting.co.za> Message-ID: <1383860092.84.0.123752717059.issue19431@psf.upfronthosting.co.za> STINNER Victor added the comment: c_api_frame.patch: document some C functions of the frame object in the C API. ---------- keywords: +patch Added file: http://bugs.python.org/file32537/c_api_frame.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 22:47:35 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Thu, 07 Nov 2013 21:47:35 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383860855.59.0.22926777357.issue19515@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: > @Andrei: Are you interested to work on a patch to remove identifiers duplicated in the same file? Yes, I will provide a patch in a day or two. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 22:57:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 21:57:23 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1350461165.29.0.129000928595.issue16261@psf.upfronthosting.co.za> Message-ID: <1383861443.81.0.109485808508.issue16261@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 23:08:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 07 Nov 2013 22:08:07 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <3dFzJQ5HQFz7Ls9@mail.python.org> Roundup Robot added the comment: New changeset 01c4a0af73cf by Victor Stinner in branch 'default': Issue #19512, #19515: remove shared identifiers, move identifiers where they http://hg.python.org/cpython/rev/01c4a0af73cf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 23:08:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 07 Nov 2013 22:08:08 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <3dFzJR3YVMz7Lmt@mail.python.org> Roundup Robot added the comment: New changeset 01c4a0af73cf by Victor Stinner in branch 'default': Issue #19512, #19515: remove shared identifiers, move identifiers where they http://hg.python.org/cpython/rev/01c4a0af73cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 23:09:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 22:09:58 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383862198.11.0.80097594307.issue19515@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 01c4a0af73cf by Victor Stinner in branch 'default': > Issue #19512, #19515: remove shared identifiers, move identifiers where they > http://hg.python.org/cpython/rev/01c4a0af73cf This changeset removes some identifiers duplicated in the same file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 23:42:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 22:42:52 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383864172.24.0.649405763503.issue19518@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch addressing some remarks of Serhiy and adding documentation. ---------- Added file: http://bugs.python.org/file32538/pyrun_object-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 7 23:43:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 22:43:22 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383864202.8.0.740280713251.issue19518@psf.upfronthosting.co.za> STINNER Victor added the comment: > Updated patch addressing some remarks of Serhiy and adding documentation. Oh, and it adds also an unit test. I didn't run the unit test on Windows yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 00:15:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Nov 2013 23:15:52 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1383866152.38.0.93184898006.issue17762@psf.upfronthosting.co.za> STINNER Victor added the comment: Comments on add_os_release_support_2.patch: - You should not write a huge try/except OSError block. I would prefer something like: try: f = open(...) except OSError: return None with f: ... - I'm not sure about that, but you might use errors='surrogateescape', just in case if the file is not correctly encoded. Surrogate characters are maybe less annoying than a huge UnicodeDecodeError - You use /etc/os-release even if the file is empty. Do you know if there is a standard, or something like that explaining if some keys are mandatory? For example, we can ignore os-release if 'ID' or 'VERSION_ID' key is missing - For the unit test, you should write at least a test on linux_distribution() to check that your private function is used correctly - You add unit tests for all escaped characters (', ", \), for comments, and maybe also for maformated lines (to have a well defined behaviour, ignore them or raise an error) - _UNIXCONFDIR looks to be dedicated to unit tests, can't you patch builtin open() instead? It would avoid the need of a temporary directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 00:33:25 2013 From: report at bugs.python.org (Matthias Klose) Date: Thu, 07 Nov 2013 23:33:25 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release In-Reply-To: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> Message-ID: <1383867205.53.0.766508391416.issue17762@psf.upfronthosting.co.za> Matthias Klose added the comment: my concern here is that platform.linux_distribution returns different values for the tuple, wether os-release is found or the lsb config file is found. I don't know about a good solution, however if the return value has different values, that has to be clearly documented, or maybe unified in some form. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 01:02:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Nov 2013 00:02:30 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3dG1rP4ML8z7Lkt@mail.python.org> Roundup Robot added the comment: New changeset f2cd38795931 by Victor Stinner in branch 'default': Issue #19437: Fix fsconvert_strdup(), raise a MemoryError on PyMem_Malloc() http://hg.python.org/cpython/rev/f2cd38795931 New changeset f88c6417b9f6 by Victor Stinner in branch 'default': Issue #19437: Fix _io._IOBase.close(), handle _PyObject_SetAttrId() failure http://hg.python.org/cpython/rev/f88c6417b9f6 New changeset 0f48843652b1 by Victor Stinner in branch 'default': Issue #19437: Fix datetime_subtract(), handle new_delta() failure http://hg.python.org/cpython/rev/0f48843652b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 01:05:16 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 08 Nov 2013 00:05:16 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383869116.95.0.134694382184.issue19518@psf.upfronthosting.co.za> Eric Snow added the comment: PEP 432 relates pretty closely here. ---------- nosy: +eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 01:07:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 08 Nov 2013 00:07:30 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383869250.67.0.339086507291.issue19518@psf.upfronthosting.co.za> STINNER Victor added the comment: > PEP 432 relates pretty closely here. What is the relation between this issue and the PEP 432? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 01:27:12 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 08 Nov 2013 00:27:12 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1383870432.77.0.206346500184.issue19518@psf.upfronthosting.co.za> Eric Snow added the comment: PEP 432 is all about the PyRun_* API and especially relates to refactoring it with the goal of improving extensibility and maintainability. I'm sure Nick could expound, but the PEP is a response to the cruft that has accumulated over the years in Python/pythonrun.c. The result of that organic growth makes it harder than necessary to do things like adding new commandline options. While I haven't looked closely at the new function you added, I expect PEP 432 would have simplified things or even removed the need for a new function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 02:23:27 2013 From: report at bugs.python.org (wang xuancong) Date: Fri, 08 Nov 2013 01:23:27 +0000 Subject: [issue19522] A suggestion: python 3.* is not as convenient as python 2.* Message-ID: <1383873807.23.0.835137280859.issue19522@psf.upfronthosting.co.za> New submission from wang xuancong: Hi python developers, I notice that one major change in python 3 is that you make 'print' as a standard function, and it will require typing (). As you know, reading from and writing to IO is a high frequency operation. By entropy coding theorem, you should make your language having shortest code for doing that job. Typing a '(' requires holding SHIFT and pressing 9, the input effort is much higher. Also, specifying IO has changed from >>* to file=*, which becomes more inconvenient. I hope you can take a look at user's code and see what are the most commonly used functions and try to shorten language codes for those functions. Assigning shortest language codes to most frequently used functions will make python the best programming language in the world. Another suggestion is that 'enumerate' is also frequently used, hopefully you can shorten the command. Wang Xuancong National University of Singapore ---------- components: Interpreter Core messages: 202400 nosy: xuancong84 priority: normal severity: normal status: open title: A suggestion: python 3.* is not as convenient as python 2.* type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 02:36:31 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 08 Nov 2013 01:36:31 +0000 Subject: [issue19522] A suggestion: python 3.* is not as convenient as python 2.* In-Reply-To: <1383873807.23.0.835137280859.issue19522@psf.upfronthosting.co.za> Message-ID: <1383874591.39.0.338587977662.issue19522@psf.upfronthosting.co.za> Eric Snow added the comment: A lot of thought went into Python 3 changes, including making print a function (see PEP 3105). While typing efficiency may be appealing, keep in mind that generally code will be read more than written. There are other programming languages that highly value terseness. Personally I find such languages (A.K.A. write-only languages) harder to read. In contrast, I find the API for Python 3's print to be easier to remember, to use, and to read. Keep in mind that the bug tracker probably isn't the best place for this discussion. I'd recommend taking it to the general Python mailing list (https://mail.python.org/mailman/listinfo/python-list). If you have a concrete proposal you should consider posting to the python-ideas mailing list. ---------- nosy: +eric.snow resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 03:58:43 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 08 Nov 2013 02:58:43 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1383879523.94.0.479795052558.issue3158@psf.upfronthosting.co.za> R. David Murray added the comment: Added some review comments. Because it could cause possibly buggy doctest fragments to run that previously did not run, I don't think it should be backported as a bug fix. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 04:40:03 2013 From: report at bugs.python.org (DDGG) Date: Fri, 08 Nov 2013 03:40:03 +0000 Subject: [issue19523] logging.FileHandler - using of delay argument case handler leaks Message-ID: <1383882003.26.0.546663037949.issue19523@psf.upfronthosting.co.za> New submission from DDGG: Issue File: Python26\Lib\logging\__init__.py class FileHandler(StreamHandler): """ A handler class which writes formatted logging records to disk files. """ def __init__(self, filename, mode='a', encoding=None, delay=0): """ Open the specified file and use it as the stream for logging. """ #keep the absolute path, otherwise derived classes which use this #may come a cropper when the current directory changes if codecs is None: encoding = None self.baseFilename = os.path.abspath(filename) self.mode = mode self.encoding = encoding if delay: #We don't open the stream, but we still need to call the #Handler constructor to set level, formatter, lock etc. Handler.__init__(self) ## 1. here will insert instance into logging._handlerList self.stream = None else: StreamHandler.__init__(self, self._open()) def close(self): """ Closes the stream. """ if self.stream: ## 2. when delay=1, here should call Handler.close(self), or the instance still store in logging._handlerList, lead to leak (instance's owner's __del__ will not be called). self.flush() if hasattr(self.stream, "close"): self.stream.close() StreamHandler.close(self) self.stream = None ------------------------------------------------ leak demo: import logging import time def using_handler(): filename = "test.log" handler = logging.FileHandler(filename, mode="w", delay=1) handler.close() def test(): while True: using_handler() time.sleep(.01) if __name__ == "__main__": test() If you run this script, and then view the Task Manager for this process's handlers, it is growing forever. ------------------------------------ Solution: very easy Fix the method FileHandler.close: def close(self): """ Closes the stream. """ if self.stream: self.flush() if hasattr(self.stream, "close"): self.stream.close() StreamHandler.close(self) self.stream = None else: Handler.close(self) regards DDGG ---------- components: Library (Lib) messages: 202403 nosy: DDGG priority: normal severity: normal status: open title: logging.FileHandler - using of delay argument case handler leaks type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 04:45:17 2013 From: report at bugs.python.org (Martin Panter) Date: Fri, 08 Nov 2013 03:45:17 +0000 Subject: [issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object Message-ID: <1383882317.08.0.635493267684.issue19524@psf.upfronthosting.co.za> New submission from Martin Panter: The AbstractHTTPHandler.do_open() method creates a HTTPConnection object but does not save it anywhere. This means a ResourceWarning is eventually triggered, at least when the HTTP server leaves the the connection open. Demonstration code: from urllib.request import urlopen with urlopen("http://localhost") as response: response.read() When I used the above code, the warning did not trigger until I forced a garbage collection: import gc; gc.collect() Output: __main__:1: ResourceWarning: unclosed Alternatively, you can add a line to the bottom of the do_open() method: r.msg = r.reason del h; import gc; gc.collect() # Add this to force warning return r When the warning happens without forced garbage collection, it tends to happen here: /usr/lib/python3.3/socket.py:370: ResourceWarning: unclosed self._sock = None I tested by using the ?socat? CLI program and supplying a chunked HTTP response, without immediately closing the connection at the server end. Using the Content-length header also seems to trigger the issue. $ sudo socat -d TCP-LISTEN:www,reuseaddr,crnl READLINE GET / HTTP/1.1 Accept-Encoding: identity Host: localhost Connection: close User-Agent: Python-urllib/3.3 HTTP/1.1 200 OK Transfer-encoding: chunked 0 If the server leaves the connection open, it only seems to get closed when Python garbage-collects the socket and closes it. Perhaps the connection should be explicitly closed when the urlopen() response object is closed. But I guess that would require wrapping the HTTPResponse object to add to the close behaviour. ---------- components: Library (Lib) messages: 202404 nosy: vadmium priority: normal severity: normal status: open title: ResourceWarning when urlopen() forgets the HTTPConnection object versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 04:47:38 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 08 Nov 2013 03:47:38 +0000 Subject: [issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 In-Reply-To: <1383554508.21.0.868746765749.issue19490@psf.upfronthosting.co.za> Message-ID: <1383882458.72.0.254130017374.issue19490@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Downgrading, since this is "fixed" in release branch. ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 05:27:30 2013 From: report at bugs.python.org (Martin Panter) Date: Fri, 08 Nov 2013 04:27:30 +0000 Subject: [issue19251] bitwise ops for bytes of equal length In-Reply-To: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> Message-ID: <1383884850.39.0.653818597571.issue19251@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 06:24:57 2013 From: report at bugs.python.org (Martin Panter) Date: Fri, 08 Nov 2013 05:24:57 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1383888297.18.0.412777265484.issue17823@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 06:26:28 2013 From: report at bugs.python.org (Martin Panter) Date: Fri, 08 Nov 2013 05:26:28 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1383888388.4.0.317073886097.issue3244@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 06:35:22 2013 From: report at bugs.python.org (DDGG) Date: Fri, 08 Nov 2013 05:35:22 +0000 Subject: [issue19523] logging.FileHandler - using of delay argument case handle leaks In-Reply-To: <1383882003.26.0.546663037949.issue19523@psf.upfronthosting.co.za> Message-ID: <1383888922.41.0.74991595503.issue19523@psf.upfronthosting.co.za> Changes by DDGG : ---------- title: logging.FileHandler - using of delay argument case handler leaks -> logging.FileHandler - using of delay argument case handle leaks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 06:35:57 2013 From: report at bugs.python.org (Martin Panter) Date: Fri, 08 Nov 2013 05:35:57 +0000 Subject: [issue11245] Implementation of IMAP IDLE in imaplib? In-Reply-To: <1298061371.03.0.0638918089315.issue11245@psf.upfronthosting.co.za> Message-ID: <1383888957.67.0.334785638788.issue11245@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 06:39:26 2013 From: report at bugs.python.org (DDGG) Date: Fri, 08 Nov 2013 05:39:26 +0000 Subject: [issue19523] logging.FileHandler - using of delay argument case handle leaks In-Reply-To: <1383882003.26.0.546663037949.issue19523@psf.upfronthosting.co.za> Message-ID: <1383889166.2.0.88975526824.issue19523@psf.upfronthosting.co.za> DDGG added the comment: If you run this script, and then view the Task Manager for this process's handles, it is growing forever. handlers -> handles. this leak handle is Handler.lock object, because the instance was not be garbage-collected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 08:14:47 2013 From: report at bugs.python.org (Michael Haubenwallner) Date: Fri, 08 Nov 2013 07:14:47 +0000 Subject: [issue19521] parallel build race condition on AIX since python-3.2 In-Reply-To: <1383840294.95.0.0890053719997.issue19521@psf.upfronthosting.co.za> Message-ID: <1383894887.38.0.419970724561.issue19521@psf.upfronthosting.co.za> Michael Haubenwallner added the comment: I'm unsure about the real purpose of _testembed, but given the name it does make sense to me to export the same symbols as $(BUILDPYTHON), thus reusing python.exp. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 08:31:06 2013 From: report at bugs.python.org (Martin Panter) Date: Fri, 08 Nov 2013 07:31:06 +0000 Subject: [issue1348] httplib closes socket, then tries to read from it In-Reply-To: <1193532553.16.0.237482805264.issue1348@psf.upfronthosting.co.za> Message-ID: <1383895866.94.0.109465402051.issue1348@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 08:33:28 2013 From: report at bugs.python.org (Sworddragon) Date: Fri, 08 Nov 2013 07:33:28 +0000 Subject: [issue19525] Strict indentation in Python3 Message-ID: <1383896008.92.0.87081391555.issue19525@psf.upfronthosting.co.za> New submission from Sworddragon: Python 2 provided this command line option: "-t Issue a warning when a source file mixes tabs and spaces for indentation in a way that makes it depend on the worth of a tab expressed in spaces. Issue an error when the option is given twice." I'm wondering why it doesn't exist anymore in Python 3. I wanted to make some tests to figure this out but I'm not able to trigger this behavior in Python 2. All my examples will result in throwing an exception with and without -tt or never throwing an exception with or without -tt. But I'm also having difficulties to understand what the second part of the sentence does mean. Can somebody maybe provide an example where "python2 -tt" will fail but "python2" not? ---------- components: Interpreter Core messages: 202408 nosy: Sworddragon priority: normal severity: normal status: open title: Strict indentation in Python3 type: enhancement versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 08:45:53 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 08 Nov 2013 07:45:53 +0000 Subject: [issue19525] Strict indentation in Python3 In-Reply-To: <1383896008.92.0.87081391555.issue19525@psf.upfronthosting.co.za> Message-ID: <1383896753.01.0.524453578955.issue19525@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Python 3 is intentionally stricter. Try attached file. $ python2.7 test $ python2.7 -t test test: inconsistent use of tabs and spaces in indentation $ python2.7 -tt test File "test", line 3 2 ^ TabError: inconsistent use of tabs and spaces in indentation $ python3.3 test File "test", line 3 2 ^ TabError: inconsistent use of tabs and spaces in indentation ---------- nosy: +Arfrever resolution: -> works for me status: open -> closed Added file: http://bugs.python.org/file32539/test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 09:41:54 2013 From: report at bugs.python.org (Sworddragon) Date: Fri, 08 Nov 2013 08:41:54 +0000 Subject: [issue19525] Strict indentation in Python3 In-Reply-To: <1383896008.92.0.87081391555.issue19525@psf.upfronthosting.co.za> Message-ID: <1383900114.64.0.815598299668.issue19525@psf.upfronthosting.co.za> Sworddragon added the comment: Thanks for the example, this is what I had in mind. Python 3 does also still provide the -t option (I'm assuming for compatibility reasons) but python3 -h and the manpage aren't saying about this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 10:45:35 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 08 Nov 2013 09:45:35 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383870432.77.0.206346500184.issue19518@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: PEP 432 doesn't really touch the PyRun_* APIs - it's all about refactoring Py_Initialize so you can use most of the C API during the latter parts of the configuration process (e.g. setting up the path for the import system). pythonrun.c is just a monstrous beast that covers the entire interpreter lifecycle from initialisation through script execution through to termination. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 12:18:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 08 Nov 2013 11:18:15 +0000 Subject: [issue19526] Review additions to the stable ABI of Python 3.4 Message-ID: <1383909495.56.0.906628582778.issue19526@psf.upfronthosting.co.za> New submission from STINNER Victor: Example: http://hg.python.org/cpython/rev/69071054b42f PyAPI_FUNC(int) _PyDict_DelItemId(PyObject *mp, struct _Py_Identifier *key); New functions added in this issue should also be reviewed (should them be part of the stable ABI?): http://bugs.python.org/issue11619 http://hg.python.org/cpython/rev/df2fdd42b375 ---------- messages: 202412 nosy: haypo, loewis, ncoghlan priority: normal severity: normal status: open title: Review additions to the stable ABI of Python 3.4 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 12:20:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 08 Nov 2013 11:20:16 +0000 Subject: [issue19526] Review additions to the stable ABI of Python 3.4 In-Reply-To: <1383909495.56.0.906628582778.issue19526@psf.upfronthosting.co.za> Message-ID: <1383909616.48.0.65160194558.issue19526@psf.upfronthosting.co.za> STINNER Victor added the comment: "Priority: release blocker" means that it should be done at least before Python 3.4 final. It may be delayed after the beta1. ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 13:30:13 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Fri, 08 Nov 2013 12:30:13 +0000 Subject: [issue19527] Test failures with COUNT_ALLOCS Message-ID: <1383913813.74.0.198352256395.issue19527@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: When Python is compiled with COUNT_ALLOCS, some tests in test_gc and test_module fail. I'm attaching the patch that skips 3 of them and modifies assertions in one of them, so that the tests pass. I'm however still unsure about one of the skipped tests, since I'm unsure whether I totally understand what's wrong there - test_gc_ordinary_module_at_shutdown. My guess is that due to COUNT_ALLOCS causing immortal types, the "final_a" and "final_b" types don't get destroyed on line [1] as they do in builds without COUNT_ALLOCS. AFAICS they are only "un-immortalized" on this line and destroyed during the following loop [2]. The problem here is that the order of destroyed modules is not deterministic, so sometimes the builtins module gets destroyed before the "final_X" and there is no "print" function, which makes the __del__ functions from "final_X" fail. IMO the best thing to do is to just skip this test with COUNT_ALLOCS. But I may be wrong, I don't have a great insight into Python's GC and module unloading. [1] http://hg.python.org/cpython/annotate/0f48843652b1/Python/import.c#l383 [2] http://hg.python.org/cpython/annotate/0f48843652b1/Python/import.c#l394 ---------- messages: 202414 nosy: bkabrda priority: normal severity: normal status: open title: Test failures with COUNT_ALLOCS versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 13:30:50 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Fri, 08 Nov 2013 12:30:50 +0000 Subject: [issue19527] Test failures with COUNT_ALLOCS In-Reply-To: <1383913813.74.0.198352256395.issue19527@psf.upfronthosting.co.za> Message-ID: <1383913850.38.0.607139365353.issue19527@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: And the patch... ---------- keywords: +patch Added file: http://bugs.python.org/file32540/00141-fix-tests_with_COUNT_ALLOCS.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 13:37:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 08 Nov 2013 12:37:47 +0000 Subject: [issue19527] Test failures with COUNT_ALLOCS In-Reply-To: <1383913813.74.0.198352256395.issue19527@psf.upfronthosting.co.za> Message-ID: <1383914267.22.0.824267907708.issue19527@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 13:58:10 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 08 Nov 2013 12:58:10 +0000 Subject: [issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object In-Reply-To: <1383882317.08.0.635493267684.issue19524@psf.upfronthosting.co.za> Message-ID: <1383915490.45.0.862633889644.issue19524@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 14:07:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Nov 2013 13:07:48 +0000 Subject: [issue19526] Review additions to the stable ABI of Python 3.4 In-Reply-To: <1383909495.56.0.906628582778.issue19526@psf.upfronthosting.co.za> Message-ID: <3dGMGW49vZz7LjX@mail.python.org> Roundup Robot added the comment: New changeset bf9c77bac36d by Victor Stinner in branch 'default': Issue #19512, #19526: Exclude the new _PyDict_DelItemId() function from the http://hg.python.org/cpython/rev/bf9c77bac36d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 14:07:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Nov 2013 13:07:48 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <3dGMGX2LnNz7LjX@mail.python.org> Roundup Robot added the comment: New changeset bf9c77bac36d by Victor Stinner in branch 'default': Issue #19512, #19526: Exclude the new _PyDict_DelItemId() function from the http://hg.python.org/cpython/rev/bf9c77bac36d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 14:45:05 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 08 Nov 2013 13:45:05 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1383918305.11.0.767019652209.issue19515@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'd be +0 on extracting common identifiers. I see a slight increase of readability, and expect a slight reduction of memory usage, and a tiny reduction in runtime. It's not really worth the effort, but I fail to see that it causes harm. I see no point in reverting cases where this approach is already taken. I don't quite understand Victor's interest in this, either, as there are hundreds of open real bugs that could use his attention. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 15:13:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 08 Nov 2013 14:13:33 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383918305.11.0.767019652209.issue19515@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/11/8 Martin v. L?wis : > I'd be +0 on extracting common identifiers. I (...) expect a slight reduction of memory usage, and a tiny reduction in runtime. Only duplicated Py_IDENTIFIER structures would be removed in memory, but these structures are very small (3 pointers or something like that). The identifier strings are already interned, so not duplicated in memory. > It's not really worth the effort, but I fail to see that it causes harm. Initializing an identifier has to decode the literal byte string from UTF-8, but Python UTF-8 decoder is really fast. I'm not sure that it's possible to see a difference on the startup time. > I see no point in reverting cases where this approach is already taken. I only reverted shared identifiers added a few days ago in issue #19512. I agree to leave the old code unchanged. > I don't quite understand Victor's interest in this, either, as there are hundreds of open real bugs that could use his attention. I tried to explain my motivation on using more identifiers in the issue #19512. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 15:13:39 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 08 Nov 2013 14:13:39 +0000 Subject: [issue8799] Hang in lib/test/test_threading.py In-Reply-To: <1274694258.02.0.421667436928.issue8799@psf.upfronthosting.co.za> Message-ID: <1383920019.7.0.808847603701.issue8799@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Here is an updated patch that only adds the necessary safety delay to the main thread. It also explains these in the comments. ---------- Added file: http://bugs.python.org/file32541/lock_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 15:34:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 08 Nov 2013 14:34:12 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1383921252.22.0.541909826297.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: I actually think Nikratio is right about the way this *should* work (intuitively). I'm just not sure it's feasible to *implement* those semantics in CPython without significant changes to the way exception handling works - I don't believe the exception chaining code can currently tell the difference between the cases: # No context on Exception3 is exactly what we want try: try: raise Exception1 except Exception1: raise Exception2 except Exception2 as exc raise Exception3 from Exception2 # Not seeing Exception1 as the context for Exception3 is surprising! try: raise Exception1 except Exception1: try: raise Exception2 except Exception2 as exc raise Exception3 from Exception2 In a certain sense, exceptions need to be able to have *multiple* contexts to handle this case properly without losing data. Frames would need to tag exceptions appropriately with the context details as an unhandled exception passed through a frame that was currently running an exception handler. So even though it doesn't require new syntax, I think it *does* require a PEP if we're going to change this (and we still haven't fully dealt with the consequence of the last one - the display options for tracebacks are still a bit limited) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 15:58:14 2013 From: report at bugs.python.org (Simon Naish) Date: Fri, 08 Nov 2013 14:58:14 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows Message-ID: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> New submission from Simon Naish: When attempting to use a config file with logging to set up a series of loggers in a script, when running on windows, if the config file name starts with an 'r' then the script fails with the following error:- File "C:\Users\simon\Documents\python dev\RepositoryChainPkg\FileLogger.py", line 45, in fileConfig logging.config.fileConfig(FileLogger.CONF_FILENAME) File "C:\Python27\lib\logging\config.py", line 78, in fileConfig handlers = _install_handlers(cp, formatters) File "C:\Python27\lib\logging\config.py", line 156, in _install_handlers h = klass(*args) File "C:\Python27\lib\logging\handlers.py", line 117, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding, delay) File "C:\Python27\lib\logging\handlers.py", line 64, in __init__ logging.FileHandler.__init__(self, filename, mode, encoding, delay) File "C:\Python27\lib\logging\__init__.py", line 902, in __init__ StreamHandler.__init__(self, self._open()) File "C:\Python27\lib\logging\__init__.py", line 925, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 22] invalid mode ('a') or filename: 'C:\\Users\\simon\repositoryChainLogging\repo_log.log' The same script works perfectly on linux and solaris. Points to note, the config filename (and path) is listed in the error as:- 'C:\\Users\\simon\repositoryChainLogging\repo_log.log' Yet when it is passed to logging\config.py as parameter fname in function fileConfig it is:- b'C:\\Users\\simon\\repositoryChainLogging\\repo_log.conf' In other words the path passed in by the script is correctly seperated and escaped by os.path functions. However in _install_handlers (line 133 of logging\config.py) the args = eval(args, vars(logging))line (154) gets the path back in this tuple:- (b'C:\\Users\\snaish.BRIGHTON\repositoryChainLogging\repo_log.log', b'a', 131072, 10) Where it has clearly lost some of the escaping, rendering the path useless, since \r is a control character, and therefore invalidates the path. Therefore at the moment it is impossible to use logging config fiels beginning with r onw windows at the moment. ---------- components: Library (Lib) messages: 202422 nosy: 51m0n priority: normal severity: normal status: open title: logger.config.fileConfig cant cope with files starting with an 'r' on windows versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:08:40 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 08 Nov 2013 15:08:40 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383923320.51.0.971109592821.issue19528@psf.upfronthosting.co.za> Eric V. Smith added the comment: It looks like you need to use double-backslashes everywhere in your path, or use single backslashes and raw strings (r""). ---------- nosy: +eric.smith resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:10:49 2013 From: report at bugs.python.org (Simon Naish) Date: Fri, 08 Nov 2013 15:10:49 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383923449.79.0.865957782933.issue19528@psf.upfronthosting.co.za> Simon Naish added the comment: I am using double backslashes in my path. But logger\config.py is losing them, please re-read the issue description, logger\config.py is part of the python libraries! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:12:18 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 08 Nov 2013 15:12:18 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383923538.88.0.398824492347.issue19528@psf.upfronthosting.co.za> Eric V. Smith added the comment: Apologies for reading too quickly. I've reopened this. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:14:23 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 08 Nov 2013 15:14:23 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383923663.84.0.90214299121.issue19528@psf.upfronthosting.co.za> Eric V. Smith added the comment: Can you provide a small, stand-alone program that demonstrates the problem? In particular, I want to see how this filename is provided to logging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:24:30 2013 From: report at bugs.python.org (Michael Haubenwallner) Date: Fri, 08 Nov 2013 15:24:30 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1383924270.13.0.107788457386.issue18235@psf.upfronthosting.co.za> Michael Haubenwallner added the comment: Actually, ld_so_aix is autogenerated from ld_so_aix.in into builddir, while makexp_aix is not. Attached patch eventually might fix the test too? ---------- nosy: +haubi Added file: http://bugs.python.org/file32542/python-tip-aix-absbuilddir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:33:18 2013 From: report at bugs.python.org (Simon Naish) Date: Fri, 08 Nov 2013 15:33:18 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383924798.23.0.963966988806.issue19528@psf.upfronthosting.co.za> Simon Naish added the comment: Example proggie. It writes its own config file (really_cool_logging.conf), then attempts to read it, all to ~/testlog If you inherit from the class FileLogger with any other class you get instant access to self.log. which will write debug and above to ~/testlog/really_cool_logging.log, and info and above to the console. Which is really handy when you have a lot of command scripts that you want to log to one place. ---------- resolution: -> invalid status: open -> closed Added file: http://bugs.python.org/file32543/TestFileLogger.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:34:39 2013 From: report at bugs.python.org (Michael Haubenwallner) Date: Fri, 08 Nov 2013 15:34:39 +0000 Subject: [issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX Message-ID: <1383924879.95.0.72869375832.issue19529@psf.upfronthosting.co.za> New submission from Michael Haubenwallner: The problem raises during build already when trying to run setup.py, where ./python is unavailable to locate the 'encodings' module and aborts. It turns out that (some of) the filenames searched for are broken due to wrong conversion from unicode (across wchar_t) to char. Attached patch is for 3.2 only, should be obvious enough. Thanks! ---------- components: Interpreter Core files: python-3.2-aix-unicode_aswidechar.patch keywords: patch messages: 202429 nosy: haubi priority: normal severity: normal status: open title: Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX type: crash versions: Python 3.2 Added file: http://bugs.python.org/file32544/python-3.2-aix-unicode_aswidechar.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:36:28 2013 From: report at bugs.python.org (Simon Naish) Date: Fri, 08 Nov 2013 15:36:28 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383924988.15.0.17458439758.issue19528@psf.upfronthosting.co.za> Simon Naish added the comment: Updated TestFileLogger, missed a line out in my rush to get you something, sorry! ---------- Added file: http://bugs.python.org/file32545/TestFileLogger.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:38:13 2013 From: report at bugs.python.org (Simon Naish) Date: Fri, 08 Nov 2013 15:38:13 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383925093.67.0.979735187904.issue19528@psf.upfronthosting.co.za> Simon Naish added the comment: And again. Damn! ---------- Added file: http://bugs.python.org/file32546/TestFileLogger.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 16:38:58 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 08 Nov 2013 15:38:58 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383925138.46.0.672093580746.issue19528@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 17:10:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Nov 2013 16:10:48 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3dGRKg4wFsz7Lnh@mail.python.org> Roundup Robot added the comment: New changeset b26e6e3e8037 by Brett Cannon in branch 'default': Issue #16803: test.test_importlib.frozen now runs both frozen and source code http://hg.python.org/cpython/rev/b26e6e3e8037 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 17:37:53 2013 From: report at bugs.python.org (Peter Otten) Date: Fri, 08 Nov 2013 16:37:53 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383928673.12.0.487377695733.issue19528@psf.upfronthosting.co.za> Peter Otten added the comment: Simon, in your code you build the config file with '''... args=('{0}', 'a', 131072, 10) ... '''.format(filename) The logging module uses eval() to process the args tuple, and a filename containing a bashlash will not roundtrip that way. Have a look at the .conf file, it contains something like args=('whatever\testlog\really_cool_logging.log', 'a', 131072, 10) when it should be args=('whatever\\testlog\\really_cool_logging.log', 'a', 131072, 10) To fix this you should drop the quote chars and use the string representation of the filename: '''... args=({0!r}, 'a', 131072, 10) ... '''.format(filename) In short: I think Eric was right with initial assumption. ---------- nosy: +peter.otten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 17:44:51 2013 From: report at bugs.python.org (David Edelsohn) Date: Fri, 08 Nov 2013 16:44:51 +0000 Subject: [issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX In-Reply-To: <1383924879.95.0.72869375832.issue19529@psf.upfronthosting.co.za> Message-ID: <1383929091.2.0.330796120094.issue19529@psf.upfronthosting.co.za> David Edelsohn added the comment: LGTM ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 17:45:49 2013 From: report at bugs.python.org (David Edelsohn) Date: Fri, 08 Nov 2013 16:45:49 +0000 Subject: [issue19521] parallel build race condition on AIX since python-3.2 In-Reply-To: <1383840294.95.0.0890053719997.issue19521@psf.upfronthosting.co.za> Message-ID: <1383929149.48.0.854294649004.issue19521@psf.upfronthosting.co.za> David Edelsohn added the comment: +1 ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 17:46:39 2013 From: report at bugs.python.org (David Edelsohn) Date: Fri, 08 Nov 2013 16:46:39 +0000 Subject: [issue18235] _sysconfigdata.py wrong on AIX installations In-Reply-To: <1371429201.94.0.372851990361.issue18235@psf.upfronthosting.co.za> Message-ID: <1383929199.72.0.358581023991.issue18235@psf.upfronthosting.co.za> David Edelsohn added the comment: +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 17:50:01 2013 From: report at bugs.python.org (Simon Naish) Date: Fri, 08 Nov 2013 16:50:01 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383929401.12.0.838023709152.issue19528@psf.upfronthosting.co.za> Simon Naish added the comment: Hi Peter, Oh well spotted! Fair enough, but that is seriously not obvious, thanks. Si ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 18:29:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 08 Nov 2013 17:29:09 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1383931749.43.0.194335063443.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch updated to the latest version of the PEP 454. ---------- Added file: http://bugs.python.org/file32547/69fd2d766005.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 18:29:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 08 Nov 2013 17:29:23 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1383931763.84.0.475833742852.issue18874@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file32494/022955935ba3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 19:08:01 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 08 Nov 2013 18:08:01 +0000 Subject: [issue19528] logger.config.fileConfig cant cope with files starting with an 'r' on windows In-Reply-To: <1383922694.77.0.246440943969.issue19528@psf.upfronthosting.co.za> Message-ID: <1383934081.24.0.316738570908.issue19528@psf.upfronthosting.co.za> Eric V. Smith added the comment: Thanks, Peter. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 19:35:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Nov 2013 18:35:07 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3dGVXB3gGRz7M39@mail.python.org> Roundup Robot added the comment: New changeset 6c998d72553a by Brett Cannon in branch 'default': Issue #16803: test.test_importlib.import_ now tests frozen and source code http://hg.python.org/cpython/rev/6c998d72553a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 19:55:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Nov 2013 18:55:45 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <3dGW0051Mzz7Ljj@mail.python.org> Roundup Robot added the comment: New changeset 71b618f0c8e9 by Charles-Fran?ois Natali in branch 'default': Issue #18923: Update subprocess to use the new selectors module. http://hg.python.org/cpython/rev/71b618f0c8e9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 20:25:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Nov 2013 19:25:46 +0000 Subject: [issue16803] Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <3dGWfc5N96z7Lkx@mail.python.org> Roundup Robot added the comment: New changeset b0f570aef6fd by Brett Cannon in branch 'default': Issue #16803: test.test_importlib.source now tests frozen and source code http://hg.python.org/cpython/rev/b0f570aef6fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 20:29:26 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 08 Nov 2013 19:29:26 +0000 Subject: [issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <1383938966.52.0.618255648231.issue16803@psf.upfronthosting.co.za> Brett Cannon added the comment: test_importlib now runs both frozen and source code for all relevant tests. Should allow for making changes in the source w/o recompiling and making sure any source tests pass. Also makes sure the pure Python implementation of import that mirrors what import.c does stays compatible. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed title: Make test_import & test_importlib run tests under both _frozen_importlib and importlib._bootstrap -> Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 20:32:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 08 Nov 2013 19:32:29 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1350461165.29.0.129000928595.issue16261@psf.upfronthosting.co.za> Message-ID: <1383939149.16.0.98228353841.issue16261@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 21:14:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Nov 2013 20:14:17 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3dGXkd0dFpz7Lkb@mail.python.org> Roundup Robot added the comment: New changeset 08c81db35959 by Victor Stinner in branch '3.3': Issue #19437: Fix convert_op_cmp() of decimal.Decimal rich comparator, handle http://hg.python.org/cpython/rev/08c81db35959 New changeset 3ff670a83c73 by Victor Stinner in branch '3.3': Issue #19437: Fix dec_format() of the _decimal module, handle dec_strdup() http://hg.python.org/cpython/rev/3ff670a83c73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 21:32:09 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 08 Nov 2013 20:32:09 +0000 Subject: [issue17621] Create a lazy import loader mixin In-Reply-To: <1364925647.64.0.233663837419.issue17621@psf.upfronthosting.co.za> Message-ID: <1383942729.33.0.740508963336.issue17621@psf.upfronthosting.co.za> Brett Cannon added the comment: Shifting this to Python 3.5 to rework using the forthcoming PEP 451 APIs which have been designed to explicitly allow for a lazy loader. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 21:35:56 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 08 Nov 2013 20:35:56 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1383942956.53.0.916618427801.issue17630@psf.upfronthosting.co.za> Brett Cannon added the comment: This is going to need a touch-up for PEP 451 to make the whole thing work more smoothly, so repositioning for Python 3.5. When that happens I can look into the 2 second issue that Amaury pointed out and Paul's review. Although I do wonder about the utility of this work. Zipimport still gets around the bootstrapping problem that any pure Python zip implementation never will. Probably the only hope of being useful is to make this abstract enough to include a pluggable (de)compression setup so that lzma or bz2 can be used on top of a single file storage back-end like tar or zip. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 22:23:22 2013 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 08 Nov 2013 21:23:22 +0000 Subject: [issue19523] logging.FileHandler - using of delay argument case handle leaks In-Reply-To: <1383882003.26.0.546663037949.issue19523@psf.upfronthosting.co.za> Message-ID: <1383945802.74.0.255819984249.issue19523@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 22:37:02 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 08 Nov 2013 21:37:02 +0000 Subject: [issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <1383946622.06.0.511529386027.issue16803@psf.upfronthosting.co.za> Eric Snow added the comment: Hurray! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 23:39:39 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 Nov 2013 22:39:39 +0000 Subject: [issue16261] Fix bare excepts in various places in std lib In-Reply-To: <1350461165.29.0.129000928595.issue16261@psf.upfronthosting.co.za> Message-ID: <1383950379.21.0.368017583422.issue16261@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The earlier #15313 is about removing bare excepts in Idle code. These should be handled separately for two reasons. 1. Changes can and in most cases should be backported. 2. As with any other Python-coded application, uncaught exceptions cause Idle to quit. Currently, if Idle is started directly, rather than from a console, such an exit looks like a silent crash. So either the added tuple of exceptions to be caught must be complete, or the calling code must be adjusted. I copied the one idlelib fix (to PyShell.py) to that issue for separate examination. It should be removed from any patch applied here. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 8 23:40:09 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 Nov 2013 22:40:09 +0000 Subject: [issue15313] IDLE - remove all bare excepts In-Reply-To: <1341887371.61.0.0302814737095.issue15313@psf.upfronthosting.co.za> Message-ID: <1383950409.57.0.49449922413.issue15313@psf.upfronthosting.co.za> Terry J. Reedy added the comment: RA's patch for #16261 suggests diff -r b76d2d8db81f Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.py Mon Dec 17 13:43:14 2012 +0530 +++ b/Lib/idlelib/PyShell.py Wed Jan 09 19:10:26 2013 +0530 @@ -152,7 +152,7 @@ lineno = int(float(text.index("insert"))) try: self.breakpoints.remove(lineno) - except: + except ValueError: pass text.tag_remove("BREAK", "insert linestart",\ "insert lineend +1char") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 00:32:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 Nov 2013 23:32:25 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1383953545.22.0.280753929384.issue10197@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is this ready to be reclosed? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 00:35:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 Nov 2013 23:35:33 +0000 Subject: [issue19479] textwrap.dedent doesn't work properly with strings containing CRLF In-Reply-To: <1383403818.41.0.713007913793.issue19479@psf.upfronthosting.co.za> Message-ID: <1383953733.75.0.715494348281.issue19479@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +georg.brandl, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 00:43:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 Nov 2013 23:43:07 +0000 Subject: [issue19486] Bump up version of Tcl/Tk in building Python in Windows platform In-Reply-To: <1383492601.4.0.567246282787.issue19486@psf.upfronthosting.co.za> Message-ID: <1383954187.52.0.122148540609.issue19486@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 01:22:31 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 09 Nov 2013 00:22:31 +0000 Subject: [issue19491] Python Crashing When Saving Documents In-Reply-To: <1383558941.35.0.744248647996.issue19491@psf.upfronthosting.co.za> Message-ID: <1383956551.59.0.124627178334.issue19491@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Exactly what are people doing in the save dialog when they have problems? If they are saving to a standard path under Computer (on the left side bar), there should be no problem. If they are saving to some place listed under Libraries, such as Documents, then this is a known problem in 3.2 that was fixed in 3.3 by using a later version of Tk. See #12988 (and #14996). If this is the case, this issue is a duplicate and should be closed. Your description of Idle 'freezing', rather than closing, sounds like this is the same issue. Ask the Pygame people to prepare a 3.3 binary and one for 3.4 as soon as it is released (or even now, for the upcoming beta). --- When Idle closes, rather than freezing, you should be able to get error messages, without access to Command Prompt, by running the standard white-on-black, text-mode python.exe interpreter in interactive mode. In the interpreter window, start Idle in a new window like so: >>> import idlelib.idle While using Idle, nothing should appear in in the original window, though there may be some TclError messages that can be ignored. When Idle stops, a prompt will appear in the original window. If Idle stops abnormally, a trackback and error message should appear before the prompt. Note that the above only works on the first import. If you repeat >>> import idlelib.idle the code in idlelib.idle does not get rerun and Idle will not start. You have to exit and restart python.exe. In order for Idle to run, python.exe has to be present somewhere. But if it has been hidden or somehow blocked, you can try the same thing as above but from an Idle Shell window. In other words, start a second Idle Shell from the first. I just cannot guarantee that this will work as well. If it does, the import will work again after Cntl-F6, Shell/Restart Shell. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 02:04:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 09 Nov 2013 01:04:29 +0000 Subject: [issue19491] Python Crashing When Saving Documents In-Reply-To: <1383558941.35.0.744248647996.issue19491@psf.upfronthosting.co.za> Message-ID: <1383959069.08.0.581820291089.issue19491@psf.upfronthosting.co.za> STINNER Victor added the comment: > There doesn't seem to be a Pygame version for 3.3 on the pygame webpage? Can't you try just to reproduce the crash in IDLE without installing pygame? (I don't know if pygame is available for Python 3.3.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 02:06:30 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 09 Nov 2013 01:06:30 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1383959190.37.0.45192164824.issue19499@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The current ugly, implicit, complex ROT13? + custom decoder version of this.py violates the initial tenets that it prints. I suppose that is an intentional joke. If it were explicit and simple: text = ''' <text lines> ...''' print(text) then people could follow up import this with this.text and learn something about accessing module attributes. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19499> _______________________________________ From report at bugs.python.org Sat Nov 9 02:27:09 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 09 Nov 2013 01:27:09 +0000 Subject: [issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX In-Reply-To: <1383924879.95.0.72869375832.issue19529@psf.upfronthosting.co.za> Message-ID: <1383960429.36.0.368656808953.issue19529@psf.upfronthosting.co.za> Terry J. Reedy added the comment: By 'crash' ('abort'), do you mean segfault (or Windows equivalent) or an exit with traceback? 3.2 only gets security patches. Do you think this is a security issue? Does the problem exist with the latest 3.3 or 3.4? ---------- nosy: +georg.brandl, terry.reedy _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19529> _______________________________________ From report at bugs.python.org Sat Nov 9 02:37:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 09 Nov 2013 01:37:15 +0000 Subject: [issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX In-Reply-To: <1383924879.95.0.72869375832.issue19529@psf.upfronthosting.co.za> Message-ID: <1383961035.55.0.316864888266.issue19529@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug is obvious and patch looks good to me. The problem is that Python 3.2 doesn't accept bugfixes anymore, any security fixes. http://www.python.org/dev/peps/pep-0392/ 3.2.5 schedule (regression fix release) 3.2.5 final: May 13, 2013 -- Only security releases after 3.2.5 -- Georg Brandl, the release manager, may reconfirm that. How is Python packaged on AIX? Can you integrate your fix in your package for Python 3.2? The unicode type has been completly rewritten in Python 3.3, the bug was indirectly fixed during the rewrite. @Michael: can you confirm? You have to compile Python >= 3.3 in debug mode and run the test suite (./python -m test -j0 -r). ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19529> _______________________________________ From report at bugs.python.org Sat Nov 9 04:53:53 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 09 Nov 2013 03:53:53 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383969233.74.0.264346650073.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: I've created a server-side clone for the implementation: http://hg.python.org/features/pep-451/ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue18864> _______________________________________ From report at bugs.python.org Sat Nov 9 04:57:49 2013 From: report at bugs.python.org (mpb) Date: Sat, 09 Nov 2013 03:57:49 +0000 Subject: [issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior Message-ID: <1383969468.97.0.110285365425.issue19530@psf.upfronthosting.co.za> New submission from mpb: I have a multi-threaded application. A background thread is blocked, having called recvfrom on a UDP socket. The main thread wants to cause the background thread to unblock. With TCP sockets, I can achieve this by calling: sock.shutdown (socket.SHUT_RD) When I try this with a UDP socket, the thread calling shutdown raises an OS Error (transport end point not connected). The blocked thread does unblock (which is helpful), but recvform appears to return successfully, returning a zero length byte string, and a bogus address! (This is the opposite of the TCP case, where the blocked thread raises the exception, and the call to shutdown succeeds.) In contrast, sock.close does not cause the blocked thread to unblock. (This is the same for both TCP and UDP sockets.) I suspect Python is just exposing the underlying C behavior of shutdown and recvfrom. I'd test it in C, but I'm not fluent in writing multi-threaded code in C. It would be nice if the recvfrom thread could raise some kind of exception, rather than appearing to return successfully. It might also be worth reporting this bug upstream (where ever upstream is for recvfrom). I'm running Python 3.3.1 on Linux. See also this similar bug. http://bugs.python.org/issue8831 The Python socket docs could mention that to unblock a reading thread, sockets should be shutdown, not closed. This might be implied in the current docs, but it could be made explicit. See: http://docs.python.org/3/library/socket.html#socket.socket.close For example, the following sentence could be appended to the Note at the above link. "Note: (...) Specifically, in multi-threaded programming, if a thread is blocked performing a read or write on a socket, calling shutdown from another thread will unblock the blocked thread. Unblocking via shutdown seems to work with TCP sockets, but may result in strange behavior with UDP sockets." Here is sample Python code that demonstrates the behavior. import socket, threading, time sock = socket.socket (socket.AF_INET, socket.SOCK_DGRAM) sock.bind (('localhost', 8000)) def recvfrom (): for i in range (2) : print ('recvfrom blocking ...') recv, remote_addr = sock.recvfrom (1024) print ('recvfrom %s %s' % (recv, remote_addr)) thread = threading.Thread ( target = recvfrom ) thread.start () time.sleep (0.5) sock2 = socket.socket (socket.AF_INET, socket.SOCK_DGRAM) sock2.sendto (b'test', ('localhost', 8000)) time.sleep (0.5) try: sock.shutdown (socket.SHUT_RD) except OSError as exc : print ('shutdown os error %s' % str (exc)) sock.close () thread.join () print ('exiting') ---- And here is the output of the above code: recvfrom blocking ... recvfrom b'test' ('127.0.0.1', 48671) recvfrom blocking ... shutdown os error [Errno 107] Transport endpoint is not connected recvfrom b'' (59308, b'\xaa\xe5\xec\xde3\xe6\x82\x02\x00\x00\xa8\xe7\xaa\xe5') exiting ---------- components: IO messages: 202457 nosy: mpb priority: normal severity: normal status: open title: cross thread shutdown of UDP socket exhibits unexpected behavior type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19530> _______________________________________ From report at bugs.python.org Sat Nov 9 05:05:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 09 Nov 2013 04:05:25 +0000 Subject: [issue11849] glibc allocator doesn't release all free()ed memory In-Reply-To: <1302858518.86.0.0355572789659.issue11849@psf.upfronthosting.co.za> Message-ID: <1383969924.99.0.130232989435.issue11849@psf.upfronthosting.co.za> STINNER Victor added the comment: I just found this issue from this article: http://python.dzone.com/articles/diagnosing-memory-leaks-python Great job! Using mmap() for arenas is the best solution for this issue. I did something similar on a completly different project (also using its own dedicated memory allocator) for workaround the fragmentation of the heap memory. ---------- nosy: +haypo _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11849> _______________________________________ From report at bugs.python.org Sat Nov 9 05:54:22 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 09 Nov 2013 04:54:22 +0000 Subject: [issue11849] glibc allocator doesn't release all free()ed memory In-Reply-To: <1302858518.86.0.0355572789659.issue11849@psf.upfronthosting.co.za> Message-ID: <1383972862.0.0.387197309125.issue11849@psf.upfronthosting.co.za> Tim Peters added the comment: [@haypo] > http://python.dzone.com/articles/diagnosing-memory-leaks-python > Great job! Using mmap() for arenas is the best solution for this issue. ? I read the article, and they stopped when they found "there seemed to be a ton of tiny little objects around, like integers.". Ints aren't allocated from arenas to begin wtih - they have their own (immortal & unbounded) free list in Python2. No change to pymalloc could make any difference to that. ---------- nosy: +tim.peters _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue11849> _______________________________________ From report at bugs.python.org Sat Nov 9 06:15:30 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 09 Nov 2013 05:15:30 +0000 Subject: [issue19249] Enumeration.__eq__ In-Reply-To: <1381693100.88.0.523701824631.issue19249@psf.upfronthosting.co.za> Message-ID: <1383974130.53.0.860505841131.issue19249@psf.upfronthosting.co.za> Ethan Furman added the comment: Given that __eq__ isn't adding anything, I think removing it is a fine option. ---------- keywords: +patch Added file: http://bugs.python.org/file32548/issue19249.stoneleaf.01.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19249> _______________________________________ From report at bugs.python.org Sat Nov 9 06:18:46 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 09 Nov 2013 05:18:46 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1383974326.77.0.868088764248.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Okay, I've updated the pep451 branch in the clone to include as much of the implementation as I've completed, which is the bulk of the functional changes. It's enough to pass the test suite. Here's what I'd like to get done before the feature freeze (in this priority order): 1. wrap up the current functional changes in the clone; 2. change module.__initializing__ to module.__spec__._initializing; 3. refactor importlib loaders to use the new Finder/Loader APIs; 4. refactor pythonrun.c to make use of __spec__; 5. implement the deprecations and removals; 6. adjust other APIs to use __spec__ (pickle, etc.); 7. add rudimentary doc additions for the new APIs. Other things that can (but don't have to) wait until after the beta release: * finish doc changes; * fill in gaps in test coverage (there shouldn't be much due to Brett's mother of all test suites for importlib) I haven't had a chance yet to make any changes to Doc/reference/import.rst in response to Brett's review, but I did make the Doc/library/importlib.rst changes he recommended. ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue18864> _______________________________________ From report at bugs.python.org Sat Nov 9 06:57:27 2013 From: report at bugs.python.org (Sworddragon) Date: Sat, 09 Nov 2013 05:57:27 +0000 Subject: [issue19531] Loading -OO bytecode files if -O was requested can lead to problems Message-ID: <1383976647.12.0.628513721742.issue19531@psf.upfronthosting.co.za> New submission from Sworddragon: The documentation says that -OO does remove docstrings so applications should be aware of it. But there is also a case where a valid declared docstring isn't accessible anymore if -O is given. First the testcase: test1.py: import test2 def test1(): """test1""" print(test1.__doc__) print(test2.test2.__doc__) test2.py: def test2(): """test2""" A simple check will show the current result: sworddragon at ubuntu:~/tmp$ python3 -BO test1.py test1 test2 If -OO is given the docstrings will be removed as expected: sworddragon at ubuntu:~/tmp$ python3 -OO test1.py None None Now we have also bytecode files saved on the disk without any docstrings. But if we try to use only -O the problem appears: sworddragon at ubuntu:~/tmp$ python3 -O test1.py test1 None Even with only -O given we doesn't get the docstring for the imported module. The problem is that Python allows to load -OO bytecode files if -O bytecode was requested. I think the simplest solution would be to name -OO bytecode-files as .pyoo. ---------- components: Interpreter Core messages: 202462 nosy: Sworddragon priority: normal severity: normal status: open title: Loading -OO bytecode files if -O was requested can lead to problems type: enhancement versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19531> _______________________________________ From report at bugs.python.org Sat Nov 9 07:14:31 2013 From: report at bugs.python.org (Sworddragon) Date: Sat, 09 Nov 2013 06:14:31 +0000 Subject: [issue19532] compileall -f doesn't force to write bytecode files Message-ID: <1383977671.71.0.216863733514.issue19532@psf.upfronthosting.co.za> New submission from Sworddragon: The force-option from compileall seems not to rebuild the bytecode files if they already exist. Here is an example of 2 calls: root at ubuntu:~# python3 -m compileall -f Skipping current directory Listing '/usr/lib/python3.3'... Compiling '/usr/lib/python3.3/__phello__.foo.py'... Compiling '/usr/lib/python3.3/_compat_pickle.py'... Compiling '/usr/lib/python3.3/_dummy_thread.py'... ... Compiling '/usr/lib/python3.3/webbrowser.py'... Compiling '/usr/lib/python3.3/xdrlib.py'... Compiling '/usr/lib/python3.3/zipfile.py'... Listing '/usr/lib/python3.3/plat-x86_64-linux-gnu'... Listing '/usr/lib/python3.3/lib-dynload'... Listing '/usr/local/lib/python3.3/dist-packages'... Listing '/usr/lib/python3/dist-packages'... root at ubuntu:~# python3 -m compileall -f Skipping current directory Listing '/usr/lib/python3.3'... Listing '/usr/lib/python3.3/plat-x86_64-linux-gnu'... Listing '/usr/lib/python3.3/lib-dynload'... Listing '/usr/local/lib/python3.3/dist-packages'... Listing '/usr/lib/python3/dist-packages'... ---------- components: Library (Lib) messages: 202463 nosy: Sworddragon priority: normal severity: normal status: open title: compileall -f doesn't force to write bytecode files type: behavior versions: Python 3.3 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19532> _______________________________________ From report at bugs.python.org Sat Nov 9 07:48:46 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 09 Nov 2013 06:48:46 +0000 Subject: [issue18923] Use the new selectors module in the subprocess module In-Reply-To: <1378320095.08.0.301150241372.issue18923@psf.upfronthosting.co.za> Message-ID: <1383979726.48.0.0943133215985.issue18923@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali <cf.natali at gmail.com>: ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue18923> _______________________________________ From report at bugs.python.org Sat Nov 9 07:51:05 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 09 Nov 2013 06:51:05 +0000 Subject: [issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior In-Reply-To: <1383969468.97.0.110285365425.issue19530@psf.upfronthosting.co.za> Message-ID: <1383979865.87.0.199693698097.issue19530@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > When I try this with a UDP socket, the thread calling shutdown > raises an OS Error (transport end point not connected). Which is normal, since UDP sockets aren't connected. > In contrast, sock.close does not cause the blocked thread to unblock. > (This is the same for both TCP and UDP sockets.) Which is normal, since you're not supposed to do this. > I suspect Python is just exposing the underlying C behavior of > shutdown and recvfrom. I'd test it in C, but I'm not fluent in > writing multi-threaded code in C. You'd get exactly the same behavior. > It would be nice if the recvfrom thread could raise some kind of > exception, rather than appearing to return successfully. It might > also be worth reporting this bug upstream (where ever upstream is for > recvfrom). I'm running Python 3.3.1 on Linux. This isn't a bug: you're not using using the BSD socket API correctly. You can try reporting this "bug" upstream (i.e. to the kernel mailing list): it'll be an interesting experience :-) > The Python socket docs could mention that to unblock a reading thread, > sockets should be shutdown, not closed. This might be implied in the > current docs, but it could be made explicit. See: If we start documenting any possible misuse of our exposed API, the documentation will get *really* large :-) Really, the problem is simply that you're not using the socket API as you should. Iy you want do unblock your thread doing a recvfrom(), you have several options: - send a datagram to the socket address from another thread - use a timeout on the socket, and periodically check a termination flag - use select()/poll() to multiplex between this socket and the read-end of a pipe: when you want to shutdown, simply write some data to the pipe: this will wake up select()/poll(), and you'll know your thread can exit Closing as invalid. ---------- nosy: +neologix resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19530> _______________________________________ From report at bugs.python.org Sat Nov 9 07:53:03 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 09 Nov 2013 06:53:03 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1383979983.79.0.893125678732.issue18874@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali <cf.natali at gmail.com>: Added file: http://bugs.python.org/file32549/3bf73dcd0b42.diff _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue18874> _______________________________________ From report at bugs.python.org Sat Nov 9 07:54:19 2013 From: report at bugs.python.org (Sworddragon) Date: Sat, 09 Nov 2013 06:54:19 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given Message-ID: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> New submission from Sworddragon: Using -OO on a script will remove the __doc__ attributes but the docstrings will still be in the process memory. In the attachments is an example script which demonstrates this with a docstring of ~10 MiB (opening the file in an editor can need some time). Calling "python3 -OO test.py" will result in a memory usage of ~16 MiB on my system (Linux 64 Bit) while test.__doc__ is None. ---------- components: Interpreter Core files: test.py messages: 202465 nosy: Sworddragon priority: normal severity: normal status: open title: Unloading docstrings from memory if -OO is given type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file32550/test.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19533> _______________________________________ From report at bugs.python.org Sat Nov 9 08:59:16 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 09 Nov 2013 07:59:16 +0000 Subject: [issue19532] compileall -f doesn't force to write bytecode files In-Reply-To: <1383977671.71.0.216863733514.issue19532@psf.upfronthosting.co.za> Message-ID: <1383983956.89.0.188342915507.issue19532@psf.upfronthosting.co.za> Ned Deily added the comment: Looking at the compileall module, it appears that -f and options other than -b have never (or, at least, for a long time, not) been supported when directories or files are not supplied and it defaults to <directories from sys.path>. Note the call in main() to compile_path vs those to compile_file or compile_dir. I'm not sure if there was a good reason for the difference but it seems like a bug now. Would you care to work on a patch and/or tests? ---------- keywords: +easy nosy: +ned.deily stage: -> needs patch versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19532> _______________________________________ From report at bugs.python.org Sat Nov 9 09:02:59 2013 From: report at bugs.python.org (Mike FABIAN) Date: Sat, 09 Nov 2013 08:02:59 +0000 Subject: [issue19534] normalize() in locale.py fails for sr_RS.UTF-8@latin Message-ID: <1383984179.72.0.86841867315.issue19534@psf.upfronthosting.co.za> New submission from Mike FABIAN: Originally reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1024667 I found that Serbian translations in Latin do not work when the locale name is written as sr_RS.UTF-8 at latin (one gets the cyrillic translations instead), but they *do* work when the locale name is written as sr_RS at latin (i.e. omitting the '.UTF-8'): $ LANG='sr_RS.UTF-8' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "What language would you like to use during the installation process?").decode("UTF-8"))' ???? ????? ????? ?????? ?? ????????? ????? ??????? ???????????? mfabian at ari:~ $ LANG='sr_RS.UTF-8 at latin' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "What language would you like to use during the installation process?").decode("UTF-8"))' ???? ????? ????? ?????? ?? ????????? ????? ??????? ???????????? mfabian at ari:~ $ LANG='sr_RS at latin' python2 -c 'import gettext; print(gettext.ldgettext("anaconda", "What language would you like to use during the installation process?").decode("UTF-8"))' Koji jezik biste ?eleli da koristite tokom procesa instalacije? mfabian at ari:~ $ The ?gettext? command line tool does not have this problem: mfabian at ari:~ $ LANG='sr_RS at latin' gettext anaconda "What language would you like to use during the installation process?" Koji jezik biste ?eleli da koristite tokom procesa instalacije?mfabian at ari:~ $ LANG='sr_RS.UTF-8 at latin' gettext anaconda "What language would you like to use during the installation process?" Koji jezik biste ?eleli da koristite tokom procesa instalacije?mfabian at ari:~ $ LANG='sr_RS.UTF-8' gettext anaconda "What language would you like to use during the installation process?" ???? ????? ????? ?????? ?? ????????? ????? ??????? ????????????mfabian at ari:~ $ ---------- components: Library (Lib) messages: 202467 nosy: mfabian priority: normal severity: normal status: open title: normalize() in locale.py fails for sr_RS.UTF-8 at latin versions: Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19534> _______________________________________ From report at bugs.python.org Sat Nov 9 09:05:26 2013 From: report at bugs.python.org (Mike FABIAN) Date: Sat, 09 Nov 2013 08:05:26 +0000 Subject: [issue19534] normalize() in locale.py fails for sr_RS.UTF-8@latin In-Reply-To: <1383984179.72.0.86841867315.issue19534@psf.upfronthosting.co.za> Message-ID: <1383984326.4.0.578976850668.issue19534@psf.upfronthosting.co.za> Mike FABIAN added the comment: The problem turns out to be caused by a problem in normalizing the locale name, see the output of this test program: mfabian at ari:~ $ cat ~/tmp/mike-test.py #!/usr/bin/python2 import sys import os import locale import encodings import encodings.aliases test_locales = [ 'ja_JP.UTF-8', 'de_DE.SJIS', 'de_DE.foobar', 'sr_RS.UTF-8 at latin', 'sr_rs at latin', 'sr at latin', 'sr_yu', 'sr_yu.SJIS at devanagari', 'sr at foobar', 'sR at foObar', 'sR', ] for test_locale in test_locales: print("%(orig)s -> %(norm)s" %{'orig': test_locale, 'norm': locale.normalize(test_locale)} ) mfabian at ari:~ $ python2 ~/tmp/mike-test.py ja_JP.UTF-8 -> ja_JP.UTF-8 de_DE.SJIS -> de_DE.SJIS de_DE.foobar -> de_DE.foobar sr_RS.UTF-8 at latin -> sr_RS.utf_8_latin sr_rs at latin -> sr_RS.UTF-8 at latin sr at latin -> sr_RS.UTF-8 at latin sr_yu -> sr_RS.UTF-8 at latin sr_yu.SJIS at devanagari -> sr_RS.sjis_devanagari sr at foobar -> sr at foobar sR at foObar -> sR at foObar sR -> sr_RS.UTF-8 mfabian at ari:~ $ I.e. ?sr_RS.UTF-8 at latin? is normalized to ?sr_RS.utf_8_latin? which is clearly wrong and causes a fallback to sr_RS when using gettext which gives the cyrillic translations. ---------- Added file: http://bugs.python.org/file32551/mike-test.py _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19534> _______________________________________ From report at bugs.python.org Sat Nov 9 09:09:25 2013 From: report at bugs.python.org (Mike FABIAN) Date: Sat, 09 Nov 2013 08:09:25 +0000 Subject: [issue19534] normalize() in locale.py fails for sr_RS.UTF-8@latin In-Reply-To: <1383984179.72.0.86841867315.issue19534@psf.upfronthosting.co.za> Message-ID: <1383984565.98.0.0369617964884.issue19534@psf.upfronthosting.co.za> Mike FABIAN added the comment: A simple fix for that problem could look like this: mfabian at ari:~ $ diff -u /usr/lib64/python2.7/locale.py.orig /usr/lib64/python2.7/locale.py --- /usr/lib64/python2.7/locale.py.orig 2013-11-09 09:08:24.807331535 +0100 +++ /usr/lib64/python2.7/locale.py 2013-11-09 09:08:34.526390646 +0100 @@ -377,7 +377,7 @@ # First lookup: fullname (possibly with encoding) norm_encoding = encoding.replace('-', '') norm_encoding = norm_encoding.replace('_', '') - lookup_name = langname + '.' + encoding + lookup_name = langname + '.' + norm_encoding code = locale_alias.get(lookup_name, None) if code is not None: return code @@ -1457,6 +1457,7 @@ 'sr_cs at latn': 'sr_RS.UTF-8 at latin', 'sr_me': 'sr_ME.UTF-8', 'sr_rs': 'sr_RS.UTF-8', + 'sr_rs.utf8 at latin': 'sr_RS.UTF-8 at latin', 'sr_rs.utf8 at latn': 'sr_RS.UTF-8 at latin', 'sr_rs at latin': 'sr_RS.UTF-8 at latin', 'sr_rs at latn': 'sr_RS.UTF-8 at latin', mfabian at ari:~ $ ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19534> _______________________________________ From report at bugs.python.org Sat Nov 9 09:15:40 2013 From: report at bugs.python.org (Mike FABIAN) Date: Sat, 09 Nov 2013 08:15:40 +0000 Subject: [issue19534] normalize() in locale.py fails for sr_RS.UTF-8@latin In-Reply-To: <1383984179.72.0.86841867315.issue19534@psf.upfronthosting.co.za> Message-ID: <1383984940.58.0.958007806047.issue19534@psf.upfronthosting.co.za> Mike FABIAN added the comment: in locale.py, the comment above ?locale_alias = {? says: # Note that the normalize() function which uses this tables # removes '_' and '-' characters from the encoding part of the # locale name before doing the lookup. This saves a lot of # space in the table. But in normalize(), this is actually not done: # First lookup: fullname (possibly with encoding) norm_encoding = encoding.replace('-', '') norm_encoding = norm_encoding.replace('_', '') lookup_name = langname + '.' + encoding code = locale_alias.get(lookup_name, None) ?norm_encoding? holds the locale name with these replacements, but then it is not used in the lookup. The patch in http://bugs.python.org/msg202469 fixes that, using the norm_encoding together with adding the alias + 'sr_rs.utf8 at latin': 'sr_RS.UTF-8 at latin', makes it work for sr_RS.UTF-8 at latin, my test program then outputs: mfabian at ari:~ $ python2 ~/tmp/mike-test.py ja_JP.UTF-8 -> ja_JP.UTF-8 de_DE.SJIS -> de_DE.SJIS de_DE.foobar -> de_DE.foobar sr_RS.UTF-8 at latin -> sr_RS.UTF-8 at latin sr_rs at latin -> sr_RS.UTF-8 at latin sr at latin -> sr_RS.UTF-8 at latin sr_yu -> sr_RS.UTF-8 at latin sr_yu.SJIS at devanagari -> sr_RS.sjis_devanagari sr at foobar -> sr at foobar sR at foObar -> sR at foObar sR -> sr_RS.UTF-8 mfabian at ari:~ $ But note that the normalization of the ?sr_yu.SJIS at devanagari? locale is still weird (of course a ?sr_yu.SJIS at devanagari? is quite silly and does not exist anyway, but the code in normalize() does not seem to work as intended. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19534> _______________________________________ From report at bugs.python.org Sat Nov 9 09:22:39 2013 From: report at bugs.python.org (Mike FABIAN) Date: Sat, 09 Nov 2013 08:22:39 +0000 Subject: [issue19534] normalize() in locale.py fails for sr_RS.UTF-8@latin In-Reply-To: <1383984179.72.0.86841867315.issue19534@psf.upfronthosting.co.za> Message-ID: <1383985359.98.0.423086716917.issue19534@psf.upfronthosting.co.za> Mike FABIAN added the comment: I think the patch I attach here is a better fix than the patch in http://bugs.python.org/msg202469 because it makes the normalize() function behave more logical overall, with this patch, my test program prints: mfabian at ari:/local/mfabian/src/cpython (2.7-mike %) $ ./python ~/tmp/mike-test.py ja_JP.UTF-8 -> ja_JP.UTF-8 de_DE.SJIS -> de_DE.SJIS de_DE.foobar -> de_DE.foobar sr_RS.UTF-8 at latin -> sr_RS.UTF-8 at latin sr_rs at latin -> sr_RS.UTF-8 at latin sr at latin -> sr_RS.UTF-8 at latin sr_yu -> sr_RS.UTF-8 at latin sr_yu.SJIS at devanagari -> sr_RS.SJIS at devanagari sr at foobar -> sr_RS.UTF-8 at foobar sR at foObar -> sr_RS.UTF-8 at foobar sR -> sr_RS.UTF-8 [18995 refs] mfabian at ari:/local/mfabian/src/cpython (2.7-mike %) $ The patch also contains a small fix for the ?ks? and ?sd? locales in the locale_alias dictionary, they had the ?.UTF-8? in the wrong place: - 'ks_in at devanagari': 'ks_IN at devanagari.UTF-8', + 'ks_in at devanagari': 'ks_IN.UTF-8 at devanagari', - 'sd': 'sd_IN at devanagari.UTF-8', + 'sd': 'sd_IN.UTF-8 at devanagari', (This error is inherited from the locale.alias file from X.org where the locale_alias dictionary is generated from) ---------- keywords: +patch Added file: http://bugs.python.org/file32552/0001-Issue-19534-fix-normalize-in-locale.py-to-make-it-wo.patch _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19534> _______________________________________ From report at bugs.python.org Sat Nov 9 09:24:28 2013 From: report at bugs.python.org (Mike FABIAN) Date: Sat, 09 Nov 2013 08:24:28 +0000 Subject: [issue19534] normalize() in locale.py fails for sr_RS.UTF-8@latin In-Reply-To: <1383984179.72.0.86841867315.issue19534@psf.upfronthosting.co.za> Message-ID: <1383985468.88.0.137587349288.issue19534@psf.upfronthosting.co.za> Mike FABIAN added the comment: The patch http://bugs.python.org/file32552/0001-Issue-19534-fix-normalize-in-locale.py-to-make-it-wo.patch is against the current HEAD of the 2.7 branch, but Python 3.3 has exactly the same problem, the same patch fixes it for python 3.3 as well. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19534> _______________________________________ From report at bugs.python.org Sat Nov 9 09:44:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 08:44:39 +0000 Subject: [issue19534] normalize() in locale.py fails for sr_RS.UTF-8@latin In-Reply-To: <1383984179.72.0.86841867315.issue19534@psf.upfronthosting.co.za> Message-ID: <1383986679.84.0.159627151684.issue19534@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems this is a duplicate of issue5815. ---------- nosy: +serhiy.storchaka superseder: -> locale.getdefaultlocale() missing corner case _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19534> _______________________________________ From report at bugs.python.org Sat Nov 9 09:59:09 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 09 Nov 2013 08:59:09 +0000 Subject: [issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter In-Reply-To: <1378145931.18.0.826598432393.issue18907@psf.upfronthosting.co.za> Message-ID: <1383987549.5.0.9833042209.issue18907@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali <cf.natali at gmail.com>: ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue18907> _______________________________________ From report at bugs.python.org Sat Nov 9 10:05:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 09:05:08 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> Message-ID: <1383987908.16.0.915092271628.issue19533@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Some tests fail when ran with -OO and then with -O. Short example (there are more examples): $ rm -rf Lib/test/__pycache__ $ ./python -OO -m test.regrtest test_property [1/1] test_property 1 test OK. $ ./python -O -m test.regrtest test_property [1/1] test_property test test_property failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_property ---------- components: +Tests nosy: +serhiy.storchaka, skrah type: enhancement -> behavior versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19533> _______________________________________ From report at bugs.python.org Sat Nov 9 10:08:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 09:08:37 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> Message-ID: <1383988117.8.0.698971375801.issue19533@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- components: -Tests type: behavior -> enhancement versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19533> _______________________________________ From report at bugs.python.org Sat Nov 9 10:08:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 09:08:49 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> Message-ID: <1383988129.01.0.190416182931.issue19533@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- Removed message: http://bugs.python.org/msg202474 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19533> _______________________________________ From report at bugs.python.org Sat Nov 9 10:09:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 09:09:07 +0000 Subject: [issue19531] Loading -OO bytecode files if -O was requested can lead to problems In-Reply-To: <1383976647.12.0.628513721742.issue19531@psf.upfronthosting.co.za> Message-ID: <1383988147.06.0.401461102289.issue19531@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Some tests fail when ran with -OO and then with -O. Short example (there are more examples): $ rm -rf Lib/test/__pycache__ $ ./python -OO -m test.regrtest test_property [1/1] test_property 1 test OK. $ ./python -O -m test.regrtest test_property [1/1] test_property test test_property failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_property ---------- components: +Tests nosy: +serhiy.storchaka, skrah type: enhancement -> behavior versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19531> _______________________________________ From report at bugs.python.org Sat Nov 9 10:09:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 09:09:31 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> Message-ID: <1383988171.57.0.268646433366.issue19533@psf.upfronthosting.co.za> Changes by Serhiy Storchaka <storchaka at gmail.com>: ---------- versions: +Python 3.3 -Python 2.7 _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue19533> _______________________________________ From report at bugs.python.org Sat Nov 9 10:21:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 09:21:23 +0000 Subject: [issue19535] Test failures with -OO Message-ID: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python -OO -m test.regrtest test_docxmlrpc test_functools test_inspect test_pkg [1/4] test_docxmlrpc test test_docxmlrpc failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_docxmlrpc.py", line 210, in test_annotations response.read()) AssertionError: b'<dl><dt><a name="-annotation"><strong>annotation</strong></a>(x: int)</dt><dd><tt>Use function annotations.</tt></dd></dl>\n<dl><dt><a name="-method_annotation"><strong>method_annotation</strong></a>(x: bytes)</dt></dl>' not found in b'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n<html><head><title>Python: DocXMLRPCServer Test Documentation\n\n\n\n\n\n
 
\n 
DocXMLRPCServer Test Docs
 
\n

This is an XML-RPC server\'s documentation, but the server can be used by POSTing to /RPC2. Try self.add, too.

\n

\n\n\n\n \n\n
 
\nMethods
       
<lambda>(x, y)
\n
add(x, y)
\n
annotation(x: int)
\n
method_annotation(x: bytes)
\n
system.listMethods()
\n
system.methodHelp(method_name)
\n
system.methodSignature(method_name)
\n
\n' [2/4/1] test_functools test test_functools failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_functools.py", line 1127, in test_wrapping_attributes self.assertEqual(g.__doc__, "Simple test") AssertionError: None != 'Simple test' [3/4/2] test_inspect test test_inspect failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_inspect.py", line 2528, in test_details self.assertIn(module.__cached__, output) AssertionError: '/home/serhiy/py/cpython/Lib/unittest/__pycache__/__init__.cpython-34.pyo' not found in "Target: unittest\nOrigin: /home/serhiy/py/cpython/Lib/unittest/__init__.py\nCached: /home/serhiy/py/cpython/Lib/unittest/__pycache__/__init__.cpython-34.pyc\nLoader: <_frozen_importlib.SourceFileLoader object at 0xb7041c4c>\nSubmodule search path: ['/home/serhiy/py/cpython/Lib/unittest']\n\n\n" [4/4/3] test_pkg 1 test OK. 3 tests failed: test_docxmlrpc test_functools test_inspect ---------- components: Tests messages: 202476 nosy: serhiy.storchaka, skrah priority: normal severity: normal status: open title: Test failures with -OO type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 10:25:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 09:25:42 +0000 Subject: [issue19535] Test failures with -OO In-Reply-To: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> Message-ID: <1383989142.85.0.90008209183.issue19535@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Failure of test_pkg is sporadic. $ ./python -OO -m test.regrtest test_pkg [1/1] test_pkg test test_pkg failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_pkg.py", line 259, in test_7 '__name__', '__package__', '__path__']) AssertionError: Lists differ: ['__c[22 chars]__file__', '__loader__', '__name__', '__package__'] != ['__c[22 chars]__file__', '__loader__', '__name__', '__package__', '__path__'] Second list contains 1 additional elements. First extra element 6: __path__ - ['__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__'] + ['__cached__', + '__doc__', + '__file__', + '__loader__', + '__name__', + '__package__', + '__path__'] 1 test failed: test_pkg ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 10:28:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 09 Nov 2013 09:28:25 +0000 Subject: [issue11849] glibc allocator doesn't release all free()ed memory In-Reply-To: <1383972862.0.0.387197309125.issue11849@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Extract of the "workaround" section: "You could also run your Python jobs using Jython, which uses the Java JVM and does not exhibit this behavior. Likewise, you could upgrade to Python 3.3 ," Which contains a link to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 11:29:06 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 09 Nov 2013 10:29:06 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <1383992946.41.0.796480949258.issue19504@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 11:57:07 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 09 Nov 2013 10:57:07 +0000 Subject: [issue19532] compileall -f doesn't force to write bytecode files In-Reply-To: <1383977671.71.0.216863733514.issue19532@psf.upfronthosting.co.za> Message-ID: <1383994627.76.0.20350645013.issue19532@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Attached the patch to fix the problem. I did not modify the unit test because the bug was located in the __main__ part of Lib/compileall. ---------- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file32553/compileall_force.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 16:15:27 2013 From: report at bugs.python.org (Brandon Rhodes) Date: Sat, 09 Nov 2013 15:15:27 +0000 Subject: [issue19536] MatchObject should offer __getitem__() Message-ID: <1384010127.61.0.754728433968.issue19536@psf.upfronthosting.co.za> New submission from Brandon Rhodes: Regular expression re.MatchObject objects are sequences. They contain at least one ?group? string, possibly more, which are integer-indexed starting at zero. Today, groups can be accessed in one of two ways. (1) You can call the method match.group(N). (2) You can call glist = match.groups() and then access each group as glist[N-1]. Note the obvious off-by-one error: .groups() does not include ?group zero?, which contains the entire match, and therefore its indexes are off-by-one from the values you would pass to .group(). I propose that MatchObject gain a __getitem__(N) method whose return value for every N is the same as .group(N) as I think that match[N] is a quite obvious syntax for asking for one particular group of an RE match. The only objection I can see to this proposal is the obvious asymmetry between Group Zero and all subsequent groups of a regular expression pattern: zero means ?the whole thing? whereas each of the others holds the content of a particular explicit set of parens. Looping over the elements match[0], match[1], ... of a pattern like this: r'(\d\d\d\d)/(\d\d)/(\d\d)' will give you *first* the *entire* match, and only then turn its attention to the three parenthesized substrings. My retort is that concentric groups can happen anyway: that Group Zero, holding the entire match, is not really as special as the newcomer might suspect, because you can always wind up with groups inside of other groups; it is simply part of the semantics of regular expressions that groups might overlap or might contain one another, as in: r'((\d\d)/(\d\d)) Description: (.*)' Here, we see that concentricity is not a special property of Group Zero, but in fact something that can happen quite naturally with other groups. The caller simply needs to imagine every regular expression being surrounded by an ?automatic set of parentheses? to understand where Group Zero comes from, and how it will be ordered in the resulting sequence of groups relative to the subordinate groups within the string. If one or two people voice agreement here in this issue, I will be very happy to offer a patch. ---------- components: Regular Expressions messages: 202480 nosy: brandon-rhodes, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: MatchObject should offer __getitem__() type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 16:20:29 2013 From: report at bugs.python.org (Brandon Rhodes) Date: Sat, 09 Nov 2013 15:20:29 +0000 Subject: [issue19536] MatchObject should offer __getitem__() In-Reply-To: <1384010127.61.0.754728433968.issue19536@psf.upfronthosting.co.za> Message-ID: <1384010429.14.0.322999344273.issue19536@psf.upfronthosting.co.za> Changes by Brandon Rhodes : ---------- versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 16:29:23 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 09 Nov 2013 15:29:23 +0000 Subject: [issue19536] MatchObject should offer __getitem__() In-Reply-To: <1384010127.61.0.754728433968.issue19536@psf.upfronthosting.co.za> Message-ID: <1384010963.88.0.900305135975.issue19536@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is something that the regex module already has, and since it is/was supposed to replace the re module in stdlib, I've been holding off to add to re for a long time. We also discussed this recently on #python-dev, and I think it's OK to add it, as long as it behaves the same way as it does in the regex module. If others agree it would be great to do it before the 3.4 feature freeze (there aren't many days left). ---------- nosy: +christian.heimes, serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 16:58:44 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 09 Nov 2013 15:58:44 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384012724.61.0.771820928241.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't quite know what you mean by "current functional changes in the clone". Is this changes to import to use exec_module() and such? Just a guess since step 3 suggests there are no loaders implementing the new API currently. As for the tests, I'm hoping that simply refactoring some of them will allow reusing a bunch of the finder & loader tests instead of having to do it from scratch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 17:00:17 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 09 Nov 2013 16:00:17 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384012817.72.0.844087578055.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: I should clarify why I want a clarification on step 1. On Friday my current plan (barring other bugs I need to squash for b1) is to just start working on the pep-451 repo and I want a TODO list to follow in this issue so I don't have to waste time trying to figure out what to work on next. That's why I want it spelled out if we want the loaders fixed first or import, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 17:04:01 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 09 Nov 2013 16:04:01 +0000 Subject: [issue19531] Loading -OO bytecode files if -O was requested can lead to problems In-Reply-To: <1383976647.12.0.628513721742.issue19531@psf.upfronthosting.co.za> Message-ID: <1384013041.08.0.175004536945.issue19531@psf.upfronthosting.co.za> Brett Cannon added the comment: This is a known problem and has been brought up over the years. Discussions have typically revolved around expanding the .pyc format to encode what optimizations were used so if the interpreter was using different optimizations it would not use the bytecode. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 17:06:12 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 09 Nov 2013 16:06:12 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> Message-ID: <1384013172.79.0.39786106431.issue19533@psf.upfronthosting.co.za> Brett Cannon added the comment: Do realize this is a one-time memory cost, though, because next execution will load from the .pyo and thus will never load the docstring into memory. If you pre-compile all bytecode with -OO this will never even occur. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 17:24:18 2013 From: report at bugs.python.org (Sworddragon) Date: Sat, 09 Nov 2013 16:24:18 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> Message-ID: <1384014258.05.0.660875704232.issue19533@psf.upfronthosting.co.za> Sworddragon added the comment: > Do realize this is a one-time memory cost, though, because next execution will load from the .pyo and thus will never load the docstring into memory. Except in 2 cases: - The bytecode was previously generated with -O. - The bytecode couldn't be written (for example permission issues or Python was invoked with -B). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 17:32:08 2013 From: report at bugs.python.org (Andreas Schwab) Date: Sat, 09 Nov 2013 16:32:08 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char Message-ID: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> New submission from Andreas Schwab: sizeof(foo) is never a good approximation for the alignment of foo ---------- components: Interpreter Core files: xx messages: 202487 nosy: schwab priority: normal severity: normal status: open title: Fix misalignment in fastsearch_memchr_1char type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file32554/xx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 18:02:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 17:02:41 +0000 Subject: [issue19536] MatchObject should offer __getitem__() In-Reply-To: <1384010127.61.0.754728433968.issue19536@psf.upfronthosting.co.za> Message-ID: <1384016561.93.0.302934554696.issue19536@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We discussed this recently on #python-dev, and I don't think that it's worth to add indexing to match object. It will be confused that len(match) != len(match.groups()). I don't know any use case for indexing, it doesn't add anything new except yet one way to access a group. This feature not only increases maintaining complexity, but it also increases a number of things which should learn and remember Python programmer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 18:13:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 17:13:59 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1384017239.71.0.410174262594.issue19537@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 18:46:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 09 Nov 2013 17:46:43 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1384019203.52.0.611648151385.issue19499@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Terry is right here. The "this" module doesn't seem to have been thought as an educational tool in the first place. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 18:56:19 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 09 Nov 2013 17:56:19 +0000 Subject: [issue19532] compileall -f doesn't force to write bytecode files In-Reply-To: <1383977671.71.0.216863733514.issue19532@psf.upfronthosting.co.za> Message-ID: <1384019778.99.0.416164508695.issue19532@psf.upfronthosting.co.za> R. David Murray added the comment: test_compileall has fairly extensive tests of the command line behavior, added when we refactored from optparse to argparse. So a test should be added for this case. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 19:35:28 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 09 Nov 2013 18:35:28 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> Message-ID: <1384022128.17.0.430195711894.issue19533@psf.upfronthosting.co.za> R. David Murray added the comment: So the question is, if there is no longer a reference to the docstring, why isn't it garbage collected? (I tested adding a gc.collect(), and it didn't make any difference.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 19:44:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 09 Nov 2013 18:44:31 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1384022671.84.0.698277930783.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: > 2013-11-09 06:53:03 neologix set files: + 3bf73dcd0b42.diff I guess that you clicked on [Create Patch]. This button doesn't work, it generates a patch with unrelated changes. Maybe I did something wrong on features/tracemalloc repository. Here is a patch of the revision 8b34364a66a9 (which does not contain add_filter()): 8b34364a66a9.patch ---------- Added file: http://bugs.python.org/file32555/8b34364a66a9.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 20:18:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 09 Nov 2013 19:18:00 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <3dH7RC1MYhz7Lkd@mail.python.org> Roundup Robot added the comment: New changeset be8f9beca8aa by Serhiy Storchaka in branch '2.7': Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.11 (issue #19085). http://hg.python.org/cpython/rev/be8f9beca8aa New changeset 204e66190dbb by Serhiy Storchaka in branch '3.3': Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.11 (issue #19085). http://hg.python.org/cpython/rev/204e66190dbb New changeset 2834e410d1ae by Serhiy Storchaka in branch 'default': Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.11 (issue #19085). http://hg.python.org/cpython/rev/2834e410d1ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 20:19:38 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 09 Nov 2013 19:19:38 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1384024778.65.0.344599144771.issue19499@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think this should be closed as won't fix. Having "import this" behave differently from any other import is counter-intuitive (students will start asking "why if I reimport 'this' the code gets executed every time but it doesn't work with my module?"). If they want to read the Zen over and over again they can check PEP 20. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 20:59:39 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 09 Nov 2013 19:59:39 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <1384027179.05.0.878237046156.issue19227@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 21:28:24 2013 From: report at bugs.python.org (Thomas Heller) Date: Sat, 09 Nov 2013 20:28:24 +0000 Subject: [issue19538] Changed function prototypes in the PEP 384 stable ABI Message-ID: <1384028904.73.0.822920006161.issue19538@psf.upfronthosting.co.za> New submission from Thomas Heller: (As requested by email in python-dev I'm reporting this problem) Some function prototypes in the stable ABI have been changed between Python 3.3 and 3.4. PyObject_CallFunction is an example, the second parameter has been changed from 'char *' to 'const char *', which leads to compiler warnings in my code. I admit that my use case is probably weird, but here we go: I want to embed Python and use the stable ABI (API?) so that I the executable does not have to be recompiled for different Python versions. I want to link dynamically to the Python runtime (loaded with LoadLibrary on Windows). Also I do not want in use python3.dll. To make calling the functions less painful I ended up with the following approach. My executable is compiled with 'Py_BUILD_CORE' defined so that I can *implement* PyObject_CallFunction myself. I have a python-dynload.c file which implements the API functions in this way: #define Py_BUILD_CORE #include HMODULE hPyDLL; /* the module handle of a dynamically loaded python3X.dll */ PyObject *PyObject_CallFunction(PyObject *callable, char *format, ...) { /* implement by forwarding to functions in the dynloaded dll */ } When I compile this code with the Python 3.3 headers, everything is ok. With the Python 3.4 headers, I get source/python-dynload.c(75) : warning C4028: formal parameter 2 different from declaration When I change the second parameter in the function definition to 'const char *format', the situation reverses, compiling with 3.3 gives the warning but 3.4 is ok. ---------- components: Build keywords: 3.3regression messages: 202495 nosy: theller priority: normal severity: normal status: open title: Changed function prototypes in the PEP 384 stable ABI versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 21:31:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 20:31:51 +0000 Subject: [issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename In-Reply-To: <1379196682.03.0.147663616291.issue19020@psf.upfronthosting.co.za> Message-ID: <1384029111.56.0.447281739652.issue19020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests added in issue19085 have a special case for tuple values because widget[name] and widget.configure(name) return different results in such cases. When remove this special case, following tests fails: ====================================================================== FAIL: test_text (tkinter.test.test_ttk.test_widgets.ButtonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 381, in test_text self.checkParams(widget, 'text', '', 'any string') File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 89, in checkParams self.checkParam(widget, name, value, **kwargs) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: ('any', 'string') != 'any string' ====================================================================== FAIL: test_offvalue (tkinter.test.test_ttk.test_widgets.CheckbuttonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 248, in test_offvalue self.checkParams(widget, 'offvalue', 1, 2.3, '', 'any string') File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 89, in checkParams self.checkParam(widget, name, value, **kwargs) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: ('any', 'string') != 'any string' ====================================================================== FAIL: test_onvalue (tkinter.test.test_ttk.test_widgets.CheckbuttonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 252, in test_onvalue self.checkParams(widget, 'onvalue', 1, 2.3, '', 'any string') File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 89, in checkParams self.checkParam(widget, name, value, **kwargs) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: ('any', 'string') != 'any string' ====================================================================== FAIL: test_text (tkinter.test.test_ttk.test_widgets.CheckbuttonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 381, in test_text self.checkParams(widget, 'text', '', 'any string') File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 89, in checkParams self.checkParam(widget, name, value, **kwargs) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: ('any', 'string') != 'any string' ====================================================================== FAIL: test_values (tkinter.test.test_ttk.test_widgets.ComboboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 363, in test_values self.checkParam(self.combo, 'values', (42, 3.14, '', 'any string')) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: Tuples differ: (42, 3.14, '', ('any', 'string')) != (42, 3.14, '', 'any string') First differing element 3: ('any', 'string') any string - (42, 3.14, '', ('any', 'string')) ? - ^^^^ - + (42, 3.14, '', 'any string') ? ^ ====================================================================== FAIL: test_text (tkinter.test.test_ttk.test_widgets.LabelFrameTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 381, in test_text self.checkParams(widget, 'text', '', 'any string') File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 89, in checkParams self.checkParam(widget, name, value, **kwargs) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: ('any', 'string') != 'any string' ====================================================================== FAIL: test_text (tkinter.test.test_ttk.test_widgets.LabelTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 381, in test_text self.checkParams(widget, 'text', '', 'any string') File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 89, in checkParams self.checkParam(widget, name, value, **kwargs) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: ('any', 'string') != 'any string' ====================================================================== FAIL: test_text (tkinter.test.test_ttk.test_widgets.RadiobuttonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 381, in test_text self.checkParams(widget, 'text', '', 'any string') File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 89, in checkParams self.checkParam(widget, name, value, **kwargs) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: ('any', 'string') != 'any string' ====================================================================== FAIL: test_value (tkinter.test.test_ttk.test_widgets.RadiobuttonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 701, in test_value self.checkParams(widget, 'value', 1, 2.3, '', 'any string') File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 89, in checkParams self.checkParam(widget, name, value, **kwargs) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 63, in checkParam self.assertEqual2(t[4], expected, eq=eq) File "/home/serhiy/py/cpython/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: ('any', 'string') != 'any string' With the tkinter_configure_splitlist.patch patch they are passed again. ---------- Added file: http://bugs.python.org/file32556/tkinter_checkParam_configure.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 21:33:27 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 09 Nov 2013 20:33:27 +0000 Subject: [issue19538] Changed function prototypes in the PEP 384 stable ABI In-Reply-To: <1384028904.73.0.822920006161.issue19538@psf.upfronthosting.co.za> Message-ID: <1384029207.24.0.411854421994.issue19538@psf.upfronthosting.co.za> Ezio Melotti added the comment: See #9369 and #1772673. ---------- nosy: +ezio.melotti, serhiy.storchaka type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 21:34:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 20:34:15 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1384029255.73.0.559570712582.issue5815@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. There are two duplicate issues opened last month. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 21:35:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 20:35:35 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1384029335.15.0.172939530182.issue16685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are no objections I will commit last patch tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 21:43:36 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 09 Nov 2013 20:43:36 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1384022128.17.0.430195711894.issue19533@psf.upfronthosting.co.za> Message-ID: <20131109204335.GA15538@sleipnir.bytereef.org> Stefan Krah added the comment: R. David Murray wrote: > So the question is, if there is no longer a reference to the docstring, why isn't it garbage collected? (I tested adding a gc.collect(), and it didn't make any difference.) I think it probably is garbage collected but the freed memory is not returned to the OS by the memory allocator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 22:12:13 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 09 Nov 2013 21:12:13 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1383980059.61.0.697157457336.issue19533@psf.upfronthosting.co.za> Message-ID: <1384031533.7.0.155155182241.issue19533@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. If I turn on gc debugging before the def, I don't see anything get collected. If I allocate a series of new 10K strings, the memory keeps growing. Of course, that could still be down to the vagaries of OS memory management. Time to break out Victor's tracemalloc, but I probably don't have that much ambition today :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 22:17:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 09 Nov 2013 21:17:10 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <3dHB4j6mY7z7Lm0@mail.python.org> Roundup Robot added the comment: New changeset 5fbcb4aa48fa by Serhiy Storchaka in branch '2.7': Issue #1575020: Fixed support of 24-bit wave files on big-endian platforms. http://hg.python.org/cpython/rev/5fbcb4aa48fa New changeset 79b8b7c5fe8a by Serhiy Storchaka in branch '3.3': Issue #1575020: Fixed support of 24-bit wave files on big-endian platforms. http://hg.python.org/cpython/rev/79b8b7c5fe8a New changeset 1ee45eb6aab9 by Serhiy Storchaka in branch 'default': Issue #1575020: Fixed support of 24-bit wave files on big-endian platforms. http://hg.python.org/cpython/rev/1ee45eb6aab9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 22:24:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 09 Nov 2013 21:24:14 +0000 Subject: [issue1575020] Request wave support > 16 bit samples Message-ID: <1384032254.92.0.118486887305.issue1575020@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 9 22:46:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 09 Nov 2013 21:46:47 +0000 Subject: [issue19538] Changed function prototypes in the PEP 384 stable ABI In-Reply-To: <1384028904.73.0.822920006161.issue19538@psf.upfronthosting.co.za> Message-ID: <1384033607.86.0.842765898209.issue19538@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 01:41:02 2013 From: report at bugs.python.org (mpb) Date: Sun, 10 Nov 2013 00:41:02 +0000 Subject: [issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior In-Reply-To: <1383969468.97.0.110285365425.issue19530@psf.upfronthosting.co.za> Message-ID: <1384044062.92.0.564216162153.issue19530@psf.upfronthosting.co.za> mpb added the comment: After some research... > Which is normal, since UDP sockets aren't connected. But UDP sockets can be connected! If I connect the UDP sockets, then shutdown succeeds (no exception is raised), but recvfrom still appears to succeed, returning a zero length message with a bogus address family, IP address and port. (Bogus even if I set them to zero before the call!) FYI, the FreeBSD (and OpenBSD) shutdown manpages anticipate calling shutdown on DGRAM sockets. And the Linux connect manpage discusses connecting DGRAM sockets. Here is the updated Python code. I do expect to try to report this upstream. (Also, I now have C/pthreads code, if you want to see it. As expected, C behaves identically.) ---- import socket, threading, time fd_0 = socket.socket (socket.AF_INET, socket.SOCK_DGRAM) fd_0.bind (('localhost', 8000)) fd_0.connect (('localhost', 8001)) fd_1 = socket.socket (socket.AF_INET, socket.SOCK_DGRAM) fd_1.bind (('localhost', 8001)) fd_1.connect (('localhost', 8000)) def thread_main (): for i in range (3) : # print ('recvfrom blocking ...') recv, remote_addr = fd_0.recvfrom (1024) print ('recvfrom %s %s' % (recv, remote_addr)) def main (): fd_1.send (b'test') fd_1.send (b'') fd_0.shutdown (socket.SHUT_RD) thread = threading.Thread ( target = thread_main ) thread.start () time.sleep (0.5) main () thread.join () print ('exiting') ---- And the code outputs: recvfrom b'test' ('127.0.0.1', 8001) recvfrom b'' ('127.0.0.1', 8001) recvfrom b'' (36100, b'\xe4\xc6\xf0^7\xe2\x85\xf8\x07\xc1\x04\x8d\xe4\xc6') exiting ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 02:09:43 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 10 Nov 2013 01:09:43 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1384045783.51.0.338829136677.issue10197@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Lib/subprocess.py still has outdated comment: # NB This only works (and is only relevant) for POSIX. ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 02:40:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 10 Nov 2013 01:40:56 +0000 Subject: [issue13248] deprecated in 3.2/3.3, should be removed in 3.4 In-Reply-To: <1319392186.66.0.823106983991.issue13248@psf.upfronthosting.co.za> Message-ID: <1384047656.23.0.868807410266.issue13248@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 02:42:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 10 Nov 2013 01:42:46 +0000 Subject: [issue18802] ipaddress documentation errors In-Reply-To: <1377118857.87.0.169407991036.issue18802@psf.upfronthosting.co.za> Message-ID: <1384047766.46.0.597740847255.issue18802@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 03:51:45 2013 From: report at bugs.python.org (Jan Kaliszewski) Date: Sun, 10 Nov 2013 02:51:45 +0000 Subject: [issue19539] The 'raw_unicode_escape' codec buggy + not apropriate for Python 3.x Message-ID: <1384051905.56.0.969775270474.issue19539@psf.upfronthosting.co.za> New submission from Jan Kaliszewski: It seems that the 'raw_unicode_escape' codec: 1) produces data that could be suitable for Python 2.x raw unicode string literals and not for Python 3.x raw unicode string literals (in Python 3.x \u... escapes are also treated literally); 2) seems to be buggy anyway: bytes in range 128-255 are encoded with the 'latin-1' encoding (in Python 3.x it is definitely a bug; and even in Python 2.x the feature is dubious, although at least the Py2's eval() and compile() functions officially accept 'latin-1'-encoded byte strings...). Python 3.3: >>> b = "za????".encode('raw_unicode_escape') >>> literal = b'r"' + b + b'"' >>> literal b'r"za\\u017c\xf3\\u0142\\u0107"' >>> eval(literal) Traceback (most recent call last): File "", line 1, in File "", line 1 SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xf3 in position 8: invalid continuation byte >>> b'\xf3'.decode('latin-1') '?' >>> b = "za?".encode('raw_unicode_escape') >>> literal = b'r"' + b + b'"' >>> literal b'r"za\\u017c"' >>> eval(literal) 'za\\u017c' >>> print(eval(literal)) za\u017c It believe that the 'raw_unicode_escape' codes should either be deprecated and later removed or be modified to accept only printable ascii characters. PS. Also, as a side note: neither 'raw_unicode_escape' nor 'unicode_escape' does escape quotes (see issue #7615) -- shouldn't it be at least documented explicitly? ---------- components: Library (Lib), Unicode messages: 202505 nosy: ezio.melotti, haypo, zuo priority: normal severity: normal status: open title: The 'raw_unicode_escape' codec buggy + not apropriate for Python 3.x versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 05:21:33 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 10 Nov 2013 04:21:33 +0000 Subject: [issue19540] PEP339: Fix link to Zephyr ASDL paper Message-ID: <1384057293.31.0.135079823938.issue19540@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- assignee: docs at python components: Documentation hgrepos: 213 nosy: docs at python, techtonik priority: normal severity: normal status: open title: PEP339: Fix link to Zephyr ASDL paper _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 06:16:58 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 10 Nov 2013 05:16:58 +0000 Subject: [issue19541] ast.dump(indent=True) prettyprinting Message-ID: <1384060618.33.0.960245227555.issue19541@psf.upfronthosting.co.za> New submission from anatoly techtonik: ast.dump needs an indent argument for pretty printing. from pprint import pprint as pp pp(ast.dump(node)) "Assign(targets=[Tuple(elts=[Name(id='d', ctx=Store()), Name(id='m', ctx=Store())], ctx=Store())], value=Call(func=Name(id='divmod', ctx=Load()), args=[Call(func=Name(id='len', ctx=Load()), args=[Name(id='seq', ctx=Load())], keywords=[], starargs=None, kwargs=None), Name(id='size', ctx=Load())], keywords=[], starargs=None, kwargs=None))" ---------- assignee: docs at python components: Documentation messages: 202506 nosy: docs at python, techtonik priority: normal severity: normal status: open title: ast.dump(indent=True) prettyprinting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 08:05:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 07:05:29 +0000 Subject: [issue19539] The 'raw_unicode_escape' codec buggy + not apropriate for Python 3.x In-Reply-To: <1384051905.56.0.969775270474.issue19539@psf.upfronthosting.co.za> Message-ID: <1384067129.42.0.14957999002.issue19539@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The 'raw_unicode_escape' codec can't be neither removed nor changed because it is used in pickle protocol. Just don't use it if its behavior looks weird for you. Right way to decode raw_unicode_escape-encoded data is use 'raw_unicode_escape' decoder. If a string don't contain quotes, you can use eval(), but you should first decode data from latin1 and encode to UTF-8: >>> literal = ('r"%s"' % "za????".encode('raw_unicode_escape').decode('latin1')).encode() >>> literal b'r"za\\u017c\xc3\xb3\\u0142\\u0107"' >>> eval(literal) 'za\\u017c?\\u0142\\u0107' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 09:47:16 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 10 Nov 2013 08:47:16 +0000 Subject: [issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior In-Reply-To: <1384044062.92.0.564216162153.issue19530@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > After some research... > >> Which is normal, since UDP sockets aren't connected. > > But UDP sockets can be connected! > No, they can't. "Connecting" a UDP socket doesn't established a duplex connection like in TCP: it's just a shortand for not having to repeat the destination address upon every sendto()/sendmsg(). > FYI, the FreeBSD (and OpenBSD) shutdown manpages anticipate calling shutdown on DGRAM sockets. And the Linux connect manpage discusses connecting DGRAM sockets. And since shutdown() is designed for duplex connection, it doesn't really make much sense. It might very well work when you passe SHUT_RD because it can be interpreted as triggering an EOF, but I wouldn't rely on this. > Here is the updated Python code. I do expect to try to report this upstream. (Also, I now have C/pthreads code, if you want to see it. As expected, C behaves identically.) So you see it's not a Python "bug". It's really not a bug at all, but if you want to report this upstream, have fun :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 09:47:31 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 08:47:31 +0000 Subject: [issue19249] Enumeration.__eq__ In-Reply-To: <1381693100.88.0.523701824631.issue19249@psf.upfronthosting.co.za> Message-ID: <1384073251.86.0.853021325534.issue19249@psf.upfronthosting.co.za> Nick Coghlan added the comment: Since the default eq implementation handles ducktyping correctly, dropping the Enum specific __eq__ implementation should be fine. Just make sure this still works: >>> class AlwaysEqual: ... def __eq__(self, other): ... return True ... >>> from enum import Enum >>> class MyEnum(Enum): ... a = 1 ... >>> MyEnum.a == AlwaysEqual() True >>> AlwaysEqual() == MyEnum.a True ---------- nosy: +ncoghlan stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 09:51:04 2013 From: report at bugs.python.org (Armin Rigo) Date: Sun, 10 Nov 2013 08:51:04 +0000 Subject: [issue19542] WeakValueDictionary bug in setdefault()&pop() Message-ID: <1384073464.47.0.0676946313386.issue19542@psf.upfronthosting.co.za> New submission from Armin Rigo: WeakValueDictionary.setdefault() contains a bug that shows up in multithreaded situations using reference cycles. Attached a test case: it is possible for 'setdefault(key, default)' to return None, although None is never put as a value in the dictionary. (Actually, being a WeakValueDictionary, None is not allowed as a value.) The reason is that the code in setdefault() ends in "return wr()", but the weakref "wr" might have gone invalid between the time it was fetched from "self.data" and the "wr()" itself, thus returning None. A similar problem occurs in pop(), leading it to possibly raise KeyError even if it is called with a default argument. ---------- components: Library (Lib) messages: 202510 nosy: arigo priority: normal severity: normal status: open title: WeakValueDictionary bug in setdefault()&pop() versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 09:55:17 2013 From: report at bugs.python.org (Armin Rigo) Date: Sun, 10 Nov 2013 08:55:17 +0000 Subject: [issue19542] WeakValueDictionary bug in setdefault()&pop() In-Reply-To: <1384073464.47.0.0676946313386.issue19542@psf.upfronthosting.co.za> Message-ID: <1384073717.51.0.199580452068.issue19542@psf.upfronthosting.co.za> Changes by Armin Rigo : Added file: http://bugs.python.org/file32557/x.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 09:57:24 2013 From: report at bugs.python.org (Armin Rigo) Date: Sun, 10 Nov 2013 08:57:24 +0000 Subject: [issue19542] WeakValueDictionary bug in setdefault()&pop() In-Reply-To: <1384073464.47.0.0676946313386.issue19542@psf.upfronthosting.co.za> Message-ID: <1384073844.1.0.117667919546.issue19542@psf.upfronthosting.co.za> Changes by Armin Rigo : Added file: http://bugs.python.org/file32558/weakref.slice _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 10:04:44 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 10 Nov 2013 09:04:44 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1384074284.56.0.727023372848.issue19499@psf.upfronthosting.co.za> Terry J. Reedy added the comment: > Having "import this" behave differently from any other import is counter-intuitive I agree. My proposal (by design) does not change the property of executing only when first imported. I merely proposed that the text either start as cleartext or that the decrypted text be saved as a module attribute. *This* would make 'this' *more* like normal modules. Having side-effect code executed on import, as opposed to when running as main, is unusual. (Idlelib.idle is another intentional example, and one which currently has the same problem.) But I agree that this unusual behavior should remain for both. Having module code that is intentionally obfuscated and as about as inefficient as possible without being totally ridiculous is, I hope, unique, and not at all like other modules. Even if Tim wants to keep the literal encrypted, and the rot13 codec is not available in Py3 (?), the decoding would, I believe, be much more efficient using str.translate. Or the text could be encoded and decoded with one of the pairs in the binascii or base64 modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 10:20:47 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 09:20:47 +0000 Subject: [issue19543] Add -3 warnings for codec convenience method changes Message-ID: <1384075247.27.0.0100141647279.issue19543@psf.upfronthosting.co.za> New submission from Nick Coghlan: The long discussion in issue 7475 and some subsequent discussions I had with Armin Ronacher have made it clear to me that the key distinction between the codec systems in Python 2 and Python 3 is the following differences in type signatures of various operations: Python 2 (8 bit str): codecs module: object <-> object convenience methods: basestring <-> basestring available codecs: unicode <-> str, str <-> str, unicode <-> unicode Python 3 (Unicode str): codecs module: object <-> object convenience methods: str <-> bytes available codecs: str <-> bytes, bytes <-> bytes, str <-> str The significant distinction is the fact that, in Python 2, the convenience methods covered all standard library codecs, but for Python 3, the codecs module needs to be used directly for the bytes <-> bytes codecs and the one str <-> str codec (since those codecs no longer satisfy the constraints of the text model related convenience methods). After attempting to implement a 2to3 fixer for these non-Unicode codecs in issue 17823, I realised that wouldn't really work properly (since it's a data driven error based on the behaviour of the named codec), so I'm rejecting that proposal and replacing it with this one for additional Py3k warnings in Python 2.7.7. My proposal is to take the following cases and make them produce warnings under Python 2.7.7 when Py3k warnings are enabled (remember, these are the 2.7 types, not the 3.x ones): - the str.encode method is called (redirect to codecs.encode to handle arbitrary input types in a forward compatible way) - the unicode.decode method is called (redirect to codecs.decode to handle arbitrary input types) - PyUnicode_AsEncodedString produces something other than an 8-bit string (redirect to codecs.encode for arbitrary output types) - PyUnicode_Decode produces something other than a unicode string (redirect to codecs.decode for arbitrary output types) For the latter two cases, issue 17828 includes updates to the Python 3 error messages to similarly redirect to the convenience functions in the codecs module. However, the removed convenience methods will continue to simply trigger AttributeError in Python 3 with no special casing. ---------- components: Interpreter Core messages: 202512 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Add -3 warnings for codec convenience method changes type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 10:22:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 09:22:11 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1384075331.0.0.795207413368.issue17823@psf.upfronthosting.co.za> Nick Coghlan added the comment: Due to the data driven nature of this particular incompatibility, I'm rejecting this in favour of the Py3k warning based approach in issue 19543. ---------- dependencies: -codecs missing: base64 bz2 hex zlib hex_codec ... resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 10:25:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 09:25:10 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1384075510.11.0.939352841182.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 17823 is now closed, but not because it has been implemented. It turns out that the data driven nature of the incompatibility means it isn't really amenable to being detected and fixed automatically via 2to3. Issue 19543 is a replacement proposal for the introduction of some additional codec related Py3k warnings in Python 2.7.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 10:26:56 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 10 Nov 2013 09:26:56 +0000 Subject: [issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename In-Reply-To: <1379196682.03.0.147663616291.issue19020@psf.upfronthosting.co.za> Message-ID: <1384075616.88.0.97041731257.issue19020@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I read your explanation in relation to the code and got part of it but not all. I need to try another run through. I may try to locally (and temporarily), print to the console to see what is happening. I am also not clear on the relation between the UnicodeDecodeError and tuple splitting. Does '_flatten((self._w, cmd)))' call split or splitlist on the tuple arg? Is so, do you know why a problem with that would lead to the UDError? Does your patch fix the leading '0' regression? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 10:40:49 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 10 Nov 2013 09:40:49 +0000 Subject: [issue19532] compileall -f doesn't force to write bytecode files In-Reply-To: <1383977671.71.0.216863733514.issue19532@psf.upfronthosting.co.za> Message-ID: <1384076449.44.0.441500360249.issue19532@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Ah, I missed that. I made this assumption because when I executed other modules manually, they were there just for testing functionality (such as shlex and aifc). Added test. ---------- Added file: http://bugs.python.org/file32559/compileall_force_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 11:03:55 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 10 Nov 2013 10:03:55 +0000 Subject: [issue19532] compileall -f doesn't force to write bytecode files In-Reply-To: <1383977671.71.0.216863733514.issue19532@psf.upfronthosting.co.za> Message-ID: <1384077835.42.0.378852466209.issue19532@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Tidied up the test. ---------- Added file: http://bugs.python.org/file32560/compileall_force_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 11:35:40 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 10 Nov 2013 10:35:40 +0000 Subject: [issue19543] Add -3 warnings for codec convenience method changes In-Reply-To: <1384075247.27.0.0100141647279.issue19543@psf.upfronthosting.co.za> Message-ID: <1384079740.22.0.580481590071.issue19543@psf.upfronthosting.co.za> Martin Panter added the comment: Just thinking the first case might get quite a few false positives. Maybe that would still be acceptable, I dunno. > - the str.encode method is called (redirect to codecs.encode to handle arbitrary input types in a forward compatible way) I guess you are trying to catch cases like this, which I have come across quite a few times: data.encode("hex") # data is a byte string But I think you would also catch cases that depend on Python 2 ?str? objects automatically converting to Unicode. Here are some examples taken from real code: file_name.encode("utf-8") # File name parameter may be str or unicode # Code meant to be compatible with both Python 2 and 3: """""".encode("iso-8859-1") ("data %s\n" % len(...)).encode("ascii") ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 12:40:06 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 10 Nov 2013 11:40:06 +0000 Subject: [issue19543] Add -3 warnings for codec convenience method changes In-Reply-To: <1384075247.27.0.0100141647279.issue19543@psf.upfronthosting.co.za> Message-ID: <527F7086.1080708@egenix.com> Marc-Andre Lemburg added the comment: On 10.11.2013 10:20, Nick Coghlan wrote: > > The long discussion in issue 7475 and some subsequent discussions I had with Armin Ronacher have made it clear to me that the key distinction between the codec systems in Python 2 and Python 3 is the following differences in type signatures of various operations: > > Python 2 (8 bit str): > > codecs module: object <-> object > convenience methods: basestring <-> basestring > available codecs: unicode <-> str, str <-> str, unicode <-> unicode > > Python 3 (Unicode str): > > codecs module: object <-> object > convenience methods: str <-> bytes > available codecs: str <-> bytes, bytes <-> bytes, str <-> str > > The significant distinction is the fact that, in Python 2, the convenience methods covered all standard library codecs, but for Python 3, the codecs module needs to be used directly for the bytes <-> bytes codecs and the one str <-> str codec (since those codecs no longer satisfy the constraints of the text model related convenience methods). Please remember that the codec sub-system is extensible. It's easily possible to add more codecs via registered codec search functions. Whatever you add as warning has to be aware of the fact that there may be codecs in the system that are not part of the stdlib and which can potentially implement codecs that use other type combinations that the ones you listed above. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 13:17:39 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 10 Nov 2013 12:17:39 +0000 Subject: [issue19373] Tkinter apps including IDLE may not display properly on OS X 10.9 Mavericks In-Reply-To: <1382596351.85.0.389017245767.issue19373@psf.upfronthosting.co.za> Message-ID: <1384085859.42.0.595276113059.issue19373@psf.upfronthosting.co.za> Ned Deily added the comment: Update: ActiveTcl 8.5.15.1 is now available and includes the fix for the 10.9 refresh problem documented here. Unfortunately, the built-in versions of Tcl/Tk 8.5 included with the pre-release python.org OS X 64-bit/32-bit x86-64/i386 installers for 3.3.3rc1 and 2.7.6rc1 (as described above) inadvertently broke compatibility with several third-party projects. As a result, as of 3.3.3rc2 and 2.7.6 final, the built-in Tcl/Tk support has been removed and these Pythons once again dynamically link with third-party Tcl and Tk 8.5 frameworks in /Library/Frameworks, such as those from ActiveState. You should install ActiveTcl 8.5.15.1 (or later 8.5.x versions) for use with these releases, if possible. http://www.python.org/download/mac/tcltk/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 13:58:38 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 10 Nov 2013 12:58:38 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1384088318.73.0.093360713033.issue19537@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 14:03:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 13:03:02 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1384088582.54.0.79854368528.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: Updated patch (v5) with a more robust chaining mechanism provided as a private "_PyErr_TrySetFromCause" API. This version eliminates the previous whitelist in favour of checking directly for the ability to replace the exception with another instance of the same type without losing information. This version also has more direct tests of the exception wrapping behaviour as a dedicated test class. If I don't hear any objections in the next couple of days, I plan to commit this version. ---------- Added file: http://bugs.python.org/file32561/issue17828_improved_codec_errors_v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 14:12:45 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 13:12:45 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1384089165.87.0.74081707271.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: It may not immediately look like it, but I think issue 17828 offers an example of a related problem. In that issue, I didn't want to *change* the exception raised, I wanted to annotate it to say "Hey, something I called raised an exception, here's some relevant local state to help you figure out what is going on" (in that case, the information to be added is the specific codec being invoked and whether it is an encoding or decoding operation). Setting the context is somewhat similar - you don't just want to know which specific exception happened to be active when the eventually caught exception was first raised - you also want to know which already active exception handlers you passed through while unwinding the stack. So really, what may be desirable here is almost an "annotated traceback", where the interpreter can decide to hang additional information off the frame currently being unwound in the exceptions traceback, while leaving the exception itself alone. That's definitely PEP territory, but there are two distinct problems with the current exception chaining mechanism to help drive a prospective design for 3.5 (the status quo doesn't bother me enough for me to work on it myself, but if you're interested Nikolaus...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 14:21:30 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 10 Nov 2013 13:21:30 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1384088582.54.0.79854368528.issue17828@psf.upfronthosting.co.za> Message-ID: <527F884F.7090607@egenix.com> Marc-Andre Lemburg added the comment: On 10.11.2013 14:03, Nick Coghlan wrote: > > Updated patch (v5) with a more robust chaining mechanism provided as a private "_PyErr_TrySetFromCause" API. This version eliminates the previous whitelist in favour of checking directly for the ability to replace the exception with another instance of the same type without losing information. > > This version also has more direct tests of the exception wrapping behaviour as a dedicated test class. > > If I don't hear any objections in the next couple of days, I plan to commit this version. This doesn't look right: diff -r 1ee45eb6aab9 Include/pyerrors.h --- a/Include/pyerrors.h Sat Nov 09 23:15:52 2013 +0200 +++ b/Include/pyerrors.h Sun Nov 10 22:54:04 2013 +1000 ... +PyAPI_FUNC(PyObject *) _PyErr_TrySetFromCause( + const char *prefix_format, /* ASCII-encoded string */ + ... + ); BTW: Why don't we make that API a public one ? It could be useful in C extensions as well. In the error messages, I'd use "codecs.encode()" and "codecs.decode()" (ie. with parens) instead of "codecs.encode" and "codecs.decode". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 14:22:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 13:22:23 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1384089743.55.0.325130960491.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: Unrelated to my previous comment, I'm also wondering if this may actually represent a behavioural difference between contextlib.ExitStack and the interpreter's own exception handling machinery. ExitStack uses a recursive->iterative transformation for its stack unwinding (see issue 14963), and it needs to do a bit of fiddling to get the context right (see issue 19092). While the contextlib test suite goes to great lengths to try to ensure the semantics of normal stack unwinding are preserved, that definitely doesn't currently cover this case, and I'm thinking the way it works may actually be more like the behaviour Nikolaus expected in the original post (i.e. setting the context as the stack is unwound rather than when the replacement exception is raised). ---------- nosy: +alonho, hniksic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 15:19:40 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 10 Nov 2013 14:19:40 +0000 Subject: [issue19533] Unloading docstrings from memory if -OO is given In-Reply-To: <1384031533.7.0.155155182241.issue19533@psf.upfronthosting.co.za> Message-ID: <20131110141939.GA11546@sleipnir.bytereef.org> Stefan Krah added the comment: It looks like the memory management is based directly on Py_Arenas: def f(): """squeamish ossifrage""" pass Breakpoint 1, PyArena_Free (arena=0x9a5120) at Python/pyarena.c:159 159 assert(arena); (gdb) p arena->a_objects $1 = ['f', 'squeamish ossifrage'] (gdb) bt #0 PyArena_Free (arena=0x9a5120) at Python/pyarena.c:159 #1 0x0000000000425af5 in PyRun_FileExFlags (fp=0xa1b780, filename_str=0x7ffff7f37eb0 "docstr.py", start=257, globals= {'f': , '__builtins__': , '__name__': '__main__', '__file__': 'docstr.py', '__package__': None, '__loader__': , '__cached__': None, '__doc__': None}, locals= {'f': , '__builtins__': , '__name__': '__main__', '__file__': 'docstr.py', '__package__': None, '__loader__': , '__cached__': None, '__doc__': None}, closeit=1, flags=0x7fffffffe490) at Python/pythonrun.c:2114 #2 0x0000000000423a0c in PyRun_SimpleFileExFlags (fp=0xa1b780, filename=0x7ffff7f37eb0 "docstr.py", closeit=1, flags= 0x7fffffffe490) at Python/pythonrun.c:1589 #3 0x000000000042289c in PyRun_AnyFileExFlags (fp=0xa1b780, filename=0x7ffff7f37eb0 "docstr.py", closeit=1, flags=0x7fffffffe490) at Python/pythonrun.c:1276 #4 0x000000000043bc83 in run_file (fp=0xa1b780, filename=0x9669b0 L"docstr.py", p_cf=0x7fffffffe490) at Modules/main.c:336 #5 0x000000000043c8c5 in Py_Main (argc=3, argv=0x964020) at Modules/main.c:780 #6 0x000000000041cdb5 in main (argc=3, argv=0x7fffffffe688) at ./Modules/python.c:69 So the string 'squeamish ossifrage' is still in arena->a_objects right until end of PyRun_FileExFlags(), even with -OO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 15:23:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 14:23:29 +0000 Subject: [issue19543] Add -3 warnings for codec convenience method changes In-Reply-To: <1384075247.27.0.0100141647279.issue19543@psf.upfronthosting.co.za> Message-ID: <1384093409.98.0.886561352663.issue19543@psf.upfronthosting.co.za> Nick Coghlan added the comment: Martin: you're right, it wouldn't be feasible to check for the 8-bit str encoding case, since the types of string literals will implicitly change between the two versions. However, the latter three cases would be feasible to check (the unicode.decode one is particularly pernicious, since it's the culprit that can lead to UnicodeEncodeErrors on a decoding operation as Python implicitly tries to encode a Unicode string as ASCII). MAL: The latter two Py3k warnings would be in the same place as the corresponding output type errors in Python 3 (i.e. all in unicodeobject.c), so they would never trigger for the general codecs machinery. Python 2 actually already has output type checks in the same place as the proposed warnings, it just only checks for "basestring" rather than anything more specific. Those two warnings would just involve adding the more restrictive Py3k-style check when -3 was enabled. A Py3k warning for unicode.decode is just a straight "this method won't be there any more in Python 3" warning, since there's no way for the conversion from Python 2 to Python 3 to implicitly replace a Unicode string with 8-bit data the way string literals switch from 8-bit data to Unicode text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 15:34:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 14:34:32 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <527F884F.7090607@egenix.com> Message-ID: Nick Coghlan added the comment: On 10 November 2013 23:21, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > On 10.11.2013 14:03, Nick Coghlan wrote: >> >> Updated patch (v5) with a more robust chaining mechanism provided as a private "_PyErr_TrySetFromCause" API. This version eliminates the previous whitelist in favour of checking directly for the ability to replace the exception with another instance of the same type without losing information. >> >> This version also has more direct tests of the exception wrapping behaviour as a dedicated test class. >> >> If I don't hear any objections in the next couple of days, I plan to commit this version. > > This doesn't look right: > > diff -r 1ee45eb6aab9 Include/pyerrors.h > --- a/Include/pyerrors.h Sat Nov 09 23:15:52 2013 +0200 > +++ b/Include/pyerrors.h Sun Nov 10 22:54:04 2013 +1000 > ... > +PyAPI_FUNC(PyObject *) _PyErr_TrySetFromCause( > + const char *prefix_format, /* ASCII-encoded string */ > + ... > + ); The signature? That API doesn't currently let you change the exception type, only the message (since the codecs machinery doesn't need to change the exception type, and changing the exception type is fraught with peril from a backwards compatibility point of view). > BTW: Why don't we make that API a public one ? It could be useful > in C extensions as well. Because I'm not sure it's a good idea in general and hence am wary of promoting it too much at this point in time (especially given the severe limitations of what it can currently wrap). I'm convinced it's worth it in this particular case (since being told the codec involved directly makes the meaning of codec errors much clearer and even with the limitations it can still wrap most errors from standard library codecs), and the implementation *has* to be in exceptions.c since it pokes around comparing the exception details to the internals of BaseException to figure out if it can safely wrap the exception or not. Issue 18861 also makes me wonder if there's an underlying structural problem in the way exception chaining currently works that could be better solved by making it possible to annotate traceback frames while unwinding the stack, which also makes me disinclined to add to the public C API in this area before 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 15:39:38 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 14:39:38 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <527F884F.7090607@egenix.com> Message-ID: Nick Coghlan added the comment: On 10 November 2013 23:21, Marc-Andre Lemburg wrote: > > This doesn't look right: > > diff -r 1ee45eb6aab9 Include/pyerrors.h > --- a/Include/pyerrors.h Sat Nov 09 23:15:52 2013 +0200 > +++ b/Include/pyerrors.h Sun Nov 10 22:54:04 2013 +1000 > ... > +PyAPI_FUNC(PyObject *) _PyErr_TrySetFromCause( > + const char *prefix_format, /* ASCII-encoded string */ > + ... > + ); After sending my previous reply, I realised you may have been referring to the comment. I copied that from the PyErr_Format signature. According to http://docs.python.org/dev/c-api/unicode.html#PyUnicode_FromFormat, the format string still has to be ASCII-encoded, and if that's no longer true, it's a separate bug from this one that will require a docs fix as well. > In the error messages, I'd use "codecs.encode()" and "codecs.decode()" > (ie. with parens) instead of "codecs.encode" and "codecs.decode". Forgot to reply to this part - I like it, will switch it over before committing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 15:59:58 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 14:59:58 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1384095598.03.0.959544278164.issue17828@psf.upfronthosting.co.za> Changes by Nick Coghlan : Added file: http://bugs.python.org/file32562/issue17828_improved_codec_errors_v6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 16:05:08 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 15:05:08 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1384095908.67.0.102508911087.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: Donald, I know you've been busy with PyPI v2.0 the last few days, but I see the pull request to resolve https://github.com/pypa/pip/issues/1294 has been merged. If we can get an updated patch that sets ENSUREPIP_OPTIONS appropriately in the process environment, it should be possible to commit this one and let Ned and Martin get started on the installers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 16:07:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 15:07:05 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1384096025.86.0.42571483262.issue19407@psf.upfronthosting.co.za> Nick Coghlan added the comment: Larry, just a heads up that as a docs patch that isn't directly affected by the feature freeze, I likely won't get to this one until after beta 1. We'll make sure issue 19406 and the other functional changes are resolved, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 16:39:51 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 10 Nov 2013 15:39:51 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: Message-ID: <527FA8BD.10708@egenix.com> Marc-Andre Lemburg added the comment: On 10.11.2013 15:39, Nick Coghlan wrote: > > On 10 November 2013 23:21, Marc-Andre Lemburg wrote: >> >> This doesn't look right: >> >> diff -r 1ee45eb6aab9 Include/pyerrors.h >> --- a/Include/pyerrors.h Sat Nov 09 23:15:52 2013 +0200 >> +++ b/Include/pyerrors.h Sun Nov 10 22:54:04 2013 +1000 >> ... >> +PyAPI_FUNC(PyObject *) _PyErr_TrySetFromCause( >> + const char *prefix_format, /* ASCII-encoded string */ >> + ... >> + ); Sorry about the false warning. After looking at those lines again, I realized that the "..." is the argument ellipsis, not some omitted code. At first this look like a function definition to me :-) > After sending my previous reply, I realised you may have been > referring to the comment. I copied that from the PyErr_Format > signature. According to > http://docs.python.org/dev/c-api/unicode.html#PyUnicode_FromFormat, > the format string still has to be ASCII-encoded, and if that's no > longer true, it's a separate bug from this one that will require a > docs fix as well. Also note that it's not clear whether the "ASCII" refers to the format string or the resulting formatted string. For the format string, ASCII would probably be fine, but for the formatted string, UTF-8 should be allowed, since it's not uncommon to add e.g. parameter strings that caused the error to the error string. That's a separate ticket, though. >> In the error messages, I'd use "codecs.encode()" and "codecs.decode()" >> (ie. with parens) instead of "codecs.encode" and "codecs.decode". > > Forgot to reply to this part - I like it, will switch it over before committing. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 17:28:33 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 16:28:33 +0000 Subject: [issue11473] upload command no longer accepts repository by section name In-Reply-To: <1299882717.19.0.490703720004.issue11473@psf.upfronthosting.co.za> Message-ID: <1384100913.39.0.405121155189.issue11473@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Indeed, the issue as reported is invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 17:59:52 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 16:59:52 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. Message-ID: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> New submission from Jason R. Coombs: Following from issue7457, in which a single feature was identified to have gone missing in 29a3eda89995, this ticket captures the need to bring the Python 3 codebase up to match Python 2.7. ---------- assignee: eric.araujo components: Distutils messages: 202534 nosy: eric.araujo, jason.coombs, tarek priority: normal severity: normal status: open title: Port distutils as found in Python 2.7 to Python 3.x. versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 18:01:00 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 17:01:00 +0000 Subject: [issue7457] Adding a read_pkg_file to DistributionMetadata In-Reply-To: <1260261174.05.0.469810624752.issue7457@psf.upfronthosting.co.za> Message-ID: <1384102860.69.0.289174032494.issue7457@psf.upfronthosting.co.za> Jason R. Coombs added the comment: As suggested, I created issue19544 to track the larger effort. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 18:03:45 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 10 Nov 2013 17:03:45 +0000 Subject: [issue19545] time.strptime exception context Message-ID: <1384103025.17.0.0483523701082.issue19545@psf.upfronthosting.co.za> New submission from Claudiu.Popa: time.strptime leaks an IndexError, as seen in the following traceback. [root at clnstor /tank/libs/cpython]# ./python Python 3.4.0a4+ (default:0aa2aedc6a21+, Nov 5 2013, 17:10:42) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd8 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strptime('19', '%Y %') Traceback (most recent call last): File "/tank/libs/cpython/Lib/_strptime.py", line 320, in _strptime format_regex = _TimeRE_cache.compile(format) File "/tank/libs/cpython/Lib/_strptime.py", line 268, in compile return re_compile(self.pattern(format), IGNORECASE) File "/tank/libs/cpython/Lib/_strptime.py", line 262, in pattern self[format[directive_index]]) IndexError: string index out of range During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/tank/libs/cpython/Lib/_strptime.py", line 494, in _strptime_time tt = _strptime(data_string, format)[0] File "/tank/libs/cpython/Lib/_strptime.py", line 332, in _strptime raise ValueError("stray %% in format '%s'" % format) ValueError: stray % in format '%Y %' >>> The attached patch suppresses the exception. This issue is similar (and based on) the issue17572. ---------- components: Library (Lib) files: time_strptime.patch keywords: patch messages: 202536 nosy: Claudiu.Popa, belopolsky priority: normal severity: normal status: open title: time.strptime exception context versions: Python 3.4 Added file: http://bugs.python.org/file32563/time_strptime.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 18:11:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 17:11:49 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1384103509.11.0.00536394527895.issue19537@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Current code assumes that PyUnicode_DATA() is aligned to PyUnicode_KIND() bytes. If this is not true on some platform it will be easer to add a padding than rewrite a code. A lot of code depends on this assumption. See also issue14422. I afraid that proposed patch may slow down a search. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 18:16:52 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 10 Nov 2013 17:16:52 +0000 Subject: [issue19546] configparser leaks implementation detail Message-ID: <1384103812.47.0.904880324738.issue19546@psf.upfronthosting.co.za> New submission from Claudiu.Popa: Various exceptions raised by configparser module leaks implementation detail, by chaining KeyErrors, as seen below: Python 3.4.0a4+ (default:0aa2aedc6a21+, Nov 5 2013, 17:10:42) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd8 Type "help", "copyright", "credits" or "license" for more information. >>> import configparser >>> parser = configparser.ConfigParser() >>> parser.remove_option('Section1', 'an_int') Traceback (most recent call last): File "/tank/libs/cpython/Lib/configparser.py", line 935, in remove_option sectdict = self._sections[section] KeyError: 'Section1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/tank/libs/cpython/Lib/configparser.py", line 937, in remove_option raise NoSectionError(section) configparser.NoSectionError: No section: 'Section1' >>> There are multiple places where this happens: using basic and extended interpolation, using .options to retrieve non-existent options, using .get or .remove_options for non-existent options/sections. The attached patch tries to fixes all those issues by suppressing the initial exception. ---------- components: Library (Lib) files: configparser.patch keywords: patch messages: 202538 nosy: Claudiu.Popa, lukasz.langa priority: normal severity: normal status: open title: configparser leaks implementation detail versions: Python 3.4 Added file: http://bugs.python.org/file32564/configparser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 18:22:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 17:22:10 +0000 Subject: [issue19538] Changed function prototypes in the PEP 384 stable ABI In-Reply-To: <1384028904.73.0.822920006161.issue19538@psf.upfronthosting.co.za> Message-ID: <1384104130.13.0.564366979498.issue19538@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this change doesn't break ABI and doesn't break applications which use PyObject_CallFunction() in usual way. The only problem with your application is compiler warning. To silence a warning you can do: #if PY_VERSION_HEX >= 0x03040000 # define CONST34 const #else # define CONST34 #endif PyObject *PyObject_CallFunction(PyObject *callable, CONST34 char *format, ...) { /* implement by forwarding to functions in the dynloaded dll */ } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 18:33:55 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 10 Nov 2013 17:33:55 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1384104835.42.0.502798709802.issue17457@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Michael, is any chance for this to go into Python 3.4? I would love to make any changes necessary in order for this to happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 18:59:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 10 Nov 2013 17:59:50 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1384106390.43.0.468249125244.issue19537@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't understand in which concrete situation the current code could be wrong. The start of the unicode string should always be aligned, due to how unicode objects are allocated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 19:02:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 18:02:19 +0000 Subject: [issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename In-Reply-To: <1379196682.03.0.147663616291.issue19020@psf.upfronthosting.co.za> Message-ID: <1384106539.73.0.990805074425.issue19020@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I am also not clear on the relation between the UnicodeDecodeError and tuple splitting. Does '_flatten((self._w, cmd)))' call split or splitlist on the tuple arg? Is so, do you know why a problem with that would lead to the UDError? Does your patch fix the leading '0' regression? The traceback is misleading. Full statement is: for x in self.tk.split( self.tk.call(_flatten((self._w, cmd)))): Where cmd is ('entryconfigure', index). The UnicodeDecodeError error was raised neither by _flatten() nor call(), but by split(). When run `./python -m idlelib.idle \\0.py` call() returns and split() gets a tuple of tuples: (('-activebackground', '', '', '', ''), ('-activeforeground', '', '', '', ''), ('-accelerator', '', '', '', ''), ('-background', '', '', '', ''), ('-bitmap', '', '', '', ''), ('-columnbreak', '', '', 0, 0), ('-command', '', '', '', '3067328620open_recent_file'), ('-compound', 'compound', 'Compound', , 'none'), ('-font', '', '', '', ''), ('-foreground', '', '', '', ''), ('-hidemargin', '', '', 0, 0), ('-image', '', '', '', ''), ('-label', '', '', '', '1 /home/serhiy/py/cpython/\\0.py'), ('-state', '', '', , 'normal'), ('-underline', '', '', -1, 0)). When set wantobjects in Lib/tkinter/__init__.py to 0, it will get a string r"{-activebackground {} {} {} {}} {-activeforeground {} {} {} {}} {-accelerator {} {} {} {}} {-background {} {} {} {}} {-bitmap {} {} {} {}} {-columnbreak {} {} 0 0} {-command {} {} {} 3067013228open_recent_file} {-compound compound Compound none none} {-font {} {} {} {}} {-foreground {} {} {} {}} {-hidemargin {} {} 0 0} {-image {} {} {} {}} {-label {} {} {} {1 /home/serhiy/py/cpython/\0.py}} {-state {} {} normal normal} {-underline {} {} -1 0}". Then split() try recursively split its argument. When it splits '1 /home/serhiy/py/cpython/\\0.py' it interprets '\\0' as backslash substitution of octal code 0 which means a character with code 0. Tcl uses modified UTF-8 encoding in which null code is encoded as b'\xC0\x80'. This bytes sequence is invalid UTF-8. That is why UnicodeDecodeError was raised (patch for issue13153 handles b'\xC0\x80' more correctly). When you will try '\101.py', it will be translated by split() to 'A.py'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 19:24:50 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 10 Nov 2013 18:24:50 +0000 Subject: [issue10552] Tools/unicode/gencodec.py error In-Reply-To: <1290889753.14.0.0688566147025.issue10552@psf.upfronthosting.co.za> Message-ID: <1384107890.72.0.112636550389.issue10552@psf.upfronthosting.co.za> A.M. Kuchling added the comment: For the Mac issue, we could just delete the mapping files before processing them. I've attached a patch that modifies the Makefile. ---------- nosy: +akuchling Added file: http://bugs.python.org/file32565/10552-remove-apple-files.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 19:32:52 2013 From: report at bugs.python.org (Mike FABIAN) Date: Sun, 10 Nov 2013 18:32:52 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1384108372.98.0.42214253983.issue5815@psf.upfronthosting.co.za> Mike FABIAN added the comment: Serhiy, in your patch you seem to have special treatment for the devanagari modifier: + # Devanagari modifier placed before encoding. + return code, modifier.split('.')[1] Probably because of 'ks_in at devanagari': 'ks_IN at devanagari.UTF-8', 'sd': 'sd_IN at devanagari.UTF-8', in the locale_alias dictionary. But I think these two lines are just wrong, this mistake is inherited from the locale.alias from X.org where the python locale_alias comes from. glibc: mfabian at ari:~ $ locale -a | grep ^sd sd_IN sd_IN.utf8 sd_IN.utf8 at devanagari sd_IN at devanagari mfabian at ari:~ $ locale -a | grep ^ks ks_IN ks_IN.utf8 ks_IN.utf8 at devanagari ks_IN at devanagari mfabian at ari:~ $ The encoding should always be *before* the modifier. ---------- nosy: +mfabian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 19:41:29 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 10 Nov 2013 18:41:29 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1384108889.6.0.860465211312.issue19499@psf.upfronthosting.co.za> Tim Peters added the comment: Reassigned to Barry, since he wrote this module ;-) FWIW, I wouldn't change it. It wasn't intended to be educational, but a newbie could learn quite a bit by figuring out how it works. ---------- assignee: tim.peters -> barry nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 19:46:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Nov 2013 18:46:03 +0000 Subject: [issue1097797] Encoding for Code Page 273 used by EBCDIC Germany Austria Message-ID: <3dHkgt6fnPz7Lsv@mail.python.org> Roundup Robot added the comment: New changeset 7d9d1bcd7d18 by Andrew Kuchling in branch 'default': #1097797: Add CP273 codec, and exercise it in the test suite http://hg.python.org/cpython/rev/7d9d1bcd7d18 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 19:48:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Nov 2013 18:48:02 +0000 Subject: [issue1097797] Encoding for Code Page 273 used by EBCDIC Germany Austria Message-ID: <3dHkk94MJ4z7Lsv@mail.python.org> Roundup Robot added the comment: New changeset fa2581bbef44 by Andrew Kuchling in branch 'default': Add news entry for #1097797; whitespace cleanup http://hg.python.org/cpython/rev/fa2581bbef44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 19:49:16 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 10 Nov 2013 18:49:16 +0000 Subject: [issue1097797] Encoding for Code Page 273 used by EBCDIC Germany Austria Message-ID: <1384109356.93.0.394654282591.issue1097797@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Committed this to 3.4. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:01:57 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 10 Nov 2013 19:01:57 +0000 Subject: [issue12226] use HTTPS by default for uploading packages to pypi In-Reply-To: <1306860665.45.0.32361907398.issue12226@psf.upfronthosting.co.za> Message-ID: <1384110117.57.0.396724900128.issue12226@psf.upfronthosting.co.za> anatoly techtonik added the comment: How come that this CVE is still present in just released 2.7.6? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:02:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Nov 2013 19:02:50 +0000 Subject: [issue7171] Add inet_ntop and inet_pton support for Windows In-Reply-To: <1255994426.45.0.89635983538.issue7171@psf.upfronthosting.co.za> Message-ID: <3dHl3F34j0z7Ljf@mail.python.org> Roundup Robot added the comment: New changeset 17b160baa20f by Atsuo Ishimoto in branch 'default': Issue #7171: Add Windows implementation of ``inet_ntop`` and ``inet_pton`` to socket module. http://hg.python.org/cpython/rev/17b160baa20f New changeset a21f506d04c9 by Jason R. Coombs in branch 'default': Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching implementation for Unix). http://hg.python.org/cpython/rev/a21f506d04c9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:03:04 2013 From: report at bugs.python.org (Andreas Schwab) Date: Sun, 10 Nov 2013 19:03:04 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1384110184.3.0.499303694842.issue19537@psf.upfronthosting.co.za> Andreas Schwab added the comment: (gdb) p sizeof(PyASCIIObject) $1 = 22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:04:21 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 10 Nov 2013 19:04:21 +0000 Subject: [issue19546] configparser leaks implementation detail In-Reply-To: <1384103812.47.0.904880324738.issue19546@psf.upfronthosting.co.za> Message-ID: <1384110261.14.0.401113603154.issue19546@psf.upfronthosting.co.za> R. David Murray added the comment: I'd vote -1 on this one. The extra context in this case is not confusing, and might be helpful to someone. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:06:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Nov 2013 19:06:11 +0000 Subject: [issue19261] Add support for 24-bit in the sunau module In-Reply-To: <1381767447.21.0.93278402116.issue19261@psf.upfronthosting.co.za> Message-ID: <3dHl771fkzz7Ljf@mail.python.org> Roundup Robot added the comment: New changeset d2cc6254d399 by Serhiy Storchaka in branch 'default': Issue #19261: Added support for writing 24-bit samples in the sunau module. http://hg.python.org/cpython/rev/d2cc6254d399 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:06:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 19:06:48 +0000 Subject: [issue19261] Add support for 24-bit in the sunau module In-Reply-To: <1381767447.21.0.93278402116.issue19261@psf.upfronthosting.co.za> Message-ID: <1384110408.69.0.719453061739.issue19261@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:11:34 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 10 Nov 2013 19:11:34 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384110184.3.0.499303694842.issue19537@psf.upfronthosting.co.za> Message-ID: <20131110191133.GA13760@sleipnir.bytereef.org> Stefan Krah added the comment: Andreas Schwab wrote: > (gdb) p sizeof(PyASCIIObject) > $1 = 22 m68k again? ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:15:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Nov 2013 19:15:05 +0000 Subject: [issue7171] Add inet_ntop and inet_pton support for Windows In-Reply-To: <1255994426.45.0.89635983538.issue7171@psf.upfronthosting.co.za> Message-ID: <3dHlKN4Twrz7LjZ@mail.python.org> Roundup Robot added the comment: New changeset 31fe38f95c82 by Jason R. Coombs in branch 'default': Update Misc/NEWS for Issue #7171 http://hg.python.org/cpython/rev/31fe38f95c82 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:15:57 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 19:15:57 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1384110957.98.0.00954997760554.issue19499@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I completely agree with Tim. The 'this' module was a *joke* and a stealthy one at that. http://www.wefearchange.org/2010/06/import-this-and-zen-of-python.html About the only thing I'd support is adding some comments to the code to either explain what's going on a little better, or provide some history to what this module is and why it's there. Then again, if you want to do that, please be sure to also add some documentation, but you better make it *funny*. :) ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:21:51 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 10 Nov 2013 19:21:51 +0000 Subject: [issue19499] "import this" is cached in sys.modules In-Reply-To: <1383616502.26.0.617402510046.issue19499@psf.upfronthosting.co.za> Message-ID: <1384111311.57.0.188888636009.issue19499@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:22:57 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 19:22:57 +0000 Subject: [issue11677] make test has horrendous performance on an ecryptfs In-Reply-To: <1301092248.42.0.811586375377.issue11677@psf.upfronthosting.co.za> Message-ID: <1384111377.3.0.0918834431428.issue11677@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm going to close this issue as invalid; it hasn't affected me on ecryptfs $HOME on Ubuntu in a long time, so let's chalk it up to better ecryptfs implementations now. If you disagree, feel free to re-open this and provide more information. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:26:04 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 19:26:04 +0000 Subject: [issue10262] Add --soabi option to `configure` In-Reply-To: <1288526843.14.0.55690735161.issue10262@psf.upfronthosting.co.za> Message-ID: <1384111564.62.0.0550541936701.issue10262@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I think we've had plenty of time to adjust to the abi tags. Does anybody think that nearly 3 years later anything really needs to be done here? ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:37:29 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 19:37:29 +0000 Subject: [issue9419] RUNSHARED needs LDFLAGS In-Reply-To: <1280423222.23.0.51081739049.issue9419@psf.upfronthosting.co.za> Message-ID: <1384112249.82.0.743792012327.issue9419@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: barry -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:41:28 2013 From: report at bugs.python.org (Donald Stufft) Date: Sun, 10 Nov 2013 19:41:28 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1384112488.14.0.0817546580654.issue19406@psf.upfronthosting.co.za> Donald Stufft added the comment: * Updated setuptools * Updated pip to the latest development snapshot * Installs default to installing easy_install-X.Y, pipX, and pipX.Y * Added --altinstall which only installs easy_install-X.Y and pipX.Y * Added --default-install which installs easy_install, easy_install-X.Y, pip, pipX, and pipX.Y ---------- Added file: http://bugs.python.org/file32566/ensurepip-combined-altinstall.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:45:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Nov 2013 19:45:08 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <3dHm040CZDz7LjZ@mail.python.org> Roundup Robot added the comment: New changeset bab0cbf86835 by Serhiy Storchaka in branch 'default': Issue #16685: Added support for any bytes-like objects in the audioop module. http://hg.python.org/cpython/rev/bab0cbf86835 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:46:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 19:46:03 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1384112763.81.0.851931570333.issue16685@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:48:04 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 19:48:04 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1384112884.04.0.171553885703.issue16754@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: barry -> doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:49:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 19:49:48 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1384112988.65.0.99753583153.issue8311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is simplified patch. Added versionchanged tags in the documentation. ---------- Added file: http://bugs.python.org/file32567/audio_write_nonbytes_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 20:53:29 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 10 Nov 2013 19:53:29 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1384113209.78.0.231242230449.issue18861@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Hi Nick, I am interested in working on this, but I have never worked on the C parts of cpython before. Do you think this is a feasible project to start with? To me it looks a bit daunting, I'd certainly need some mentoring to even know where to start with this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:00:32 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 10 Nov 2013 20:00:32 +0000 Subject: [issue19540] PEP339: Fix link to Zephyr ASDL paper Message-ID: <1384113632.77.0.778275071687.issue19540@psf.upfronthosting.co.za> New submission from Benjamin Peterson: c0d120cf0aac ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:01:09 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 10 Nov 2013 20:01:09 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1384113209.78.0.231242230449.issue18861@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: The first thing to do is to carefully specificy what the behavior should be. 2013/11/10 Nikolaus Rath : > > Nikolaus Rath added the comment: > > Hi Nick, > > I am interested in working on this, but I have never worked on the C parts of cpython before. Do you think this is a feasible project to start with? To me it looks a bit daunting, I'd certainly need some mentoring to even know where to start with this. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:03:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 20:03:23 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1384113803.2.0.203815383132.issue5815@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The /usr/share/X11/locale/locale.alias file in Ubuntu 12.04 LTS contains ks_IN at devanagari.UTF-8 and sd_IN at devanagari.UTF-8 entities. While the encoding is expected to be before the modifier, if there are systems with ks_IN at devanagari.UTF-8 or sd_IN at devanagari.UTF-8 locales we should support these weird case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:06:29 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 20:06:29 +0000 Subject: [issue11513] chained exception/incorrect exception from tarfile.open on a non-existent file In-Reply-To: <1300146032.78.0.080952835314.issue11513@psf.upfronthosting.co.za> Message-ID: <1384113989.51.0.0414243518313.issue11513@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Should this issue still remain open? The original report described a chained exception, which obviously doesn't happen in 2.7 (nor with Georg's changeset, in 3.2, 3.3, or 3.4). RDM's message implies there still may still be bugs lurking here in 2.7, but OTOH, the original issue isn't a problem (i.e. no chained exceptions). I'd be tempted to say that if there are still problems here, it would be better to open a 2.7 specific bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:21:35 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 10 Nov 2013 20:21:35 +0000 Subject: [issue13276] bdist_wininst-created installer does not run the postinstallation script when uninstalling In-Reply-To: <1319729455.78.0.312367178712.issue13276@psf.upfronthosting.co.za> Message-ID: <1384114895.17.0.899906655623.issue13276@psf.upfronthosting.co.za> anatoly techtonik added the comment: Here is workaround, which is - patching distutils - https://code.google.com/p/spyderlib/wiki/PatchingDistutils ---------- versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:22:21 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 20:22:21 +0000 Subject: [issue13173] Default values for string.Template In-Reply-To: <1318540565.49.0.753035083637.issue13173@psf.upfronthosting.co.za> Message-ID: <1384114941.56.0.439396428353.issue13173@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm looking at this issue again with an eye toward Python 3.4. Raymond describes what I think is a reasonable way to use defaults: >>> x = Template('$foo $bar') >>> defaults = dict(foo='one', bar='two') >>> x.substitute(defaults) 'one two' >>> x.substitute(defaults, bar='three') 'one three' >>> x.substitute(defaults, foo='nine', bar='three') 'nine three' (The implementation actually uses ChainMap.) Now, to address Bfontaine's complaint about passing around tuples, observe that Template instances are Just Instances, so you can always do this: >>> x = Template('$foo $bar') >>> x.defaults = defaults >>> x.substitute(x.defaults, foo='nine', bar='three') 'nine three' IOW, just stash your defaults on the instance and pass the instance around. Does the Template class actually need more built-in support for defaults? I'm inclined to close this as Won't Fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:30:34 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 20:30:34 +0000 Subject: [issue1198569] string.Template not flexible enough to subclass (regexes) Message-ID: <1384115434.04.0.611272452082.issue1198569@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This seems like a reasonable request. Do you care to submit a patch with tests and doc updates? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:36:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 10 Nov 2013 20:36:02 +0000 Subject: [issue11513] chained exception/incorrect exception from tarfile.open on a non-existent file In-Reply-To: <1300146032.78.0.080952835314.issue11513@psf.upfronthosting.co.za> Message-ID: <1384115762.2.0.175639009212.issue11513@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suppose that 2.7 may leak GzipFile in case of some errors, but this is another issue. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:47:19 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 10 Nov 2013 20:47:19 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384116439.67.0.374842845818.issue19544@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I went through Python 2.7's Misc/NEWS file and collected the entries for Distutils-related issues that were applied. Perhaps we can check the individual entries on this list, and see which ones are still present in Python 3.x and which ones got reverted. ---------- nosy: +akuchling Added file: http://bugs.python.org/file32568/ticket-list.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:48:31 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 10 Nov 2013 20:48:31 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384116511.49.0.0889769051135.issue19544@psf.upfronthosting.co.za> Ned Deily added the comment: I wouldn't trust the NEWS items. I think the only reliable thing to do is diff each file, unfortunately. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 21:50:45 2013 From: report at bugs.python.org (Andreas Schwab) Date: Sun, 10 Nov 2013 20:50:45 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1384116645.46.0.644278819345.issue19537@psf.upfronthosting.co.za> Andreas Schwab added the comment: There is nothing wrong with that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 22:23:27 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 10 Nov 2013 21:23:27 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384118607.75.0.0616731427223.issue19544@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Issue #11104 also made some functionality work in both 2.7 and 3.2, though it's not clear that the problem stemmed from the distutils2 revert. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 22:31:55 2013 From: report at bugs.python.org (Stefan Richter) Date: Sun, 10 Nov 2013 21:31:55 +0000 Subject: [issue19547] HTTPS proxy support missing without warning Message-ID: <1384119115.17.0.177090288449.issue19547@psf.upfronthosting.co.za> New submission from Stefan Richter: When using urllib2 and specifying a HTTPS proxy when setting up a ProxyHandler, the library does not encrypt the traffic sent to the proxy server. This results in unpredictable behavior. Either the support should be implemented or an error raised ---------- components: Library (Lib) messages: 202575 nosy: 02strich priority: normal severity: normal status: open title: HTTPS proxy support missing without warning type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 22:36:51 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 10 Nov 2013 21:36:51 +0000 Subject: [issue19461] RawConfigParser modifies empty strings unconditionally In-Reply-To: <1383240246.91.0.876276014549.issue19461@psf.upfronthosting.co.za> Message-ID: <1384119411.49.0.536572740067.issue19461@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- assignee: -> lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 22:37:31 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 10 Nov 2013 21:37:31 +0000 Subject: [issue19546] configparser leaks implementation detail In-Reply-To: <1384103812.47.0.904880324738.issue19546@psf.upfronthosting.co.za> Message-ID: <1384119451.24.0.290025925441.issue19546@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- assignee: -> lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 22:43:29 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 10 Nov 2013 21:43:29 +0000 Subject: [issue11513] chained exception/incorrect exception from tarfile.open on a non-existent file In-Reply-To: <1300146032.78.0.080952835314.issue11513@psf.upfronthosting.co.za> Message-ID: <1384119809.81.0.645957588003.issue11513@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Alright, I'm going to close this issue. Please open a new bug for Python 2.7. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 22:50:54 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 21:50:54 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1384120254.2.0.842296915735.issue1180@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Confirmed - and to be included in issue19544. ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 22:52:51 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 21:52:51 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <1384120371.07.0.687691664792.issue6516@psf.upfronthosting.co.za> Jason R. Coombs added the comment: This change was rolled back before the release of 3.2, so only exists in 2.7. See issue19544 for details. ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:16:33 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 10 Nov 2013 22:16:33 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: Message-ID: Nick Coghlan added the comment: Yes, I suggest using ExitStack to figure out the behaviour we *want* first, before diving into the messy practical details of how to make that a reality in CPython. We somehow have to get the state of the exception object and its traceback to represent an appropriate stack *tree*, rather than the traditionally assumed linear stack. It also occurred to me there's another potentially related issue: frame hiding, where we want to avoid showing infrastructure code in end user tracebacks. importlib currently has a very hacky version of that. The Jinja2 template library uses a different approach. The reason I bring these other problems up is because I think they illustrate a theme around altering how a traceback is displayed that may be amenable to a common solution (preferably one that is contextlib and asyncio friendly). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:53:11 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 22:53:11 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384123991.19.0.239993476824.issue19544@psf.upfronthosting.co.za> Jason R. Coombs added the comment: After spending several hours spelunking, we identified what we believe are the tickets that were backed out in the aforementioned reversion. issue1180 issue6516 issue7457 issue6466 issue6286 Additionally, issue6377 (renaming .compiler to .compiler_obj) was reverted, but it likely should not be re-applied. Attached is an export of the etherpad (http://beta.etherpad.org/p/python_2.7_distutil_commits) which we used to keep track of the changes and show our work. We will flag the above tickets and address each individually. ---------- Added file: http://bugs.python.org/file32569/python_2.7_distutil_commits.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:53:50 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 22:53:50 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <1384124030.27.0.108862555669.issue6516@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:55:39 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 22:55:39 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1384124139.8.0.624708952509.issue1180@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- assignee: tarek -> akuchling nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:56:06 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 22:56:06 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1384124166.44.0.989896127161.issue1180@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:57:16 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 22:57:16 +0000 Subject: [issue6466] duplicate get_version() code between cygwinccompiler and emxccompiler In-Reply-To: <1247386841.98.0.269164765319.issue6466@psf.upfronthosting.co.za> Message-ID: <1384124236.54.0.783777191511.issue6466@psf.upfronthosting.co.za> Jason R. Coombs added the comment: This change didn't make it into Python 3.2 but is in 2.7. see issue19544 for details. ---------- assignee: tarek -> jason.coombs components: +Distutils nosy: +alexis, jason.coombs status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:58:02 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 22:58:02 +0000 Subject: [issue6286] distutils upload command doesn't work with http proxy In-Reply-To: <1245059662.2.0.968328150082.issue6286@psf.upfronthosting.co.za> Message-ID: <1384124282.52.0.929524826067.issue6286@psf.upfronthosting.co.za> Jason R. Coombs added the comment: This change didn't make it into Python 3.2 but is in 2.7. see issue19544 for details. ---------- nosy: +jason.coombs status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:58:09 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 22:58:09 +0000 Subject: [issue6286] distutils upload command doesn't work with http proxy In-Reply-To: <1245059662.2.0.968328150082.issue6286@psf.upfronthosting.co.za> Message-ID: <1384124289.9.0.964933661451.issue6286@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- assignee: tarek -> jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 10 23:58:38 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 22:58:38 +0000 Subject: [issue7457] Adding a read_pkg_file to DistributionMetadata In-Reply-To: <1260261174.05.0.469810624752.issue7457@psf.upfronthosting.co.za> Message-ID: <1384124318.34.0.632056881405.issue7457@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- assignee: tarek -> jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:08:13 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 10 Nov 2013 23:08:13 +0000 Subject: [issue17518] urllib2 cannnot handle https and BasicAuth via Proxy. In-Reply-To: <1363951100.05.0.959443247001.issue17518@psf.upfronthosting.co.za> Message-ID: <1384124893.66.0.68462044028.issue17518@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:09:34 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 10 Nov 2013 23:09:34 +0000 Subject: [issue19547] HTTPS proxy support missing without warning In-Reply-To: <1384119115.17.0.177090288449.issue19547@psf.upfronthosting.co.za> Message-ID: <1384124974.76.0.51713778023.issue19547@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:11:07 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 10 Nov 2013 23:11:07 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1384125067.18.0.148009916263.issue1180@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Here's a patch to restore the --no-user-cfg switch to 3.4. If someone will take a quick look at the patch for sanity, I can apply it. ---------- keywords: +needs review resolution: fixed -> stage: -> patch review versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file32570/3.4-patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:22:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Nov 2013 23:22:19 +0000 Subject: [issue7457] Adding a read_pkg_file to DistributionMetadata In-Reply-To: <1260261174.05.0.469810624752.issue7457@psf.upfronthosting.co.za> Message-ID: <3dHrpf6ZKtz7LkY@mail.python.org> Roundup Robot added the comment: New changeset e19441e540ca by Jason R. Coombs in branch '3.3': Issue 19544 and Issue #7457: Restore the read_pkg_file method to distutils.dist.DistributionMetadata accidentally removed in the undo of distutils2. http://hg.python.org/cpython/rev/e19441e540ca New changeset 28059d8b395b by Jason R. Coombs in branch 'default': Merge with 3.3 for Issue #19544 and Issue #7457 http://hg.python.org/cpython/rev/28059d8b395b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:22:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Nov 2013 23:22:20 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <3dHrpg4s4Tz7LkY@mail.python.org> Roundup Robot added the comment: New changeset e19441e540ca by Jason R. Coombs in branch '3.3': Issue 19544 and Issue #7457: Restore the read_pkg_file method to distutils.dist.DistributionMetadata accidentally removed in the undo of distutils2. http://hg.python.org/cpython/rev/e19441e540ca New changeset 28059d8b395b by Jason R. Coombs in branch 'default': Merge with 3.3 for Issue #19544 and Issue #7457 http://hg.python.org/cpython/rev/28059d8b395b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:25:25 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 23:25:25 +0000 Subject: [issue7457] Adding a read_pkg_file to DistributionMetadata In-Reply-To: <1260261174.05.0.469810624752.issue7457@psf.upfronthosting.co.za> Message-ID: <1384125925.13.0.00375941964377.issue7457@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:26:05 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 10 Nov 2013 23:26:05 +0000 Subject: [issue6286] distutils upload command doesn't work with http proxy In-Reply-To: <1245059662.2.0.968328150082.issue6286@psf.upfronthosting.co.za> Message-ID: <1384125965.66.0.426958415372.issue6286@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:42:24 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 10 Nov 2013 23:42:24 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <1384126944.34.0.600847915294.issue6516@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Here's an updated patch, to be applied against the default branch. ---------- nosy: +akuchling stage: -> patch review Added file: http://bugs.python.org/file32571/3.4-patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:45:12 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 10 Nov 2013 23:45:12 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384127112.17.0.427836317751.issue19544@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Patches for the default branch have been added to issue1180 (option to ignore ~/.pydistutils.cfg) and issue6516 (setting the owner/group in Distutils-built tarballs). Please double-check those patches; I can apply them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 00:45:49 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 10 Nov 2013 23:45:49 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <1384127149.13.0.594215692172.issue6516@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- versions: +Python 3.4 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 01:00:07 2013 From: report at bugs.python.org (Greg Ward) Date: Mon, 11 Nov 2013 00:00:07 +0000 Subject: [issue19536] MatchObject should offer __getitem__() In-Reply-To: <1384010127.61.0.754728433968.issue19536@psf.upfronthosting.co.za> Message-ID: <1384128007.42.0.0390843207499.issue19536@psf.upfronthosting.co.za> Greg Ward added the comment: >>> import this [...] There should be one-- and preferably only one --obvious way to do it. ---------- nosy: +gward _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 01:00:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Nov 2013 00:00:37 +0000 Subject: [issue6286] distutils upload command doesn't work with http proxy In-Reply-To: <1245059662.2.0.968328150082.issue6286@psf.upfronthosting.co.za> Message-ID: <3dHsfs0jBqz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 5e98c4e9c909 by Jason R. Coombs in branch '3.3': Issue #19544 and Issue #6286: Restore use of urllib over http allowing use of http_proxy for Distutils upload command, a feature accidentally lost in the rollback of distutils2. http://hg.python.org/cpython/rev/5e98c4e9c909 New changeset b1244046f37a by Jason R. Coombs in branch 'default': Merge with 3.3 for Issue #19544 and Issue #6286. Merge is untested. I was unable to test due to bab0cbf86835. http://hg.python.org/cpython/rev/b1244046f37a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 01:00:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Nov 2013 00:00:38 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <3dHsfs6XfRz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 5e98c4e9c909 by Jason R. Coombs in branch '3.3': Issue #19544 and Issue #6286: Restore use of urllib over http allowing use of http_proxy for Distutils upload command, a feature accidentally lost in the rollback of distutils2. http://hg.python.org/cpython/rev/5e98c4e9c909 New changeset b1244046f37a by Jason R. Coombs in branch 'default': Merge with 3.3 for Issue #19544 and Issue #6286. Merge is untested. I was unable to test due to bab0cbf86835. http://hg.python.org/cpython/rev/b1244046f37a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 01:01:08 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 11 Nov 2013 00:01:08 +0000 Subject: [issue6286] distutils upload command doesn't work with http proxy In-Reply-To: <1245059662.2.0.968328150082.issue6286@psf.upfronthosting.co.za> Message-ID: <1384128068.79.0.0602280018509.issue6286@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 01:22:07 2013 From: report at bugs.python.org (Jan Kaliszewski) Date: Mon, 11 Nov 2013 00:22:07 +0000 Subject: [issue19539] The 'raw_unicode_escape' codec buggy + not apropriate for Python 3.x In-Reply-To: <1384051905.56.0.969775270474.issue19539@psf.upfronthosting.co.za> Message-ID: <1384129327.95.0.829693890955.issue19539@psf.upfronthosting.co.za> Jan Kaliszewski added the comment: Which means that the description "Produce a string that is suitable as raw Unicode literal in Python source code" is (in Python 3.x) no longer true. So, if change/removal is not possible because of internal significance of the codec, I believe that the description should be changed to something like: "For internal use. This codec *does not* produce anything suitable as a raw string literal in Python 3.x source code." ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 01:54:07 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 11 Nov 2013 00:54:07 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384131247.93.0.414680252898.issue19544@psf.upfronthosting.co.za> Ned Deily added the comment: b1244046f37a appears to have broken buildbots. See, for example: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/2984 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 02:29:13 2013 From: report at bugs.python.org (Jan Kaliszewski) Date: Mon, 11 Nov 2013 01:29:13 +0000 Subject: [issue19548] 'codecs' module docs improvements Message-ID: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> New submission from Jan Kaliszewski: When learning about the 'codecs' module I encountered several places in the docs of the module that, I believe, could be improved to be clearer and easier for codecs-begginers: 1. Ad `codecs.encode` and `codecs.decode` descriptions: I believe it would be worth to mention that, unlike str.encode()/bytes.decode(), these functions (and all their counterparts in the classes the module contains) support not only "traditional str/bytes encodings", but also bytes-to-bytes as well as str-to-str encodings. 2. Ad 'codecs.register': in two places there is such a text: `These have to be factory functions providing the following interface: factory([...] errors='strict')` -- `errors='strict'` may be confusing (at the first sight it may suggest that the only valid value is 'strict'; maybe `factory(errors=)` with an appropriate description below would be better?). 3. Ad `codecs.open`: I believe there should be a reference to the built-in open() as an alternative that is better is most cases. 4. Ad `codecs.BOM*`: `These constants define various encodings of the Unicode byte order mark (BOM).` -- the world `encodings` seems to be confusing here; maybe `These constants define various byte sequences being Unicode byte order marks (BOMs) for several encodings. They are used...` would be better? 5. Ad `7.2.1. Codec Base Classes` + `codecs.IncrementalEncoder`/`codecs/IncrementalDecoder`: * `Each codec has to define four interfaces to make it usable as codec in Python: stateless encoder, stateless decoder, stream reader and stream writer` -- only four? Not six? What about incremental encoder/decoder??? * Comparing the fragments (and tables) about error halding methods (Codecs Base Classes, IncrementalEncoder, IncrementalDecoder) with similar fragment in the `codecs.register` description and with the `codecs.register_error` description I was confused: is it the matter of a particular codec implementation or of a registered error handler to implement a particular way of error handling? I believe it would be worth to describe clearly relations between these elements of the API. Also more detailed description of differences beetween error handling for encoding and decoding, and translation would be a good thing. 6. Ad `7.2.1.6. StreamReaderWriter Objects` and `7.2.1.7. StreamRecoder Objects`: It would be worth to say explicitly that, contrary to previously described abstract classes (IncrementalEncoder/Decoder, StreamReader/Writer), these classes are *concrete* ones (if I understand it correctly). 7. Ad `7.2.4. Python Specific Encodings`: * `raw_unicode_encoding` -- see: ticket #19539. * `unicode_encoding` -- `Produce a string that is suitable as Unicode literal in Python source code` but it is *not* a string; it's a *bytes* object (which could be used in source code using an `ascii`-compatibile encoding). * `bytes-to-bytes` and `str-to-str` encodings -- maybe it would be nice to mention that these encodings cannot be used with str.encode()/bytes.decode() methods (and to mention again they *can* be used with the functions/method provided by the `codecs` module). ---------- assignee: docs at python components: Documentation messages: 202593 nosy: docs at python, zuo priority: normal severity: normal status: open title: 'codecs' module docs improvements versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 02:31:10 2013 From: report at bugs.python.org (Jan Kaliszewski) Date: Mon, 11 Nov 2013 01:31:10 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1384133470.83.0.485815810078.issue19548@psf.upfronthosting.co.za> Jan Kaliszewski added the comment: s/world/word s/begginers/beginners (sorry, it's late night here) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 02:56:00 2013 From: report at bugs.python.org (Jan Kaliszewski) Date: Mon, 11 Nov 2013 01:56:00 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1384134960.27.0.809048925872.issue19548@psf.upfronthosting.co.za> Jan Kaliszewski added the comment: 8. Again ad `codecs.open`: the default file mode is actually 'rb', not 'r'. 9. Several places in the docs -- ad: `codecs.register_error`, `codecs.open`, `codecs.EncodedFile`, `Codec.encode/decode`, `codecs.StreamWriter/StreamReader` -- do not cover cases of using bytes-to-bytes and/or str-to-str encodings (especially when using `string`/`bytes` and `text`/`binary` terms). 10. `codecs.replace_errors` -- `bytestring` should be replaced with `bytes-like object` (as in other places). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 03:01:23 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 11 Nov 2013 02:01:23 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1384135283.35.0.841522409611.issue16685@psf.upfronthosting.co.za> Jason R. Coombs added the comment: The patch as committed causes the Windows 64-bit builds to fail to compile. http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/3187/steps/compile/logs/stdio ---------- nosy: +jason.coombs status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 03:05:32 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 11 Nov 2013 02:05:32 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384135532.07.0.364084847182.issue19544@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Thanks Ned. I did see that and have pushed 394ed9deebd4. I believe that corrects the only test failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 03:14:06 2013 From: report at bugs.python.org (Jan Kaliszewski) Date: Mon, 11 Nov 2013 02:14:06 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1384136046.19.0.973892175061.issue19548@psf.upfronthosting.co.za> Jan Kaliszewski added the comment: 11. Ad encoding 'undefined': The sentence `Can be used as the system encoding if no automatic coercion between byte and Unicode strings is desired.` was suitable for Python 2.x, but not for Python 3.x'. I believe, this sentence should be removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 03:15:10 2013 From: report at bugs.python.org (Jan Kaliszewski) Date: Mon, 11 Nov 2013 02:15:10 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1384136110.77.0.0401293973041.issue19548@psf.upfronthosting.co.za> Changes by Jan Kaliszewski : ---------- versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 03:17:44 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 11 Nov 2013 02:17:44 +0000 Subject: [issue19249] Enumeration.__eq__ In-Reply-To: <1381693100.88.0.523701824631.issue19249@psf.upfronthosting.co.za> Message-ID: <1384136264.51.0.846268266.issue19249@psf.upfronthosting.co.za> Ethan Furman added the comment: Done and done. ---------- stage: test needed -> patch review Added file: http://bugs.python.org/file32572/issue19249.stoneleaf.02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 03:22:11 2013 From: report at bugs.python.org (Brian Curtin) Date: Mon, 11 Nov 2013 02:22:11 +0000 Subject: [issue13276] bdist_wininst-created installer does not run the postinstallation script when uninstalling In-Reply-To: <1319729455.78.0.312367178712.issue13276@psf.upfronthosting.co.za> Message-ID: <1384136531.34.0.428075203441.issue13276@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 03:46:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Nov 2013 02:46:57 +0000 Subject: [issue1097797] Encoding for Code Page 273 used by EBCDIC Germany Austria Message-ID: <3dHxLm2dPrz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 93645b0b6750 by Andrew Kuchling in branch 'default': #1097797: add the original mapping file http://hg.python.org/cpython/rev/93645b0b6750 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 05:32:14 2013 From: report at bugs.python.org (Mike FABIAN) Date: Mon, 11 Nov 2013 04:32:14 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1384144334.0.0.266251209557.issue5815@psf.upfronthosting.co.za> Mike FABIAN added the comment: Serhiy> The /usr/share/X11/locale/locale.alias file in Ubuntu 12.04 LTS Serhiy> contains ks_IN at devanagari.UTF-8 and sd_IN at devanagari.UTF-8 Serhiy> entities. Yes, I know, that?s why I wrote that the Python code inherited this mistake from X.org. Serhiy> While the encoding is expected to be before the modifier, if Serhiy> there are systems with ks_IN at devanagari.UTF-8 or Serhiy> sd_IN at devanagari.UTF-8 locales we should support these weird case. There are no such systems really, in X.org this is just a mistake. glibc doesn?t write it like this and it is agains the specification here: http://pubs.opengroup.org/onlinepubs/007908799/xbd/envvar.html#tag_002 [language[_territory][.codeset][@modifier]] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 05:47:08 2013 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 11 Nov 2013 04:47:08 +0000 Subject: [issue19549] PKG-INFO is created with CRLF on Windows Message-ID: <1384145228.19.0.594572636685.issue19549@psf.upfronthosting.co.za> New submission from anatoly techtonik: When packaging on Windows, sdist creates PKG-INFO, which is different in linefeeds. It will be better if this is consistent between platforms. ---------- assignee: eric.araujo components: Distutils, Distutils2 messages: 202602 nosy: alexis, eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: PKG-INFO is created with CRLF on Windows versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 05:51:59 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 11 Nov 2013 04:51:59 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1384145519.1.0.200729710194.issue19548@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 05:55:20 2013 From: report at bugs.python.org (Mike FABIAN) Date: Mon, 11 Nov 2013 04:55:20 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1384145720.3.0.423745670442.issue5815@psf.upfronthosting.co.za> Mike FABIAN added the comment: In glibc, sd_IN at devanagari.UTF-8 is an invalid locale name, only sd_IN.UTF-8 at devanagari is valid: mfabian at ari:~ $ LC_ALL=sd_IN.UTF-8 at devanagari locale charmap UTF-8 mfabian at ari:~ $ LC_ALL=sd_IN at devanagari.UTF-8 locale charmap locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory ANSI_X3.4-1968 mfabian at ari:~ $ So I think this should be fixed in X.org. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 06:27:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 05:27:27 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384145519.16.0.976214630769.issue19548@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: A few more: - codec name normalisation (lower case, space to hyphen) is not mentioned in the codecs.register description - search function registration is not reversible, which doesn't play well with module reloading - codecs.CodecInfo init signature is not covered ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 06:51:38 2013 From: report at bugs.python.org (David Chambers) Date: Mon, 11 Nov 2013 05:51:38 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1384149098.67.0.19160505617.issue19238@psf.upfronthosting.co.za> David Chambers added the comment: These commits contain a typo: s/preceeded/preceded/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 06:52:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Nov 2013 05:52:11 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <3dJ1SV57Dnz7Lkr@mail.python.org> Roundup Robot added the comment: New changeset 35cd00465624 by Serhiy Storchaka in branch 'default': Fixed compile error on Windows caused by arithmetic with void * pointers http://hg.python.org/cpython/rev/35cd00465624 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 08:30:49 2013 From: report at bugs.python.org (Michael Haubenwallner) Date: Mon, 11 Nov 2013 07:30:49 +0000 Subject: [issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX In-Reply-To: <1383924879.95.0.72869375832.issue19529@psf.upfronthosting.co.za> Message-ID: <1384155049.39.0.513377473713.issue19529@psf.upfronthosting.co.za> Michael Haubenwallner added the comment: It is the abort() libc function being called, causing a core file to be written. And I can see the backtrace from both the core file or when running in the debugger. Yes: I already have included this fix into my python-3.2.5 packaging. I'm basically fine when this patch is accepted "technically", although I'd prefer to see it included in the next 3.2 release, if any. In fact I've reported it only because I've seen a 2.7 release recently - ohw, and 2.6.9 yesterday, so I've expected there eventually may be another 3.2 release too. Yes: This bug does not exist since 3.3 any more due to the rewrite. And indeed I'd also call this a security fix because it is of the "invalid memory read" type: I do see the filenames being truncated after 112 characters when building in some longer build-path. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 11:26:53 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 10:26:53 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1384165613.56.0.961347778084.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: Assigning to myself for final review and commit :) ---------- assignee: dstufft -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 11:33:09 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 10:33:09 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1384165989.39.0.547822398304.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm also going to start creating the implementation issues for the installer and pyvenv updates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 11:33:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 10:33:15 +0000 Subject: [issue19550] PEP 453: Windows installer integration Message-ID: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> New submission from Nick Coghlan: Part of the PEP 453 implementation as tracked in issue 19347. This issue covers the Windows installer updates: * new option to choose whether or not to invoke "python -m ensurepip --upgrade" on the just installed Python * also add the result of calling 'sysconfig.get_path("scripts")' to PATH when PATH modification is enabled in the installer ---------- assignee: loewis components: Windows messages: 202610 nosy: larry, loewis, ncoghlan priority: release blocker severity: normal status: open title: PEP 453: Windows installer integration versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 11:33:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 10:33:27 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> Message-ID: <1384166007.42.0.164824591632.issue19550@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +PEP 453: add the ensurepip module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 11:34:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 10:34:55 +0000 Subject: [issue19551] PEP 453: Mac OS X installer integration Message-ID: <1384166095.93.0.842869053252.issue19551@psf.upfronthosting.co.za> New submission from Nick Coghlan: Part of the PEP 453 implementation as tracked in issue 19347. This issue covers the Mac OS X installer update to include a new option to choose whether or not to invoke "python -m ensurepip --upgrade" on the just installed Python. ---------- assignee: ned.deily components: Macintosh messages: 202611 nosy: larry, ncoghlan, ned.deily priority: release blocker severity: normal stage: needs patch status: open title: PEP 453: Mac OS X installer integration type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 11:46:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 10:46:02 +0000 Subject: [issue19552] PEP 453: venv module and pyvenv integration Message-ID: <1384166762.42.0.483253842263.issue19552@psf.upfronthosting.co.za> New submission from Nick Coghlan: Part of the PEP 453 implementation as tracked in issue 19347. This issue covers the venv module and pyvenv CLI updates: * Add a "with_pip=False" parameter to venv.EnvBuilder and venv.create * When with_pip is a true value, invoke ensurepip.bootstrap with the root set to the just created venv and default_pip set to True * update pyvenv to pass with_pip=True by default * add a --without-pip option to pyvenv to pass with_pip=False instead ---------- messages: 202612 nosy: larry, ncoghlan priority: release blocker severity: normal stage: needs patch status: open title: PEP 453: venv module and pyvenv integration type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 11:46:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 10:46:11 +0000 Subject: [issue19552] PEP 453: venv module and pyvenv integration In-Reply-To: <1384166762.42.0.483253842263.issue19552@psf.upfronthosting.co.za> Message-ID: <1384166771.34.0.539149948978.issue19552@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +PEP 453: add the ensurepip module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 11:48:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 10:48:14 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1384166894.57.0.108636786623.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: The inconsistency between altinstall and default_install bothered me, so I plan to change the spelling of the latter option to "default_pip" (since it directly controls whether or not the "pip" script gets installed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 12:32:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Nov 2013 11:32:22 +0000 Subject: [issue8799] Hang in lib/test/test_threading.py In-Reply-To: <1274694258.02.0.421667436928.issue8799@psf.upfronthosting.co.za> Message-ID: <3dJ9120D33z7Lnt@mail.python.org> Roundup Robot added the comment: New changeset 9e48c9538a7f by Kristjan Valur Jonsson in branch 'default': Issue #8799: Reduce timing sensitivity of condition test by explicitly http://hg.python.org/cpython/rev/9e48c9538a7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 12:39:25 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 11 Nov 2013 11:39:25 +0000 Subject: [issue15440] multiprocess fails to re-raise exception which has mandatory arguments In-Reply-To: <1343143072.3.0.822241372547.issue15440@psf.upfronthosting.co.za> Message-ID: <1384169965.56.0.269266696193.issue15440@psf.upfronthosting.co.za> Richard Oudkerk added the comment: This was fixed for 3.3 in #1692335. The issue of backporting to 2.7 is discussed in #17296. ---------- resolution: -> duplicate status: open -> closed superseder: -> Cannot unpickle classes derived from 'Exception' type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 12:39:39 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 11:39:39 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration Message-ID: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> New submission from Nick Coghlan: Part of the PEP 453 implementation as tracked in issue 19347. This issue covers the integration of ensurepip with "make install" (running "python -m ensurepip") and "make altinstall" (running "python -m ensurepip --altinstall") ---------- components: Build messages: 202616 nosy: larry, ncoghlan priority: release blocker severity: normal stage: needs patch status: open title: PEP 453: "make install" and "make altinstall" integration type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 12:39:50 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 11:39:50 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384169990.52.0.209017038947.issue19553@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +PEP 453: add the ensurepip module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 12:55:38 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 11:55:38 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1384170938.92.0.884931840846.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: New subtasks: Issue 19550: Windows installer integration Issue 19551: Mac OS X installer integration Issue 19552: venv module and pyvenv integration Issue 19553: "make install" and "make altinstall" integration open ---------- dependencies: +Compact int and float freelists, Potential overflows due to incorrect usage of PyUnicode_AsString., test_select.py converted to unittest, test_wave.py converted to unittest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 12:56:09 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 11:56:09 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1384170969.54.0.298242944624.issue19347@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +PEP 453: "make install" and "make altinstall" integration, PEP 453: Mac OS X installer integration, PEP 453: Windows installer integration, PEP 453: venv module and pyvenv integration -Compact int and float freelists, Potential overflows due to incorrect usage of PyUnicode_AsString., test_select.py converted to unittest, test_wave.py converted to unittest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 12:58:43 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 11 Nov 2013 11:58:43 +0000 Subject: [issue5527] multiprocessing won't work with Tkinter (under Linux) In-Reply-To: <1237574081.02.0.0677822756927.issue5527@psf.upfronthosting.co.za> Message-ID: <1384171123.08.0.728716187267.issue5527@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > So hopefully the bug should disappear entirely in future releases of tcl, > but for now you can work around it by building tcl without threads, > calling exec in between the fork and any use of tkinter in the child > process, or not importing tkinter until after the fork. In 3.4 you can do this by using multiprocessing.set_start_method('spawn') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:15:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Nov 2013 12:15:25 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <3dJ9yj2WvZz7Lmm@mail.python.org> Roundup Robot added the comment: New changeset 6a6b1ee306e3 by Nick Coghlan in branch 'default': Close #19406: Initial implementation of ensurepip http://hg.python.org/cpython/rev/6a6b1ee306e3 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:19:29 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 11 Nov 2013 12:19:29 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1384172369.89.0.648446366794.issue19537@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:23:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 12:23:23 +0000 Subject: [issue19406] PEP 453: add the ensurepip module In-Reply-To: <1382791353.58.0.0832819187688.issue19406@psf.upfronthosting.co.za> Message-ID: <1384172603.2.0.323573469258.issue19406@psf.upfronthosting.co.za> Nick Coghlan added the comment: Aside from the default-install -> default-pip name change, the other fixes/changes between Donald's last patch and the committed version: - added the missing docs for the new options - updated What's New, ACKS, NEWS - avoided repetition in the test code by using setUp and addCleanUp appropriately (this also prevented the earlier tests from altering os.environ) - marked the .whl as binary in .hgeol ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:25:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 12:25:46 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> Message-ID: <1384172746.85.0.786314177941.issue19550@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:26:00 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 12:26:00 +0000 Subject: [issue19551] PEP 453: Mac OS X installer integration In-Reply-To: <1384166095.93.0.842869053252.issue19551@psf.upfronthosting.co.za> Message-ID: <1384172760.41.0.756400983052.issue19551@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +PEP 453: add the ensurepip module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:26:35 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 12:26:35 +0000 Subject: [issue19552] PEP 453: venv module and pyvenv integration In-Reply-To: <1384166762.42.0.483253842263.issue19552@psf.upfronthosting.co.za> Message-ID: <1384172795.78.0.698466984705.issue19552@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:29:49 2013 From: report at bugs.python.org (William Grzybowski) Date: Mon, 11 Nov 2013 12:29:49 +0000 Subject: [issue19554] Enable all freebsd* host platforms Message-ID: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> New submission from William Grzybowski: Hello, Currently python setup.py restricts FreeBSD host platform by version, e.g. freebsd7, freebsd8. It is not only out-of-date (we already are on freebsd11) but also doesn't seem to have a good reason to do so. Proposed patches replaces it with startswith('freebsd'). Thanks ---------- components: Build files: tip.patch keywords: patch messages: 202621 nosy: wg priority: normal severity: normal status: open title: Enable all freebsd* host platforms type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file32573/tip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:32:46 2013 From: report at bugs.python.org (William Grzybowski) Date: Mon, 11 Nov 2013 12:32:46 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384173166.03.0.621979261305.issue19554@psf.upfronthosting.co.za> Changes by William Grzybowski : Added file: http://bugs.python.org/file32574/tip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:32:59 2013 From: report at bugs.python.org (William Grzybowski) Date: Mon, 11 Nov 2013 12:32:59 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384173179.52.0.652719320923.issue19554@psf.upfronthosting.co.za> Changes by William Grzybowski : Removed file: http://bugs.python.org/file32573/tip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:44:16 2013 From: report at bugs.python.org (koobs) Date: Mon, 11 Nov 2013 12:44:16 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384173856.22.0.977013177174.issue19554@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:51:35 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 11 Nov 2013 12:51:35 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384174295.72.0.602823629889.issue19554@psf.upfronthosting.co.za> Stefan Krah added the comment: The comment says that semaphores are broken up to FreeBSD-8, so linking with -lrt is disabled. This looks correct to me and our FreeBSD 9 and 10 buildbots work. If you have a specific problem, please re-open the issue. ---------- nosy: +skrah resolution: -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:52:01 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 11 Nov 2013 12:52:01 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384174321.46.0.52952509402.issue19554@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:55:15 2013 From: report at bugs.python.org (William Grzybowski) Date: Mon, 11 Nov 2013 12:55:15 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384174515.35.0.718643014825.issue19554@psf.upfronthosting.co.za> William Grzybowski added the comment: Semaphores broken or not (it seems to work just fine in freebsd9) python is still usable overall. I see no reason to arbitrarily chose what freebsd platform to build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 13:58:20 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 11 Nov 2013 12:58:20 +0000 Subject: [issue17874] ProcessPoolExecutor in interactive shell doesn't work in Windows In-Reply-To: <1367291797.68.0.0512798150346.issue17874@psf.upfronthosting.co.za> Message-ID: <1384174700.31.0.233538495083.issue17874@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Fixed by #11161. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed superseder: -> futures.ProcessPoolExecutor hangs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 14:02:48 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 11 Nov 2013 13:02:48 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384174515.35.0.718643014825.issue19554@psf.upfronthosting.co.za> Message-ID: <20131111130247.GA23856@sleipnir.bytereef.org> Stefan Krah added the comment: I looked at patch set 1, which actually *reduced* functionality for FreeBSD >= 9. Now there is a second patch set, so I'm re-opening. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 14:04:16 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 11 Nov 2013 13:04:16 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384175056.48.0.488924661257.issue19554@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: invalid -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 14:06:50 2013 From: report at bugs.python.org (William Grzybowski) Date: Mon, 11 Nov 2013 13:06:50 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384175210.92.0.824799500932.issue19554@psf.upfronthosting.co.za> William Grzybowski added the comment: Ah, I see, I made a misinterpretation of setup.py. Sorry about that. So please ignore the setup.py changes in the patch ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 14:32:23 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 11 Nov 2013 13:32:23 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384176743.18.0.211163110487.issue19554@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- dependencies: +Automatically regenerate platform-specific modules nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 14:37:25 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 11 Nov 2013 13:37:25 +0000 Subject: [issue12619] Automatically regenerate platform-specific modules In-Reply-To: <1311414212.95.0.467545301683.issue12619@psf.upfronthosting.co.za> Message-ID: <1384177045.16.0.762579505258.issue12619@psf.upfronthosting.co.za> Stefan Krah added the comment: See also #19554. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 15:20:30 2013 From: report at bugs.python.org (Alan Cristhian) Date: Mon, 11 Nov 2013 14:20:30 +0000 Subject: [issue19441] itertools.tee improve documentation In-Reply-To: <1383087333.66.0.191656186181.issue19441@psf.upfronthosting.co.za> Message-ID: <1384179630.34.0.676665216504.issue19441@psf.upfronthosting.co.za> Alan Cristhian added the comment: Ok, I agree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 15:49:40 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 11 Nov 2013 14:49:40 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> Message-ID: <1384181380.91.0.681645336588.issue19550@psf.upfronthosting.co.za> Martin v. L?wis added the comment: IIUC, the current implementation strategy is to check the wheels into source control. If so, what's to be done in the installer (except for making sure that the wheels get bundled and installed into the msi, which it should do by default?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 15:52:51 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 11 Nov 2013 14:52:51 +0000 Subject: [issue19541] ast.dump(indent=True) prettyprinting In-Reply-To: <1384060618.33.0.960245227555.issue19541@psf.upfronthosting.co.za> Message-ID: <1384181571.49.0.768469415693.issue19541@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> components: +Library (Lib) -Documentation nosy: -docs at python priority: normal -> low stage: -> test needed type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 15:54:57 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 11 Nov 2013 14:54:57 +0000 Subject: [issue19543] Add -3 warnings for codec convenience method changes In-Reply-To: <1384075247.27.0.0100141647279.issue19543@psf.upfronthosting.co.za> Message-ID: <1384181697.57.0.940862871419.issue19543@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 16:09:35 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 11 Nov 2013 15:09:35 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1384182575.48.0.546000165104.issue10197@psf.upfronthosting.co.za> Tim Golden added the comment: Thanks: final outdated comments removed ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 16:13:58 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 11 Nov 2013 15:13:58 +0000 Subject: [issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError In-Reply-To: <1285193199.71.0.119462884073.issue9922@psf.upfronthosting.co.za> Message-ID: <1384182838.47.0.34595517639.issue9922@psf.upfronthosting.co.za> Tim Golden added the comment: Closing this as won't fix. The code has been reimplemented and additional documentation has been added over at issue10197. Given that these are legacy functions, I don't propose to do any more here. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 17:29:06 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 11 Nov 2013 16:29:06 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> Message-ID: <1384187346.12.0.29164497277.issue19550@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I missed the original message. I'll try to come up with a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 17:42:56 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 11 Nov 2013 16:42:56 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1384144334.0.0.266251209557.issue5815@psf.upfronthosting.co.za> Message-ID: <52810904.50201@egenix.com> Marc-Andre Lemburg added the comment: >> Then I don't understand changes such as: >> >> - 'chinese-s': 'zh_CN.eucCN', >> + 'chinese-s': 'zh_CN.gb2312', >> >> or >> >> - 'sp': 'sr_CS.ISO8859-5', >> - 'sp_yu': 'sr_CS.ISO8859-5', >> + 'sp': 'sr_RS.ISO8859-5', >> + 'sp_yu': 'sr_RS.ISO8859-5', >> >> The .test_locale_alias() checks that the normalize() >> function returns the the alias given in the alias table. As mentioned earlier, the purpose of the alias table is to map *normalized* local names to the C runtime string, which in some cases use different encoding names that we use in Python. > It also test normalize(locale_alias[localname]) == locale_alias[localname] > == normalize(localname). I.e. that applying normalize() twice doesn't > change a result. That's not intended. The normalize() function is supposed to prepare the locale for the lookup. It's not supposed to be applied to the looked up value. About the devangari special case: This has been in the X11 file for ages and still is ... http://cgit.freedesktop.org/xorg/lib/libX11/tree/nls/locale.alias.pre ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 18:29:57 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Mon, 11 Nov 2013 17:29:57 +0000 Subject: [issue19555] "SO" config var not getting set Message-ID: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> New submission from Marc Abramowitz: I just installed Python 3.0a4 from source on an Ubuntu system and noticed that it doesn't seem to set the distutils.sysconfig config var: "SO": ``` vagrant at ubuntu:~/src/Python-3.4.0a4$ python3.4 Python 3.4.0a4 (default, Nov 11 2013, 17:11:59) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from distutils import sysconfig >>> sysconfig.get_config_var("SO") >>> sysconfig.get_config_var("SO") is None True ``` This worked fine for me in Python 3.3: ``` vagrant at ubuntu:~/src/Python-3.4.0a4$ python3.3 Python 3.3.2 (default, May 16 2013, 18:32:41) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from distutils import sysconfig >>> sysconfig.get_config_var("SO") '.so' ``` ---------- assignee: eric.araujo components: Distutils messages: 202634 nosy: Marc.Abramowitz, eric.araujo, tarek priority: normal severity: normal status: open title: "SO" config var not getting set type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 18:54:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 Nov 2013 17:54:29 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1384192469.48.0.583458887129.issue16685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed. Thank you Jason. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 18:58:02 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 11 Nov 2013 17:58:02 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1384192682.78.0.239448760507.issue19555@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: eric.araujo -> nosy: -eric.araujo, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 19:16:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 Nov 2013 18:16:08 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1384193768.83.0.63836788196.issue5202@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is simplified and updated to tip patch. ---------- Added file: http://bugs.python.org/file32575/wave_write_unseekable_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 19:19:15 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 11 Nov 2013 18:19:15 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1384193955.37.0.00310008946295.issue19555@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Indeed, this happens for me too in default head. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 19:21:08 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 11 Nov 2013 18:21:08 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1384194068.7.0.820880387928.issue19555@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Never mind, this is an intentional change: - Issue #16754: Fix the incorrect shared library extension on linux. Introduce two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4. Although this does introduce some backward compatibility issues. Perhaps sysconfig.get_config_var('SO') should be deprecated in 3.4 and removed in 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 19:22:04 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 11 Nov 2013 18:22:04 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1384194124.71.0.140317092179.issue19555@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 19:23:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 Nov 2013 18:23:39 +0000 Subject: [issue19539] The 'raw_unicode_escape' codec buggy + not apropriate for Python 3.x In-Reply-To: <1384051905.56.0.969775270474.issue19539@psf.upfronthosting.co.za> Message-ID: <1384194219.78.0.322694312106.issue19539@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: -Library (Lib) nosy: -serhiy.storchaka stage: -> needs patch type: -> enhancement versions: -Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 19:27:26 2013 From: report at bugs.python.org (Marc Abramowitz) Date: Mon, 11 Nov 2013 18:27:26 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1384194446.04.0.777298300112.issue19555@psf.upfronthosting.co.za> Marc Abramowitz added the comment: Thanks Barry, for tracking down that this is intentional. I wonder how one gets this value in Python code now? For example, the reason I stumbled upon this in the first place is that there is some code in PyCrypto (https://github.com/dlitz/pycrypto/blob/master/lib/Crypto/SelfTest/PublicKey/test_RSA.py#L464) that uses `get_config_var("SO")` thusly: ``` except ImportError: from distutils.sysconfig import get_config_var import inspect _fm_path = os.path.normpath(os.path.dirname(os.path.abspath( inspect.getfile(inspect.currentframe()))) +"/../../PublicKey/_fastmath"+get_config_var("SO")) if os.path.exists(_fm_path): raise ImportError("While the _fastmath module exists, importing "+ "it failed. This may point to the gmp or mpir shared library "+ "not being in the path. _fastmath was found at "+_fm_path) ``` What would be the way to express this now in Python >= 3.4? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:03:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Nov 2013 19:03:54 +0000 Subject: [issue6683] smtplib authentication - try all mechanisms In-Reply-To: <1250007436.58.0.446313092376.issue6683@psf.upfronthosting.co.za> Message-ID: <3dJM2116jZz7Lnv@mail.python.org> Roundup Robot added the comment: New changeset 19912ad231a3 by Andrew Kuchling in branch 'default': Closes #6683: add a test that exercises multiple authentication. http://hg.python.org/cpython/rev/19912ad231a3 ---------- nosy: +python-dev resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:10:36 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 11 Nov 2013 19:10:36 +0000 Subject: [issue15858] tarfile missing entries due to omitted uid/gid fields In-Reply-To: <1346701660.86.0.976031645545.issue15858@psf.upfronthosting.co.za> Message-ID: <1384197036.74.0.321566772507.issue15858@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Here's the changes from patch.py, put into patch format. I took out the inlining for ntb() and support for different tarfile APIs, and also replaced the use of .split(,1)[0] by .partition(). ---------- nosy: +akuchling Added file: http://bugs.python.org/file32576/tarfile-patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:12:41 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 11 Nov 2013 19:12:41 +0000 Subject: [issue9878] Avoid parsing pyconfig.h and Makefile by autogenerating extension module In-Reply-To: <1284660526.13.0.672517649262.issue9878@psf.upfronthosting.co.za> Message-ID: <1384197161.74.0.66513348748.issue9878@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Isn't this already fixed? We have _sysconfigdata for this now. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:19:23 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 11 Nov 2013 19:19:23 +0000 Subject: [issue19539] The 'raw_unicode_escape' codec buggy + not appropriate for Python 3.x In-Reply-To: <1384051905.56.0.969775270474.issue19539@psf.upfronthosting.co.za> Message-ID: <1384197563.26.0.45577927483.issue19539@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Jan, the codec implements an encoding which has certain characteristics just like any other codec. It works both in Python 2 and 3 without problems. The documentation is no longer true, though. Ever since we added encoding markers to source files, the raw Unicode string literals depended on this encoding setting. Before this change the docs were fine, since Unicode literals were interpreted as Latin-1 encoded. More correct would be: "Produce a string that uses Unicode escapes to encode non-Latin-1 code points. It is used in the Python pickle protocol." ---------- nosy: +lemburg title: The 'raw_unicode_escape' codec buggy + not apropriate for Python 3.x -> The 'raw_unicode_escape' codec buggy + not appropriate for Python 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:21:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 Nov 2013 19:21:22 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1384197682.82.0.509538201919.issue5815@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > That's not intended. The normalize() function is supposed to prepare the locale for the lookup. It's not supposed to be applied to the looked up value. Last patch doesn't contain this part of tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:25:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 Nov 2013 19:25:16 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1384197916.8.0.620235598543.issue5815@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > There are no such systems really, in X.org this is just a mistake. glibc doesn?t write it like this and it is agains the specification here: While normalize can return sd_IN at devanagari.UTF-8, _parse_localename() should be able correctly parse it. Removing sd_IN at devanagari.UTF-8 from alias table is another issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:50:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Nov 2013 19:50:25 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <3dJN3h0DQRz7Ln4@mail.python.org> Roundup Robot added the comment: New changeset 267ad2ed4138 by Andrew Kuchling in branch 'default': #15422: remove NEWS item for a change that was later reverted http://hg.python.org/cpython/rev/267ad2ed4138 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:54:20 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 11 Nov 2013 19:54:20 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1384197682.82.0.509538201919.issue5815@psf.upfronthosting.co.za> Message-ID: <528135E0.4030204@egenix.com> Marc-Andre Lemburg added the comment: On 11.11.2013 20:21, Serhiy Storchaka wrote: > >> That's not intended. The normalize() function is supposed to >> prepare the locale for the lookup. It's not supposed to be applied >> to the looked up value. > > Last patch doesn't contain this part of tests. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:56:03 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 11 Nov 2013 19:56:03 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1384199763.95.0.687470581016.issue19555@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Here's a patch, sans NEWS and any docs. ---------- Added file: http://bugs.python.org/file32577/issue19555.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:56:30 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 11 Nov 2013 19:56:30 +0000 Subject: [issue19555] SO configuration variable should be deprecated in 3.4 In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1384199790.49.0.0917248471695.issue19555@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- title: "SO" config var not getting set -> SO configuration variable should be deprecated in 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 20:57:39 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 11 Nov 2013 19:57:39 +0000 Subject: [issue19555] SO configuration variable should be deprecated in 3.4 In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1384199859.17.0.265001446244.issue19555@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Note that obviously the DeprecationWarning is not raised if you do sysconfig.get_config_vars()['SO'] but it still gets mapped to EXT_SUFFIX in that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 21:01:16 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 11 Nov 2013 20:01:16 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384194446.04.0.777298300112.issue19555@psf.upfronthosting.co.za> Message-ID: <20131111150113.52bbe64e@anarchist> Barry A. Warsaw added the comment: On Nov 11, 2013, at 06:27 PM, Marc Abramowitz wrote: >What would be the way to express this now in Python >= 3.4? For now, use sysconfig.get_config_var('EXT_SUFFIX') though if no one objects to my patch, I'll restore 'SO' for 3.4. We'll add a DeprecationWarning and get rid of it in 3.5. ---------- title: SO configuration variable should be deprecated in 3.4 -> "SO" config var not getting set _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 21:32:30 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 11 Nov 2013 20:32:30 +0000 Subject: [issue16776] Document PyCFunction_New and PyCFunction_NewEx functions In-Reply-To: <1356434154.16.0.0981038830976.issue16776@psf.upfronthosting.co.za> Message-ID: <1384201950.9.0.869921985351.issue16776@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Here's a patch that contains text for a description of these two functions. However, I can't figure out what section they would belong in. They don't really belong in http://docs.python.org/3.4/c-api/structures.html, which is for the C structures. Also note that PyCFunctionObject isn't described anywhere. Should it be? ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 21:32:48 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 11 Nov 2013 20:32:48 +0000 Subject: [issue16776] Document PyCFunction_New and PyCFunction_NewEx functions In-Reply-To: <1356434154.16.0.0981038830976.issue16776@psf.upfronthosting.co.za> Message-ID: <1384201968.1.0.0108285315616.issue16776@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Mis-clicked and forgot to attach the patch. ---------- Added file: http://bugs.python.org/file32578/16776.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 22:28:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 Nov 2013 21:28:14 +0000 Subject: [issue10734] test_ttk test_heading_callback fails with newer Tk 8.5 In-Reply-To: <1292706922.45.0.208964037247.issue10734@psf.upfronthosting.co.za> Message-ID: <1384205294.83.0.279158683722.issue10734@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 23:13:04 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 11 Nov 2013 22:13:04 +0000 Subject: [issue8502] support plurals in pygettext In-Reply-To: <1271985007.3.0.675755685137.issue8502@psf.upfronthosting.co.za> Message-ID: <1384207984.75.0.0160482595775.issue8502@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Here's an updated version of the documentation patch, that doesn't encourage using pygettext so much. It also updates Barry Warsaw's e-mail address and makes some other small edits. ---------- nosy: +akuchling Added file: http://bugs.python.org/file32579/patch-8502.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 23:32:20 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 11 Nov 2013 22:32:20 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1384209140.49.0.365966845926.issue3158@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a new version of the patch that I think addresses the points in your review (which I've also replied to on Rietveld). And I agree about not backporting. ---------- Added file: http://bugs.python.org/file32580/issue3158.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 23:40:32 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 11 Nov 2013 22:40:32 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384209632.54.0.0757275473855.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Sorry that wasn't more clear. I committed the changes from the modulespec-primary-changes.diff patch to the pep451 branch in the server-side clone. Those changes are: Step 1 ------ 1. added ModuleSpec class 2. added _SpecMethods wrapper class 3. added ModuleSpec factory functions 4. added tests for ModuleSpec, _SpecMethods, and the factories 5. exposed ModuleSpec in importlib.machinery 6. exposed ModuleSpec factories in importlib.util 7. added basic docs for ModuleSpec and the factory functions Step 2 ------ 1. changed _find_module() to _find_spec() 2. changed _find_and_load_unlocked() to use _find_spec() and _SpecMethods 3. changed _setup() to use specs 4. changed pydoc to recognize __spec__ Step 3 ------ 1. updated the import reference doc 2. changed importlib.reload() to use specs 3. added importlib.find_spec() 4. changed importlib.find_loader() to wrap find_spec() 5. updated importlib.abc to reflect the new APIs 6. changed pkgutil to use specs 7. changed imp to use specs 8. fixed a bunch of broken tests to use spec Step 3 ------ 1. implemented find_spec() on PathFinder 2. implemented find_spec() on FileFinder 3. re-implemented FileFinder.find_loader() to wrap find_spec() 4. re-implemented PathFinder.find_module() to wrap find_spec() 5. changed _NamespacePath to use specs Step 5 ------ 1. added _module_repr function 2. changed ModuleType.__repr__ to wrap _module_repr Others ------ * removed _NamespaceLoader * added comments indicating deprecations and removals At this point, the test suite passes and the fundamental changes of the PEP are implemented (on the server-side clone). Here's what's left to do before the feature freeze: 1. 2. change module.__initializing__ to module.__spec__._initializing 3. refactor importlib loaders to use the new Finder/Loader APIs 4. refactor pythonrun.c to make use of specs 5. check pkgutil for any missed changes 6. implement the deprecations and removals 7. adjust other APIs to use __spec__ (pickle, runpy, inspect, pydoc, others?) 8. evaluate any impact on setuptools Other things that can (but don't have to) wait until after the beta release: * finish doc changes * fill in any gaps in test coverage * ensure new docstrings exist and are correct * ensure existing docstrings are still correct ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 23:41:19 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 11 Nov 2013 22:41:19 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384209679.05.0.434462470791.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: "1." was intentionally left blank ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 11 23:44:45 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 11 Nov 2013 22:44:45 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384209885.37.0.368595610714.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Regarding tests, a bunch of importlib (and other?) tests make direct calls to find_module(), find_loader(), or load_module(). These are still working, as expected. However, we should probably either replace them or supplement them with equivalent tests that make use of specs directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 00:19:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 23:19:27 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1384209885.37.0.368595610714.issue18864@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Yeah, don't replace any tests, add new ones for the new APIs. Given the needs of 2/3 compatible loader implementations, the deprecations referred to in the PEP should also be documentation-only for 3.4. A more conservative approach also gives us a chance to make sure we have provided a full replacement for load_module - it occurred to me after the PEP was accepted that we may eventually need a "can_load_into(target)" loader API after all, since loaders may not be finder specific. That means that with the current API of passing the target to find_spec, I potentially talked us into repeating the "load_module" mistake on the finder side of things by asking the finder to handle more than it needed to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 00:36:51 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 11 Nov 2013 23:36:51 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384213011.76.0.445889098938.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: > Yeah, don't replace any tests, add new ones for the new APIs. That's what makes the most sense to me too. > Given the > needs of 2/3 compatible loader implementations, the deprecations referred > to in the PEP should also be documentation-only for 3.4. I'm fine with that. I seem to remember one place where an actual deprecation warning would be good, but I'll have to double-check. > A more conservative approach also gives us a chance to make sure we have > provided a full replacement for load_module - it occurred to me after the > PEP was accepted that we may eventually need a "can_load_into(target)" > loader API after all, since loaders may not be finder specific. That means > that with the current API of passing the target to find_spec, I potentially > talked us into repeating the "load_module" mistake on the finder side of > things by asking the finder to handle more than it needed to. Nice analogy. "can_load_into()" makes sense. Do you think it's important enough to include in 3.4? I'm not sure it is, since I'd expect it to be a pretty uncommon case that can be worked around pretty easily (since the finder is fully aware of the loader it's creating). The extra loader method would help with that boilerplate operation, but... As we found out (and you expounded) there are a variety of reload/load-into cases that we could address more explicitly. Perhaps there's a better API that could address those needs more broadly, or maybe they're just not worth addressing specifically. Exploring all this is something that can wait, IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 00:41:06 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 23:41:06 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: Message-ID: Nick Coghlan added the comment: Although, a boolean query method would bring back the problem of the loader not reporting any details on *why* it can't load into a particular target module. So it may be better to have an optional loader "check_existing_target" API that throws a suitable exception if the target is unacceptable. Loaders that don't support reloading at all would just always raise an exception, while those that don't care would just not implement the method. That would address my concern about the lack of useful error information in Eric's original boolean check idea, without bothering finders with loader related details as the accepted PEP does (I still like the idea of passing a target to importlib.find_spec - I just no longer think we should be passing that down to the finders themselves). Another thing we need to check we have a test for: ensuring reloading a namespace module picks up new directories added since it was first loaded. This would all be so much easier if reloading wasn't supported in the first place :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 00:49:41 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 23:49:41 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1384213011.76.0.445889098938.issue18864@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On 12 Nov 2013 09:36, "Eric Snow" wrote: > > As we found out (and you expounded) there are a variety of reload/load-into cases that we could address more explicitly. Perhaps there's a better API that could address those needs more broadly, or maybe they're just not worth addressing specifically. Exploring all this is something that can wait, IMHO. Yes, that's an option, too, and probably a good one. To go down that path, we would drop the various "target" parameters and say loaders that need to check for the reloading case should continue to provide load_module without exec_module (at least for 3.4). runpy would use the rule that it supports anything that exposes exec_module without create_module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 00:55:36 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 11 Nov 2013 23:55:36 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384214136.52.0.403977209668.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: > (I still like the idea of passing > a target to importlib.find_spec - I just no longer think we should be > passing that down to the finders themselves). Passing the target to the finders isn't just for the sake of any implicit "check_target" test, though that was the original motivator. It also allows the finder to decide between multiple loaders based on other criteria related to the target (but not necessarily the loader). I think it was a good addition to the API regardless. > Another thing we need to check we have a test for: ensuring reloading a > namespace module picks up new directories added since it was first loaded. Agreed. Furthermore, such a test is worthwhile outside the context of PEP 451. I'm tempted to say we're already covered with existing tests, but reload is goofy enough that an explicit test is worth it. > This would all be so much easier if reloading wasn't supported in the first > place :) So very true. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 00:59:59 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 11 Nov 2013 23:59:59 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: Message-ID: Nick Coghlan added the comment: And coming full circle: there's no *harm* in letting finders reject loading into a target module, and that's orthogonal to having loaders reject it. It's just that loaders that want to do that will currently still need to implement load_module. That means the only thing we need to postpone is the load_module deprecation, since it still covers at least one advanced use case the new API doesn't handle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 01:06:20 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 12 Nov 2013 00:06:20 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384214780.46.0.891967047087.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Sounds good. It will be worth adding a note to the load_module() docs indicating the limited cases where it is still appropriate, and encouraging the use of exec_module() instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 01:49:44 2013 From: report at bugs.python.org (Takayuki SHIMIZUKAWA) Date: Tue, 12 Nov 2013 00:49:44 +0000 Subject: [issue19556] A missing link to Python-2.7.6.tar.bz2 in Download page. Message-ID: <1384217384.48.0.91002834493.issue19556@psf.upfronthosting.co.za> New submission from Takayuki SHIMIZUKAWA: http://python.org/download/ have a link to "Python 2.7.6 bzipped source tarball (for Linux, Unix or Mac OS X, more compressed)", but Python-2.7.6.tar.bz2 that is linked is not exist. Thanks. ---------- components: Build messages: 202665 nosy: benjamin.peterson, shimizukawa priority: normal severity: normal status: open title: A missing link to Python-2.7.6.tar.bz2 in Download page. versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 01:59:59 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 12 Nov 2013 00:59:59 +0000 Subject: [issue19556] A missing link to Python-2.7.6.tar.bz2 in Download page. In-Reply-To: <1384217384.48.0.91002834493.issue19556@psf.upfronthosting.co.za> Message-ID: <1384217999.8.0.00852185811437.issue19556@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. As of the 2.7.6 release, bz2-compressed 2.7.x tarballs are no longer produced. The link on the download page now points to the xz-compressed tarball, which offers better compression than bz2. ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 03:13:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 02:13:13 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1384222393.84.0.465340590639.issue19466@psf.upfronthosting.co.za> STINNER Victor added the comment: neologix made a review on rietveld: http://bugs.python.org/review/19466/#ps9818 There was an issue in finalize_threads-2.patch: the test didn't pass in release mode. I fixed it by adding -Wd to the command line option. I also replaced threading.Lock with threading.Event in the unit test to synchronize the two threads. => finalize_threads-3.patch ---------- Added file: http://bugs.python.org/file32581/finalize_threads-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 03:41:31 2013 From: report at bugs.python.org (mpb) Date: Tue, 12 Nov 2013 02:41:31 +0000 Subject: [issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior In-Reply-To: <1383969468.97.0.110285365425.issue19530@psf.upfronthosting.co.za> Message-ID: <1384224091.78.0.223132110893.issue19530@psf.upfronthosting.co.za> mpb added the comment: > "Connecting" a UDP socket doesn't established a duplex connection like > in TCP: Stream and duplex are orthogonal concepts. I still contend that connected UDP sockets are a duplex communication channel (under every definition of duplex I have read). The Linux connect manpage and the behavior of the Linux connect and shutdown system calls agree with me. (So does the OpenBSD shutdown manpage.) But we agree that this is not a Python issue (unless Python wants to improve its documentation to explicitly mention the benefits of cross thread shutdowns of TCP sockets). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 05:16:08 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 12 Nov 2013 04:16:08 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384229768.92.0.704354704301.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: I'm running the pep-451 clone against 2 buildbots for now: * http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%20custom * http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%20custom The ubuntu one is happy with the feature clone, but the windows buildbot keeps finding problems. At first it was issue17116 all over again. I've now set __spec__ to None by default (a la issue17115). Then it fussed about test_everyone_has___loader__. I'm sure something else will turn up. Any thoughts on why import-related tests are responding differently depending on platform? FWIW, I think the Windows failures should have also failed on the Ubuntu buildbot. I'm also going to run on a Windows 7 and OS X to see where things stand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 05:20:57 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 12 Nov 2013 04:20:57 +0000 Subject: [issue18326] Mention 'keyword only' for list.sort, improve glossary. In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <1384230057.21.0.482340091722.issue18326@psf.upfronthosting.co.za> Zachary Ware added the comment: Any further thoughts on this? I think my vote is for v3, except s/must/can only/. "must" makes it sound like you are forced to pass those arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 06:00:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Nov 2013 05:00:06 +0000 Subject: [issue19440] Clean up test_capi In-Reply-To: <1383081712.17.0.162713378456.issue19440@psf.upfronthosting.co.za> Message-ID: <3dJcFw6xGzz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset 5198e8f325f5 by Zachary Ware in branch '3.3': Issue #19440: Clean up test_capi http://hg.python.org/cpython/rev/5198e8f325f5 New changeset 26108b2761aa by Zachary Ware in branch 'default': Issue #19440: Clean up test_capi http://hg.python.org/cpython/rev/26108b2761aa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 06:01:50 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 12 Nov 2013 05:01:50 +0000 Subject: [issue19440] Clean up test_capi In-Reply-To: <1383081712.17.0.162713378456.issue19440@psf.upfronthosting.co.za> Message-ID: <1384232510.78.0.534623178896.issue19440@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 06:04:16 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 12 Nov 2013 05:04:16 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384232656.9.0.520816807039.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: The OS X buildbot I used [1] did not exhibit any of the failures that Windows server 2003 showed. [1] http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%20custom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 06:07:26 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 12 Nov 2013 05:07:26 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384232846.01.0.565772095277.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: The Windows 7 buildbot I tried [1] shows the exact same failures that the server 2003 does. [1] http://buildbot.python.org/all/builders/x86%20Windows7%20custom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 06:23:38 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 12 Nov 2013 05:23:38 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384233818.52.0.185457642291.issue19553@psf.upfronthosting.co.za> Ned Deily added the comment: If nobody else gets to it first, I'll do this in the next couple of days. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 07:52:24 2013 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 12 Nov 2013 06:52:24 +0000 Subject: [issue19557] ast - docs for every node type are missing Message-ID: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> New submission from anatoly techtonik: http://docs.python.org/2/library/ast.html AST module doc is incomplete. To write node visitor, you need to know possible types of parameters and expected values for every node type. They are different. http://hg.python.org/cpython/file/1ee45eb6aab9/Parser/Python.asdl For example, visit_Assign expects: Assign(targets, value) `targets` can be List, Tuple or Name When there is List, and when there is Tuple? It should be documented. ---------- assignee: docs at python components: Devguide, Documentation messages: 202675 nosy: docs at python, ezio.melotti, techtonik priority: normal severity: normal status: open title: ast - docs for every node type are missing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 08:44:29 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 12 Nov 2013 07:44:29 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384242269.03.0.7192273338.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Naturally the other Windows buildbot I tried did not fail any import-related tests. So much for consistency. :( http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20custom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 08:48:40 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 12 Nov 2013 07:48:40 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384242520.14.0.799182325281.issue19554@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 09:05:23 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 12 Nov 2013 08:05:23 +0000 Subject: [issue1109602] Need some setup.py sanity Message-ID: <1384243523.41.0.960054910212.issue1109602@psf.upfronthosting.co.za> Ned Deily added the comment: Issue1584 has implemented ways to specify non-standard Tcl and Tk include file and library locations, both via ./configure and as "make" arguments. Since there are many other issues open regarding specific aspects of setup.py and since, in nine years, there has has been no progress in addressing the more general concerns and since the intent is to phase out setup.py in general in future releases, I am going to close this issue as a duplicate of Issue1584. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Mac OS X: building with X11 Tkinter versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 09:25:18 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 12 Nov 2013 08:25:18 +0000 Subject: [issue19558] Provide Tcl/Tk linkage information for extension module builds Message-ID: <1384244718.62.0.601132485199.issue19558@psf.upfronthosting.co.za> New submission from Ned Deily: In Issue 19490, Piet van Oostrum suggested: "I think future versions of Python should add the relevant information about how they are linked to Tcl/Tk in sysconfig. This would include the path of the include files, the shared libraries and the tcl files. Or a framework location on OS X if this is used. The setup.py for extensions that need to link to Tcl/Tk can then interrogate this information, and fall back to the current way, if it is not available." Ned Deily replied: "Piet, yes, I've been thinking of how to do that. Unfortunately, it can only be a hint since, in the case of an "installer" Python, there is no guarantee that the header files on the build machine are available on the installed machine in the same location or even at all." ---------- components: Build messages: 202678 nosy: ned.deily, pietvo priority: normal severity: normal status: open title: Provide Tcl/Tk linkage information for extension module builds type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 09:31:50 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 12 Nov 2013 08:31:50 +0000 Subject: [issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1 In-Reply-To: <1383554508.21.0.868746765749.issue19490@psf.upfronthosting.co.za> Message-ID: <1384245110.87.0.817261177972.issue19490@psf.upfronthosting.co.za> Ned Deily added the comment: As proposed above, the built-in Tcl/Tk support has been reverted from the OS X installers for 3.3.3rc2 and for 2.7.6 final. Issue15663 will continue to track changes for 3.4.0; the implementation there will have to change for 3.4.0b1. I've also opened Issue19558 concerning Piet's suggestion to provide a way to obtain info about Tcl and Tk linkage. This issue can now be closed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 09:43:07 2013 From: report at bugs.python.org (mpb) Date: Tue, 12 Nov 2013 08:43:07 +0000 Subject: [issue18240] hmac unnecessarily restricts input to "bytes" In-Reply-To: <1371465508.71.0.540084524464.issue18240@psf.upfronthosting.co.za> Message-ID: <1384245787.47.0.876233394869.issue18240@psf.upfronthosting.co.za> Changes by mpb : ---------- nosy: +mpb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 09:59:42 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 12 Nov 2013 08:59:42 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields In-Reply-To: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> Message-ID: <1384246782.77.0.625608019506.issue19449@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the preliminary patch. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file32582/fix_error_message_write_fields_not_in_fieldnames.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 10:00:24 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 12 Nov 2013 09:00:24 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields In-Reply-To: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> Message-ID: <1384246824.48.0.367253489616.issue19449@psf.upfronthosting.co.za> Changes by Vajrasky Kok : ---------- components: +Library (Lib) versions: +Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 11:16:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 12 Nov 2013 10:16:44 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1384242269.03.0.7192273338.issue18864@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: The three Windows machines look like they have very different system versions of Python (ActiveState, cygwin, vanilla CPython). Any chance we're accidentally invoking the system Python instead of the built one somewhere? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 12:18:06 2013 From: report at bugs.python.org (Mike FABIAN) Date: Tue, 12 Nov 2013 11:18:06 +0000 Subject: [issue5815] locale.getdefaultlocale() missing corner case In-Reply-To: <1240424446.58.0.284100987299.issue5815@psf.upfronthosting.co.za> Message-ID: <1384255086.93.0.450051585393.issue5815@psf.upfronthosting.co.za> Mike FABIAN added the comment: Serhiy> While normalize can return sd_IN at devanagari.UTF-8, _parse_localename() Serhiy> should be able correctly parse it. But if normalize returns sd_IN at devanagari.UTF-8, isn?t that quite useless because it is a locale name which does not actually work in glibc? Serhiy> Removing sd_IN at devanagari.UTF-8 from alias table is another issue. Yes. I think it should be fixed in the alias table as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 13:58:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Nov 2013 12:58:18 +0000 Subject: [issue13674] crash in datetime.strftime In-Reply-To: <1325149457.99.0.374098273588.issue13674@psf.upfronthosting.co.za> Message-ID: <3dJpsk0krnz7Ltt@mail.python.org> Roundup Robot added the comment: New changeset 1537f14cc690 by Tim Golden in branch '3.3': Issue13674 Correct crash with strftime %y format under Windows http://hg.python.org/cpython/rev/1537f14cc690 New changeset 41a4c55db7f2 by Tim Golden in branch 'default': Issue13674 Correct crash with strftime %y format under Windows http://hg.python.org/cpython/rev/41a4c55db7f2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 14:00:20 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 12 Nov 2013 13:00:20 +0000 Subject: [issue13674] crash in datetime.strftime In-Reply-To: <1325149457.99.0.374098273588.issue13674@psf.upfronthosting.co.za> Message-ID: <1384261220.7.0.0379082338322.issue13674@psf.upfronthosting.co.za> Tim Golden added the comment: I've committed the changes with a variant of the pre-1900 test running on all platforms. I think there's scope for more testing of the boundary conditions of strftime but that would be for another issue. I want to get this one in now as it's a crasher on Windows. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 14:13:10 2013 From: report at bugs.python.org (Mark Richman) Date: Tue, 12 Nov 2013 13:13:10 +0000 Subject: [issue19559] Interactive interpreter crashes after any two commands Message-ID: <1384261989.27.0.967760332041.issue19559@psf.upfronthosting.co.za> New submission from Mark Richman: On Mac OS X 10.9 (Mavericks), I open the python3 command line interpreter, enter any two commands (enter after each), and I get a Segmentation Fault: 11. This *could* be an issue with readline, but I'm not sure. Example: Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> help Type help() for interactive help, or help(object) for help about object. >>> help Segmentation fault: 11 Attached is the error report. ---------- components: Interpreter Core files: segfault.txt messages: 202685 nosy: mrichman priority: normal severity: normal status: open title: Interactive interpreter crashes after any two commands type: crash versions: Python 3.3 Added file: http://bugs.python.org/file32583/segfault.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 14:31:31 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 12 Nov 2013 13:31:31 +0000 Subject: [issue19559] Interactive interpreter crashes after any two commands In-Reply-To: <1384261989.27.0.967760332041.issue19559@psf.upfronthosting.co.za> Message-ID: <1384263091.12.0.699944611968.issue19559@psf.upfronthosting.co.za> Ezio Melotti added the comment: See #18458. ---------- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 14:33:52 2013 From: report at bugs.python.org (Tom Lynn) Date: Tue, 12 Nov 2013 13:33:52 +0000 Subject: [issue19560] PEP 8 operator precedence across parens Message-ID: <1384263232.23.0.922688589796.issue19560@psf.upfronthosting.co.za> New submission from Tom Lynn: PEP 8 currently has:: Yes:: ... c = (a+b) * (a-b) No:: ... c = (a + b) * (a - b) That looks wrong to me -- surely the parens are a sufficient precedence hint, and don't need further squashing inside? This will be worse with any non-trivial example. I suspect it may also lead to silly complications in code formatting tools. This was changed by Guido as part of a reversion in issue 16239, but I wonder whether that example was intended to be included? ---------- assignee: docs at python components: Documentation messages: 202687 nosy: docs at python, tlynn priority: normal severity: normal status: open title: PEP 8 operator precedence across parens type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 14:33:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Nov 2013 13:33:53 +0000 Subject: [issue13674] crash in datetime.strftime In-Reply-To: <1325149457.99.0.374098273588.issue13674@psf.upfronthosting.co.za> Message-ID: <3dJqfm1QqJz7LnG@mail.python.org> Roundup Robot added the comment: New changeset c61147d66843 by Tim Golden in branch 'default': Issue #13674 Updated NEWS http://hg.python.org/cpython/rev/c61147d66843 New changeset 49db4851c63b by Tim Golden in branch '3.3': Issue #13674 Updated NEWS http://hg.python.org/cpython/rev/49db4851c63b New changeset 3ff7602ee543 by Tim Golden in branch 'default': Issue #13674 Null merge with 3.3 http://hg.python.org/cpython/rev/3ff7602ee543 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 14:55:24 2013 From: report at bugs.python.org (Tom Lynn) Date: Tue, 12 Nov 2013 13:55:24 +0000 Subject: [issue19560] PEP 8 operator precedence across parens In-Reply-To: <1384263232.23.0.922688589796.issue19560@psf.upfronthosting.co.za> Message-ID: <1384264524.56.0.301176530071.issue19560@psf.upfronthosting.co.za> Tom Lynn added the comment: FWIW, this pair of examples differs from the others in this section as they were both explicitly okayed in the first version of PEP 8 :: - Use your better judgment for the insertion of spaces around arithmetic operators. Always be consistent about whitespace on either side of a binary operator. Some examples: i = i+1 submitted = submitted + 1 x = x*2 - 1 hypot2 = x*x + y*y c = (a+b) * (a-b) c = (a + b) * (a - b) My guess is that this is still the intention? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 15:12:48 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 12 Nov 2013 14:12:48 +0000 Subject: [issue19560] PEP 8 operator precedence across parens In-Reply-To: <1384263232.23.0.922688589796.issue19560@psf.upfronthosting.co.za> Message-ID: <1384265568.15.0.542269094695.issue19560@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 15:39:41 2013 From: report at bugs.python.org (Richard PALO) Date: Tue, 12 Nov 2013 14:39:41 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined Message-ID: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> New submission from Richard PALO: I'd like to have reopened this previous issue as it is still very much the case. I believe as well that the common distros (I can easily verify OpenIndiana and OmniOS) patch it out (patch file attached). Upstream/oracle/userland-gate seems to as well. It is time to retire this check, or at least take into consideration the parametrization from unistd.h: #if defined(_XPG4_2) extern int gethostname(char *, size_t); #elif !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) extern int gethostname(char *, int); #endif ---------- components: Build files: Python26-10-gethostname.patch keywords: patch messages: 202690 nosy: risto3 priority: normal severity: normal status: open title: request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined type: compile error versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32584/Python26-10-gethostname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 15:41:00 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 12 Nov 2013 14:41:00 +0000 Subject: [issue19560] PEP 8 operator precedence across parens In-Reply-To: <1384263232.23.0.922688589796.issue19560@psf.upfronthosting.co.za> Message-ID: <1384267260.92.0.57998311048.issue19560@psf.upfronthosting.co.za> Ezio Melotti added the comment: See msg173785. The example in the "no" section is not "wrong" -- it's just worse than the one in the "yes" section because it provides less hints about the groups and it's less readable, so it has no reason to be used. If you note the introductory paragraph it says "Use your better judgment for the insertion of spaces around arithmetic operators.". This means that even if the general rule is to add spaces around the operators, in some situations it is better to omit them, and one should decide on a case by case basis. To provide a further example, see: a = 2 * (b+c) and a = 2*(b+c) - 2/(d+e) The first part -- 2*(b+c) -- is the same in both the examples, but the spaces change depending on the context. In the first case you can emphasize the multiplication between 2 and b+c, whereas in the second case there are two "groups" that get subtracted, so the spaces around the * and / can be removed to emphasize these two bigger groups. I think that section is OK, and doesn't need to be changed. ---------- assignee: docs at python -> gvanrossum nosy: +ezio.melotti, gvanrossum status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 15:50:12 2013 From: report at bugs.python.org (Michael Haubenwallner) Date: Tue, 12 Nov 2013 14:50:12 +0000 Subject: [issue17919] AIX POLLNVAL definition causes problems In-Reply-To: <1367852817.71.0.664729704726.issue17919@psf.upfronthosting.co.za> Message-ID: <1384267812.2.0.813129014618.issue17919@psf.upfronthosting.co.za> Michael Haubenwallner added the comment: This is a regression since 2.7.4 because of http://bugs.python.org/issue15989. As the 'events' and 'revents' members of 'struct pollfd' both are bitfields, the question actually is why they need to be signed at all. Additionally: I'm wondering why poll_modify() and internal_devpoll_register() haven't been updated along issue#15989, as both still have 'i' for the 'events' arg. Attached patch (for hg-tip) changes the 'events' for 'struct pollfd' to be generally treated as unsigned short bitfield. Not that I know of one, but the &0xffff hack may break on platforms where 'short' is not 16bits - casting to (unsigned short) instead feels more save. Additional question: Would it make sense to have the 'BHIkK' types check for overflow? Thank you! ---------- nosy: +haubi Added file: http://bugs.python.org/file32585/python-tip-unsigned-pollfd-events.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 15:50:36 2013 From: report at bugs.python.org (Michael Haubenwallner) Date: Tue, 12 Nov 2013 14:50:36 +0000 Subject: [issue17919] AIX POLLNVAL definition causes problems In-Reply-To: <1367852817.71.0.664729704726.issue17919@psf.upfronthosting.co.za> Message-ID: <1384267836.62.0.670976395192.issue17919@psf.upfronthosting.co.za> Changes by Michael Haubenwallner : ---------- versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 15:50:47 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 12 Nov 2013 14:50:47 +0000 Subject: [issue19536] MatchObject should offer __getitem__() In-Reply-To: <1384010127.61.0.754728433968.issue19536@psf.upfronthosting.co.za> Message-ID: <1384267847.51.0.196057244467.issue19536@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think the idea is to eventually deprecate the .group() API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 15:53:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 14:53:57 +0000 Subject: [issue17919] AIX POLLNVAL definition causes problems In-Reply-To: <1367852817.71.0.664729704726.issue17919@psf.upfronthosting.co.za> Message-ID: <1384268037.09.0.93128185432.issue17919@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 16:24:58 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 12 Nov 2013 15:24:58 +0000 Subject: [issue18967] Find a less conflict prone approach to Misc/NEWS In-Reply-To: <1378605881.29.0.990351353386.issue18967@psf.upfronthosting.co.za> Message-ID: <1384269898.18.0.0717102189477.issue18967@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 16:25:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Nov 2013 15:25:23 +0000 Subject: [issue12828] xml.dom.minicompat is not documented In-Reply-To: <1314121617.5.0.895410943337.issue12828@psf.upfronthosting.co.za> Message-ID: <3dJt7Q0D39z7LtM@mail.python.org> Roundup Robot added the comment: New changeset 3710514aa92a by Andrew Kuchling in branch '3.3': Closes #12828: add docstring text noting this is an internal-only module http://hg.python.org/cpython/rev/3710514aa92a ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 16:34:53 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 12 Nov 2013 15:34:53 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384270493.63.0.688896401455.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: I think worrying about more API expansions to handle edge case/advanced reload scenarios is not worth it (or at least not in Python 3.4). And if we are shifting importlib.reload() back to looking for a new finder then we are only worrying about when people decide to directly call exec_module() manually and want some pre-condition way to verify that the reload would succeed w/o putting that logic into exec_module() itself. All I'm seeing is a mole hill for some advanced users who should be able to deal with it on their own. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 16:40:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 15:40:56 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1384270856.56.0.932378855772.issue19515@psf.upfronthosting.co.za> STINNER Victor added the comment: @Andrei: Ping? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 16:43:02 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 12 Nov 2013 15:43:02 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1384270982.14.0.652851108161.issue19557@psf.upfronthosting.co.za> Brett Cannon added the comment: The node types are all listed right there in the docs in the abstract grammar section, so arguing they are incomplete I don't think is accurate. I'm willing to leave this open in case some ambitious person wants to write docs for every node type, but I think this is a very low priority task. ---------- nosy: +brett.cannon priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 16:43:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 15:43:28 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1384271008.54.0.927891015604.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: @Georg, Serhiy, Martin: Sorry for having commits directly without more review. I didn't expect negative feedback on such changes, I thaught to moving from literal C byte string to Python identifiers was a well accepted practice since identifiers are used in a lot of places in Python code base. So what should I do now? Should I revert all changesets related to this issue, or can we keep these new identifiers and close the issue? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 16:45:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Nov 2013 15:45:41 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <3dJtZr5DsrzPtG@mail.python.org> Roundup Robot added the comment: New changeset c2a13acd5e2b by Victor Stinner in branch 'default': Close #19466: Clear the frames of daemon threads earlier during the Python http://hg.python.org/cpython/rev/c2a13acd5e2b ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 16:47:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 15:47:18 +0000 Subject: [issue19519] Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8 In-Reply-To: <1383828055.35.0.303135915018.issue19519@psf.upfronthosting.co.za> Message-ID: <1384271238.44.0.289229832767.issue19519@psf.upfronthosting.co.za> STINNER Victor added the comment: > If the code is to be simplified, unifying the cases of string-based parsing and file-based parsing might be a worthwhile goal. Ah yes, it enc and encoding attributes are almost the same, it would be nice to merge them! But I'm not sure that I understand, do you prefer to merge them in this issue or in a new issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 17:08:23 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 12 Nov 2013 16:08:23 +0000 Subject: [issue19560] PEP 8 operator precedence across parens In-Reply-To: <1384263232.23.0.922688589796.issue19560@psf.upfronthosting.co.za> Message-ID: <1384272503.26.0.601351544016.issue19560@psf.upfronthosting.co.za> Guido van Rossum added the comment: Style is a matter of taste, not of correctness. It is pointless to debate the finer points in a bug report. ---------- resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 17:10:21 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 12 Nov 2013 16:10:21 +0000 Subject: [issue19560] PEP 8 operator precedence across parens In-Reply-To: <1384263232.23.0.922688589796.issue19560@psf.upfronthosting.co.za> Message-ID: <1384272621.84.0.200067872676.issue19560@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 17:10:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 16:10:48 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1384272648.17.0.56765714933.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran pybench with the patch. I don't understand this result (10% slower with the patch): DictWithStringKeys: 28ms 25ms +10.7% 28ms 26ms +10.5% This test doesn't use unicode_compare_eq() from Objects/unicodeobject.c but unicode_eq() from Objects/stringlib/eq.h which is not modified by the patch. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 17:13:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 16:13:05 +0000 Subject: [issue16286] Use hash if available to optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1384272785.53.0.697170863305.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: (oops, I didn't want to close the issue, it's a mistake) ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 17:17:01 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 12 Nov 2013 16:17:01 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1384273021.93.0.663232457402.issue19466@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Typo: s/immediatly/immediately. I attached the patch. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file32586/fix_typo_19466.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 17:19:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Nov 2013 16:19:00 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <3dJvKH74YCz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 10a8e676b87b by Victor Stinner in branch 'default': Issue #19466: Fix typo. Patch written by Vajrasky Kok. http://hg.python.org/cpython/rev/10a8e676b87b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 18:02:57 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Tue, 12 Nov 2013 17:02:57 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1384275777.53.0.831409369912.issue19515@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: Removed _Py_IDENTIFIERs duplicated in the same file, except: _Py_IDENTIFIER(replace): Modules/zipimport.c:563 which was enclosed in some #ifdefs. ---------- keywords: +patch Added file: http://bugs.python.org/file32587/remove_duplicated_pyidentifiers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 18:34:14 2013 From: report at bugs.python.org (Laurent Birtz) Date: Tue, 12 Nov 2013 17:34:14 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384277654.85.0.996843052804.issue6208@psf.upfronthosting.co.za> Laurent Birtz added the comment: In my opinion, the decision to cross your arms and pretend there is no issue is unprofessional. Summary of your arguments: - It's Microsoft's fault. - Windows accepts backslashes anyway. - Shell detection is difficult. - It's a complex issue. None of this is relevant to addressing the issue ThurnerRupert was facing. He asked to be able to CONFIGURE the path seperator. This needs not involve shell detection (which is indeed brittle). This could be handled simply by the user setting 'os.sep' and having os.path.join() and friends use that. I'm using SCons on MinGW and the build is failing due to the messed-up paths. I'm less than thrilled about learning that this won't get fixed. I feel that one of the important strength of Python is that it "just works" on many platforms and this amply justifies this issue not being treated with such frivolity. ---------- nosy: +laurent.birtz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 18:40:59 2013 From: report at bugs.python.org (Srinivas Reddy T) Date: Tue, 12 Nov 2013 17:40:59 +0000 Subject: [issue19562] Added description for assert statement Message-ID: <1384278059.69.0.538735147491.issue19562@psf.upfronthosting.co.za> New submission from Srinivas Reddy T: Added descriptive message to assert statement in datetime module. Since _check_date_fields does the job of data integrity, i did not check for ValueError, TypeError checks in the function. However, i am not sure of the adding descriptive messages to the other assert statements like, assert seconds == int(seconds). And isn't this too much defensive programming? ---------- components: Library (Lib) files: datetime.patch keywords: patch messages: 202708 nosy: thatiparthy priority: normal severity: normal status: open title: Added description for assert statement versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32588/datetime.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 18:44:59 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 12 Nov 2013 17:44:59 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384278299.56.0.794526231562.issue6208@psf.upfronthosting.co.za> Mark Lawrence added the comment: How can you rant about something "won't get fixed" when it's an enhancement request? If it's that important and/or so simple the OP or anyone else for that matter can provide a patch, including tests and doc changes. Given that the issue is nearly 4 1/2 years old I'm not holding my breath. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 19:03:12 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 12 Nov 2013 18:03:12 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384279392.05.0.065794435016.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: > The three Windows machines look like they have very different system > versions of Python (ActiveState, cygwin, vanilla CPython). Any chance we're > accidentally invoking the system Python instead of the built one somewhere? Good point. I'll check that out. That said, on my local clone (Ubuntu 12.10) I'm also getting no failures. It could also be related to the speed of the buildbot, but I doubt it. Anyway, I'll take a closer look at the stdout artifacts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 19:04:31 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 12 Nov 2013 18:04:31 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384279471.2.0.552869443605.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: > I think worrying about more API expansions to handle edge case/advanced > reload scenarios is not worth it (or at least not in Python 3.4). Agreed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 19:06:56 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 12 Nov 2013 18:06:56 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384279616.75.0.0187965543191.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Regarding the to-do list, I'm going to add a TODO file to the root of the feature clone (in the pep451 branch) so we don't have to keep updating this ticket. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 20:15:03 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 12 Nov 2013 19:15:03 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384283703.83.0.108654312551.issue6208@psf.upfronthosting.co.za> R. David Murray added the comment: I think both of you could stand to turn down the rhetoric :) Laurent: we're not saying there's no issue, we're saying we don't see an acceptable fix for the issue. So the bottom line is that for this situation to improve someone is going to have to go through the hassle of figuring out *how* to make it better (working code, not just words, I think), and convincing people that it is a good idea. The better the solution is, the easier it will be to get it committed. I don't think a "stop gap" kind of solution will be good enough (such as making the global os.sep value settable...I don't think that kind of global state change will fly, though I could be wrong). There are other people interested in SCons/mingw support, and this could conceivably be a configure time option for such support, but *that* is a whole other area of discussion. For that to get off the ground, there has to be someone willing to commit to supporting it (more than one, someone, I suspect) who can work well enough with the community to eventually become part of the core team. (There are patches in this tracker relevant to that, and at least one someone working on making them better, but admit I haven't been following that activity and don't know if any of those patches have gotten reviewed yet.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 20:16:07 2013 From: report at bugs.python.org (Srinivas Reddy T) Date: Tue, 12 Nov 2013 19:16:07 +0000 Subject: [issue19563] Changing barry's email to barry@python.org Message-ID: <1384283767.67.0.793092256619.issue19563@psf.upfronthosting.co.za> New submission from Srinivas Reddy T: Updated to barry's new email address. ---------- components: Tests files: barry_email.patch keywords: patch messages: 202714 nosy: thatiparthy priority: normal severity: normal status: open title: Changing barry's email to barry at python.org versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32589/barry_email.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 20:16:46 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 12 Nov 2013 19:16:46 +0000 Subject: [issue19563] Changing barry's email to barry@python.org In-Reply-To: <1384283767.67.0.793092256619.issue19563@psf.upfronthosting.co.za> Message-ID: <1384283806.29.0.101484508541.issue19563@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 20:22:40 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 12 Nov 2013 19:22:40 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined In-Reply-To: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> Message-ID: <1384284160.32.0.477753336492.issue19561@psf.upfronthosting.co.za> R. David Murray added the comment: We have an OpenIndian buildbot that compiles from our source, so no distro changes. Can you sort out why this isn't a problem on the buildbut but is for you? Your patch files says 2.6, so is it possible it is fixed in 2.7? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 21:12:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 12 Nov 2013 20:12:46 +0000 Subject: [issue19290] Clarify compile and eval interaction. In-Reply-To: <1382135132.91.0.187309157375.issue19290@psf.upfronthosting.co.za> Message-ID: <1384287166.11.0.409240144027.issue19290@psf.upfronthosting.co.za> Ezio Melotti added the comment: I find your suggestion difficult to read. Maybe using a list would make it more understandable? ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 21:19:11 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 12 Nov 2013 20:19:11 +0000 Subject: [issue19371] timing test too tight In-Reply-To: <1382566801.77.0.760747140726.issue19371@psf.upfronthosting.co.za> Message-ID: <1384287551.77.0.908284840874.issue19371@psf.upfronthosting.co.za> Ezio Melotti added the comment: Also this should use assertAlmostEqual(). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 21:42:13 2013 From: report at bugs.python.org (Richard PALO) Date: Tue, 12 Nov 2013 20:42:13 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined In-Reply-To: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> Message-ID: <1384288933.26.0.245336751761.issue19561@psf.upfronthosting.co.za> Richard PALO added the comment: I don't believe the problem is a question solely of building the python sources, but also certain dependent application sources... I know of at least libreoffice building against python and this problem has come up. The workaround was to apply the patch indicated (here, on python3.3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 21:42:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Nov 2013 20:42:39 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <3dK19V3BgJz7LnG@mail.python.org> Roundup Robot added the comment: New changeset 518e3b174120 by Victor Stinner in branch 'default': Issue #19515: Remove identifiers duplicated in the same file. http://hg.python.org/cpython/rev/518e3b174120 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 21:42:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 20:42:56 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <1384288976.14.0.11691097936.issue19515@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 21:44:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Nov 2013 20:44:58 +0000 Subject: [issue19515] Share duplicated _Py_IDENTIFIER identifiers in C code In-Reply-To: <1383786497.11.0.135880606465.issue19515@psf.upfronthosting.co.za> Message-ID: <3dK1D96zSGz7LnG@mail.python.org> Roundup Robot added the comment: New changeset d2209b9f8971 by Victor Stinner in branch 'default': Issue #19515: Remove duplicated identifiers in zipimport.c http://hg.python.org/cpython/rev/d2209b9f8971 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 22:10:03 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 12 Nov 2013 21:10:03 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1384283703.83.0.108654312551.issue6208@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: There's also the fact that *Cygwin's* Python will behave like a *nix Python and use backslashes. It's only the Windows Python that follows Windows platform conventions. So there's already a reasonable workaround in the cygwin case: use the version which relies on the POSIX compatibility layer, not the Windows native one. As David pointed out, unless/until someone that is affected by the issue can come up with a coherent design proposal for what the behaviour *should* be that is a better solution than "just use the Cygwin Python instead if you actually want POSIX behaviour", this isn't going to progress. ---------- title: path separator output ignores shell's path separator: / instead of \ -> path separator output ignores shell's path separator: / instead of \ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 22:22:57 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Tue, 12 Nov 2013 21:22:57 +0000 Subject: [issue16042] smtplib: unlimited readline() from connection In-Reply-To: <1348569609.82.0.499861906556.issue16042@psf.upfronthosting.co.za> Message-ID: <1384291377.3.0.683782076004.issue16042@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Serhiy, your version of the patch for 2.7 looks fine. I've attached a version of the patch for 3.3. A change is needed to the MockFile object provided by Lib/test/mock_socket.py ---------- Added file: http://bugs.python.org/file32590/3.3-fix.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 22:53:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 21:53:07 +0000 Subject: [issue16776] Document PyCFunction_New and PyCFunction_NewEx functions In-Reply-To: <1356434154.16.0.0981038830976.issue16776@psf.upfronthosting.co.za> Message-ID: <1384293187.53.0.726822525268.issue16776@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 22:56:34 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 12 Nov 2013 21:56:34 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined In-Reply-To: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> Message-ID: <1384293394.66.0.414652464035.issue19561@psf.upfronthosting.co.za> R. David Murray added the comment: Libreoffice is a big thing to compile as a test...do you know of any smaller packages that exhibit the bug? I've added jcea to nosy, he set up the OpenIndiana buildbots and may be able to help clarify the issue. I'm not willing to opine on it since I don't know what effect modifying those directives might have on other platforms. ---------- assignee: -> jcea nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 22:56:44 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 12 Nov 2013 21:56:44 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined In-Reply-To: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> Message-ID: <1384293404.63.0.252037480815.issue19561@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: jcea -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 23:06:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 22:06:31 +0000 Subject: [issue19564] test_multiprocessing_spawn Message-ID: <1384293991.33.0.242857083412.issue19564@psf.upfronthosting.co.za> New submission from STINNER Victor: test_multiprocessing_spawn.test_context() hanged on x86 Gentoo Non-Debug 3.x: def test_context(self): if self.TYPE == 'processes': L = list(range(10)) expected = [sqr(i) for i in L] with multiprocessing.Pool(2) as p: r = p.map_async(sqr, L) self.assertEqual(r.get(), expected) <=== HERE === self.assertRaises(ValueError, p.map_async, sqr, L) http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/5424/steps/test/logs/stdio [ 35/385] test_multiprocessing_spawn Timeout (1:00:00)! Thread 0xb27fdb40 (most recent call first): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py", line 384 in _recv File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py", line 407 in _recv_bytes File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py", line 251 in recv File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", line 415 in _handle_results File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 869 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 921 in _bootstrap_inner File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 889 in _bootstrap Thread 0xb2ffeb40 (most recent call first): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 290 in wait File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/queue.py", line 167 in get File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", line 371 in _handle_tasks File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 869 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 921 in _bootstrap_inner File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 889 in _bootstrap Thread 0xb37ffb40 (most recent call first): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", line 362 in _handle_workers File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 869 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 921 in _bootstrap_inner File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 889 in _bootstrap Thread 0xb417fb40 (most recent call first): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py", line 384 in _recv File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py", line 407 in _recv_bytes File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/connection.py", line 251 in recv File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", line 415 in _handle_results File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 869 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 921 in _bootstrap_inner File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 889 in _bootstrap Thread 0xb520fb40 (most recent call first): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 290 in wait File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/queue.py", line 167 in get File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", line 371 in _handle_tasks File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 869 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 921 in _bootstrap_inner File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 889 in _bootstrap Thread 0xb5a10b40 (most recent call first): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", line 362 in _handle_workers File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 869 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 921 in _bootstrap_inner File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 889 in _bootstrap Thread 0xb76196c0 (most recent call first): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 290 in wait File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/threading.py", line 553 in wait File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", line 585 in wait File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/multiprocessing/pool.py", line 588 in get File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/_test_multiprocessing.py", line 1786 in test_context File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/case.py", line 571 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/case.py", line 610 in __call__ File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/suite.py", line 117 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/suite.py", line 79 in __call__ File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/suite.py", line 117 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/suite.py", line 79 in __call__ File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/suite.py", line 117 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/suite.py", line 79 in __call__ File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/unittest/runner.py", line 168 in run File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/support/__init__.py", line 1661 in _run_suite File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/support/__init__.py", line 1695 in run_unittest File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/regrtest.py", line 1275 in File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/regrtest.py", line 1276 in runtest_inner File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/regrtest.py", line 965 in runtest File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/regrtest.py", line 761 in main File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/regrtest.py", line 1560 in main_in_temp_cwd File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/__main__.py", line 3 in File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/runpy.py", line 73 in _run_code File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/runpy.py", line 160 in _run_module_as_main make: *** [buildbottest] Error 1 ---------- components: Tests messages: 202724 nosy: haypo, sbt priority: normal severity: normal status: open title: test_multiprocessing_spawn versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 23:08:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 22:08:05 +0000 Subject: [issue19564] test_multiprocessing_spawn hangs In-Reply-To: <1384293991.33.0.242857083412.issue19564@psf.upfronthosting.co.za> Message-ID: <1384294085.12.0.966267825117.issue19564@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_multiprocessing_spawn -> test_multiprocessing_spawn hangs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 23:11:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 22:11:38 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot Message-ID: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> New submission from STINNER Victor: Since the changeset c2a13acd5e2b24560419b93180ee49d1a4839b92 ("Close #19466: Clear the frames of daemon threads earlier during the Python shutdown to call objects destructors"), test_multiprocessing_spawn now show RuntimeError and a child process crashs with an assertion error on windows xp buildbot. http://buildbot.python.org/all/builders/x86 XP-4 3.x/builds/9538/steps/test/logs/stdio [ 71/385] test_multiprocessing_spawn RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash RuntimeError: I/O operations still in flight while destroying Overlapped object, the process may crash Assertion failed: !PyErr_Occurred(), file ..\Python\ceval.c, line 4077 ---------- messages: 202725 nosy: gvanrossum, haypo, neologix, sbt priority: normal severity: normal status: open title: test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 12 23:12:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Nov 2013 22:12:03 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1384294323.77.0.448569082083.issue19537@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 01:13:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 00:13:03 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <1384301583.69.0.808324151207.issue19565@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm able to reproduce the RuntimeError on Windows 7, it comes from a pipe. The message is probably written by a child process, not by the main process. I suppose that Richard knows better than me how to fix this warning, so I don't want to investigate it :-) I'm unable to reproduce the "Assertion failed: !PyErr_Occurred(), file ..\Python\ceval.c, line 4077" failure on Windows 7 on my AMD64 with Python compiled in debug mode in 32-bit mode (I only have Visual Studio Express, so no 64-bit binary). I'm interested by this one, but I need a traceback, the C traceback if possible. An option would be to enable faulthandler by monkey-patching multiprocessing.spawn.get_command_line() (to add -X faulthandler). But in my exprerience, the Python traceback doesn't help to investigate such assertion error. I added this assertion recently in Python 3.4 to detect bugs earlier. If PyEval_CallObjectWithKeywords() is called with an exception set, the exception may be cleared or replaced with a new exception, so the original exception can be lost, which is probably not expected. For example, PyDict_GetItem() raises a KeyError and then clears the current exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 01:19:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 00:19:37 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) Message-ID: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> New submission from STINNER Victor: The following test of test_asyncio failed once. I didn't check if it failed more than once on this buildbot. The cleanup code is not safe, it should handle errors correctly, so following tests would not fail. http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/5421/steps/test/logs/stdio ====================================================================== ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/asyncio/unix_events.py", line 662, in _do_waitpid_all callback, args = self._callbacks.pop(pid) KeyError: 7673 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_asyncio/test_unix_events.py", line 723, in setUp self.watcher = self.create_watcher(self.loop) File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_asyncio/test_unix_events.py", line 1466, in create_watcher return unix_events.FastChildWatcher(loop) File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/asyncio/unix_events.py", line 596, in __init__ super().__init__(loop) File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/asyncio/unix_events.py", line 474, in __init__ self.set_loop(loop) File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/asyncio/unix_events.py", line 498, in set_loop self._do_waitpid_all() File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/asyncio/unix_events.py", line 665, in _do_waitpid_all with self._lock: AttributeError: 'FastChildWatcher' object has no attribute '_lock' Following tests fail like that: ====================================================================== FAIL: test_create_watcher (test.test_asyncio.test_unix_events.FastChildWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_asyncio/test_unix_events.py", line 718, in setUp assert ChildWatcherTestsMixin.instance is None AssertionError ---------- messages: 202727 nosy: gvanrossum, haypo priority: normal severity: normal status: open title: ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 01:20:45 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 13 Nov 2013 00:20:45 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <1384302045.05.0.0800966729987.issue19565@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 01:22:31 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 13 Nov 2013 00:22:31 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1384302151.84.0.799763096577.issue1500504@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Here's a slightly modified version of urischeme.py that can be run under Python 3 and compares its results with urllib.parse, printing out the mismatches. The major differences seem to be 1) urischeme fills in the default port if it's not explicitly provided, e.g. http urls have the port set to 80, 2) the path is returned as '/', not the empty string, for the URL http://host, 3) urllib.parse.urljoin() doesn't get rid of ./ and ../ in URLs. 3) seems like something worth fixing in urllib.parse. The others probably present some backward-compatibility issues. ---------- nosy: +akuchling Added file: http://bugs.python.org/file32591/urischemes.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 01:23:51 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 13 Nov 2013 00:23:51 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384302231.67.0.579153897502.issue19566@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'll ask Anthony Baire (the author of the new child watcher code) to look into this. Thanks for reporting this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 05:36:22 2013 From: report at bugs.python.org (Richard PALO) Date: Wed, 13 Nov 2013 04:36:22 +0000 Subject: [issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined In-Reply-To: <1384267181.39.0.791538142123.issue19561@psf.upfronthosting.co.za> Message-ID: <1384317382.8.0.691020332629.issue19561@psf.upfronthosting.co.za> Richard PALO added the comment: Sure, attached is a simple test found on the internet, compiled with the following reproduces the problem: richard at devzone:~/src$ /opt/local/gcc48/bin/g++ -o tp tp.cpp -DSOLARIS -I/opt/local/include/python2.7 -L/opt/local/lib -lpython2.7 In file included from /opt/local/include/python2.7/Python.h:58:0, from tp.cpp:1: /opt/local/include/python2.7/pyport.h:645:35: error: declaration of C function 'int gethostname(char*, int)' conflicts with extern int gethostname(char *, int); ^ In file included from /opt/local/include/python2.7/Python.h:44:0, from tp.cpp:1: /usr/include/unistd.h:351:12: error: previous declaration 'int gethostname(char*, uint_t)' here extern int gethostname(char *, size_t); ---------- Added file: http://bugs.python.org/file32592/tp.cpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 06:20:58 2013 From: report at bugs.python.org (adamhj) Date: Wed, 13 Nov 2013 05:20:58 +0000 Subject: [issue19567] mimetypes.init() raise unhandled excption in windows Message-ID: <1384320058.03.0.631626483584.issue19567@psf.upfronthosting.co.za> New submission from adamhj: my system is windows 2k3 sp2, python version is 2.7.6 i found this bug when trying to install the newest setuptools ------------------------------------------------------------------------ X:\xxx>ez_setup.py Extracting in d:\docume~1\xxx\locals~1\temp\tmpcyxs8s Now working in d:\docume~1\xxx\locals~1\temp\tmpcyxs8s\setuptools-1.3.2 Installing Setuptools Traceback (most recent call last): File "setup.py", line 17, in exec(init_file.read(), command_ns) File "", line 8, in File "d:\docume~1\xxx\locals~1\temp\tmpcyxs8s\setuptools-1.3.2\setuptools\__init__.py", line 11, in from setuptools.extension import Extension File "d:\docume~1\xxx\locals~1\temp\tmpcyxs8s\setuptools-1.3.2\setuptools\extension.py", line 5, in from setuptools.dist import _get_unpatched File "d:\docume~1\xxx\locals~1\temp\tmpcyxs8s\setuptools-1.3.2\setuptools\dist.py", line 15, in from setuptools.compat import numeric_types, basestring File "d:\docume~1\xxx\locals~1\temp\tmpcyxs8s\setuptools-1.3.2\setuptools\compat.py", line 19, in from SimpleHTTPServer import SimpleHTTPRequestHandler File "D:\Python27\lib\SimpleHTTPServer.py", line 27, in class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): File "D:\Python27\lib\SimpleHTTPServer.py", line 208, in SimpleHTTPRequestHandler mimetypes.init() # try to read system mime.types File "D:\Python27\lib\mimetypes.py", line 358, in init db.read_windows_registry() File "D:\Python27\lib\mimetypes.py", line 258, in read_windows_registry for subkeyname in enum_types(hkcr): File "D:\Python27\lib\mimetypes.py", line 249, in enum_types ctype = ctype.encode(default_encoding) # omit in 3.x! UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 33: ordinal not in range(128) Something went wrong during the installation. See the error message above. ------------------------------------------------------------------------ then i see into the code, the exception is raised in this function ------------------------------------------------------------------------ def enum_types(mimedb): i = 0 while True: try: ctype = _winreg.EnumKey(mimedb, i) except EnvironmentError: break try: ctype = ctype.encode(default_encoding) # omit in 3.x! except UnicodeEncodeError: pass else: yield ctype i += 1 ------------------------------------------------------------------------ i checked my registry, there is an key in HKCR whose name is in Chinese(encoding GBK), which causes this problem(btw, the default_encoding is 'ascii', assigned from sys.getdefaultencoding()) i don't know is it legal to use a non-ascii string as the name of a registry key in windows, but i think there is some problem in these piece of code. why the variable ctype need to be decoded here? i checked the _winreg.EnumKey() function, it returns byte string: >>> _winreg.EnumKey(key,8911) '\xbb\xad\xb0\xe5\xa1\xa3\xce\xc4\xb5\xb5' #this is the problem key which cause the exception so python tries to encode it(with ascii encoding) first, and then the exception is raised(and unhandled) shouldn't we just remove the try..encode..except paragraph? ---------- components: Library (Lib) messages: 202731 nosy: adamhj priority: normal severity: normal status: open title: mimetypes.init() raise unhandled excption in windows type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 11:08:28 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 13 Nov 2013 10:08:28 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <1384337308.12.0.239126291231.issue19565@psf.upfronthosting.co.za> Richard Oudkerk added the comment: If you have a pending overlapped operation then the associated buffer should not be deallocated until that operation is complete, or else you are liable to get a crash or memory corruption. Unfortunately WinXP provides no reliable way to cancel a pending operation -- there is CancelIo() but that just cancels operations started by the *current thread* on a handle. Vista introduced CancelIoEx() which allows cancellation of a specific overlapped op. These warnings happen in the deallocator because the buffer has to be freed. For Vista and later versions of Windows these warnings are presumably unnecessary since CancelIoEx() is used. For WinXP the simplest thing may be to check if Py_Finalize is non-null and if so suppress the warning (possibly "leaking" the buffer since we are exiting anyway). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 11:14:43 2013 From: report at bugs.python.org (ThurnerRupert) Date: Wed, 13 Nov 2013 10:14:43 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384337683.86.0.354597084174.issue6208@psf.upfronthosting.co.za> ThurnerRupert added the comment: david, you mentioned working code. i am the opposite of an expert in the source code of python, but i thought i would be able to at least find where the code is for sys.stdout.write and sys.stderr.write, where i thought \ should be replaced by / when running in cygwin or msys/mingw. embarrassing for me, i did not find it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 11:20:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 10:20:00 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <1384338000.27.0.0413276205338.issue19565@psf.upfronthosting.co.za> STINNER Victor added the comment: "For Vista and later versions of Windows these warnings are presumably unnecessary since CancelIoEx() is used." As close() on regular files, I would prefer to call explicitly cancel() to control exactly when the overlapped operation is cancelled. Can't you fix multiprocessing and/or the unit test to ensure that all overlapped operations are completed or cancelled? close() does flush buffers and so may fail. Is it the same for CancelIo/CancelIoEx? In the official documentation, only one error case is described: "If this function cannot find a request to cancel, the return value is 0 (zero), and GetLastError returns ERROR_NOT_FOUND." The warning is useful because it may be a real bug in the code. I also like ResourceWarning("unclosed file/socket ...") warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 11:55:46 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 13 Nov 2013 10:55:46 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <1384340146.09.0.634328417781.issue19565@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > As close() on regular files, I would prefer to call explicitly cancel() > to control exactly when the overlapped operation is cancelled. If you use daemon threads then you have no guarantee that the thread will ever get a chance to explicitly call cancel(). > Can't you fix multiprocessing and/or the unit test to ensure that all > overlapped operations are completed or cancelled? On Vista and later, yes, this is done in the deallocator using CancelIoEx(), although there is still a warning. On XP it is not possible because CancelIo() has to be called from the same thread which started the operation. I think these warnings come from daemon threads used by "manager" processes. When the manager process exits some background threads may be blocked doing an overlapped read. (It might be possible to wake up blocked threads by setting the event handle returned by _PyOS_SigintEvent(). That might allow the use of non-daemon threads.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 13:20:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 12:20:40 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure Message-ID: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> New submission from STINNER Victor: When bytearray_setslice_linear() is called to shrink the buffer with lo=0 and PyByteArray_Resize() fails because of a memory error, the bytearray is leaved in an inconsistent state: ob_start has been updated but not the size. I found the issue using failmalloc: test_nonblock_pipe_write_smallbuf() of test_io does fail with an assertion error when testing the _pyio module which uses bytearray for the write buffer. Attached patch restores the bytearray in its previous state if PyByteArray_Resize() failed. I prefer to only fix the issue in Python 3.4 because it is unlikely and I prefer to not introduce regressions in previous Python versions. I made a similar fix for list: changeset: 84717:3f25a7dd8346 user: Victor Stinner date: Fri Jul 19 23:06:21 2013 +0200 files: Objects/listobject.c description: Issue #18408: Fix list_ass_slice(), handle list_resize() failure I tested the patch manually by injecting a fault using gdb: list items are correctly restored on failure. ---------- files: bytearray_setslice_mem_error.patch keywords: patch messages: 202736 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure versions: Python 3.4 Added file: http://bugs.python.org/file32593/bytearray_setslice_mem_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 13:20:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Nov 2013 12:20:54 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384345254.68.0.655439932361.issue6208@psf.upfronthosting.co.za> Nick Coghlan added the comment: You certainly can't replace *all* occurrences of backslash characters with forward slashes when running in a cygwin or msys shell anyway. Backslashes have many uses besides being (annoyingly) Windows path separators. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 13:33:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 13 Nov 2013 12:33:27 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3dKQGZ5Drmz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 8e40d07d3cd2 by Victor Stinner in branch 'default': Issue #19437: Fix PyImport_ImportModuleLevelObject(), handle http://hg.python.org/cpython/rev/8e40d07d3cd2 New changeset a217ea1671a8 by Victor Stinner in branch 'default': Issue #19437: Fix PyCData_GetContainer() of ctypes, handle PyDict_New() failure http://hg.python.org/cpython/rev/a217ea1671a8 New changeset dc5ae99bc605 by Victor Stinner in branch 'default': Issue #19437: Fix GetKeepedObjects() of ctypes, handle PyCData_GetContainer() http://hg.python.org/cpython/rev/dc5ae99bc605 New changeset 13203ea0ac5b by Victor Stinner in branch 'default': Issue #19437: Fix ctypes, handle PyCData_GetContainer() and GetKeepedObjects() http://hg.python.org/cpython/rev/13203ea0ac5b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 13:34:47 2013 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 13 Nov 2013 12:34:47 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384346087.47.0.583446099087.issue6208@psf.upfronthosting.co.za> Eric V. Smith added the comment: Agreed with Nick. I think it's clear than any change to the behavior will have to take place inside os.path. I just don't know what that change would be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:11:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 13:11:16 +0000 Subject: [issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros Message-ID: <1384348276.8.0.185765824651.issue19569@psf.upfronthosting.co.za> New submission from STINNER Victor: Python C API evolves. For example, the Unicode type has been rewriten for scratch to use a more efficient design. Would it be possible to mark deprecated functions as deprecated, so users will be noticed that the API evolved and Python has better functions? For example, PyUnicode_GET_SIZE() is deprecated and returns a different value than PyUnicode_GET_LENGTH() if wchar_t size is 16-bit (ex: Windows and AIX). GCC has an nice __attribute__((deprecated)) to tag functions. ---------- messages: 202740 nosy: haypo priority: normal severity: normal status: open title: Use __attribute__((deprecated)) to warn usage of deprecated functions and macros versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:11:57 2013 From: report at bugs.python.org (Sascha Peilicke) Date: Wed, 13 Nov 2013 13:11:57 +0000 Subject: [issue19570] distutils' Command.ensure_dirname fails on Unicode Message-ID: <1384348317.37.0.567121673163.issue19570@psf.upfronthosting.co.za> New submission from Sascha Peilicke: Encountered an isssue with Unicode paths when invoking Sphinx' distutils command (i.e. 'setup.py build_sphinx'): $ python setup.py build_sphinx running build_sphinx error: 'source_dir' must be a directory name (got `doc/source`) ... (Pdb) l 96 for root, dirnames, filenames in os.walk(guess): 97 if 'conf.py' in filenames: 98 return root 99 return None 100 101 -> def finalize_options(self): 102 if self.source_dir is None: 103 self.source_dir = self._guess_source_dir() 104 self.announce('Using source directory %s' % self.source_dir) 105 self.ensure_dirname('source_dir') 106 if self.source_dir is None: (Pdb) n > /usr/lib/python2.7/site-packages/sphinx/setup_command.py(102)finalize_options() -> if self.source_dir is None: (Pdb) n > /usr/lib/python2.7/site-packages/sphinx/setup_command.py(105)finalize_options() -> self.ensure_dirname('source_dir') (Pdb) s --Call-- > /usr/lib64/python2.7/distutils/cmd.py(266)ensure_dirname() -> def ensure_dirname(self, option): (Pdb) s ... --Call-- > /usr/lib64/python2.7/distutils/cmd.py(253)_ensure_tested_string() -> def _ensure_tested_string(self, option, tester, (Pdb) > /usr/lib64/python2.7/distutils/cmd.py(255)_ensure_tested_string() -> val = self._ensure_stringlike(option, what, default) Command.ensure_dirname (likewise ensure_filename) fails because _ensure_stringlike only tests for isistance(..., str) rather than isinstance(..., types.StringTypes). ---------- components: Distutils files: distutils-ensure_stringlike-unicode.patch keywords: patch messages: 202741 nosy: saschpe priority: normal severity: normal status: open title: distutils' Command.ensure_dirname fails on Unicode type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file32594/distutils-ensure_stringlike-unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:13:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 13:13:27 +0000 Subject: [issue19570] distutils' Command.ensure_dirname fails on Unicode In-Reply-To: <1384348317.37.0.567121673163.issue19570@psf.upfronthosting.co.za> Message-ID: <1384348407.33.0.945065676826.issue19570@psf.upfronthosting.co.za> STINNER Victor added the comment: This is more a feature request than a bug. You should use an encoded path, or upgrade to Python 3 which handles Unicode correctly. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:23:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 13:23:04 +0000 Subject: [issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros In-Reply-To: <1384348276.8.0.185765824651.issue19569@psf.upfronthosting.co.za> Message-ID: <1384348984.36.0.222392544501.issue19569@psf.upfronthosting.co.za> STINNER Victor added the comment: I just commited a change to avoid PyUnicode_GET_SIZE(): this function doesn't handle errors very well, if PyUnicode_AsUnicode() fails, the result is zero. The caller is unable to know that an error occurred. http://hg.python.org/cpython/rev/28f71af02b69 """ Don't use deprecated function PyUnicode_GET_SIZE() Replace it with PyUnicode_GET_LENGTH() or PyUnicode_AsUnicodeAndSize() """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:32:36 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Nov 2013 13:32:36 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1384349556.76.0.795963172664.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: Patch for the final version that I'm about to commit. - I realised the exception chaining would only trigger for the encode() and decode() methods, when it was equally applicable to the codecs.encode() and codecs.decode() functions, so I updated the test cases and moved it accordingly. - reworded the What's New text to better clarify the historical confusion around the nature of the codecs module that these changes are intended to rectify (since the intent is clear from the existence of codecs.encode and codecs.decode and their coverage in the test suite since Python 2.4). ---------- stage: needs patch -> commit review Added file: http://bugs.python.org/file32595/issue17828_improved_codec_errors_v7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:36:48 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Wed, 13 Nov 2013 13:36:48 +0000 Subject: [issue19343] Expose FreeBSD-specific APIs in resource module In-Reply-To: <1382434038.91.0.920002784924.issue19343@psf.upfronthosting.co.za> Message-ID: <1384349808.01.0.300692722286.issue19343@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hello. Here's a preliminary patch. ---------- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file32596/resource.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:42:46 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 13 Nov 2013 13:42:46 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <1384350166.01.0.0977230974308.issue19565@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I think the attached patch should fix it. Note that with the patch the RuntimeError can probably only occur on Windows XP. Shall I apply it? ---------- keywords: +patch Added file: http://bugs.python.org/file32597/dealloc-runtimeerror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:46:26 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Nov 2013 13:46:26 +0000 Subject: [issue19567] mimetypes.init() raise unhandled excption in windows In-Reply-To: <1384320058.03.0.631626483584.issue19567@psf.upfronthosting.co.za> Message-ID: <1384350386.71.0.976436590578.issue19567@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 9291. Can you answer Victor's question over there for us? ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> mimetypes initialization fails on Windows because of non-Latin characters in registry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:46:46 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Nov 2013 13:46:46 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1384350406.01.0.828211623351.issue9291@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +adamhj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:51:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 13 Nov 2013 13:51:51 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <3dKS123FHSz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 854a2cea31b9 by Nick Coghlan in branch 'default': Close #17828: better handling of codec errors http://hg.python.org/cpython/rev/854a2cea31b9 ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:51:55 2013 From: report at bugs.python.org (Sascha Peilicke) Date: Wed, 13 Nov 2013 13:51:55 +0000 Subject: [issue19570] distutils' Command.ensure_dirname fails on Unicode In-Reply-To: <1384348317.37.0.567121673163.issue19570@psf.upfronthosting.co.za> Message-ID: <1384350715.57.0.402701727317.issue19570@psf.upfronthosting.co.za> Sascha Peilicke added the comment: Happens since Sphinx-1.2b3, here's some context: https://bitbucket.org/birkenfeld/sphinx/issue/1142 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 14:56:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Nov 2013 13:56:48 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384351008.08.0.372148500923.issue6208@psf.upfronthosting.co.za> Nick Coghlan added the comment: As noted above, it's still not clear the change *can* be implemented at the standard library level - we don't have the context to determine if a Windows native path or a POSIX path is more appropriate when a Windows build is being used in a POSIX environment. >From the interpreter's point of view, the launch environment makes no difference, the only thing that matters is the target platform for the build. If they don't match, you're going to get weird glitches like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 15:07:14 2013 From: report at bugs.python.org (stutiredboy) Date: Wed, 13 Nov 2013 14:07:14 +0000 Subject: [issue19571] urlparse.parse_qs with empty string Message-ID: <1384351634.39.0.133564903051.issue19571@psf.upfronthosting.co.za> New submission from stutiredboy: >>> import urlparse >>> urlparse.parse_qs('a=&b=1') {'b': ['1']} >>> why not: {'a' : [''], 'b' : ['1']} is this a bug? ---------- components: Library (Lib) messages: 202751 nosy: stutiredboy priority: normal severity: normal status: open title: urlparse.parse_qs with empty string versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 15:25:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 13 Nov 2013 14:25:23 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <3dKSlk3rbkz7M5G@mail.python.org> Roundup Robot added the comment: New changeset e53984133740 by Nick Coghlan in branch 'default': Issue #17839: mention base64 change in What's New http://hg.python.org/cpython/rev/e53984133740 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 15:30:38 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Nov 2013 14:30:38 +0000 Subject: [issue19571] urlparse.parse_qs with empty string In-Reply-To: <1384351634.39.0.133564903051.issue19571@psf.upfronthosting.co.za> Message-ID: <1384353038.82.0.142323209202.issue19571@psf.upfronthosting.co.za> R. David Murray added the comment: It is not a bug: >>> parse_qs('a=&b=1', keep_blank_values=True) {'a': [''], 'b': ['1']} ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 15:46:47 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Nov 2013 14:46:47 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1384354007.21.0.640295427502.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: So, I've been pondering the idea of traceback/frame annotations and exception trees a bit. And what I'm wondering is if it may make sense to have the ability to annotate *frames* at runtime, and these annotations can be qualified by module names. So, for example, you might be able to write things like: sys.annotate_frame("codecs", "encoding", the_encoding) sys.annotate_frame("codecs", "decoding", the_encoding) sys.annotate_frame("traceback", "hide", True) sys.annotate_frame("traceback", "context", exc) And then the traceback display machinery would be updated to do something useful with the annotations. I'm not sure how ExitStack would cope with that (or other code that fakes tracebacks) but it's something to ponder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 15:54:06 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 13 Nov 2013 14:54:06 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1384354446.19.0.449709365971.issue9291@psf.upfronthosting.co.za> Tim Golden added the comment: Only just been reminded of this one; it's possible that it's been superseded by Issue15207. At the least, that issue resulted in a code change in this area of mimetypes. I'll have a look later. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 16:00:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 15:00:16 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384354816.51.0.0805227818591.issue19566@psf.upfronthosting.co.za> STINNER Victor added the comment: Also reproduced on "x86 Ubuntu Shared 3.x" buildbot. http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/9012/steps/test/logs/stdio ====================================================================== ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/unix_events.py", line 662, in _do_waitpid_all callback, args = self._callbacks.pop(pid) KeyError: 21303 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_asyncio/test_unix_events.py", line 723, in setUp self.watcher = self.create_watcher(self.loop) File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_asyncio/test_unix_events.py", line 1466, in create_watcher return unix_events.FastChildWatcher(loop) File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/unix_events.py", line 596, in __init__ super().__init__(loop) File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/unix_events.py", line 474, in __init__ self.set_loop(loop) File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/unix_events.py", line 498, in set_loop self._do_waitpid_all() File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/asyncio/unix_events.py", line 665, in _do_waitpid_all with self._lock: AttributeError: 'FastChildWatcher' object has no attribute '_lock' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 16:05:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 15:05:05 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384355105.57.0.714469008391.issue19566@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch should fix this issue. BaseChildWatcher constructors calls set_loop() which calls _do_waitpid_all(). The problem is that _do_waitpid_all() is called before FastChildWatcher own attributes are set. ---------- keywords: +patch Added file: http://bugs.python.org/file32598/asyncio_fastchildwatcher.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 16:07:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 15:07:44 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <1384355264.37.0.124034387642.issue19565@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Can't you fix multiprocessing and/or the unit test to ensure that all >> overlapped operations are completed or cancelled? > On Vista and later, yes, this is done in the deallocator using > CancelIoEx(), although there is still a warning. I don't understand. The warning is emitted because an operating is not done nor cancelled. Why not cancel explicitly active operations in manager.shutdown()? It is not possible? > ... I think these warnings come from daemon threads used by "manager" > processes. When the manager process exits some background threads > may be blocked doing an overlapped read. I don't know overlapped operations. There are not asynchronous? What do you mean by "blocked doing an overlapped read"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 17:14:58 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Nov 2013 16:14:58 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1384359298.49.0.762796729813.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: Walter suggested annotating the exceptions directly might work: https://mail.python.org/pipermail/python-dev/2013-November/130155.html However, that potentially runs into nesting problems (e.g. the idna codec invokes the ascii codec), although Walter suggested a simpler mechanism that just involved appending to a list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 17:47:00 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 13 Nov 2013 16:47:00 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384361220.56.0.249631893154.issue19566@psf.upfronthosting.co.za> Guido van Rossum added the comment: Hmm... That fix works, and if you're concerned about the buildbots, by all means check it in. But I think the root cause is a poor API for initializing ChildWatchers. This is currently done at the end of __init__() -- it calls self.set_loop() which is implemented by the subclass. I think the right fix is to change the protocol to separate out the constructor from the set_loop() call (which also isn't a great name, since it does so much more -- maybe it can be called link_loop()?). This is more cumbersome (esp. for the tests), but it really rubs me the wrong way that you have to to initialize the subclass before initializing the base class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 17:51:40 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 13 Nov 2013 16:51:40 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384355264.37.0.124034387642.issue19565@psf.upfronthosting.co.za> Message-ID: <5283AE0E.9040702@gmail.com> Richard Oudkerk added the comment: On 13/11/2013 3:07pm, STINNER Victor wrote: >> On Vista and later, yes, this is done in the deallocator using >> CancelIoEx(), although there is still a warning. > > I don't understand. The warning is emitted because an operating is not done nor cancelled. Why not cancel explicitly active operations in manager.shutdown()? It is not possible? shutdown() will be run in a different thread to the ones which started the overlapped ops, so it cannot stop them using CancelIo(). And anyway, it would mean writing a separate implementation for Windows -- the current manager implementation contains no platform specific code. Originally overlapped IO was not used on Windows. But, to get rid of polling, Antoine opened the can of worms that is overlapped IO:-) >> ... I think these warnings come from daemon threads used by "manager" >> processes. When the manager process exits some background threads >> may be blocked doing an overlapped read. > > I don't know overlapped operations. There are not asynchronous? What do you mean by "blocked doing an overlapped read"? They are asynchronous but the implementation uses a hidden thread pool. If a pool thread tries to read from/write to a buffer that has been deallocated, then we can get a crash. By "blocked doing an overlapped read" I mean that a daemon thread is waiting for a line like data = conn.recv() to complete. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 18:19:02 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 13 Nov 2013 17:19:02 +0000 Subject: [issue19572] Report more silently skipped tests as skipped Message-ID: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> New submission from Zachary Ware: (Nosy list copied from #18702) Grepping for "^\s+return$" and "^\s+pass$" in Lib/test turned up several more tests that are silently skipped (along with many legitimate uses of each). The attached patch turns each into a skip in a few various ways, including splitting a test into two tests in a couple of cases. I'll make a few comments on Rietveld myself to point out places where I would really like some extra scrutiny. ---------- components: Tests files: skiptest_not_return_or_pass.diff keywords: patch messages: 202762 nosy: ezio.melotti, haypo, michael.foord, ned.deily, pitrou, serhiy.storchaka, terry.reedy, vajrasky, zach.ware priority: normal severity: normal stage: patch review status: open title: Report more silently skipped tests as skipped type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32599/skiptest_not_return_or_pass.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 18:21:46 2013 From: report at bugs.python.org (Artem Ustinov) Date: Wed, 13 Nov 2013 17:21:46 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1384363306.18.0.207312146326.issue19462@psf.upfronthosting.co.za> Artem Ustinov added the comment: What is the way to 'hide' the argument from being parsed? E.g. we have self.parser.add_argument('foo') in parent class, how can we modify it in child class so that it would not to appear in --help strings and not populated to child's Namespace? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 18:31:21 2013 From: report at bugs.python.org (paul j3) Date: Wed, 13 Nov 2013 17:31:21 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1384363881.85.0.764552224674.issue19462@psf.upfronthosting.co.za> paul j3 added the comment: `argparse.SUPPRESS` should do the trick. According to the documentation it can be used with `default` and `help` parameters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 19:31:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 Nov 2013 18:31:16 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384367476.08.0.257824571724.issue19568@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can't "un-memmove" because you already lost bytes between new_hi and hi. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 19:37:26 2013 From: report at bugs.python.org (Laurent Birtz) Date: Wed, 13 Nov 2013 18:37:26 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384367846.36.0.760932801319.issue6208@psf.upfronthosting.co.za> Laurent Birtz added the comment: First, I apologize for my overly harsh tone. A dismissive comment above struck a nerve but that doesn't excuse it. @Lawrence: from my perspective it is a bug: the Python interpreter doesn't handle paths correctly on MinGW as I'd expect. As Nick said, the ideal scenario would be to come up with a solution that actually fixes the problem on MinGW. I realize that very few people use MinGW and are impacted by this, so it seems like much effort for little gain. Nevertheless, perhaps the issue could be left open until someone decides to bite the bullet and fix it properly? I'm the one complaining and it's fair that I spend the effort to fix it, but like everyone I have limited time on my hands, and I can't do this now. FWIW I see three potential solutions. I'm not involved in Python development and I don't know how applicable they are. 1) Modifying os.sep as described above. Pros: it behaves as expected from the user point-of-view. It makes sense that the separator in this variable is used internally by the module for manipulating the paths. It may be straightforward to implement by making this a property and propagating the change to the Python code and/or interpreter code whenever it is set. Cons: AFAICT there aren't obvious reasons why someone would modify os.sep currently, so it *should* be fine for backward compatibility for most users, but there is no guarantee. 2) Adding the function os.set_sep(separator). Like 1), but it's less transparent to the user, who might set os.sep naively like I did and be surprised that it doesn't work. I think that eliminates all potential backward compatibility issues though. 3) Detect MinGW. It's brittle but it makes Python behaves as expected for the user -- who might still want/depend on the current behavior however? I'm not a fan of this but it's doable. If the MinGW detection fails then the behavior falls back to the standard Windows behavior. The reverse (assuming MinGW incorrectly) is way more problematic, but I think that the odds of that happening are very low. So essentially if the detection fails then only the MinGW users are impacted. Nick, correct me if I'm wrong but the target platform for MinGW is mostly Windows itself, aside of this particular issue? The rest of the standard library seems to be working fine on MinGW as it is. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 19:54:10 2013 From: report at bugs.python.org (Anthony Baire) Date: Wed, 13 Nov 2013 18:54:10 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384368850.33.0.26382927643.issue19566@psf.upfronthosting.co.za> Anthony Baire added the comment: I confirm the fix. It is clear that the separation between BaseChildWatcher and its subclasses is far from ideal. The first implementation was clean, but as the patch evolved interactions got complex to the point that BaseChildWatcher should not be considered as an API but rather as implementation details for the two other classes (eg. .add_child_handler() is implemented in subclasses whereas .remove_child_handler() is in the base class). At least it should be renamed as _BaseChildWatcher to make that clear. For set_loop, another possible name is 'attach_loop' (like in the doc string actually) ---------- nosy: +aba _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 19:59:20 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 13 Nov 2013 18:59:20 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384369160.05.0.0150921429713.issue19566@psf.upfronthosting.co.za> Guido van Rossum added the comment: TBH the test structure is also rather fragile. I need to think about it more; the global state to hold the current test instance smells, as do the various class-level functions (waitpid(), WIFEXITED() etc.) that aren't methods but used as mock functions. The huge piles of mock.patch decorators should have tipped me off during the review, but I was more focused on the implementation instead of on the tests. :-( The smallest fix to prevent one breaking test from breaking all following tests is just to remove the assert. The next smallest fix is to use addCleanup() instead of tearDown() to reset ChildWatcherTestsMixin.instance. The next fix would be huge (refactor the tests completely) and I don't want to go there. Anthony, can you come up with a fix along the lines you suggested? You can submit this to the Tulip repo first (let me review it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 20:03:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 Nov 2013 19:03:37 +0000 Subject: [issue10734] test_ttk test_heading_callback fails with newer Tk 8.5 In-Reply-To: <1292706922.45.0.208964037247.issue10734@psf.upfronthosting.co.za> Message-ID: <1384369417.01.0.672667736369.issue10734@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 20:05:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 Nov 2013 19:05:58 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384369558.87.0.338509379852.issue19572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue19492 and issue19493. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 20:09:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 13 Nov 2013 19:09:10 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <3dKb370jvqz7M6Q@mail.python.org> Roundup Robot added the comment: New changeset 8e0eeb4cc8fa by Guido van Rossum in branch 'default': asyncio: Temporary fix by Victor Stinner for issue 19566. http://hg.python.org/cpython/rev/8e0eeb4cc8fa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 20:09:38 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 13 Nov 2013 19:09:38 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384369778.93.0.213861482312.issue19566@psf.upfronthosting.co.za> Guido van Rossum added the comment: I pushed Victor's temporary patch so the buildbots can have peace. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 20:29:16 2013 From: report at bugs.python.org (Anthony Baire) Date: Wed, 13 Nov 2013 19:29:16 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384370956.19.0.295225161853.issue19566@psf.upfronthosting.co.za> Anthony Baire added the comment: I put a cleaner patch here: https://codereview.appspot.com/26220043/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 20:33:43 2013 From: report at bugs.python.org (Antony Lee) Date: Wed, 13 Nov 2013 19:33:43 +0000 Subject: [issue19573] Fix the docstring of inspect.Parameter and the implementation of _ParameterKind Message-ID: <1384371223.06.0.467962768293.issue19573@psf.upfronthosting.co.za> New submission from Antony Lee: The following patch corrects the docstring of `inspect.Parameter`, as the `default` and `annotation` attributes are in fact set to `empty` if no value is provided, and the `kind` attribute is in fact an `int` (more precisely, a `_ParameterKind`). It also reimplements the `_ParameterKind` type as an `IntEnum`, as the previous implementation (which predates stdlib enums) was more or less a hand-rolled `IntEnum`. ---------- assignee: docs at python components: Documentation files: inspect.py.diff keywords: patch messages: 202773 nosy: Antony.Lee, docs at python priority: normal severity: normal status: open title: Fix the docstring of inspect.Parameter and the implementation of _ParameterKind type: enhancement Added file: http://bugs.python.org/file32600/inspect.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 20:47:48 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 13 Nov 2013 19:47:48 +0000 Subject: [issue19570] distutils' Command.ensure_dirname fails on Unicode In-Reply-To: <1384348317.37.0.567121673163.issue19570@psf.upfronthosting.co.za> Message-ID: <1384372068.1.0.375394872783.issue19570@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 21:24:41 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 13 Nov 2013 20:24:41 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384374281.64.0.956119494554.issue19572@psf.upfronthosting.co.za> Zachary Ware added the comment: Starting a review of #19492, I realized my original regexs didn't take comments into account. Grepping "^\s+return\s*(#.*)?$" instead turned up a couple more skips, including some in test_tempfile that said "return # ugh, can't use SkipTest", relics of the days before unittest.SkipTest. ---------- Added file: http://bugs.python.org/file32601/skiptest_not_return_or_pass.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 21:43:46 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 13 Nov 2013 20:43:46 +0000 Subject: [issue19492] Report skipped distutils tests as skipped In-Reply-To: <1383569864.94.0.187586889245.issue19492@psf.upfronthosting.co.za> Message-ID: <1384375426.55.0.365736640953.issue19492@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 21:44:14 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 13 Nov 2013 20:44:14 +0000 Subject: [issue19493] Report skipped ctypes tests as skipped In-Reply-To: <1383569878.45.0.454771857446.issue19493@psf.upfronthosting.co.za> Message-ID: <1384375454.76.0.100630062819.issue19493@psf.upfronthosting.co.za> Zachary Ware added the comment: Grepping with the same regexes I used for #19572 come up with some extra skips in the ctypes tests too; would you like me to create a new patch including them or would you like to do it, Serhiy? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 21:52:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 20:52:14 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384370956.19.0.295225161853.issue19566@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Hmm... That fix works, and if you're concerned about the buildbots, by all means check it in. > (...) > I pushed Victor's temporary patch so the buildbots can have peace. Yes, I'm concerned by buildbots, I would like to check if my last changes did not introduce any regression. This week, there is a lot of noise: many false positive related to networks and various other bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 21:54:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 20:54:00 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <1384376040.52.0.942069259355.issue19566@psf.upfronthosting.co.za> STINNER Victor added the comment: (So thanks for having applied my fix.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:01:28 2013 From: report at bugs.python.org (Vatroslav Suton) Date: Wed, 13 Nov 2013 21:01:28 +0000 Subject: [issue19574] Negative integer division error Message-ID: <1384376488.65.0.288336541103.issue19574@psf.upfronthosting.co.za> New submission from Vatroslav Suton: integer division obviously uses float division with math.floor, which produces invalid result when result is less than 0, simply try the following 5/2 versus -5/2. Please use math.ceil function for results less than 0. btw is there any way to patch that in __builtins__ ? ---------- components: Library (Lib) messages: 202778 nosy: vatroslavsuton priority: normal severity: normal status: open title: Negative integer division error type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:02:53 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Wed, 13 Nov 2013 21:02:53 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close Message-ID: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> New submission from Bernt R?skar Brenna: Running the following task using concurrent.futures.ThreadPoolExecutor works with max_workers == 1 and fails when max_workers > 1 : def task(): dirname = tempfile.mkdtemp() f_w = open(os.path.join(dirname, "stdout.txt"), "w") f_r = open(os.path.join(dirname, "stdout.txt"), "r") e_w = open(os.path.join(dirname, "stderr.txt"), "w") e_r = open(os.path.join(dirname, "stderr.txt"), "r") with subprocess.Popen("dir", shell=True, stdout=f_w, stderr=e_w) as p: pass f_w.close() f_r.close() e_w.close() e_r.close() shutil.rmtree(dirname) The exception is raised by shutil.rmtree when max_workers > 1: "The process cannot access the file because it is being used by another process" See also this Stack Overflow question about what seems to bee a similar problem: http://stackoverflow.com/questions/15966418/python-popen-on-windows-with-multithreading-cant-delete-stdout-stderr-logs The discussion on SO indicates that this might be an XP problem only. The attached file reproduces the problem on my Windows XP VM. ---------- components: Library (Lib), Windows files: repro.py messages: 202779 nosy: Bernt.R?skar.Brenna priority: normal severity: normal status: open title: subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close versions: Python 3.3 Added file: http://bugs.python.org/file32602/repro.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:06:15 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Wed, 13 Nov 2013 21:06:15 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384376775.45.0.0929155898567.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: Simpler task method that still reproduces the problem: def task(): dirname = tempfile.mkdtemp() f_w = open(os.path.join(dirname, "stdout.txt"), "w") e_w = open(os.path.join(dirname, "stderr.txt"), "w") with subprocess.Popen("dir", shell=True, stdout=f_w, stderr=e_w) as p: pass f_w.close() e_w.close() shutil.rmtree(dirname) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:15:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 21:15:51 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384377351.23.0.897134392876.issue19568@psf.upfronthosting.co.za> STINNER Victor added the comment: > You can't "un-memmove" because you already lost bytes between new_hi and hi. Oh, that's why I prefered a review. You're right, bytes are lost. Here is a different approach which updates the size to ensure that the object is consistent on memory allocation failure. ---------- Added file: http://bugs.python.org/file32603/bytearray_setslice_mem_error-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:34:50 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Nov 2013 21:34:50 +0000 Subject: [issue19574] Negative integer division error In-Reply-To: <1384376488.65.0.288336541103.issue19574@psf.upfronthosting.co.za> Message-ID: <1384378490.52.0.776563121924.issue19574@psf.upfronthosting.co.za> R. David Murray added the comment: This is not an aspect of Python that can possibly change, I'm afraid, for backward compatibility reasons. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Integer division for negative numbers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:38:20 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Nov 2013 21:38:20 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384378700.11.0.0592694554328.issue19575@psf.upfronthosting.co.za> R. David Murray added the comment: It doesn't look like you are waiting for the subprocess to complete (and therefore close the files) before doing the rmtree. What happens if you do that? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:38:21 2013 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 13 Nov 2013 21:38:21 +0000 Subject: [issue19574] Negative integer division error In-Reply-To: <1384376488.65.0.288336541103.issue19574@psf.upfronthosting.co.za> Message-ID: <1384378701.47.0.393695983878.issue19574@psf.upfronthosting.co.za> Mark Dickinson added the comment: See also http://docs.python.org/2/faq/programming.html#why-does-22-10-return-3 BTW, integer division does not use float division internally. That would fail for integers too large to be exactly representable as floats. The implementation can be seen in Objects/intobject.c and Objects/longobject.c if you're interested. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:39:27 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Nov 2013 21:39:27 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384378767.6.0.425344244308.issue19575@psf.upfronthosting.co.za> R. David Murray added the comment: Nevermind, I forgot that the context manager also does the wait. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:44:36 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Nov 2013 21:44:36 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384379076.18.0.615194401559.issue19575@psf.upfronthosting.co.za> R. David Murray added the comment: Most likely this is a case of a virus scanner or file indexer having the file open when rmtree runs. See issue 7443, which was about solving this for our test suite. My last message there asks about exposing the workaround in shutil, but no one appears to have taken me up on that suggestion yet. Can you disable all virus scanners and indexers and try again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 22:49:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 21:49:30 +0000 Subject: [issue19576] "Non-Python created threads" documentation doesn't mention PyEval_InitThreads() Message-ID: <1384379370.85.0.232061958171.issue19576@psf.upfronthosting.co.za> New submission from STINNER Victor: While working on a unit test for the issue #14432, I hit a bug. My C thread got the GIL with PyGILState_Ensure(), but it was strange because the main Python thread also had the GIL... Then I saw that gil_created() returned false. The solution is to call PyEval_InitThreads() to create the GIL. I was reading "Non-Python created threads" documentation, but this section doesn't mention PyEval_InitThreads(). I don't know if it's something new in Python 3.2 with the new GIL. ---------- assignee: docs at python components: Documentation messages: 202787 nosy: christian.heimes, docs at python, haypo, pitrou priority: normal severity: normal status: open title: "Non-Python created threads" documentation doesn't mention PyEval_InitThreads() versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:05:38 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Wed, 13 Nov 2013 22:05:38 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384380338.81.0.0202605367362.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: No indexing and no virus scanner running. Note that it never fails if running in a single thread. IMO, this indicates that external processes interfering is not the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:25:52 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Wed, 13 Nov 2013 22:25:52 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384381552.21.0.569273069396.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: Here's an improved repro script. I believe it demonstrates that it is the combination of subprocess.Popen and threading that causes the problem. Here's the output from my Windows XP VM: *** c:\...> c:\Python33\python.exe repro_improved.py Windows-XP-5.1.2600-SP3 Concurrency: 2 Task kind: subprocess_redirfile 3 errors of 10 Concurrency: 1 Task kind: subprocess_redirfile 0 errors of 10 Concurrency: 2 Task kind: subprocess_devnull 5 errors of 10 Concurrency: 1 Task kind: subprocess_devnull 0 errors of 10 Concurrency: 2 Task kind: nosubprocess 0 errors of 10 Concurrency: 1 Task kind: nosubprocess 0 errors of 10 *** Note that: - even when subprocess redirects to DEVNULL there are errors - when no subprocess.Popen is executed, no errors occur (the file is created as normal, but is not used by subprocess.Popen) ---------- Added file: http://bugs.python.org/file32604/repro_improved.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:27:41 2013 From: report at bugs.python.org (Ethan Furman) Date: Wed, 13 Nov 2013 22:27:41 +0000 Subject: [issue19249] Enumeration.__eq__ In-Reply-To: <1381693100.88.0.523701824631.issue19249@psf.upfronthosting.co.za> Message-ID: <1384381661.05.0.169407516446.issue19249@psf.upfronthosting.co.za> Ethan Furman added the comment: changeset ca909a3728d3 ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:30:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 Nov 2013 22:30:18 +0000 Subject: [issue19493] Report skipped ctypes tests as skipped In-Reply-To: <1384375454.76.0.100630062819.issue19493@psf.upfronthosting.co.za> Message-ID: <3646454.rpkThW8eJf@raxxla> Serhiy Storchaka added the comment: > Grepping with the same regexes I used for #19572 come up with some extra > skips in the ctypes tests too; would you like me to create a new patch > including them or would you like to do it, Serhiy? Please do this Zachary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:30:37 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Nov 2013 22:30:37 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1384367846.36.0.760932801319.issue6208@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: We can't change os.sep globally for the process because the Windows APIs don't reliably accept forward slashes. Changing it when the Windows binary is run through msys would thus mean potentially breaking currently working applications. Using the Cygwin Python instead is safer, since all the affected OS API calls will be trapped by Cygwin's POSIX API implementation and translated appropriately for Windows. Terry's description when first closing this issue remains accurate: MS created this mess through an atrociously poor choice of path separator decades ago, and until *all* their APIs natively accept forward slashes as path separators (which seems unlikely to ever happen), the only backwards compatible answer currently appears to be to use a full POSIX interface layer like Cygwin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:35:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 Nov 2013 22:35:17 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384382117.83.0.97201612837.issue19572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added some comments on Rietveld to the first patch. In general it LGTM. I will made a review for additional skips tomorrow. I suggest extract importlib related changes in separated issue. Bratt Cannon should review them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:37:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Nov 2013 22:37:40 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: Message-ID: Nick Coghlan added the comment: However, coming up with a way to detect that msys is in use, and publishing that information for use by applications like Mercurial, or creating a catalogue of which Windows APIs still don't accept forward slashes as path separators could help the issue progress. There's just no magic fix we can apply at the interpreter or standard library level to make the problem go away - it's *precisely* the kind of problem that exists in the space between the "POSIX shell on Windows" provided by msys and the full POSIX API provided by Cygwin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:44:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 Nov 2013 22:44:10 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384382650.15.0.577058610636.issue19572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I will made a review for additional skips tomorrow. Additional skips LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:47:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 22:47:29 +0000 Subject: [issue14432] Bug in generator if the generator in created in a C thread In-Reply-To: <1332948868.24.0.309034348776.issue14432@psf.upfronthosting.co.za> Message-ID: <1384382849.2.0.664215397899.issue14432@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch for Python 3.4: - remove PyFrameObject.f_tstate attribute: the thread state can be easily retrieved, it is known where it is needed (see the patch). There is one function which doesn't know the thread state: _PyEval_CallTracing(), but this function was already calling PyEval_GetFrame() which calls PyThreadState_GET() internally, so... - add an unit test for this issue (generator created in a temporary C thread) It's really hard to reproduce the crash. I tried with my old tarball and I failed. I also tried with my unit test and I failed. I'm pretty sure that the crash can only be reproduced when Python is compiled is release mode. I reproduced the crash once with the unit test on an unpatched Python 3.4. For Python 2.7 and 3.3, what do you think of applying generator.patch? It looks simple and obvious. I don't know the impact on performances, but it should be very low. ---------- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file32605/issue14432.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 13 23:58:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 13 Nov 2013 22:58:14 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384383494.8.0.955843540378.issue19568@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why the object with updated size is more consistent? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 00:22:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 13 Nov 2013 23:22:06 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384384926.73.0.738563316717.issue19568@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is tricky, I will try to explain it. To understand the bug, I wrote the following function: static int _PyByteArray_CheckConsistency(PyByteArrayObject *obj) { assert(obj != NULL); assert(PyByteArray_Check(obj)); assert(Py_SIZE(obj) >= 0); assert(obj->ob_bytes <= obj->ob_start); assert((obj->ob_start - obj->ob_bytes) <= obj->ob_alloc); assert((obj->ob_alloc - (obj->ob_start - obj->ob_bytes)) >= Py_SIZE(obj)); return 1; } In this issue, I'm concerned by bytearray_setslice_linear() with growth < 0. There are two cases: (A) lo == 0 (B) lo != 0. (A) It's trivial to rollback the change: restore previous value of ob_start. (Another option is to update the size, which should be the same if I understood correctly.) You retrieve the original object. Expected result: >>> b=bytearray(b'1234567890') >>> del b[:6] >>> b bytearray(b'7890') Current behaviour on MemoryError >>> b=bytearray(b'1234567890') >>> del b[:6] >>> b bytearray(b'7890\x00\xfb\xfb\xfb\xfb\xfb') With the patch: >>> b=bytearray(b'1234567890') >>> del b[:6] Traceback (most recent call last): File "", line 1, in MemoryError >>> b bytearray(b'1234567890') (B) You cannot restore removed bytes. Currently, you get an inconsistent bytearray object because its content is updated but not its size. No error: >>> b=bytearray(b'1234567890') >>> del b[3:6] >>> b bytearray(b'1237890') Current behaviour on MemoryError: >>> b=bytearray(b'1234567890') >>> del b[3:6] Traceback (most recent call last): File "", line 1, in MemoryError >>> b bytearray(b'1237890890') With the patch: >>> b=bytearray(b'1234567890') >>> del b[3:6] Traceback (most recent call last): File "", line 1, in MemoryError >>> b bytearray(b'1237890') With the patch, the deletion succeeded even if you get a MemoryError. The bytearray object is consistent. It's just that its buffer could be smaller (it wastes memory). Note: I used gdb to inject a MemoryError in PyByteArray_Resize(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 00:24:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 13 Nov 2013 23:24:33 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384385073.2.0.0350302511756.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file32606/ac521cef665a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 00:27:44 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 13 Nov 2013 23:27:44 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384385264.02.0.228920589346.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: Hi Nick, I have updated the patch and the PEP text. The new version has small string hash optimization disabled. The other changes are mostly cleanup, reformatting and simplifications. Can you please do a review so I can get the patch into 3.4 before beta1 is released? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 00:32:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 13 Nov 2013 23:32:50 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1384385570.54.0.982012801264.issue16487@psf.upfronthosting.co.za> Christian Heimes added the comment: What's the status of this patch? I need a way to load CA certs from memory for another patch of mine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 00:50:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 13 Nov 2013 23:50:15 +0000 Subject: [issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests) In-Reply-To: <1384301977.23.0.703867213373.issue19566@psf.upfronthosting.co.za> Message-ID: <3dKjHV5C3vz7M4B@mail.python.org> Roundup Robot added the comment: New changeset eb42adc53923 by Guido van Rossum in branch 'default': asyncio: Fix from Anthony Baire for CPython issue 19566 (replaces earlier fix). http://hg.python.org/cpython/rev/eb42adc53923 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 00:59:11 2013 From: report at bugs.python.org (Craig McQueen) Date: Wed, 13 Nov 2013 23:59:11 +0000 Subject: [issue9816] random.jumpahead and PRNG sequence independence In-Reply-To: <1284103771.84.0.522023819888.issue9816@psf.upfronthosting.co.za> Message-ID: <1384387151.05.0.385221644892.issue9816@psf.upfronthosting.co.za> Craig McQueen added the comment: I notice that the C++11 library has a discard() member function for its random generators, which is effectively a jumpahead operation. It seems that the C++11 library has implemented discard() for the Mersene Twister generator. If jumpahead() is technically possible for MT, can it be added back into the Python library? ---------- nosy: +cmcqueen1975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:06:47 2013 From: report at bugs.python.org (Craig McQueen) Date: Thu, 14 Nov 2013 00:06:47 +0000 Subject: [issue9816] random.jumpahead and PRNG sequence independence In-Reply-To: <1284103771.84.0.522023819888.issue9816@psf.upfronthosting.co.za> Message-ID: <1384387607.71.0.444265772756.issue9816@psf.upfronthosting.co.za> Craig McQueen added the comment: C++11 Mersenne Twister discard() member function: http://www.cplusplus.com/reference/random/mersenne_twister_engine/discard/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:11:28 2013 From: report at bugs.python.org (Craig McQueen) Date: Thu, 14 Nov 2013 00:11:28 +0000 Subject: [issue9816] random.jumpahead and PRNG sequence independence In-Reply-To: <1284103771.84.0.522023819888.issue9816@psf.upfronthosting.co.za> Message-ID: <1384387888.84.0.820052182821.issue9816@psf.upfronthosting.co.za> Craig McQueen added the comment: StackOverflow question about Mersenne Twister jumpahead: http://stackoverflow.com/q/4184478/60075 which refers to this: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/JUMP/index.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:21:09 2013 From: report at bugs.python.org (Laurent Birtz) Date: Thu, 14 Nov 2013 00:21:09 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384388469.37.0.993226465265.issue6208@psf.upfronthosting.co.za> Laurent Birtz added the comment: I agree with the "no magic bullet" point and that Microsoft is fully to blame for the situation. About the catalogue of Windows APIs that accept slashes. I've read in various places that the only problematic case is the legacy shell API. The power shell seems to accept forward slashes. http://stackoverflow.com/questions/18464038/is-it-possible-to-make-vim-use-forward-slashes-on-windows http://stackoverflow.com/questions/10523708/why-does-the-cmd-exe-shell-on-windows-fail-with-paths-using-a-forward-slash Is it reasonable to believe that most Python programs don't care about the legacy shell API? I assume that the Python library uses CreateProcess() under the hood without touching cmd.exe. Some odd Python programs may invoke cmd.exe explicitly but hopefully that is a rare case. If those assumptions hold, then changing os.sep *from the user script* would not break backward compatibility and allow Python to work as expected on MinGW. Arguably it's a simpler solution than requiring Python projects like Mercurial to tackle that issue themselves. Even if it's not the perfect solution, it's a step-up from "Non-Cygwin Python corrupts paths on MinGW and you can't make it stop". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:39:17 2013 From: report at bugs.python.org (mpb) Date: Thu, 14 Nov 2013 00:39:17 +0000 Subject: [issue19577] memoryview bind (the opposite of release) Message-ID: <1384389557.7.0.405119332815.issue19577@psf.upfronthosting.co.za> New submission from mpb: I'm writing Python code to parse binary (byte oriented) data. I am (at least somewhat) aware of the performance implications of various approaches to doing the parsing. With performance in mind, I would like to avoid unnecessary creation/destruction/copying of memory/objects. An example: Let's say I am parsing b'0123456789'. I want to extract and return the substring b'234'. Now let's say I do this with memoryviews, to avoid unnecessary creation and copying of memory. m0 = memoryview (b'0123456789') m1 = m0[2:5] # m1 == b'234' Let's say I do this 1000 times. Each time I use readinto to load the next data into m0. So I can create m0 only once and reuse it. But if the relative position of m1 inside m0 changes with each parse, then I need to create a new m1 for each parse. In the context of the above example, I think it might be nice if I could rebind an existing memoryview to a new object. For example: m0 = memoryview (b'0123456789') m1.bind (m0, 2, 5) # m1 == b'234' Is this an idea worth considering? (Possibly related: Issue 9789, 9757, 3506; PEP 3118) ---------- messages: 202806 nosy: mpb priority: normal severity: normal status: open title: memoryview bind (the opposite of release) type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:39:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 00:39:51 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <3dKkNk4zRBz7LlT@mail.python.org> Roundup Robot added the comment: New changeset 99ba1772c469 by Christian Heimes in branch 'default': Issue #17828: va_start() must be accompanied by va_end() http://hg.python.org/cpython/rev/99ba1772c469 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:42:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 00:42:00 +0000 Subject: [issue19578] del list[a:b:c] doesn't handle correctly list_resize() failure Message-ID: <1384389720.61.0.338181274078.issue19578@psf.upfronthosting.co.za> New submission from STINNER Victor: "del list[start:stop:step]" instruction doesn't handle list_resize() failure when step != 1. Attached patch notifies the caller that list_resize() fails. On case of failure, the list is modified (items are deleted), it's just that list buffer could be smaller (it wastes memory). See also issue #19568 which is similar for bytearray. ---------- files: list_ass_subscript.patch keywords: patch messages: 202808 nosy: haypo priority: normal severity: normal status: open title: del list[a:b:c] doesn't handle correctly list_resize() failure versions: Python 3.4 Added file: http://bugs.python.org/file32607/list_ass_subscript.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:42:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 00:42:17 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384389737.58.0.91960470303.issue19568@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #19578, similar issue in list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:42:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 00:42:25 +0000 Subject: [issue19578] del list[a:b:c] doesn't handle correctly list_resize() failure In-Reply-To: <1384389720.61.0.338181274078.issue19578@psf.upfronthosting.co.za> Message-ID: <1384389745.37.0.448358201374.issue19578@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:47:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 00:47:11 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3dKkYB4xrWz7M5d@mail.python.org> Roundup Robot added the comment: New changeset eea54395797c by Victor Stinner in branch 'default': Issue #19437: Fix fold_unaryops_on_constants() of the peephole optimizer, clear http://hg.python.org/cpython/rev/eea54395797c New changeset 7d0323556c53 by Victor Stinner in branch 'default': Issue #19437: Use an identifier for "__name__" string in pickle to improve http://hg.python.org/cpython/rev/7d0323556c53 New changeset 285d28c3620a by Victor Stinner in branch 'default': Issue #19437: Fix array.buffer_info(), handle PyLong_FromVoidPtr() and http://hg.python.org/cpython/rev/285d28c3620a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:48:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 00:48:41 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <3dKkZw5d0Kz7M4B@mail.python.org> Roundup Robot added the comment: New changeset 26121ae22016 by Christian Heimes in branch 'default': Issue #17828: _PyObject_GetDictPtr() may return NULL instead of a PyObject** http://hg.python.org/cpython/rev/26121ae22016 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 01:49:38 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 14 Nov 2013 00:49:38 +0000 Subject: [issue17828] More informative error handling when encoding and decoding In-Reply-To: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> Message-ID: <1384390178.17.0.662860035474.issue17828@psf.upfronthosting.co.za> Christian Heimes added the comment: Coverity has found two issues in your patch. I have fixed them both. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 02:00:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 01:00:01 +0000 Subject: [issue19579] test_asyncio: test__run_once timings should be relaxed Message-ID: <1384390800.99.0.143827109941.issue19579@psf.upfronthosting.co.za> New submission from STINNER Victor: On Windows, the monotonic timer has a resolution of 15 ms in the worst case. The timing should accept a greater error. http://buildbot.python.org/all/builders/x86%20XP-4%203.x/builds/9547/steps/test/logs/stdio ====================================================================== FAIL: test__run_once (test.test_asyncio.test_base_events.BaseEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_asyncio\test_base_events.py", line 184, in test__run_once self.assertTrue(9.99 < t < 10.1, t) AssertionError: False is not true : 9.989999999990687 ---------- messages: 202813 nosy: gvanrossum, haypo priority: normal severity: normal status: open title: test_asyncio: test__run_once timings should be relaxed versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 02:20:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 14 Nov 2013 01:20:33 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384392033.5.0.373977235528.issue6208@psf.upfronthosting.co.za> Terry J. Reedy added the comment: subprocess has a 'shell=True' option, although its use is discouraged unless really necessary. To pursue this, I suggest running the test suite on Windows (including xp) with os.sep changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 02:39:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 01:39:23 +0000 Subject: [issue19576] "Non-Python created threads" documentation doesn't mention PyEval_InitThreads() In-Reply-To: <1384379370.85.0.232061958171.issue19576@psf.upfronthosting.co.za> Message-ID: <1384393163.52.0.647639353021.issue19576@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps we can fix PyGILState to call PyEval_InitThreads automatically? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 02:41:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 01:41:39 +0000 Subject: [issue19577] memoryview bind (the opposite of release) In-Reply-To: <1384389557.7.0.405119332815.issue19577@psf.upfronthosting.co.za> Message-ID: <1384393299.91.0.251078976979.issue19577@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > In the context of the above example, I think it might be nice if I > could rebind an existing memoryview to a new object. It would be nice how so? Can you try to estimate the speed gain? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 02:44:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 01:44:49 +0000 Subject: [issue19563] Changing barry's email to barry@python.org In-Reply-To: <1384283767.67.0.793092256619.issue19563@psf.upfronthosting.co.za> Message-ID: <1384393489.51.0.093919855886.issue19563@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do we want to cut a new release quickly in order to spread the fix? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 02:46:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 01:46:03 +0000 Subject: [issue19371] timing test too tight In-Reply-To: <1382566801.77.0.760747140726.issue19371@psf.upfronthosting.co.za> Message-ID: <1384393563.92.0.662672054636.issue19371@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 03:04:47 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 Nov 2013 02:04:47 +0000 Subject: [issue19371] timing test too tight In-Reply-To: <1382566801.77.0.760747140726.issue19371@psf.upfronthosting.co.za> Message-ID: <1384394687.69.0.141734473608.issue19371@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> duplicate superseder: -> test_asyncio: test__run_once timings should be relaxed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 03:06:58 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 Nov 2013 02:06:58 +0000 Subject: [issue19579] test_asyncio: test__run_once timings should be relaxed In-Reply-To: <1384390800.99.0.143827109941.issue19579@psf.upfronthosting.co.za> Message-ID: <1384394818.14.0.0952036186075.issue19579@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: +ezio.melotti, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 03:41:12 2013 From: report at bugs.python.org (Martin Panter) Date: Thu, 14 Nov 2013 02:41:12 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1384396872.08.0.832193872091.issue19291@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 05:18:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 04:18:01 +0000 Subject: [issue19579] test_asyncio: test__run_once timings should be relaxed In-Reply-To: <1384390800.99.0.143827109941.issue19579@psf.upfronthosting.co.za> Message-ID: <3dKqDS3THXz7Lpw@mail.python.org> Roundup Robot added the comment: New changeset f91550e7e2b7 by Guido van Rossum in branch 'default': asyncio: Relax timing requirement. Fixes issue 19579. http://hg.python.org/cpython/rev/f91550e7e2b7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 07:27:08 2013 From: report at bugs.python.org (mpb) Date: Thu, 14 Nov 2013 06:27:08 +0000 Subject: [issue19577] memoryview bind (the opposite of release) In-Reply-To: <1384389557.7.0.405119332815.issue19577@psf.upfronthosting.co.za> Message-ID: <1384410428.12.0.766944701547.issue19577@psf.upfronthosting.co.za> mpb added the comment: It would be nice in terms of avoiding malloc()s and free()s. I could estimate it in terms of memoryview creations per message parse. I'll be creating 10-20 memoryviews to parse each ~100 byte message. So... I guess I'd have to build a test to see how long a memoryview creation/free takes. And then perhaps compare it with variable to variable assignment instead. If Python pools and recycles unused object by type (the way Lisp recycles cons cells) without free()ing them back to the heap, then there would be minimal speed improvement from my suggestion. I don't know how CPython works internally, however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 09:08:56 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 14 Nov 2013 08:08:56 +0000 Subject: [issue19580] Got resource warning when running test_base_events (test_asyncio) Message-ID: <1384416536.42.0.501877379944.issue19580@psf.upfronthosting.co.za> New submission from Vajrasky Kok: $ ./python Lib/test/test_asyncio/test_base_events.py ............................./home/ethan/Documents/code/python/cpython3.4/Lib/unittest/case.py:158: ResourceWarning: unclosed callable_obj(*args, **kwargs) .............. ---------------------------------------------------------------------- Ran 43 tests in 0.219s OK sys:1: ResourceWarning: unclosed sys:1: ResourceWarning: unclosed sys:1: ResourceWarning: unclosed Attached the patch to close the leak in the test. ---------- components: Tests files: resource_warning_test_base_events_asyncio.patch keywords: patch messages: 202820 nosy: vajrasky priority: normal severity: normal status: open title: Got resource warning when running test_base_events (test_asyncio) type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file32608/resource_warning_test_base_events_asyncio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 09:23:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 08:23:52 +0000 Subject: [issue19579] test_asyncio: test__run_once timings should be relaxed In-Reply-To: <1384390800.99.0.143827109941.issue19579@psf.upfronthosting.co.za> Message-ID: <1384417432.68.0.976172469187.issue19579@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 09:28:02 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 08:28:02 +0000 Subject: [issue19576] "Non-Python created threads" documentation doesn't mention PyEval_InitThreads() In-Reply-To: <1384379370.85.0.232061958171.issue19576@psf.upfronthosting.co.za> Message-ID: <1384417682.25.0.829972568274.issue19576@psf.upfronthosting.co.za> STINNER Victor added the comment: > Perhaps we can fix PyGILState to call PyEval_InitThreads automatically? Yes, I had the same idea. Here is a patch to call PyEval_InitThreads() in PyGILState_Ensure() for new threads. ---------- keywords: +patch Added file: http://bugs.python.org/file32609/PyGILState_Ensure.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 09:28:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 08:28:40 +0000 Subject: [issue14432] Bug in generator if the generator in created in a temporary C thread In-Reply-To: <1332948868.24.0.309034348776.issue14432@psf.upfronthosting.co.za> Message-ID: <1384417720.15.0.661836616945.issue14432@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Bug in generator if the generator in created in a C thread -> Bug in generator if the generator in created in a temporary C thread _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 10:27:28 2013 From: report at bugs.python.org (Tim Golden) Date: Thu, 14 Nov 2013 09:27:28 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1384388469.37.0.993226465265.issue6208@psf.upfronthosting.co.za> Message-ID: <5284977C.6020600@timgolden.me.uk> Tim Golden added the comment: On 14/11/2013 00:21, Laurent Birtz wrote: > Is it reasonable to believe that most Python programs don't care > about the legacy shell API? No more than it is to believe that most Python programs don't care about MSys or Cygwin ;) For information, cmd.exe will happily run, eg, "c:/windows/notepad.exe". The problem is that command-line programs built in to cmd.exe (such as "type" and "dir") expect the slash to prefix a command-line switch. And they don't seem to have particularly good escape- or quote-handling. External command-line tools, like "xcopy", will happily act on forward-slash pathnames as long as they're double-quoted. Now certain of the Windows shell API (and here "shell" means: the visual elements, *not* the cmd/PS command shell) will only operate on backslash-separated paths. For example: SHILCreateFromPath: http://msdn.microsoft.com/en-us/library/windows/desktop/bb762210(v=vs.85).aspx I'm not exactly how much that affects the current discussion, but my point is that there *are* places in Windows where the backslash is the only acceptable separator. Changing os.sep globally is real no-no. it has the potential to break a *lot* of code and we're in no position to assess how it's been used. Applying a change conditionally might be acceptable, but somone would have to work out how we knew what environment we were in. TJG ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 10:30:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 09:30:35 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1384421435.78.0.51921765363.issue19291@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 10:37:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 09:37:25 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows Message-ID: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> New submission from STINNER Victor: PyUnicodeWriter currently overallocates the internal buffer by 25%. On Windows, PyUnicodeWriter is slower than PyAccu API. With an overallocation factor of 50%, PyUnicodeWriter is fastter. See this message for the benchmark: http://bugs.python.org/issue19513#msg202312 We might also change the factor on all platform, performances are almost the same with a factor of 25% or 50% on Linux. ---------- components: Windows files: writer_overallocate_factor.patch keywords: patch messages: 202823 nosy: haypo, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: PyUnicodeWriter: change the overallocation factor for Windows type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32610/writer_overallocate_factor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 10:38:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 09:38:35 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1384421915.91.0.70917629001.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: > Please open a separate issue for the overallocation factor patch. Ok, here you have: #19581. I consider this issue has a dependency of this one, because without a better overallocation factor on Windows, list_repr_writer-2.patch makes repr(list) less efficient in some cases on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 12:12:35 2013 From: report at bugs.python.org (Debarshi Goswami) Date: Thu, 14 Nov 2013 11:12:35 +0000 Subject: [issue19582] Tkinter is not working with Py_SetPath Message-ID: <1384427555.71.0.261717374261.issue19582@psf.upfronthosting.co.za> New submission from Debarshi Goswami: Tkinter is not working when I set PYTHONPATH using Py_SetPath before Initialization in an application embedding Python interpreter. Any call to Py_SetPath is screwing up Tkinter with an error traceback - ----------------------------------------------------- 'Line 1789: Traceback (most recent call last): File "TestTK.py", line 33, in File "C:\Python33\Lib\tkinter\__init__.py", line 1789, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: Can't find a usable init.tcl in the following directories: C:/Python33/lib/tcl8.5 .... and so on This probably means that Tcl wasn't installed properly. ------------------------------------------------------------- But if set the 2 environment variable it works fine set TCL_LIBRARY=C:\Python33\tcl\tcl8.5\ set TK_LIBRARY=C:\tcl\tk8.5\ If Py_SetPath is not called tkinter works well and tkwindow can be launched. I am using Windows7 64 and Python 3.3.2 ---------- components: Tkinter messages: 202825 nosy: Debarshi.Goswami priority: normal severity: normal status: open title: Tkinter is not working with Py_SetPath versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 12:13:44 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 14 Nov 2013 11:13:44 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> Message-ID: <1384427624.08.0.942563329507.issue19550@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm currently blocked on a discrepancy of this request and PEP 453. You are asking me to run "ensurepip --upgrade", whereas the PEP asks for an option to install the bundled pip (i.e. a mere ensurepip). Which of these should be done? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 12:13:52 2013 From: report at bugs.python.org (Debarshi Goswami) Date: Thu, 14 Nov 2013 11:13:52 +0000 Subject: [issue19582] Tkinter is not working with Py_SetPath In-Reply-To: <1384427555.71.0.261717374261.issue19582@psf.upfronthosting.co.za> Message-ID: <1384427632.61.0.10968651329.issue19582@psf.upfronthosting.co.za> Changes by Debarshi Goswami : ---------- components: +Interpreter Core type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 12:23:48 2013 From: report at bugs.python.org (Debarshi Goswami) Date: Thu, 14 Nov 2013 11:23:48 +0000 Subject: [issue19582] Tkinter is not working with Py_SetPath In-Reply-To: <1384427555.71.0.261717374261.issue19582@psf.upfronthosting.co.za> Message-ID: <1384428228.47.0.824563973027.issue19582@psf.upfronthosting.co.za> Debarshi Goswami added the comment: Is there any way to run Tkinter adding some changes from interpreter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 12:47:52 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 14 Nov 2013 11:47:52 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1384429672.46.0.250154189112.issue16487@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Update the latest patch to the current state of python. ---------- Added file: http://bugs.python.org/file32611/ssl2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 12:48:39 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 14 Nov 2013 11:48:39 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1384429719.58.0.18610000187.issue16487@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The patch should be valid, please try it out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 12:52:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 14 Nov 2013 11:52:42 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384427624.08.0.942563329507.issue19550@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: After a CPython installation with the option checked, the installed pip should be at least as recent as the bundled one: http://www.python.org/dev/peps/pep-0453/#invocation-from-the-cpython-installers You're right the prompt may be better as something like "Install/upgrade pip?", since a previously installed pip may be upgraded when installing a CPython maintenance release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:02:23 2013 From: report at bugs.python.org (Stefan Krah) Date: Thu, 14 Nov 2013 12:02:23 +0000 Subject: [issue19577] memoryview bind (the opposite of release) In-Reply-To: <1384389557.7.0.405119332815.issue19577@psf.upfronthosting.co.za> Message-ID: <1384430543.36.0.524038343533.issue19577@psf.upfronthosting.co.za> Stefan Krah added the comment: -1 on complicating the code further. It would be possible to pass an existing memoryview to mbuf_add_view(). That would save the line mv = memory_alloc(). But: a) You need to check that ndim is correct (shape, strides and suboffsets are allocated via the struct hack). b) You need to check for existing exports of the memoryview. c) ... probably other things that would surface on closer examination. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:04:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 14 Nov 2013 12:04:29 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1384430669.5.0.756929030716.issue16487@psf.upfronthosting.co.za> Christian Heimes added the comment: Your patch looks like Benjamin's fix for issue #17828 and not like a SSL improvement. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:07:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 12:07:14 +0000 Subject: [issue19580] Got resource warning when running test_base_events (test_asyncio) In-Reply-To: <1384416536.42.0.501877379944.issue19580@psf.upfronthosting.co.za> Message-ID: <1384430834.18.0.488280804146.issue19580@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:11:37 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 14 Nov 2013 12:11:37 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1384431097.42.0.678795086417.issue16487@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Haha, indeed. what nonsense. Here is the correct one. ---------- Added file: http://bugs.python.org/file32612/ssl2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:11:55 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 14 Nov 2013 12:11:55 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1384431115.43.0.135489740818.issue16487@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : Removed file: http://bugs.python.org/file32611/ssl2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:12:08 2013 From: report at bugs.python.org (Stefan Krah) Date: Thu, 14 Nov 2013 12:12:08 +0000 Subject: [issue19577] memoryview bind (the opposite of release) In-Reply-To: <1384389557.7.0.405119332815.issue19577@psf.upfronthosting.co.za> Message-ID: <1384431128.28.0.40359434453.issue19577@psf.upfronthosting.co.za> Stefan Krah added the comment: You could experiment with multiple freelists, one for each ndim. I'm skeptical however that the gain will be substantial. I've tried freelists for _decimal and the gain was in the order of 2% (not worth it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:12:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 12:12:15 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows In-Reply-To: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> Message-ID: <1384431135.84.0.581948100633.issue19581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Your patch implies that the two only supported OSes are Linux and Windows :-) To be honest I think we should have one single overallocation factor for all OSes. If 50% is ok on Linux too, then let it be 50%. (did you run stringbench to see if it made a difference?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:13:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 12:13:38 +0000 Subject: [issue19577] memoryview bind (the opposite of release) In-Reply-To: <1384389557.7.0.405119332815.issue19577@psf.upfronthosting.co.za> Message-ID: <1384431218.13.0.705900030182.issue19577@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, I also doubt this would actually bring anything significant, which is why I asked for numbers :-) Python creates many objects in a very intensive fashion, and memoryview are not, by far, the most common object type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:28:16 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 14 Nov 2013 12:28:16 +0000 Subject: [issue19446] Integer division for negative numbers In-Reply-To: <1383117496.94.0.70226236706.issue19446@psf.upfronthosting.co.za> Message-ID: <1384432096.54.0.146752218849.issue19446@psf.upfronthosting.co.za> Mark Dickinson added the comment: Nitin: > Is there any operator for integer division in python? Yes, there is: the '//' operator. :-) There's no universally agreed upon definition for 'integer division' when negative numbers enter the mix, but I'm guessing that in this case you need something that rounds towards 0 instead of towards -infinity. There's no dedicated operator for that, but you can simply do (assuming that b is positive): -(-a // b) if a < 0 else a // b References: [1] http://python-history.blogspot.co.uk/2010/08/why-pythons-integer-division-floors.html [2] http://docs.python.org/2/faq/programming.html#why-does-22-10-return-3 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 13:38:39 2013 From: report at bugs.python.org (Stefan Krah) Date: Thu, 14 Nov 2013 12:38:39 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384432719.84.0.851173040201.issue19568@psf.upfronthosting.co.za> Stefan Krah added the comment: > With the patch, the deletion succeeded even if you get a MemoryError. The bytearray object is consistent. It's just that its buffer could be smaller (it wastes memory). I think intuitively I'd expect the object to be unmodified if there is any error. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 14:09:53 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Thu, 14 Nov 2013 13:09:53 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384434593.81.0.562932190296.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: Another script, another test case. Four different tasks are run: subprocess_redirfile: Popen(stdout=file) subprocess_devnull: Popen(stdout=DEVNULL) subprocess_noredirect: Popen() nosubprocess: No Popen() call Judging from the output it looks as if it is the redirection that triggers this behavior. Here's the output from my Win XP computer: Platform: Windows-XP-5.1.2600-SP3 task_type #threads result subprocess_redirfile 2 4 errors subprocess_redirfile 1 OK subprocess_devnull 2 5 errors subprocess_devnull 1 OK subprocess_noredirect 2 OK subprocess_noredirect 1 OK nosubprocess 2 OK nosubprocess 1 OK ---------- Added file: http://bugs.python.org/file32613/testcase3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 14:26:38 2013 From: report at bugs.python.org (adamhj) Date: Thu, 14 Nov 2013 13:26:38 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1384435598.62.0.337865541782.issue9291@psf.upfronthosting.co.za> adamhj added the comment: > The encoding is wrong. We should read the registry using Unicode, or at least use the correct encoding. The correct encoding is the ANSI code page: sys.getfilesystemencoding(). > Can you please try with: default_encoding = sys.getfilesystemencoding() ? This does not work. In fact it doesn't matter what default_encoding is. The variable ctype, which is returned by _winreg.EnumKey(), is a byte string(b'blahblah'), at least on my computer(win2k3sp2, python 2.7.6). Because the interpreter is asked to encode a byte string, it tries to convert the byte string to unicode string first, by calling decode implicitly with 'ascii' encoding, so the exception UnicodeDecodeError. the variable ctype, which is read from registry key name, can be decoded correctly with sys.getfilesystemencoding()(which returns 'mbcs'), but in fact what we need is a byte string, so there should be neither encoding nor decoding here. if there is a case that _winreg.EnumKey() returns unicode string, then a type check should be added before the encode. Or maybe the case is that the return type of _winreg.EnumKey() is different in 2.x and 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 14:32:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 13:32:53 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1384435973.44.0.709234480166.issue16487@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 14:34:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 13:34:58 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384436098.79.0.86430806888.issue19568@psf.upfronthosting.co.za> STINNER Victor added the comment: >> With the patch, the deletion succeeded even if you get a MemoryError. The bytearray object is consistent. It's just that its buffer could be smaller (it wastes memory). >I think intuitively I'd expect the object to be unmodified >if there is any error. It would be possible to have a fully atomic operation, but it would kill performances: you have to allocate a temporary buffer to store the removed bytes. I prefer to not kill performances for a very rare case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 14:36:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 13:36:17 +0000 Subject: [issue19577] memoryview bind (the opposite of release) In-Reply-To: <1384389557.7.0.405119332815.issue19577@psf.upfronthosting.co.za> Message-ID: <1384436177.51.0.784986385208.issue19577@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 14:55:21 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 14 Nov 2013 13:55:21 +0000 Subject: [issue19563] Changing barry's email to barry@python.org In-Reply-To: <1384393489.51.0.093919855886.issue19563@psf.upfronthosting.co.za> Message-ID: <20131114085518.682b17c1@anarchist> Barry A. Warsaw added the comment: On Nov 14, 2013, at 01:44 AM, Antoine Pitrou wrote: >Do we want to cut a new release quickly in order to spread the fix? I am working on a 2.6.10 right now. IMHO this is the only critical security fix to warrant the two digit last version number. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 15:04:15 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Thu, 14 Nov 2013 14:04:15 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384437855.74.0.440413453115.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: Similar result on Windows Server 2008: Platform: Windows-2008ServerR2-6.1.7600 task_type #threads result subprocess_redirfile 2 9 errors subprocess_redirfile 1 OK subprocess_devnull 2 9 errors subprocess_devnull 1 OK subprocess_noredirect 2 OK subprocess_noredirect 1 OK nosubprocess 2 OK nosubprocess 1 OK ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 15:25:12 2013 From: report at bugs.python.org (Stefan Krah) Date: Thu, 14 Nov 2013 14:25:12 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384436098.79.0.86430806888.issue19568@psf.upfronthosting.co.za> Message-ID: <20131114142511.GA17302@sleipnir.bytereef.org> Stefan Krah added the comment: Can you suppress the MemoryError if deletion succeeds? That would be ok IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 15:51:55 2013 From: report at bugs.python.org (Mathieu Dupuy) Date: Thu, 14 Nov 2013 14:51:55 +0000 Subject: [issue19583] time.strftime fails to use %:z time formatter of the underlying C library Message-ID: <1384440715.52.0.843709066707.issue19583@psf.upfronthosting.co.za> New submission from Mathieu Dupuy: function time.strftime fails to use '%:z' time formatter of the underlying library. Passing it does not format time accordingly but returns it as if it was a non-formatting string. Simple reproduction, on Linux: $ date +%:z +01:00 $ python -c 'import time;print time.strftime("%:z")' %:z %z works fine, any of the other middle-colon variant (glibc also have %::z, %:::z) have the same problem. Reproduced with python 2.7 and 3.3 ---------- components: Library (Lib) messages: 202845 nosy: mdupuy priority: normal severity: normal status: open title: time.strftime fails to use %:z time formatter of the underlying C library type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:03:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 15:03:59 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384441439.34.0.677836678024.issue19568@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > With the patch, the deletion succeeded even if you get a MemoryError. The bytearray object is consistent. It's just that its buffer could be smaller (it wastes memory). Yes, but if a MemoryError occurred during slice assignment b[3:6] = b'ab', the bytearray will be not consistent. For consistency we should copy replacement bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:17:49 2013 From: report at bugs.python.org (Mathieu Dupuy) Date: Thu, 14 Nov 2013 15:17:49 +0000 Subject: [issue19583] time.strftime fails to use %:z time formatter of the underlying C library In-Reply-To: <1384440715.52.0.843709066707.issue19583@psf.upfronthosting.co.za> Message-ID: <1384442269.61.0.578013835992.issue19583@psf.upfronthosting.co.za> Mathieu Dupuy added the comment: But in fact "date" was not the right reference to look at, C strftime has exactly the same behaviour than python, so I'm marking this bug as invalid and closing it. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:17:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 15:17:51 +0000 Subject: [issue19583] time.strftime fails to use %:z time formatter of the underlying C library In-Reply-To: <1384440715.52.0.843709066707.issue19583@psf.upfronthosting.co.za> Message-ID: <1384442271.91.0.429541669603.issue19583@psf.upfronthosting.co.za> STINNER Victor added the comment: According to Mathieu on IRC, it's not a bug: date behaves differently than the C function strftime(). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:26:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 15:26:38 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows In-Reply-To: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> Message-ID: <1384442798.77.0.691253218065.issue19581@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Many collections in other programming languages use overallocating rate 100%. Perhaps overallocating rate 12.5% for Python lists is good compromise between speed and memory usage (as far as Python lists have no explicit resize method), but for short-living objects we can use larger overallocating rate. In theory for overallocating rate r long list needs in average O(1/log(1+r)) reallocations and O((r+1)/r) copyings per element. I.e. 50% overallocating rate is 3-3.4 times more efficient than current 12.5% overallocating rate and 100% overallocating rate is 1.5-1.7 times more efficient than 50% overallocating rate (in terms of numbers of reallocations and copyings). I'm interesting what will happened when increase overallocating rate (50% or 100%) for PyAccu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:31:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 15:31:28 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1384443088.53.0.704469523372.issue19513@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And what will be PyAccu vs PyUnicodeWriter comparison when increase PyAccu overallocating rate too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:31:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 15:31:41 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows In-Reply-To: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> Message-ID: <1384443101.88.0.17983296976.issue19581@psf.upfronthosting.co.za> STINNER Victor added the comment: I chose 25% on Linux after some micro-benchmarks on str%args and str.format(args). If the buffer is too large, the final resize (because PyUnicodeObject must have the exact size) is slow. I suppose that realloc() can avoid copying data if the new is is very close, but has to allocate a new memory block and copy data if the new size is higher than a threshold. It's how _PyObject_Realloc() for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:38:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 15:38:25 +0000 Subject: [issue14432] Bug in generator if the generator in created in a temporary C thread In-Reply-To: <1332948868.24.0.309034348776.issue14432@psf.upfronthosting.co.za> Message-ID: <1384443504.99.0.721887676134.issue14432@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 -Python 2.6, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:39:25 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 14 Nov 2013 15:39:25 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384443565.0.0.917111721868.issue19575@psf.upfronthosting.co.za> R. David Murray added the comment: Unfortunately I currently lack a windows environment on which to test this. I've added some people to nosy who might be able to help out with this. ---------- nosy: +gps, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:46:13 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 14 Nov 2013 15:46:13 +0000 Subject: [issue1507224] sys.path issue if sys.prefix contains a colon Message-ID: <1384443973.71.0.0246526611474.issue1507224@psf.upfronthosting.co.za> Ronald Oussoren added the comment: AFAIK this still is a problem, although as Brett mentioned you have to do some work to end up with a non-functional install. I ran into this in the context of py2app, that output of py2app basically contains a "portable" python installation and users can change the value of sys.prefix by dragging the application into a different folder. When applications are launched from a folder whose name contains a colon the application currently does not launch due to this problem. I have no idea yet as to how to cleanly the py2app problem. I'll probably end up with a symlink hack for that ;-( It should be easy enough to provide a patch for 3.5 that uses an array of path elements instead of the raw $PYTHONPATH value, but that requires changes to Python's startup code and I'll probably just try to contribute to Nick's plans to cleanup the APIs for interpreter configuration (PEP 432) instead of providing a patch here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 16:59:03 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 14 Nov 2013 15:59:03 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384444743.2.0.755637471676.issue19575@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I think it's simply due to file descriptor inheritance (files being inherited by other subprocess instance): since Windows can't remove open files, kaboom. It doesn't have anything to do with threads. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 17:04:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 16:04:13 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows In-Reply-To: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> Message-ID: <1384445053.6.0.332478738917.issue19581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Did you find a difference for small strings vs. large strings? ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 17:30:01 2013 From: report at bugs.python.org (Bob Wake) Date: Thu, 14 Nov 2013 16:30:01 +0000 Subject: [issue19584] IDLE fails - Python V2.7.6 - 64b on Win7 64b Message-ID: <1384446600.97.0.293760172402.issue19584@psf.upfronthosting.co.za> New submission from Bob Wake: IDLE won't start on Python 2.7.6, 64 bit running on Windows 7, 64 bit. It crashes in less than 1 second, before opening a window. Python appears to work from the command line. The CPU is a quad core i7 with 8GB memory and 2TB disk space. ---------- components: IDLE messages: 202856 nosy: bob7wake priority: normal severity: normal status: open title: IDLE fails - Python V2.7.6 - 64b on Win7 64b type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 17:41:32 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 16:41:32 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1384443088.53.0.704469523372.issue19513@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/11/14 Serhiy Storchaka : > And what will be PyAccu vs PyUnicodeWriter comparison when increase PyAccu overallocating rate too? PyAccu doesn't use a Unicode buffer, but a list of strings. PyUnicode_Join() is used to compact the list. PyAccu uses an hardcoded limit of 100,000 items before compacting. PyUnicodeWriter has a different design, it gives access to the buffer. So functions like PyUnicode_WRITE() can be used directly. The design allows a little bit optimizations. Example: - s = PyUnicode_FromString("["); - if (s == NULL || _PyAccu_Accumulate(&acc, s)) + if (_PyUnicodeWriter_WriteChar(&writer, '[') < 0) In list_repr(), it shouldn't make a big difference. But it helps me in str%args and str.format(args) to avoid large temporary strings. For example, "%.100s" writes directly padding into the buffer, instead of having to allocate a long string, copy characters, and then destroy the padding string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 17:46:02 2013 From: report at bugs.python.org (Laurent Birtz) Date: Thu, 14 Nov 2013 16:46:02 +0000 Subject: [issue6208] path separator output ignores shell's path separator: / instead of \ In-Reply-To: <1244226110.31.0.876689452852.issue6208@psf.upfronthosting.co.za> Message-ID: <1384447562.69.0.334287274007.issue6208@psf.upfronthosting.co.za> Laurent Birtz added the comment: Thank you for the clarifications on the usage of cmd.exe and shell=True. I tend to forget that the shell support in subprocess isn't just about UNIX. The point of running msys is getting programs to work as if they were in a limited UNIX environment without the emulation layer provided by Cygwin. It's nice if programs unaware of msys work out-of-the-box, but for use cases like mine what is needed is the possibility to write a program that works correctly on msys with a minimum of fuss. Given that, conditionally setting os.dep on program entry and wrapping the calls to cmd.exe manually seems to fit the bill. I haven't tested if SCons plays nice with that change, so I may be in for a disappointment. Even if it doesn't work right, it would still be useful for me to temporarily change os.dep and join my paths correctly until I return control to SCons. On my system, print os.environ["MSYSTEM"] yields MINGW32. That's all I need for detecting msys currently. If that ever break I'll find another method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 17:49:25 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 14 Nov 2013 16:49:25 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384447765.56.0.096190367607.issue19575@psf.upfronthosting.co.za> R. David Murray added the comment: That was my initial thought, too, but the subprocess context manager waits for the subprocess to end, so those file descriptors should be closed by the time the deletion attempt happens, shouldn't they? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 17:51:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 16:51:33 +0000 Subject: [issue14432] Bug in generator if the generator in created in a temporary C thread In-Reply-To: <1384443505.08.0.419660229665.issue14432@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > versions: +Python 3.4 -Python 2.6, Python 3.2 It would be interesting to fix the issue in Python 2.7 and 3.3: generator.patch should fix it and the patch is simple (update frame->f_tstate before each execution of a generator). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 17:59:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 16:59:50 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows In-Reply-To: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> Message-ID: <1384448390.37.0.418017122061.issue19581@psf.upfronthosting.co.za> STINNER Victor added the comment: > Did you find a difference for small strings vs. large strings? When I replaced PyAccu with PyUnicodeWriter for str%args and str.format(args), I ran a lot of benchmarks with short, medium and large strings. See for example: http://bugs.python.org/file25687/REPORT_64BIT_2.7_3.2_writer See issues #14716 and #14744 for old benchmark results. If I remember correctly, this is the script used to run the benchmark: https://bitbucket.org/haypo/misc/src/7c2deb7a37353b41a45564ce6a98e07bbe0c691b/python/bench_str.py The script should be run using: https://bitbucket.org/haypo/misc/src/7c2deb7a37353b41a45564ce6a98e07bbe0c691b/python/benchmark.py?at=default I was concerned by performances on short strings because most calls to str%args are short strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 18:09:30 2013 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Thu, 14 Nov 2013 17:09:30 +0000 Subject: [issue19585] Frame annotation Message-ID: <1384448970.46.0.460613881183.issue19585@psf.upfronthosting.co.za> New submission from Walter D?rwald: This patch adds frame annotations, i.e. it adds an attribute f_annotation to frame objects, a decorator to set this attribute on exceptions and extensions to the traceback machinery that display the annotation in the traceback. ---------- components: Interpreter Core files: frame-annotation.diff hgrepos: 214 keywords: patch messages: 202862 nosy: doerwalter priority: normal severity: normal status: open title: Frame annotation type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file32614/frame-annotation.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 18:27:58 2013 From: report at bugs.python.org (Gregory Salvan) Date: Thu, 14 Nov 2013 17:27:58 +0000 Subject: [issue19586] Remove assertEquals and assert_ deprecation warnings Message-ID: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> New submission from Gregory Salvan: Replace assertEquals by assertEqual and assert_ by assertTrue to remove tests deprecation warning. It's few, but it's a first step to make contributions. ---------- components: Distutils, Distutils2 files: distutil.patch keywords: patch messages: 202863 nosy: Gregory.Salvan, alexis priority: normal severity: normal status: open title: Remove assertEquals and assert_ deprecation warnings type: compile error versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file32615/distutil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 18:29:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 17:29:11 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <1384450150.99.0.399844122137.issue19586@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Remove assertEquals and assert_ deprecation warnings -> distutils: Remove assertEquals and assert_ deprecation warnings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 18:30:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 17:30:05 +0000 Subject: [issue19585] Frame annotation In-Reply-To: <1384448970.46.0.460613881183.issue19585@psf.upfronthosting.co.za> Message-ID: <1384450205.79.0.65153669479.issue19585@psf.upfronthosting.co.za> STINNER Victor added the comment: What is the use case of frame annotations? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 18:32:02 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 14 Nov 2013 17:32:02 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <1384450322.11.0.843424255154.issue19586@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 18:36:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 17:36:06 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1384450566.45.0.65833936511.issue2259@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 18:43:31 2013 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Thu, 14 Nov 2013 17:43:31 +0000 Subject: [issue19585] Frame annotation In-Reply-To: <1384448970.46.0.460613881183.issue19585@psf.upfronthosting.co.za> Message-ID: <1384451011.57.0.628286278608.issue19585@psf.upfronthosting.co.za> Walter D?rwald added the comment: See http://bugs.python.org/issue18861 and the discussion started here: https://mail.python.org/pipermail/python-dev/2013-November/130155.html. Basically it allows to add context information to a traceback without changing the type of the exception. In the following example: import itertools ', '.join(itertools.chain((str(i) for i in range(100)), [42])) the join method itself adds context information to the TypeError: Traceback (most recent call last): File "hurz.py", line 2, in ', '.join(itertools.chain((str(i) for i in range(100)), [42])) TypeError: sequence item 100: expected str instance, int found i.e. the "sequence item 100" is context information. However when the exception occurs higher up in the call chain, no such context information is added: import itertools def foo(x): return str(x+1) ', '.join(foo(x) for x in itertools.chain(range(100), [None])) This gives: Traceback (most recent call last): File "hurz.py", line 6, in ', '.join(foo(x) for x in itertools.chain(range(100), [None])) File "hurz.py", line 6, in ', '.join(foo(x) for x in itertools.chain(range(100), [None])) File "hurz.py", line 4, in foo return str(x+1) TypeError: unsupported operand type(s) for +: 'NoneType' and 'int' With frame annotations the traceback might look like this: Traceback (most recent call last): File "hurz.py", line 6, in ', '.join(foo(x) for x in itertools.chain(range(100), [None])) File "hurz.py", line 6, in : sequence item 100 ', '.join(foo(x) for x in itertools.chain(range(100), [None])) File "hurz.py", line 4, in foo return str(x+1) TypeError: unsupported operand type(s) for +: 'NoneType' and 'int' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 18:47:22 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 17:47:22 +0000 Subject: [issue19587] Remove test_bytes.FixedStringTest Message-ID: <1384451242.84.0.0741219651505.issue19587@psf.upfronthosting.co.za> New submission from Zachary Ware: The attached patch removes test_bytes.FixedStringTest and its subclasses, as they report success when they don't actually test anything at all. ---------- components: Tests files: test_bytes.diff keywords: patch messages: 202866 nosy: serhiy.storchaka, zach.ware priority: normal severity: normal status: open title: Remove test_bytes.FixedStringTest type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32616/test_bytes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:06:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 18:06:31 +0000 Subject: [issue19580] Got resource warning when running test_base_events (test_asyncio) In-Reply-To: <1384416536.42.0.501877379944.issue19580@psf.upfronthosting.co.za> Message-ID: <3dL9cQ4NkJzSpx@mail.python.org> Roundup Robot added the comment: New changeset df50f73f03ca by Guido van Rossum in branch 'default': asyncio: Avoid ResourceWarning. Fix issue 19580 by Vajrasky Kok. http://hg.python.org/cpython/rev/df50f73f03ca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:06:58 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 Nov 2013 18:06:58 +0000 Subject: [issue19580] Got resource warning when running test_base_events (test_asyncio) In-Reply-To: <1384416536.42.0.501877379944.issue19580@psf.upfronthosting.co.za> Message-ID: <1384452418.36.0.407902740642.issue19580@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks for the fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:06:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 18:06:59 +0000 Subject: [issue19587] Remove test_bytes.FixedStringTest In-Reply-To: <1384451242.84.0.0741219651505.issue19587@psf.upfronthosting.co.za> Message-ID: <1384452419.67.0.728641524336.issue19587@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: ByteArrayAsStringTest and BytesAsStringTest inherit tests from test.string_tests.BaseTest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:11:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 18:11:15 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <1384452675.06.0.401221126499.issue19586@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue16510. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:16:36 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 18:16:36 +0000 Subject: [issue19587] Remove test_bytes.FixedStringTest In-Reply-To: <1384451242.84.0.0741219651505.issue19587@psf.upfronthosting.co.za> Message-ID: <1384452995.99.0.765699084766.issue19587@psf.upfronthosting.co.za> Zachary Ware added the comment: So they do, I failed to notice that. New patch just removes the empty test methods. ---------- Added file: http://bugs.python.org/file32617/test_bytes.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:19:49 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 18:19:49 +0000 Subject: [issue19587] Remove empty tests in test_bytes.FixedStringTest In-Reply-To: <1384451242.84.0.0741219651505.issue19587@psf.upfronthosting.co.za> Message-ID: <1384453189.84.0.0516634815554.issue19587@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- title: Remove test_bytes.FixedStringTest -> Remove empty tests in test_bytes.FixedStringTest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:20:05 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 14 Nov 2013 18:20:05 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384453205.8.0.834616105921.issue19575@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Note that on Windows if you redirect the standard streams then *all* inheritable handles are inherited by the child process. Presumably the handle for f_w file object (and/or a duplicate of it) created in one thread is accidentally "leaked" to the other child process. This means that shutil.rmtree() cannot succeed until *both* child processes have exited. PEP 446 might fix this, although there will still be a race condition. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:35:17 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 14 Nov 2013 18:35:17 +0000 Subject: [issue19540] PEP339: Fix link to Zephyr ASDL paper In-Reply-To: <1384113632.77.0.778275071687.issue19540@psf.upfronthosting.co.za> Message-ID: <1384454117.17.0.194635191099.issue19540@psf.upfronthosting.co.za> anatoly techtonik added the comment: It conflicts. =( https://bitbucket.org/rirror/peps/pull-request/1/pep-0339txt-fix-link-to-zephyr-asdl-paper/diff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:39:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 18:39:40 +0000 Subject: [issue19587] Remove empty tests in test_bytes.FixedStringTest In-Reply-To: <1384451242.84.0.0741219651505.issue19587@psf.upfronthosting.co.za> Message-ID: <1384454380.47.0.942062564533.issue19587@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This LGTM, but the purpose of suppressing these tests is not absolutely clear to me. I suppose they were suppressed in times when bytes and batearray had no the lower() and upper() methods and the __contains__() methods accepted only integers. It will be good if developers which touched this code in past will made a review. ---------- nosy: +georg.brandl, nnorwitz stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 19:42:33 2013 From: report at bugs.python.org (Gregory Salvan) Date: Thu, 14 Nov 2013 18:42:33 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <1384454553.67.0.640325021533.issue19586@psf.upfronthosting.co.za> Gregory Salvan added the comment: Do I suggest the patch to issue16510 and close this one ? ---------- components: +Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 20:24:29 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Thu, 14 Nov 2013 19:24:29 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384457069.74.0.420814664953.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: @neologix: How can it not have anything to do with threads? - It always works with max_workers == 1 - When max_workers == 2, shutil.rmtree sometimes fails ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 20:42:01 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Thu, 14 Nov 2013 19:42:01 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384458121.15.0.366016974871.issue19575@psf.upfronthosting.co.za> Changes by Bernt R?skar Brenna : ---------- nosy: +astrand _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 20:43:41 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 14 Nov 2013 19:43:41 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384457069.74.0.420814664953.issue19575@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Bernt R?skar Brenna added the comment: > > @neologix: How can it not have anything to do with threads? > > - It always works with max_workers == 1 > - When max_workers == 2, shutil.rmtree sometimes fails It has nothing to do with threads. You could reproduce it by opening your files, spawning two child processes, wait until the first one returns, and then try to remove the files used by the first subprocess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:29:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:29:10 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <1384460950.45.0.534936616553.issue19586@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No. Issue16510 enhances tests while your patch fixes bugs. LGTM. ---------- stage: -> commit review type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:34:48 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 20:34:48 +0000 Subject: [issue19588] Silently skipped test in test_random Message-ID: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> New submission from Zachary Ware: See: http://hg.python.org/cpython/file/87099/Lib/test/test_random.py#l241 This test (and its match in MersenneTwister_TestBasicOps) is nearly always skipped by the 'if stop <= start: return' check; in a test with adding "print('skipped', i)" before the return and running test_random via regrtest with -F, i was 40 when the test returned about 21 out of 25 times. It seems to have been this way since the test was added. Was this intended? It looks to me like perhaps the start and stop assignments are swapped; Serhiy suggested that perhaps stop was meant to have been added to start. How is this test meant to work? ---------- components: Tests messages: 202879 nosy: rhettinger, serhiy.storchaka, zach.ware priority: normal severity: normal status: open title: Silently skipped test in test_random type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:40:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:40:50 +0000 Subject: [issue19589] Use specific asserts in test_asyncio Message-ID: <1384461650.67.0.185273921474.issue19589@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes test_asyncio use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_asyncio_asserts.patch keywords: patch messages: 202880 nosy: gvanrossum, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in test_asyncio type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32618/test_asyncio_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:41:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:41:40 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384461700.06.0.127764179192.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Use specific asserts in test_asyncio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:44:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:44:02 +0000 Subject: [issue19590] Use specific asserts in test_email Message-ID: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes test_email use more specific asserts. This will provide more useful failure report. ---------- components: Tests, email files: test_email_asserts.patch keywords: patch messages: 202881 nosy: barry, r.david.murray, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in test_email type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32619/test_email_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:45:21 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 14 Nov 2013 20:45:21 +0000 Subject: [issue19589] Use specific asserts in test_asyncio In-Reply-To: <1384461650.67.0.185273921474.issue19589@psf.upfronthosting.co.za> Message-ID: <1384461921.9.0.449314796126.issue19589@psf.upfronthosting.co.za> Guido van Rossum added the comment: Looks good -- please commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:46:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:46:27 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384461987.17.0.691936877908.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Use specific asserts in test_email _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:49:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:49:52 +0000 Subject: [issue19591] Use specific asserts in ctype tests Message-ID: <1384462192.45.0.696464665582.issue19591@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the ctypes package tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests, ctypes files: test_ctypes_asserts.patch keywords: patch messages: 202883 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in ctype tests type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32620/test_ctypes_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:50:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:50:27 +0000 Subject: [issue19591] Use specific asserts in ctype tests In-Reply-To: <1384462192.45.0.696464665582.issue19591@psf.upfronthosting.co.za> Message-ID: <1384462227.76.0.877279206202.issue19591@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:53:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:53:52 +0000 Subject: [issue19592] Use specific asserts in lib2to3 tests Message-ID: <1384462432.63.0.387609657134.issue19592@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the lib2to3 package tests use more specific asserts. This will provide more useful failure report. ---------- components: 2to3 (2.x to 3.x conversion tool), Tests files: test_lib2to3_asserts.patch keywords: patch messages: 202884 nosy: benjamin.peterson, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in lib2to3 tests type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32621/test_lib2to3_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:56:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:56:23 +0000 Subject: [issue19593] Use specific asserts in importlib tests Message-ID: <1384462583.85.0.490812724335.issue19593@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the importlib package tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_importlib_asserts.patch keywords: patch messages: 202885 nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in importlib tests type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32622/test_importlib_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 21:58:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 20:58:30 +0000 Subject: [issue19594] Use specific asserts in unittest tests Message-ID: <1384462710.0.0.524948910788.issue19594@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the unittest package tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_unittest_asserts.patch keywords: patch messages: 202886 nosy: ezio.melotti, michael.foord, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in unittest tests type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32623/test_unittest_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:00:56 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 21:00:56 +0000 Subject: [issue19595] Silently skipped test in test_winsound Message-ID: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> New submission from Zachary Ware: In test_winsound, PlaySoundTest.test_alias_fallback has been commented out for quite some time but has been reported as 'ok' ever since. Does anyone know what the current status of the test is? Should it still be skipped (explicitly)? Should it be marked as an expected failure? Would it be dangerous to enable? My own testing shows it to be harmless on my machine, but my range of test configurations is sorely limited at present. My own suggestion is to mark it as an expected failure (or just enable it wholesale, and mark it if it does prove flaky) and see what the buildbots make of it, but I don't want to do that if it could cause anything worse than an exception. Thoughts? ---------- components: Tests, Windows messages: 202887 nosy: brian.curtin, serhiy.storchaka, tim.golden, zach.ware priority: normal severity: normal status: open title: Silently skipped test in test_winsound type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:02:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 21:02:18 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384462938.06.0.116912083084.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Use specific asserts in ctype tests, Use specific asserts in importlib tests, Use specific asserts in lib2to3 tests, Use specific asserts in unittest tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:11:27 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 14 Nov 2013 21:11:27 +0000 Subject: [issue19592] Use specific asserts in lib2to3 tests In-Reply-To: <1384462432.63.0.387609657134.issue19592@psf.upfronthosting.co.za> Message-ID: <1384463487.73.0.813863070187.issue19592@psf.upfronthosting.co.za> Benjamin Peterson added the comment: lgtm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:11:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 21:11:34 +0000 Subject: [issue19589] Use specific asserts in test_asyncio In-Reply-To: <1384461650.67.0.185273921474.issue19589@psf.upfronthosting.co.za> Message-ID: <3dLFjx4C7fzNmK@mail.python.org> Roundup Robot added the comment: New changeset 7e00bdada290 by Serhiy Storchaka in branch 'default': Issue #19589: Use specific asserts in asyncio tests. http://hg.python.org/cpython/rev/7e00bdada290 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:12:22 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 21:12:22 +0000 Subject: [issue19596] Silently skipped tests in test_importlib Message-ID: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> New submission from Zachary Ware: Several tests in test_importlib are skipped by way of the test method consisting of a comment and a 'pass' statement. The attached patch makes the skips explicit, using the removed comment as the reason. Ideally these skipped tests should be removed from being 'tested' at all, since most of them are impossible to test, but I'm not sure how easy that would be to do. ---------- components: Tests files: skipped_importlib_tests.diff keywords: patch messages: 202890 nosy: brett.cannon, serhiy.storchaka, zach.ware priority: normal severity: normal stage: patch review status: open title: Silently skipped tests in test_importlib type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32624/skipped_importlib_tests.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:12:48 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 21:12:48 +0000 Subject: [issue19595] Silently skipped test in test_winsound In-Reply-To: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> Message-ID: <1384463568.79.0.27675455381.issue19595@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:13:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 21:13:14 +0000 Subject: [issue19592] Use specific asserts in lib2to3 tests In-Reply-To: <1384462432.63.0.387609657134.issue19592@psf.upfronthosting.co.za> Message-ID: <1384463594.64.0.476032013783.issue19592@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Should the patch be applied in maintenance releases? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:13:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 21:13:45 +0000 Subject: [issue19589] Use specific asserts in test_asyncio In-Reply-To: <1384461650.67.0.185273921474.issue19589@psf.upfronthosting.co.za> Message-ID: <1384463625.71.0.334032002159.issue19589@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Done. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:16:30 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 14 Nov 2013 21:16:30 +0000 Subject: [issue19592] Use specific asserts in lib2to3 tests In-Reply-To: <1384463594.64.0.476032013783.issue19592@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: If you want. 2013/11/14 Serhiy Storchaka : > > Serhiy Storchaka added the comment: > > Should the patch be applied in maintenance releases? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:23:01 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Thu, 14 Nov 2013 21:23:01 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384464181.24.0.578110215396.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: @neologix: But how do you explain this: subprocess_devnull 2 9 errors subprocess_devnull 1 OK subprocess_devnull creates a file, then starts a subprocess (that redirects to DEVNULL, does not use the file), then tries to remove the directory containing the file. When running in parallel, it fails. subprocess_noredirect 2 OK subprocess_noredirect 1 OK subprocess_noredirect creates a file, then starts a subprocess (that does not use the file), then tries to remove the directory containing the file. When running in parallel, it does not fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:38:03 2013 From: report at bugs.python.org (Tim Peters) Date: Thu, 14 Nov 2013 21:38:03 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1384465083.64.0.643675003734.issue19588@psf.upfronthosting.co.za> Tim Peters added the comment: Nice catch! That's insane. `start` and `stop` should indeed be swapped, *and* the `return` should be `continue`. I didn't write the test, but these things are obvious to my eyeballs ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:40:29 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 14 Nov 2013 21:40:29 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384465229.04.0.236995788364.issue19575@psf.upfronthosting.co.za> R. David Murray added the comment: neologix noted that *when redirection is used* the way that *all* windows file handles are inherited changes. But that's about the end of *my* understanding of the issue :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:44:27 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 14 Nov 2013 21:44:27 +0000 Subject: [issue19595] Silently skipped test in test_winsound In-Reply-To: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> Message-ID: <1384465467.04.0.730542948669.issue19595@psf.upfronthosting.co.za> R. David Murray added the comment: I believe that expected failure will give an error report if the test succeeds. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:51:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 21:51:07 +0000 Subject: [issue19592] Use specific asserts in lib2to3 tests In-Reply-To: <1384462432.63.0.387609657134.issue19592@psf.upfronthosting.co.za> Message-ID: <3dLGbZ4Q2Fz7LjY@mail.python.org> Roundup Robot added the comment: New changeset c178d72e2f84 by Serhiy Storchaka in branch '2.7': Issue #19592: Use specific asserts in lib2to3 tests. http://hg.python.org/cpython/rev/c178d72e2f84 New changeset 46fc4fb2c8c5 by Serhiy Storchaka in branch '3.3': Issue #19592: Use specific asserts in lib2to3 tests. http://hg.python.org/cpython/rev/46fc4fb2c8c5 New changeset 1b9d8be8b07e by Serhiy Storchaka in branch 'default': Issue #19592: Use specific asserts in lib2to3 tests. http://hg.python.org/cpython/rev/1b9d8be8b07e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:55:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 21:55:14 +0000 Subject: [issue19592] Use specific asserts in lib2to3 tests In-Reply-To: <1384462432.63.0.387609657134.issue19592@psf.upfronthosting.co.za> Message-ID: <1384466114.29.0.845135010132.issue19592@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It will be easier to backport fixes if tests are consistent. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:56:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 21:56:32 +0000 Subject: [issue19429] OSError constructor does not handle errors correctly In-Reply-To: <1383011006.26.0.841503225462.issue19429@psf.upfronthosting.co.za> Message-ID: <3dLGjr12l9z7Ln4@mail.python.org> Roundup Robot added the comment: New changeset 61a712066770 by Victor Stinner in branch 'default': Issue #19429, #19437: fix error handling in the OSError constructor http://hg.python.org/cpython/rev/61a712066770 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:56:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Nov 2013 21:56:33 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3dLGjr6LNYz7Lmg@mail.python.org> Roundup Robot added the comment: New changeset c9efe992e9b2 by Victor Stinner in branch 'default': Issue #19437: Fix parse_save_field() of the csv module, handle PyList_Append() http://hg.python.org/cpython/rev/c9efe992e9b2 New changeset 98ac18544722 by Victor Stinner in branch 'default': Issue #19437: Fix parse_envlist() of the posix/nt module, don't call http://hg.python.org/cpython/rev/98ac18544722 New changeset 61a712066770 by Victor Stinner in branch 'default': Issue #19429, #19437: fix error handling in the OSError constructor http://hg.python.org/cpython/rev/61a712066770 New changeset f7d401eaee0e by Victor Stinner in branch 'default': Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject() http://hg.python.org/cpython/rev/f7d401eaee0e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:56:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Nov 2013 21:56:56 +0000 Subject: [issue19585] Frame annotation In-Reply-To: <1384448970.46.0.460613881183.issue19585@psf.upfronthosting.co.za> Message-ID: <1384466216.97.0.666610580919.issue19585@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think this would need a PEP. ---------- nosy: +ncoghlan, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 22:59:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 21:59:38 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384466378.22.0.522001387373.issue19596@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I use `test_spam = None` to skip the test in a subclass and remove it from the report. The question is which of these tests should be removed because they are senseless in specified subclass and which of them are just not implemented yet and should be reported in the report for reminder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 23:01:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 14 Nov 2013 22:01:06 +0000 Subject: [issue19429] OSError constructor does not handle errors correctly In-Reply-To: <1383011006.26.0.841503225462.issue19429@psf.upfronthosting.co.za> Message-ID: <1384466466.8.0.47139672383.issue19429@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 23:01:58 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 22:01:58 +0000 Subject: [issue19595] Silently skipped test in test_winsound In-Reply-To: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> Message-ID: <1384466518.67.0.542692553347.issue19595@psf.upfronthosting.co.za> Zachary Ware added the comment: It doesn't appear to; at least on 3.4 an unexpected success is silently ignored by regrtest in non-verbose mode and added to the report in verbose mode (e.g., "OK (skipped=1, unexpected successes=1)") or when run alone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 23:02:54 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 14 Nov 2013 22:02:54 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <1384466574.24.0.395050190565.issue19590@psf.upfronthosting.co.za> R. David Murray added the comment: Looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 23:05:55 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 22:05:55 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384466755.93.0.209518978572.issue19572@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a new patch to address the reviews from Serhiy and Ezio (thanks to you both!). ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file32625/skiptest_not_return_or_pass.v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 23:33:12 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 14 Nov 2013 22:33:12 +0000 Subject: [issue19597] Add decorator for tests not yet implemented Message-ID: <1384468392.3.0.701563221168.issue19597@psf.upfronthosting.co.za> New submission from Zachary Ware: Some tests in the test suite are not implemented for one reason or another, and most of these are defined simply as "def test_thats_not_implemented(self): pass", possibly with a comment meant to be a reminder to implement it. This patch adds a decorator to test.support which turns the non-test into an expected failure with a docstring. This means that when run in verbose mode, instead of showing: """ test_thats_not_implemented (test.test_sometest.TestClass) ... ok """ it will instead show: """ Not Implemented: TestClass.test_thats_not_implemented ... expected failure """ This should make it more obvious that such a test needs some work. The patch also applies the decorator in test_minidom as an example; there are a few other places that could use it as well. ---------- components: Tests files: support.not_implemented.diff keywords: patch messages: 202907 nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka, zach.ware priority: normal severity: normal stage: patch review status: open title: Add decorator for tests not yet implemented type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32626/support.not_implemented.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 23:37:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 14 Nov 2013 22:37:25 +0000 Subject: [issue19585] Frame annotation In-Reply-To: <1384466216.97.0.666610580919.issue19585@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Aye, it would. The improved exception chaining and frame hiding ideas in issue 18861 are also related. The part I particularly like in Walter's suggestion is the idea of a "frame description" that is displayed in the traceback for that frame, without the traceback module needing to know the details of other annotations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 14 23:38:59 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 14 Nov 2013 22:38:59 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384468739.96.0.185020478235.issue16510@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think there are two counterargument to leaving things alone. 1. The reason for the specialized checks is to change behavior when the test fails, to give more informative error messages. So the change is not purely cosmetic or stylistic. I believe there was a recent case where assertTrue(a == b), a and b strings, had to be changed to assertEqual(a, b) to find out why the assert failed. As I remember, nothing else in the test file obviously needed changing and it would not have been touched otherwise. 2. People adding tests may not review existing tests for modernization. That said, it *is* possible to ignore 2. and not worry about 1. until a test fails. And I agree that the original patch is too much to review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 00:21:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 23:21:37 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <1384471297.54.0.137705591499.issue19590@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is larger patch (some asserts were aliased). It is applicable to 3.3 too. ---------- versions: +Python 3.3 Added file: http://bugs.python.org/file32627/test_email_asserts_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 00:23:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 14 Nov 2013 23:23:07 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <1384471387.95.0.122418098228.issue19590@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And here is a patch for 2.7. ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file32628/test_email_asserts_2-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 01:04:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 00:04:29 +0000 Subject: [issue19580] Got resource warning when running test_base_events (test_asyncio) In-Reply-To: <1384416536.42.0.501877379944.issue19580@psf.upfronthosting.co.za> Message-ID: <1384473869.68.0.737923363548.issue19580@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 01:47:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 00:47:29 +0000 Subject: [issue19466] Clear state of threads earlier in Python shutdown In-Reply-To: <1383262786.4.0.00831923947445.issue19466@psf.upfronthosting.co.za> Message-ID: <1384476449.25.0.0898541898953.issue19466@psf.upfronthosting.co.za> STINNER Victor added the comment: The fix raised a new issue: #19565. I also saw a crash on Windows which is probably related: http://buildbot.python.org/all/builders/x86 Windows Server 2003 [SB] 3.x/builds/1717/steps/test/logs/stdio ====================================================================== FAIL: test_4_daemon_threads (test.test_threading.ThreadJoinOnShutdown) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\test_threading.py", line 783, in test_4_daemon_threads rc, out, err = assert_python_ok('-c', script) File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\script_helper.py", line 69, in assert_python_ok return _assert_python(True, *args, **env_vars) File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\script_helper.py", line 55, in _assert_python "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore'))) AssertionError: Process return code is 3221225477, stderr follows: ---------------------------------------------------------------------- ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 01:55:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 00:55:57 +0000 Subject: [issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests Message-ID: <1384476957.48.0.494965760116.issue19598@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7528/steps/test/logs/stdio ... test_popen (test.test_asyncio.test_windows_utils.PopenTests) ... FAIL test_winsocketpair (test.test_asyncio.test_windows_utils.WinsocketpairTests) ... ok test_winsocketpair_exc (test.test_asyncio.test_windows_utils.WinsocketpairTests) ... ok ====================================================================== FAIL: test_popen (test.test_asyncio.test_windows_utils.PopenTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_windows_utils.py", line 123, in test_popen self.assertEqual(res, _winapi.WAIT_OBJECT_0) AssertionError: 258 != 0 ---------------------------------------------------------------------- 258 is the Windows error code for timeout: WAIT_TIMEOUT. The timeout of 2 seconds if maybe too short for busy and slow Windows buildbots? ---------- messages: 202913 nosy: gvanrossum, haypo priority: normal severity: normal status: open title: Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 02:01:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 01:01:20 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised Message-ID: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/1716/steps/test/logs/stdio and http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7529/steps/test/logs/stdio ====================================================================== FAIL: test_async_timeout (test.test_multiprocessing_spawn.WithManagerTestPool) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\_test_multiprocessing.py", line 1726, in test_async_timeout self.assertRaises(multiprocessing.TimeoutError, get, timeout=TIMEOUT2) AssertionError: TimeoutError not raised by ---------- components: Tests messages: 202914 nosy: haypo, sbt priority: normal severity: normal status: open title: Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 02:06:41 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 15 Nov 2013 01:06:41 +0000 Subject: [issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests In-Reply-To: <1384476957.48.0.494965760116.issue19598@psf.upfronthosting.co.za> Message-ID: <1384477601.62.0.102497401085.issue19598@psf.upfronthosting.co.za> Guido van Rossum added the comment: Likely. Can you suggest a fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 04:38:47 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 15 Nov 2013 03:38:47 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384486727.82.0.568142156413.issue19553@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 05:06:19 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 15 Nov 2013 04:06:19 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <1384488379.81.0.8439613866.issue19590@psf.upfronthosting.co.za> R. David Murray added the comment: Any chance of getting a patch with the just the added changes? I'd rather not fish through the stuff I've already looked at looking for the new stuff. I'm of two minds about the advisability of backporting this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 05:47:47 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 15 Nov 2013 04:47:47 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384490867.64.0.360473202784.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: FYI, as of cc7ebd952777 the bulk of the implementation in features/pep-451 is working. There is a failing test on the Windows Server 2003 buildbot (which I'm trying to track down). I haven't been able to reproduce the failure on other buildbots, on my local Ubuntu 12.10 workstation, or on my local Windows laptop. See http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%20custom/builds/30/steps/test/logs/stdio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 05:50:57 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 15 Nov 2013 04:50:57 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384491057.07.0.672144450269.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Cool. Roundup linked the revision hash to the feature clone. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 06:24:01 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 15 Nov 2013 05:24:01 +0000 Subject: [issue19597] Add decorator for tests not yet implemented In-Reply-To: <1384468392.3.0.701563221168.issue19597@psf.upfronthosting.co.za> Message-ID: <1384493041.39.0.171377623117.issue19597@psf.upfronthosting.co.za> Zachary Ware added the comment: This patch takes the idea a little further, adding a command line option to regrtest, '--failnoimpl' (it could use a better name). With this option specified any test decorated by support.not_implemented will not be marked as an expected failure, allowing the NotImplementedError exception to fail the test. The default under regrtest is to expect the failure, but the default for running a test file directly is to fail loudly. The idea is just to make it more obvious when a test is just in need of implementation, and could make it easier for new contributors to find something that needs doing. ---------- Added file: http://bugs.python.org/file32629/support.not_implemented.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 07:53:41 2013 From: report at bugs.python.org (mpb) Date: Fri, 15 Nov 2013 06:53:41 +0000 Subject: [issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior In-Reply-To: <1383969468.97.0.110285365425.issue19530@psf.upfronthosting.co.za> Message-ID: <1384498421.85.0.820069656679.issue19530@psf.upfronthosting.co.za> mpb added the comment: Someone wrote a kernel patch based on my bug report. http://www.spinics.net/lists/netdev/msg257653.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 07:55:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 06:55:40 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <1384498540.67.0.632882604866.issue19590@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which includes only added changes. Such small and straightforward changes are easier to review by looking at colorized `hg diff` output. ---------- Added file: http://bugs.python.org/file32630/test_email_asserts_2_diff.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 09:06:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 08:06:48 +0000 Subject: [issue19600] Use specific asserts in distutils tests Message-ID: <1384502808.59.0.591173639176.issue19600@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the distutils package tests use more specific asserts. This will provide more useful failure report. ---------- components: Distutils files: test_distutils_asserts.patch keywords: patch messages: 202922 nosy: eric.araujo, serhiy.storchaka, tarek priority: normal severity: normal stage: patch review status: open title: Use specific asserts in distutils tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32631/test_distutils_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 09:08:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 08:08:31 +0000 Subject: [issue19601] Use specific asserts in sqlite3 tests Message-ID: <1384502911.7.0.613780921305.issue19601@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the sqlite3 package tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_sqlite3_asserts.patch keywords: patch messages: 202923 nosy: ghaering, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in sqlite3 tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32632/test_sqlite3_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 09:09:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 08:09:59 +0000 Subject: [issue19602] Use specific asserts in tkinter tests Message-ID: <1384502999.03.0.730675393841.issue19602@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the tkinter package tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests, Tkinter files: test_tkinter_asserts.patch keywords: patch messages: 202924 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in tkinter tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32633/test_tkinter_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 09:12:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 08:12:08 +0000 Subject: [issue19603] Use specific asserts in test_decr Message-ID: <1384503127.94.0.904619557147.issue19603@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes test_descr use more specific asserts. This will provide more useful failure report. This is the largest patch in the series. ---------- components: Tests messages: 202925 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in test_decr type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 09:14:53 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 15 Nov 2013 08:14:53 +0000 Subject: [issue19493] Report skipped ctypes tests as skipped In-Reply-To: <1383569878.45.0.454771857446.issue19493@psf.upfronthosting.co.za> Message-ID: <1384503293.13.0.33598443591.issue19493@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a patch. It turned out to be much more extensive than I expected, and the diff turned into a huge huge ugly monster that I hope Rietveld can help to make sense of, since the majority of the diff is simply changes in indentation level. The most major change of this patch is the addition of a "needs_symbol" decorator to ctypes.test.__init__, which is then used throughout the tests. Pre-patch, the tests are littered with constructs like this: """ class TestSomething(unittest.TestCase): try: c_wchar except NameError: pass else: def test_something_using_c_wchar(self): ... """ These have all (I think) been simplified to: """ class TestSomething(unittest.TestCase): @needs_symbol('c_wchar') def test_something_using_c_wchar(self): ... """ There are also several instances of tests guarded by "if sys.platform = 'win32':" or similar, which have been turned into @unittest.skipUnless, and several tests which were commented out which have been uncommented and given unconditional skips. On my Gentoo machine at home, the patch takes the ctypes test suite from 348 tests with 1 skip to 422 tests with 78 skips. ---------- Added file: http://bugs.python.org/file32634/skip_tests_ctypes.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 09:14:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 08:14:58 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384503298.16.0.0325943233323.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Use specific asserts in distutils tests, Use specific asserts in sqlite3 tests, Use specific asserts in test_decr, Use specific asserts in tkinter tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 10:47:09 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 15 Nov 2013 09:47:09 +0000 Subject: [issue12853] global name 'r' is not defined in upload.py In-Reply-To: <1314637700.16.0.440169429003.issue12853@psf.upfronthosting.co.za> Message-ID: <1384508829.88.0.335200004041.issue12853@psf.upfronthosting.co.za> Berker Peksag added the comment: This is fixed in 3.3 and 3.4 by changeset http://hg.python.org/cpython/rev/5e98c4e9c909#l1.89. I can still reproduce the NameError in 2.7: http://hg.python.org/cpython/file/2.7/Lib/distutils/command/upload.py#l180 ---------- nosy: +berker.peksag, jason.coombs versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 10:47:58 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 15 Nov 2013 09:47:58 +0000 Subject: [issue17354] TypeError when running setup.py upload --show-response In-Reply-To: <1362477390.5.0.0948217479976.issue17354@psf.upfronthosting.co.za> Message-ID: <1384508878.82.0.135740414436.issue17354@psf.upfronthosting.co.za> Berker Peksag added the comment: Oh, I was wrong. This is not a duplicate of issue 12853 (but they are related). Also, the patch in issue 19226 is looks better to me. ---------- nosy: +jason.coombs, labrat resolution: duplicate -> stage: committed/rejected -> patch review status: closed -> open superseder: global name 'r' is not defined in upload.py -> versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 10:51:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 09:51:29 +0000 Subject: [issue19604] Use specific asserts in array tests Message-ID: <1384509089.55.0.263530897465.issue19604@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the array module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_array_asserts.patch keywords: patch messages: 202929 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in array tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32635/test_array_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 10:53:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 09:53:35 +0000 Subject: [issue19605] Use specific asserts in datetime tests Message-ID: <1384509215.73.0.873700234251.issue19605@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the datetime module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_datetime_asserts.patch keywords: patch messages: 202930 nosy: belopolsky, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in datetime tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32636/test_datetime_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 10:55:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 09:55:20 +0000 Subject: [issue19606] Use specific asserts in http.cookiejar tests Message-ID: <1384509320.61.0.0425135546952.issue19606@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the http.cookiejar module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_http_cookiejar_asserts.patch keywords: patch messages: 202931 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in http.cookiejar tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32637/test_http_cookiejar_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 10:57:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 09:57:17 +0000 Subject: [issue19607] Use specific asserts in weakref tests Message-ID: <1384509437.64.0.236253006497.issue19607@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the weakref module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_weakref_asserts.patch keywords: patch messages: 202932 nosy: fdrake, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in weakref tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32638/test_weakref_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 10:57:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 09:57:58 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384509478.14.0.878661513882.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Use specific asserts in array tests, Use specific asserts in datetime tests, Use specific asserts in http.cookiejar tests, Use specific asserts in weakref tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 11:13:10 2013 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 15 Nov 2013 10:13:10 +0000 Subject: [issue19608] devguide needs pictures Message-ID: <1384510390.93.0.961404476169.issue19608@psf.upfronthosting.co.za> New submission from anatoly techtonik: http://docs.python.org/devguide/ it covers pretty much complicated stuff, which takes a lot of time to grasp. Pictures help to save hours if not weeks. There needs to be some immediate intro picture at the top of front page illustrating transformation of Python code through the toolchain to machine execution instructions. ---------- components: Devguide messages: 202933 nosy: ezio.melotti, techtonik priority: normal severity: normal status: open title: devguide needs pictures _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 11:23:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 10:23:45 +0000 Subject: [issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests In-Reply-To: <1384477601.62.0.102497401085.issue19598@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Likely. Can you suggest a fix? Replace the timeout of 2 seconds with a timeout of 10 seconds. It looks like the test checks the overlapped I/O API, not the timing. If you want to test exactly the timing, another test is needed (ex: measure the elapsed time and then ensure that the time is in a range). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:01:17 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 15 Nov 2013 11:01:17 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1384513277.3.0.0350999087069.issue17810@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file32639/f87b455af573.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:05:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 11:05:34 +0000 Subject: [issue19608] devguide needs pictures In-Reply-To: <1384510390.93.0.961404476169.issue19608@psf.upfronthosting.co.za> Message-ID: <1384513534.83.0.818080845789.issue19608@psf.upfronthosting.co.za> Nick Coghlan added the comment: Feel free to draw some and send a patch. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:07:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 11:07:12 +0000 Subject: [issue19593] Use specific asserts in importlib tests In-Reply-To: <1384462583.85.0.490812724335.issue19593@psf.upfronthosting.co.za> Message-ID: <1384513632.11.0.849029219958.issue19593@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adding a dependency on the PEP 451 implementation - we should merge that first to ensure it doesn't encounter any conflicts. ---------- dependencies: +Implementation for PEP 451 (importlib.machinery.ModuleSpec) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:09:08 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 15 Nov 2013 11:09:08 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1384513748.29.0.78595064813.issue17810@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file32640/8434af450da0.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:10:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 11:10:29 +0000 Subject: [issue19609] Codec exception chaining shouldn't cover the initial codec lookup Message-ID: <1384513829.85.0.540008765744.issue19609@psf.upfronthosting.co.za> New submission from Nick Coghlan: The exception chaining from issue 17828 is triggering for the initial codec lookup. This is less than helpful: ==================== Failed example: str(result) Expected: Traceback (most recent call last): ... LookupError: unknown encoding: UCS4 Got: LookupError: unknown encoding: UCS4 The above exception was the direct cause of the following exception: Traceback (most recent call last): File ".../py3km/python/lib/python3.4/doctest.py", line 1291, in __run compileflags, 1), test.globs) File "", line 1, in str(result) File "xslt.pxi", line 727, in lxml.etree._XSLTResultTree.__str__ (src/lxml/lxml.etree.c:143584) File "xslt.pxi", line 750, in lxml.etree._XSLTResultTree.__unicode__ (src/lxml/lxml.etree.c:143853) LookupError: decoding with 'UCS4' codec failed (LookupError: unknown encoding: UCS4) ==================== ---------- assignee: ncoghlan messages: 202937 nosy: ncoghlan priority: normal severity: normal status: open title: Codec exception chaining shouldn't cover the initial codec lookup versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:11:21 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 15 Nov 2013 11:11:21 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1384513881.2.0.861208513829.issue17810@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file32639/f87b455af573.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:24:52 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 15 Nov 2013 11:24:52 +0000 Subject: [issue19610] TypeError in distutils.command.upload Message-ID: <1384514692.62.0.115546674646.issue19610@psf.upfronthosting.co.za> New submission from Berker Peksag: Python 3.4: $ ../cpython/./python setup.py sdist upload -r test --show-response ... ... Traceback (most recent call last): File "setup.py", line 24, in 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', File "/home/berker/projects/cpython/Lib/distutils/core.py", line 148, in setup dist.run_commands() File "/home/berker/projects/cpython/Lib/distutils/dist.py", line 930, in run_commands self.run_command(cmd) File "/home/berker/projects/cpython/Lib/distutils/dist.py", line 949, in run_command cmd_obj.run() File "/home/berker/projects/cpython/Lib/distutils/command/upload.py", line 65, in run self.upload_file(command, pyversion, filename) File "/home/berker/projects/cpython/Lib/distutils/command/upload.py", line 165, in upload_file body.write(value) TypeError: 'str' does not support the buffer interface Python 3.3: $ python3.3 setup.py sdist upload -r test --show-response ... ... Traceback (most recent call last): File "setup.py", line 24, in 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', File "/usr/local/lib/python3.3/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/lib/python3.3/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/usr/local/lib/python3.3/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/usr/local/lib/python3.3/distutils/command/upload.py", line 66, in run self.upload_file(command, pyversion, filename) File "/usr/local/lib/python3.3/distutils/command/upload.py", line 155, in upload_file body.write(value) TypeError: 'str' does not support the buffer interface I also attached my setup.py. ---------- components: Distutils files: setup.py messages: 202938 nosy: berker.peksag priority: normal severity: normal stage: patch review status: open title: TypeError in distutils.command.upload type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32641/setup.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:25:13 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 15 Nov 2013 11:25:13 +0000 Subject: [issue19610] TypeError in distutils.command.upload In-Reply-To: <1384514692.62.0.115546674646.issue19610@psf.upfronthosting.co.za> Message-ID: <1384514713.48.0.327689177127.issue19610@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +patch Added file: http://bugs.python.org/file32642/fix-upload-cmd.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:26:58 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 15 Nov 2013 11:26:58 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1384514818.51.0.725299366707.issue17810@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Hi folks, I consider my implementation of PEP-3154 mostly feature complete at this point. I still have a few things left to do. For example, I need to update the documentation about the new protocol. However, these can mostly be done along the review process. Plus, I definitely prefer getting feedback sooner. :-) Please review at: http://bugs.python.org/review/17810/ Thanks! ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:50:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 11:50:14 +0000 Subject: [issue19609] Codec exception chaining shouldn't cover the initial codec lookup In-Reply-To: <1384513829.85.0.540008765744.issue19609@psf.upfronthosting.co.za> Message-ID: <1384516214.61.0.419600249103.issue19609@psf.upfronthosting.co.za> Nick Coghlan added the comment: Fixed by narrowing the scope of the chaining in http://hg.python.org/cpython/rev/4ea622c085ca ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:51:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 11:51:22 +0000 Subject: [issue19610] TypeError in distutils.command.upload In-Reply-To: <1384514692.62.0.115546674646.issue19610@psf.upfronthosting.co.za> Message-ID: <1384516282.86.0.87852383302.issue19610@psf.upfronthosting.co.za> STINNER Victor added the comment: I never undersood why, but classifiers must be a list, not a tuple. This is a bug in my opinion. upload.upload_file() doesn't check if the tuple contains exactly 2 items. If the value is a tuple, it doesn't encode the value. This is another bug. I don't know in which cases a value should be a (key, value) tuple. ---------- nosy: +eric.araujo, haypo, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:52:37 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 11:52:37 +0000 Subject: [issue19551] PEP 453: Mac OS X installer integration In-Reply-To: <1384166095.93.0.842869053252.issue19551@psf.upfronthosting.co.za> Message-ID: <1384516357.05.0.301143926851.issue19551@psf.upfronthosting.co.za> Nick Coghlan added the comment: Based on a comment from MvL in issue 19550 (the Windows installer counterpart), it may be better to say something like "Install/update pip?" as a prompt (since leaving the option checked may also update an existing pip installation that is older than the bundled one) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:52:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 11:52:39 +0000 Subject: [issue19610] TypeError in distutils.command.upload In-Reply-To: <1384514692.62.0.115546674646.issue19610@psf.upfronthosting.co.za> Message-ID: <1384516359.16.0.21845116131.issue19610@psf.upfronthosting.co.za> STINNER Victor added the comment: > upload.upload_file() ... doesn't encode the value. fix-upload-cmd.diff should fix this specific bug, but the first bug (accept tuple for classifiers) should be fixed before or you will get an unexpected behaviour (only send 1 classifier?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 12:52:57 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 11:52:57 +0000 Subject: [issue19552] PEP 453: venv module and pyvenv integration In-Reply-To: <1384166762.42.0.483253842263.issue19552@psf.upfronthosting.co.za> Message-ID: <1384516377.22.0.89600440458.issue19552@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 13:03:03 2013 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 15 Nov 2013 12:03:03 +0000 Subject: [issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects. Message-ID: <1384516983.26.0.0584971052865.issue19611@psf.upfronthosting.co.za> New submission from Ned Batchelder: In 2.7, set comprehensions are compiled to code objects expecting an argument named ".0". This convention is also used for the unnamed arguments needed by tuple arguments. inspect.getcallargs understands the tuple argument case, but not the set comprehension case, and throws errors for correct arguments. This is also true for generator expressions and dictionary comprehensions. Demonstration: #----- import inspect import sys import types def make_set(): return {z*z for z in range(5)} print(make_set()) # The set comprehension is turned into a code object expecting a single # argument called ".0" with should be an iterator over range(5). if sys.version_info < (3,): setcomp_code = make_set.func_code.co_consts[1] else: setcomp_code = make_set.__code__.co_consts[1] setcomp_func = types.FunctionType(setcomp_code, {}) # We can successfully call the function with the argument it expects. print(setcomp_func(iter(range(5)))) # But inspect can't figure that out, because the ".0" argument also means # tuple arguments, which this code object doesn't expect. print(inspect.getcallargs(setcomp_func, iter(range(5)))) #----- When run on Python 3.3, this produces: {0, 1, 4, 16, 9} {0, 1, 4, 16, 9} {'.0': } When run on Python 2.7, it produces: set([0, 1, 4, 16, 9]) set([0, 1, 4, 16, 9]) Traceback (most recent call last): File "foo.py", line 17, in print(inspect.getcallargs(setcomp_func, iter(range(5)))) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 935, in getcallargs assign(arg, value) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 922, in assign raise ValueError('too many values to unpack') ValueError: too many values to unpack ---------- components: Library (Lib) messages: 202944 nosy: nedbat priority: normal severity: normal status: open title: inspect.getcallargs doesn't properly interpret set comprehension code objects. versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 13:08:24 2013 From: report at bugs.python.org (Ned Batchelder) Date: Fri, 15 Nov 2013 12:08:24 +0000 Subject: [issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects. In-Reply-To: <1384516983.26.0.0584971052865.issue19611@psf.upfronthosting.co.za> Message-ID: <1384517304.58.0.974747694248.issue19611@psf.upfronthosting.co.za> Ned Batchelder added the comment: BTW: I don't hold any illusions that this bug is important enough to fix, but I would be interested in hearing ideas about how I could work around it... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 13:36:39 2013 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 15 Nov 2013 12:36:39 +0000 Subject: [issue19609] Codec exception chaining shouldn't cover the initial codec lookup In-Reply-To: <1384513829.85.0.540008765744.issue19609@psf.upfronthosting.co.za> Message-ID: <1384518999.67.0.784171605114.issue19609@psf.upfronthosting.co.za> Stefan Behnel added the comment: Thanks! ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 13:37:09 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 12:37:09 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1384519029.11.0.0447628784708.issue1180@psf.upfronthosting.co.za> Nick Coghlan added the comment: Patch looks good to me. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 13:41:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 12:41:54 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <1384519314.16.0.300336377629.issue6516@psf.upfronthosting.co.za> Nick Coghlan added the comment: Patch looks good to me. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 14:05:50 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 13:05:50 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384520750.44.0.354367270173.issue19183@psf.upfronthosting.co.za> Nick Coghlan added the comment: I reviewed the latest PEP text at http://www.python.org/dev/peps/pep-0456/ I'm almost prepared to accept the current version of the implementation, but there's one technical decision to be clarified and a few placeholders in the PEP that need to be cleaned up prior to formal acceptance: * The rationale for turning off the small string optimisation by default rather than setting the cutoff to 7 bytes isn't at all clear to me. A consistent 3-5% speed difference on the benchmark suite isn't trivial, and if we have the small string optimization off by default, why aren't we just deleting that code instead? * A link to the benchmark suite at http://hg.python.org/benchmarks should be included at the appropriate places in the PEP * The "Further things to consider" section needs to be moved to a paragraph under "Discussion" describing the current implementation (i.e. the hash equivalence is tolerated for simplicity and consistency) * The "TBD" in the performance section needs to go. Reference should be made to the numbers in the small string optimisation section. * The performance numbers need to be clear on what version of the feature branch was used to obtain them (preferably the one you plan to commit!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 14:20:39 2013 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 15 Nov 2013 13:20:39 +0000 Subject: [issue19608] devguide needs pictures In-Reply-To: <1384510390.93.0.961404476169.issue19608@psf.upfronthosting.co.za> Message-ID: <1384521639.97.0.175805440585.issue19608@psf.upfronthosting.co.za> anatoly techtonik added the comment: Thanks for the proposal, but you know perfectly that I am not a designer. I don't believe that there are no talented people who find this ticket interesting. You just need to add tag:easy to is (or allow others to do), so it became visible to these people via OpenHatch or through PSF outreach initiatives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 15:00:31 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 15 Nov 2013 14:00:31 +0000 Subject: [issue19577] memoryview bind (the opposite of release) In-Reply-To: <1384389557.7.0.405119332815.issue19577@psf.upfronthosting.co.za> Message-ID: <1384524031.78.0.787952805433.issue19577@psf.upfronthosting.co.za> Stefan Krah added the comment: To my surprise, this line is 10% faster with a freelist: ./python -m timeit -s "import array; a = array.array('B', [0]*100); m = memoryview(a)" "m[30:40]" I think the reason is that PyObject_GC_NewVar() is quite slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 15:42:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Nov 2013 14:42:46 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384526566.73.0.601657874121.issue19183@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: ncoghlan -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 15:57:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 15 Nov 2013 14:57:18 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384527438.87.0.0249174313954.issue19596@psf.upfronthosting.co.za> Brett Cannon added the comment: These tests can't be removed because the classes are inheriting from an ABC to make sure that those test cases are considered and dealt with, either by explicitly testing them or ignoring them because they don't apply to the finder/loader. And since they are being ignored because the case has been considered and "tested" by doing nothing I don't want them listed as skipped since they aren't skipped based on some conditional result but instead because they literally can't be tested or don't apply. IOW testing packages with test_package() for the builtin loader wasn't skipped, it was tested by doing nothing since packages are flat-out not supported. I say close this as rejected. I appreciate the sentiment but in this instance I think the skip label for the test is incorrect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 16:10:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 15 Nov 2013 15:10:12 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384528212.9.0.456140535198.issue19596@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In this case we should do test_package = None # Built-in modules cannot be a package. test_module_in_package = None # Built-in modules cannobt be in a package. ... And then tests will be skipped and not shown in test report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 16:13:22 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 15 Nov 2013 15:13:22 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384528402.43.0.732119866844.issue19596@psf.upfronthosting.co.za> Brett Cannon added the comment: As long as setting them to None satisfies the ABC that's fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 16:41:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 15:41:13 +0000 Subject: [issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests In-Reply-To: <1384476957.48.0.494965760116.issue19598@psf.upfronthosting.co.za> Message-ID: <3dLkLK2CZzz7Lnv@mail.python.org> Roundup Robot added the comment: New changeset d48ec67b3b0e by Guido van Rossum in branch 'default': asyncio: Longer timeout in Windows test_popen. Fixes issue 19598. http://hg.python.org/cpython/rev/d48ec67b3b0e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 16:44:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 15:44:29 +0000 Subject: [issue19598] Timeout in test_popen() of test_asyncio.test_windows_utils.PopenTests In-Reply-To: <1384476957.48.0.494965760116.issue19598@psf.upfronthosting.co.za> Message-ID: <1384530269.28.0.836296182684.issue19598@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 17:29:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 16:29:59 +0000 Subject: [issue19612] test_subprocess: sporadic failure of test_communicate_epipe() Message-ID: <1384532999.66.0.279652262495.issue19612@psf.upfronthosting.co.za> New submission from STINNER Victor: The test failed on a buildbot, see the message below. By the way, the test should use a value based on test.support.PIPE_MAX_SIZE rather than an hardcoded size of 2**20 bytes. http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1661/steps/test/logs/stdio test_communicate_epipe (test.test_subprocess.ProcessTestCase) ... ERROR test_communicate_epipe_only_stdin (test.test_subprocess.ProcessTestCase) ... ok ====================================================================== ERROR: test_communicate_epipe (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_subprocess.py", line 1095, in test_communicate_epipe p.communicate(b"x" * 2**20) File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\subprocess.py", line 952, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\subprocess.py", line 1188, in _communicate self.stdin.write(input) OSError: [Errno 22] Invalid argument ---------------------------------------------------------------------- (...) test_communicate_epipe (test.test_subprocess.ProcessTestCase) ... ok test_communicate_epipe_only_stdin (test.test_subprocess.ProcessTestCase) ... ok ---------- components: Tests, Windows keywords: buildbot messages: 202959 nosy: haypo priority: normal severity: normal status: open title: test_subprocess: sporadic failure of test_communicate_epipe() versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 18:03:50 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 15 Nov 2013 17:03:50 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <1384535030.48.0.874651426068.issue19590@psf.upfronthosting.co.za> R. David Murray added the comment: Additional changes look good to me. Unless (pun intended) Barry objects, I think I'll come down in favor of backporting all of these changes. The tipping point is that I've always found myself experiencing cognitive dissonance reading the 'unless' calls, since they are the "opposite sense" of all of the other 'assert' style calls. Having all these tests be the same in all active branches will also help reduce cognitive dissonance while debugging failures :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 18:30:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 17:30:45 +0000 Subject: [issue19613] test_nntplib: sporadic failures, test_article_head_body() Message-ID: <1384536645.9.0.862907413915.issue19613@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3024/steps/test/logs/stdio ====================================================================== ERROR: test_article_head_body (test.test_nntplib.NetworkedNNTP_SSLTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_nntplib.py", line 251, in wrapped meth(self) File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_nntplib.py", line 178, in test_article_head_body self.check_article_resp(resp, body, art_num) File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_nntplib.py", line 158, in check_article_resp self.assertNotIn(article.lines[-1], (b".", b".\n", b".\r\n")) IndexError: list index out of range (...) Re-running failed tests in verbose mode Re-running test 'test_nntplib' in verbose mode (...) test_article_head_body (test.test_nntplib.NetworkedNNTPTests) ... ok ---------- components: Tests messages: 202961 nosy: haypo priority: normal severity: normal status: open title: test_nntplib: sporadic failures, test_article_head_body() versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 18:44:46 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 15 Nov 2013 17:44:46 +0000 Subject: [issue19614] support.temp_cwd should use support.rmtree Message-ID: <1384537486.79.0.657999884373.issue19614@psf.upfronthosting.co.za> New submission from R. David Murray: Based on this error on one of the buildbots, it is clear that support.temp_cwd should be calling support.rmtree, and not shutil.rmtree, during cleanup: [...] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 73, in _run_code exec(code, run_globals) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\regrtest.py", line 1585, in main_in_temp_cwd() File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\regrtest.py", line 1560, in main_in_temp_cwd main() File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 77, in __exit__ self.gen.throw(type, value, traceback) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 868, in temp_cwd yield cwd_dir File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 77, in __exit__ self.gen.throw(type, value, traceback) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 822, in temp_dir shutil.rmtree(path) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 477, in rmtree return _rmtree_unsafe(path, onerror) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 376, in _rmtree_unsafe onerror(os.rmdir, path, sys.exc_info()) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 374, in _rmtree_unsafe os.rmdir(path) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4744' [...] ---------- components: Tests keywords: buildbot, easy messages: 202962 nosy: r.david.murray priority: normal severity: normal stage: needs patch status: open title: support.temp_cwd should use support.rmtree type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 18:53:53 2013 From: report at bugs.python.org (Edward Catmur) Date: Fri, 15 Nov 2013 17:53:53 +0000 Subject: [issue19615] "ImportError: dynamic module does not define init function" when deleting and recreating .so files from different machines over NFS Message-ID: <1384538033.67.0.422579002875.issue19615@psf.upfronthosting.co.za> New submission from Edward Catmur: foo.c: #include static PyMethodDef mth[] = { {NULL, NULL, 0, NULL} }; static struct PyModuleDef mod = { PyModuleDef_HEAD_INIT, "foo", NULL, -1, mth }; PyMODINIT_FUNC PyInit_foo(void) { return PyModule_Create(&mod); } bar.c: #include static PyMethodDef mth[] = { {NULL, NULL, 0, NULL} }; static struct PyModuleDef mod = { PyModuleDef_HEAD_INIT, "bar", NULL, -1, mth }; PyMODINIT_FUNC PyInit_bar(void) { return PyModule_Create(&mod); } setup.py: from distutils.core import setup, Extension setup(name='PackageName', ext_modules=[Extension('foo', sources=['foo.c']), Extension('bar', sources=['bar.c'])]) In an NFS mount: host1$ python setup.py build host1$ rm *.so; cp build/lib.*/foo*.so .; cp build/lib.*/bar*.so . host1$ python -c 'import foo; input(); import bar' While python is waiting for input, on another host in the same directory: host2$ rm *.so; cp build/lib.*/bar*.so .; cp build/lib.*/foo*.so . Back on host1: ImportError: dynamic module does not define init function (PyInit_bar) Attaching a debugger to Python after the ImportError and calling dlerror() shows the problem: (gdb) print (char *)dlerror() $1 = 0xe495210 "/<...>/foo.cpython-34dm.so: undefined symbol: PyInit_bar" This is because dynload_shlib.c[1] caches dlopen handles by (device and) inode number; but NFS will reuse inode numbers even if a process on a client host has the file open; running lsof on Python, before: python 16475 ecatmur mem REG 0,36 14000 55321147 /<...>/foo.cpython-34dm.so (nfs:/export/user) and after: python 16475 ecatmur mem REG 0,36 55321147 /<...>/foo.cpython-34dm.so (nfs:/export/user) (path inode=55321161) Indeed, bar.cpython-34dm.so now has the inode number that Python originally opened foo.cpython-34dm.so under: host1$ stat -c '%n %i' *.so bar.cpython-34dm.so 55321147 foo.cpython-34dm.so 55321161 Obviously, this can only happen on a filesystem like NFS where inode numbers can be reused even while a process still has a file open (or mapped). We encountered this problem in a fairly pathological situation; multiple processes running in two virtualenvs with different copies of a zipped egg (of the same version!) were contending over the ~/.python-eggs directory created by pkg_resources[2] to cache .so files extracted from eggs. We are working around the situation by setting PYTHON_EGG_CACHE to a virtualenv-specific location, which also fixes the contention issue. (We should probably work out why the eggs are different, but fixing that is bound into our build/deployment system.) I'm not sure exactly how to solve or even detect this issue; perhaps looking at the mtime of the .so might work? If it is decided not to fix the issue it would be useful if _PyImport_GetDynLoadFunc could report the actual dlerror(); this would have saved us quite some time debugging it. I'll work on a patch to do that. 1. http://hg.python.org/cpython/file/tip/Python/dynload_shlib.c 2. https://bitbucket.org/pypa/setuptools/src/ac127a3f46be3037c79f2c4076c7ab221cde21b2/pkg_resources.py?at=default#cl-1040 ---------- components: Interpreter Core messages: 202963 nosy: ecatmur priority: normal severity: normal status: open title: "ImportError: dynamic module does not define init function" when deleting and recreating .so files from different machines over NFS type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 18:58:07 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 15 Nov 2013 17:58:07 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <1384538287.45.0.786739677428.issue19590@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: assertTrue(dtrt) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 19:07:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 18:07:00 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <3dLnZW3zF8z7LqJ@mail.python.org> Roundup Robot added the comment: New changeset b9c9c4b2effe by Andrew Kuchling in branch 'default': Issue #19544 and Issue #6516: Restore support for --user and --group parameters to sdist command as found in Python 2.7 and originally slated for Python 3.2 but accidentally rolled back as part of the distutils2 rollback. Closes Issue #6516. http://hg.python.org/cpython/rev/b9c9c4b2effe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 19:07:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 18:07:00 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <3dLnZX2FFzz7LnQ@mail.python.org> Roundup Robot added the comment: New changeset b9c9c4b2effe by Andrew Kuchling in branch 'default': Issue #19544 and Issue #6516: Restore support for --user and --group parameters to sdist command as found in Python 2.7 and originally slated for Python 3.2 but accidentally rolled back as part of the distutils2 rollback. Closes Issue #6516. http://hg.python.org/cpython/rev/b9c9c4b2effe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 19:08:00 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 Nov 2013 18:08:00 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <1384538880.98.0.457319679179.issue6516@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 19:08:37 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 Nov 2013 18:08:37 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1384538917.07.0.768770473977.issue1180@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- assignee: akuchling -> jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 19:15:18 2013 From: report at bugs.python.org (Edward Catmur) Date: Fri, 15 Nov 2013 18:15:18 +0000 Subject: [issue19615] "ImportError: dynamic module does not define init function" when deleting and recreating .so files from different machines over NFS In-Reply-To: <1384538033.67.0.422579002875.issue19615@psf.upfronthosting.co.za> Message-ID: <1384539318.46.0.585089666836.issue19615@psf.upfronthosting.co.za> Edward Catmur added the comment: Report dlerror() if dlsym() fails. The error output is now something like: ImportError: /<...>/foo.cpython-34dm.so: undefined symbol: PyInit_bar ---------- keywords: +patch Added file: http://bugs.python.org/file32643/dynload_report_dlerror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 19:18:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Nov 2013 18:18:08 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384539488.2.0.797612139833.issue19596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with both Brett and Serhiy. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 21:43:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 20:43:01 +0000 Subject: [issue19523] logging.FileHandler - using of delay argument case handle leaks In-Reply-To: <1383882003.26.0.546663037949.issue19523@psf.upfronthosting.co.za> Message-ID: <3dLs2X6sFXz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset bbb227b96c45 by Vinay Sajip in branch '2.7': Issue #19523: Closed FileHandler leak which occurred when delay was set. http://hg.python.org/cpython/rev/bbb227b96c45 New changeset 058810fe1b98 by Vinay Sajip in branch '3.3': Issue #19523: Closed FileHandler leak which occurred when delay was set. http://hg.python.org/cpython/rev/058810fe1b98 New changeset a3640822c3e6 by Vinay Sajip in branch 'default': Closes #19523: Merged fix from 3.3. http://hg.python.org/cpython/rev/a3640822c3e6 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 21:59:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 20:59:01 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <3dLsP05xqsz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset e9d9bebb979f by Vinay Sajip in branch '2.7': Issue #19504: Used American spelling for 'customize'. http://hg.python.org/cpython/rev/e9d9bebb979f New changeset 1c714c35c02a by Vinay Sajip in branch '3.3': Issue #19504: Used American spelling for 'customize'. http://hg.python.org/cpython/rev/1c714c35c02a New changeset 08c7bc4266e6 by Vinay Sajip in branch 'default': Issue #19504: Used American spelling for 'customize'. http://hg.python.org/cpython/rev/08c7bc4266e6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 23:06:54 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 15 Nov 2013 22:06:54 +0000 Subject: [issue19616] Fix test.test_importlib.util.test_both() to set __module__ Message-ID: <1384553214.36.0.335433521852.issue19616@psf.upfronthosting.co.za> New submission from Brett Cannon: Should help with traceback/test failure reporting. ---------- assignee: brett.cannon messages: 202971 nosy: brett.cannon priority: low severity: normal stage: needs patch status: open title: Fix test.test_importlib.util.test_both() to set __module__ versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 23:08:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 22:08:29 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <3dLtx90vYTz7Lk6@mail.python.org> Roundup Robot added the comment: New changeset b08868fd5994 by Christian Heimes in branch 'default': Issue #19544 and Issue #6516: quick workaround for failing builds http://hg.python.org/cpython/rev/b08868fd5994 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 23:08:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 22:08:30 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <3dLtx969Tdz7LmZ@mail.python.org> Roundup Robot added the comment: New changeset b08868fd5994 by Christian Heimes in branch 'default': Issue #19544 and Issue #6516: quick workaround for failing builds http://hg.python.org/cpython/rev/b08868fd5994 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 23:13:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 22:13:27 +0000 Subject: [issue6516] reset owner/group to root for distutils tarballs In-Reply-To: <1247933699.76.0.278346370296.issue6516@psf.upfronthosting.co.za> Message-ID: <3dLv2t67jZz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 015463176d2e by Victor Stinner in branch 'default': Issue #19544, #6516: no need to catch AttributeError on import pwd/grp http://hg.python.org/cpython/rev/015463176d2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 23:13:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 22:13:28 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <3dLv2v4Mysz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 015463176d2e by Victor Stinner in branch 'default': Issue #19544, #6516: no need to catch AttributeError on import pwd/grp http://hg.python.org/cpython/rev/015463176d2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 15 23:40:02 2013 From: report at bugs.python.org (Rob) Date: Fri, 15 Nov 2013 22:40:02 +0000 Subject: [issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper In-Reply-To: <1366979224.14.0.876475494511.issue17849@psf.upfronthosting.co.za> Message-ID: <1384555202.51.0.175763624161.issue17849@psf.upfronthosting.co.za> Changes by Rob : ---------- nosy: +raymondr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 00:08:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 23:08:07 +0000 Subject: [issue19617] Fix usage of Py_ssize_t type in Python/compile.c Message-ID: <1384556887.78.0.0801644931994.issue19617@psf.upfronthosting.co.za> New submission from STINNER Victor: On Windows 64-bit, Visual Studio generates a lot of warnings because Py_ssize_t values are downcasted to int. Attached patch fixes all warnings and move the final downcast into compiler_addop_i(). This function uses an assertion to check that integer parameter fits into an C int type. I don't know if it's safe to "return 0" on overflow error. The patch fixes also some indentation issues seen was I wrote the patch. Nobody complained before, I don't know if the bugs can be seen in practice, so I prefer to not touch Python 2.7 nor 3.2. ---------- files: compile_ssize_t.patch keywords: patch messages: 202976 nosy: benjamin.peterson, haypo, serhiy.storchaka priority: normal severity: normal status: open title: Fix usage of Py_ssize_t type in Python/compile.c versions: Python 3.4 Added file: http://bugs.python.org/file32644/compile_ssize_t.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 00:29:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 23:29:46 +0000 Subject: [issue18294] zlib module is not completly 64-bit safe In-Reply-To: <1372107882.97.0.731855490225.issue18294@psf.upfronthosting.co.za> Message-ID: <1384558186.3.0.621873768919.issue18294@psf.upfronthosting.co.za> STINNER Victor added the comment: Ping myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 00:30:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 23:30:12 +0000 Subject: [issue18294] zlib module is not completly 64-bit safe In-Reply-To: <1372107882.97.0.731855490225.issue18294@psf.upfronthosting.co.za> Message-ID: <1384558212.1.0.0603027423498.issue18294@psf.upfronthosting.co.za> STINNER Victor added the comment: > The "I" parser format does not check for integer overflow. The "O" format can be used with _PyLong_AsInt() instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 00:39:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Nov 2013 23:39:22 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384558762.72.0.0769744897372.issue19544@psf.upfronthosting.co.za> STINNER Victor added the comment: At changeset 015463176d2e2530e4f07cfbe97e41abac540a57, test_make_distribution_owner_group() was failing on some buildbots. test_distutils works fine on my Linux box, I ran the test as my haypo user and as root. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/5780/steps/test/logs/stdio ====================================================================== FAIL: test_make_distribution_owner_group (distutils.tests.test_sdist.SDistTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/distutils/tests/test_sdist.py", line 477, in test_make_distribution_owner_group self.assertEquals(member.gid, os.getgid()) AssertionError: 0 != 1002 http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/470/steps/test/logs/stdio ====================================================================== FAIL: test_make_distribution_owner_group (distutils.tests.test_sdist.SDistTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/distutils/tests/test_sdist.py", line 477, in test_make_distribution_owner_group self.assertEquals(member.gid, os.getgid()) AssertionError: 0 != 20 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 00:57:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 23:57:08 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <3dLxLW5PJwzR4H@mail.python.org> Roundup Robot added the comment: New changeset c35311fcc967 by Andrew Kuchling in branch 'default': Issue #19544 and Issue #1180: Restore global option to ignore ~/.pydistutils.cfg in Distutils, accidentally removed in backout of distutils2 changes. http://hg.python.org/cpython/rev/c35311fcc967 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 00:57:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Nov 2013 23:57:09 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <3dLxLX3XxzzR4H@mail.python.org> Roundup Robot added the comment: New changeset c35311fcc967 by Andrew Kuchling in branch 'default': Issue #19544 and Issue #1180: Restore global option to ignore ~/.pydistutils.cfg in Distutils, accidentally removed in backout of distutils2 changes. http://hg.python.org/cpython/rev/c35311fcc967 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 00:59:05 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 15 Nov 2013 23:59:05 +0000 Subject: [issue19617] Fix usage of Py_ssize_t type in Python/compile.c In-Reply-To: <1384556887.78.0.0801644931994.issue19617@psf.upfronthosting.co.za> Message-ID: <1384559945.04.0.347803576812.issue19617@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You could use the Py_SAFE_DOWNCAST macro everywhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:00:20 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 00:00:20 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1384560020.64.0.143035784305.issue1180@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:06:08 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 00:06:08 +0000 Subject: [issue6466] duplicate get_version() code between cygwinccompiler and emxccompiler In-Reply-To: <1247386841.98.0.269164765319.issue6466@psf.upfronthosting.co.za> Message-ID: <1384560368.85.0.695386916346.issue6466@psf.upfronthosting.co.za> Jason R. Coombs added the comment: emxccompiler is no longer present in Python 3.4, so this ticket has become invalid. ---------- resolution: fixed -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:10:11 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 16 Nov 2013 00:10:11 +0000 Subject: [issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior In-Reply-To: <1384498421.85.0.820069656679.issue19530@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > mpb added the comment: > > Someone wrote a kernel patch based on my bug report. > > http://www.spinics.net/lists/netdev/msg257653.html It's just a patch to avoid returning garbage in the address. But AFAICT, recvfrom() returning 0 is enough to know that the socket was shut down. But two things to keep in mind: - it'll only work on "connected" datagram sockets - even then, I'm not sure it's supported by POSIX: I can't think of any spec specifying the behavior in case of cross-thread shutdown (and close won't unblock for example). Also, I think HP-UX doesn't wake up the waiting thread in that situation. So I'd still advise you to either use a timeout or a select(). Cheers, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:11:50 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 16 Nov 2013 00:11:50 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384465229.04.0.236995788364.issue19575@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > R. David Murray added the comment: > > neologix noted that *when redirection is used* the way that *all* windows file handles are inherited changes. That's true (but that was from Richard actually). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:12:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Nov 2013 00:12:15 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <3dLxLX3XxzzR4H@mail.python.org> Message-ID: STINNER Victor added the comment: > At changeset 015463176d2e2530e4f07cfbe97e41abac540a57, test_make_distribution_owner_group() was failing on some buildbots. The problem is that tempfile.mkdtemp() creates a directory with the group 0. Files created in this directory also have the group 0. The test uses os.getpid() to get the group identifier. The test should use os.stat(self.tmp_dir).st_gid (and st_uid) instead of os.getgid(), or the tmp_dir directory. Or the group of the temporary directory should be changed to os.getgid(). I don't know if distutils should create tarball with the group 0 or the group of the current user. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:14:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Nov 2013 00:14:03 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384560843.69.0.616910508871.issue19575@psf.upfronthosting.co.za> STINNER Victor added the comment: > I think it's simply due to file descriptor inheritance File handles are now non-inheritable by default in Python 3.4 (PEP 446). Does it change anything? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:15:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Nov 2013 00:15:19 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <1384560919.13.0.505505477071.issue19599@psf.upfronthosting.co.za> STINNER Victor added the comment: Seen on another buildbot. http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6809/steps/test/logs/stdio ====================================================================== FAIL: test_async_timeout (test.test_multiprocessing_fork.WithProcessesTestPool) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/_test_multiprocessing.py", line 1726, in test_async_timeout self.assertRaises(multiprocessing.TimeoutError, get, timeout=TIMEOUT2) AssertionError: TimeoutError not raised by ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:18:20 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 00:18:20 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384561100.68.0.987094401715.issue19544@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Thanks Victor. Yes, it appears that there's yet another unported issue #7408, a follow-up to #6516. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:20:47 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 00:20:47 +0000 Subject: [issue7408] test_distutils fails on Mac OS X 10.5 In-Reply-To: <1259515270.43.0.427140625875.issue7408@psf.upfronthosting.co.za> Message-ID: <1384561247.61.0.536743505608.issue7408@psf.upfronthosting.co.za> Jason R. Coombs added the comment: In issue #19544, #6516 was ported to Python 3.4. After doing so, this issue re-emerges. ---------- assignee: tarek -> jason.coombs nosy: +jason.coombs resolution: accepted -> status: closed -> open versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:26:50 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 16 Nov 2013 00:26:50 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384561610.85.0.876670900655.issue16596@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'd love it if someone could review this. This would be a great improvement to debugging coroutines in asyncio. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:27:07 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 16 Nov 2013 00:27:07 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384561627.27.0.0934459378458.issue16596@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:29:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 00:29:22 +0000 Subject: [issue7408] test_distutils fails on Mac OS X 10.5 In-Reply-To: <1259515270.43.0.427140625875.issue7408@psf.upfronthosting.co.za> Message-ID: <3dLy3k06w8z7LpM@mail.python.org> Roundup Robot added the comment: New changeset f4b364617abc by Jason R. Coombs in branch 'default': Issue #7408: Forward port limited test from Python 2.7, fixing failing buildbot tests on BSD-based platforms. http://hg.python.org/cpython/rev/f4b364617abc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:32:46 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 00:32:46 +0000 Subject: [issue7408] test_distutils fails on Mac OS X 10.5 In-Reply-To: <1259515270.43.0.427140625875.issue7408@psf.upfronthosting.co.za> Message-ID: <1384561966.16.0.0551635427271.issue7408@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I'm declaring this fixed and watching the buildbots for confirmation. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:37:03 2013 From: report at bugs.python.org (Berker Peksag) Date: Sat, 16 Nov 2013 00:37:03 +0000 Subject: [issue19618] test_sysconfig_module fails on Ubuntu 12.04 Message-ID: <1384562223.55.0.434561574175.issue19618@psf.upfronthosting.co.za> New submission from Berker Peksag: This is probably related to issue 17679. ====================================================================== FAIL: test_sysconfig_module (distutils.tests.test_sysconfig.SysconfigTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/berker/projects/cpython/Lib/distutils/tests/test_sysconfig.py", line 132, in test_sysconfig_module self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS')) AssertionError: '-Wno-unused-result -g -O0 -Wall -Wstrict-prototypes' != '-Wno-unused-result -Werror=declaration-after-statement -g -O0[22 chars]ypes' - -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes + -Wno-unused-result -Werror=declaration-after-statement -g -O0 -Wall -Wstrict-prototypes ---------- components: Distutils, Tests messages: 202994 nosy: berker.peksag priority: normal severity: normal status: open title: test_sysconfig_module fails on Ubuntu 12.04 type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:37:17 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 00:37:17 +0000 Subject: [issue19535] Test failures with -OO In-Reply-To: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> Message-ID: <1384562237.63.0.418993407795.issue19535@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume a test could detect docstring stripping with def f(): 'docstring' if f.__doc__ is None: This would cover the test_functools case, but I don't know about the others. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:42:02 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 00:42:02 +0000 Subject: [issue19539] The 'raw_unicode_escape' codec buggy + not appropriate for Python 3.x In-Reply-To: <1384051905.56.0.969775270474.issue19539@psf.upfronthosting.co.za> Message-ID: <1384562522.56.0.714035730649.issue19539@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:44:05 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 00:44:05 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1384562645.92.0.340281716512.issue19548@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:45:17 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 00:45:17 +0000 Subject: [issue19554] Enable all freebsd* host platforms In-Reply-To: <1384172989.4.0.879301350688.issue19554@psf.upfronthosting.co.za> Message-ID: <1384562717.67.0.532576920162.issue19554@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:46:26 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 00:46:26 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1384562786.37.0.667887726965.issue19557@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: -Devguide _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:47:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Nov 2013 00:47:09 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() Message-ID: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> New submission from STINNER Victor: I propose to add new input_type and output_type to CodecInfo. These attributes would only be defined for base64, hex, ... codecs which are not the classic encode: str=>bytes, decode: bytes=>str codecs. I also propose to modify str.encode() and bytes.encode() to only accept codecs using the right types. If the type doesn't match, the codec raises a LookupError. This issue should avoid the denial of service attack when a compression codec is used, see: https://mail.python.org/pipermail/python-dev/2013-November/130188.html ---------- messages: 202996 nosy: haypo, lemburg, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:51:55 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 00:51:55 +0000 Subject: [issue19544] Port distutils as found in Python 2.7 to Python 3.x. In-Reply-To: <1384102792.62.0.350506434661.issue19544@psf.upfronthosting.co.za> Message-ID: <1384563115.7.0.0885912980393.issue19544@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I believe all identified issues have been ported/fixed. ---------- assignee: eric.araujo -> jason.coombs resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:57:30 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 00:57:30 +0000 Subject: [issue19562] Added description for assert statement In-Reply-To: <1384278059.69.0.538735147491.issue19562@psf.upfronthosting.co.za> Message-ID: <1384563450.45.0.729620584898.issue19562@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since failed asserts print the failed assert, repeating the assertion in a message is useless. >>> assert 1 <= i Traceback (most recent call last): File "", line 1, in assert 1 <= i AssertionError It is already obvious that i must be >= 1. So I would reject the patch. > And isn't this too much defensive programming? Whether stdlib python code should have asserts is a more interesting question. I will ask on pydev. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 01:57:48 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 00:57:48 +0000 Subject: [issue19562] Added description for assert statement In-Reply-To: <1384278059.69.0.538735147491.issue19562@psf.upfronthosting.co.za> Message-ID: <1384563468.28.0.311988849123.issue19562@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 02:00:52 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 16 Nov 2013 01:00:52 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384563652.15.0.50440153614.issue16596@psf.upfronthosting.co.za> Guido van Rossum added the comment: I think this is not ready for inclusion. It works wonderfully when stepping over a yield[from], but I can't seem to get it to step nicely *out* of a generator. (Details on request -- basically I put a "pdb.set_trace()" call in Tulip's fetch3.py example and step around.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 02:04:26 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 01:04:26 +0000 Subject: [issue12853] global name 'r' is not defined in upload.py In-Reply-To: <1314637700.16.0.440169429003.issue12853@psf.upfronthosting.co.za> Message-ID: <1384563866.77.0.663193244341.issue12853@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- assignee: tarek -> jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 02:09:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 01:09:18 +0000 Subject: [issue12853] global name 'r' is not defined in upload.py In-Reply-To: <1314637700.16.0.440169429003.issue12853@psf.upfronthosting.co.za> Message-ID: <3dLyxn71FKz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset aa3a7d5e0478 by Jason R. Coombs in branch '2.7': Issue #12853: Correct NameError in distutils upload command. http://hg.python.org/cpython/rev/aa3a7d5e0478 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 02:10:13 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 01:10:13 +0000 Subject: [issue12853] global name 'r' is not defined in upload.py In-Reply-To: <1314637700.16.0.440169429003.issue12853@psf.upfronthosting.co.za> Message-ID: <1384564213.1.0.0561413176866.issue12853@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 02:16:17 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 01:16:17 +0000 Subject: [issue17354] TypeError when running setup.py upload --show-response In-Reply-To: <1362477390.5.0.0948217479976.issue17354@psf.upfronthosting.co.za> Message-ID: <1384564577.3.0.829552080017.issue17354@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Berker reports in issue12853, msg202927 that the issue is fixed for Python 3.3 and 3.4 by the patch for issue6286 applied as part of issue19544. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 02:51:44 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 01:51:44 +0000 Subject: [issue19562] Added description for assert statement In-Reply-To: <1384278059.69.0.538735147491.issue19562@psf.upfronthosting.co.za> Message-ID: <1384566704.45.0.566084227718.issue19562@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Looking further, the current code has a message object, the month that fails the test and your patch removes that in adding the redundant message. I also see that your change would make the first assert match the next 2. But I would rather change the next two. Sequences like _DI4Y = _days_before_year(5) # A 4-year cycle has an extra leap day over what we'd get from pasting # together 4 single years. assert _DI4Y == 4 * 365 + 1 are bizarre. The constant should be directly set to 4*365 + 1 and then _days_before_year(5) == _DI4Y tested in test_datetime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 03:06:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 Nov 2013 02:06:45 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384567605.77.0.0990166230215.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: Here are benchmarks on two Linux machine. It looks like SipHash24 takes advantage of newer CPUs. I'm a bit puzzled about the results. Or maybe my super simple and naive analyzer doesn't give sensible results... https://bitbucket.org/tiran/pep-456-benchmarks/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 03:21:42 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Nov 2013 02:21:42 +0000 Subject: [issue19584] IDLE fails - Python V2.7.6 - 64b on Win7 64b In-Reply-To: <1384446600.97.0.293760172402.issue19584@psf.upfronthosting.co.za> Message-ID: <1384568502.15.0.849537004348.issue19584@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Report like this should initially go to python-list as the problem is probably idiosyncratic to your machine. I have a similar setup, just installed 2.7.6, and Idle seems to work fine. Open a Windows console (AllPrograms/Accessories/CommandPrompt), cd to your 2.7 director, and try to start idle as below C:\Users\Terry>cd /programs/python27 C:\Programs\Python27>python -m idlelib.idle You should see an error message. Perhaps about tkinter. If so, try re-installing and make sure that tcl/tk are checked to be installed. ---------- nosy: +terry.reedy type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 03:31:52 2013 From: report at bugs.python.org (Christopher Welborn) Date: Sat, 16 Nov 2013 02:31:52 +0000 Subject: [issue19620] tokenize documentation contains typos (argment instead of argument) Message-ID: <1384569112.62.0.796047767365.issue19620@psf.upfronthosting.co.za> New submission from Christopher Welborn: Documentation for tokenize contains typos, functions detect_encoding() and tokenize() at least. The lines are: The tokenize() generator requires one argment, readline,... It requires one argment, readline, ...where argment is supposed to be 'argument' i'm sure. Things like that bug me in my own code/docs, and since it's been there since 2.7 (Also in 3.3 and 3.4), I figured no one had noticed. ---------- assignee: docs at python components: Documentation messages: 203005 nosy: cjwelborn, docs at python priority: normal severity: normal status: open title: tokenize documentation contains typos (argment instead of argument) versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 03:33:58 2013 From: report at bugs.python.org (Christopher Welborn) Date: Sat, 16 Nov 2013 02:33:58 +0000 Subject: [issue19620] tokenize documentation contains typos (argment instead of argument) In-Reply-To: <1384569112.62.0.796047767365.issue19620@psf.upfronthosting.co.za> Message-ID: <1384569238.69.0.637056088418.issue19620@psf.upfronthosting.co.za> Christopher Welborn added the comment: Oops, forgot to mention the documentation I am speaking of is the actual doc strings. The actual test is to run: import tokenize help(tokenize) or just: `python -c "import tokenize;help(tokenize)" | grep "argment"` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 04:33:25 2013 From: report at bugs.python.org (mpb) Date: Sat, 16 Nov 2013 03:33:25 +0000 Subject: [issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior In-Reply-To: <1383969468.97.0.110285365425.issue19530@psf.upfronthosting.co.za> Message-ID: <1384572805.01.0.935633385588.issue19530@psf.upfronthosting.co.za> mpb added the comment: > It's just a patch to avoid returning garbage in the address. Right, which is why I pursued the point. recvfrom should not return ambiguous data (the ambiguity being between shutdown and receiving a zero length message). It is now possible to distinguish the two by looking at the src_addr. (Arguably this could have been done before, but garbage in src_addr is not a reliable indicator, IMO.) > But AFAICT, recvfrom() returning 0 is enough to know that the socket > was shut down. My example code clearly shows a zero length UPD message being sent and received prior to shutdown. I admit, sending a zero length UDP message is probably pretty rare, but it is allowed and it does work. And it makes more sense than returning garbage in src_addr. > But two things to keep in mind: > - it'll only work on "connected" datagram sockets What will only work on connected datagram sockets? Shutdown *already* works (ie, wakes up blocked threads) on non-connected datagram sockets on Linux. Shutdown does wake them up (it just happens to return an error *after* waking them up). So... the only reason to connect the UDP socket (prior to calling shutdown) is to avoid the error (or, in Python, to avoid the raised Exception). > - even then, I'm not sure it's supported by POSIX: I can't think of > any spec specifying the behavior in case of cross-thread shutdown (and > close won't unblock for example). Also, I think HP-UX doesn't wake up > the waiting thread in that situation. Do you consider the POSIX specifications to be robust when it comes to threading? It would not surprise me if there are other threading related grey areas in POSIX. > So I'd still advise you to either use a timeout or a select(). My application only needs to run on Linux. If I cared about portability, I might well do something else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 05:46:43 2013 From: report at bugs.python.org (Chris Angelico) Date: Sat, 16 Nov 2013 04:46:43 +0000 Subject: [issue19621] Reimporting this and str.translate() Message-ID: <1384577203.93.0.74432815372.issue19621@psf.upfronthosting.co.za> New submission from Chris Angelico: In an interactive session, typing 'import this' a second time doesn't produce output (as the module's already imported). Peeking into the module shows a string and what looks like a translation dictionary, but doing the obvious thing: >>> this.s.translate(this.d) doesn't work, because str.translate() expects a dictionary that maps Unicode ordinals, not one-character strings. Attached is a patch which makes Lib/this.py use s.translate() instead of the wordier comprehension. Dare I ask, is there any possible code that this change could break? :) ---------- components: Library (Lib) files: this-translate.patch keywords: patch messages: 203008 nosy: Rosuav priority: normal severity: normal status: open title: Reimporting this and str.translate() type: enhancement versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file32645/this-translate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 05:56:17 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 16 Nov 2013 04:56:17 +0000 Subject: [issue19621] Reimporting this and str.translate() In-Reply-To: <1384577203.93.0.74432815372.issue19621@psf.upfronthosting.co.za> Message-ID: <1384577777.93.0.763592129971.issue19621@psf.upfronthosting.co.za> Eric Snow added the comment: The this module was actually the subject of a similar proposal recently: issue19499. The same arguments there for leaving the module alone apply here. (Amon other things, it's a neat little artifact: http://www.wefearchange.org/2010/06/import-this-and-zen-of-python.html.) ---------- nosy: +eric.snow resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> "import this" is cached in sys.modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 06:22:14 2013 From: report at bugs.python.org (Martin Panter) Date: Sat, 16 Nov 2013 05:22:14 +0000 Subject: [issue19622] Default buffering for input and output pipes in subprocess module Message-ID: <1384579334.66.0.612676075589.issue19622@psf.upfronthosting.co.za> New submission from Martin Panter: Currently the documentation for the ?bufsize? parameter in the ?subprocess? module says: """ Changed in version 3.2.4,: 3.3.1 bufsize now defaults to -1 to enable buffering by default to match the behavior that most code expects. In 3.2.0 through 3.2.3 and 3.3.0 it incorrectly defaulted to 0 which was unbuffered and allowed short reads. This was unintentional and did not match the behavior of Python 2 as most code expected. """ First of all the formatting is a bit screwy. There?s a colon in the wrong place, so it?s not obvious that the ?changed in version? heading applies to the following paragraph. The main issue is that I got the impression the default of 0 was a regression, and that Python 3.1 and Python 2 defaulted to -1. However, as far as I can tell the default was actually 0 in 3.1 and 2. The change to -1 was for Issue 17488, which seems to be focussed on the behaviour of reading from a subprocess?s output pipe. In Python 2, file.read() blocks to read as much as possible, even when buffering is disabled. In Python 3, you end up with either a FileIO or a BufferedIOBase object, and they have different read() behaviours. Perhaps the documentation should say something like """ The ?bufsize? argument now defaults to -1 to enable buffering. In 3.2.3, 3.3.0, and earlier, it defaulted to 0 which was unbuffered and allowed short reads. """ I would take out the ?most code expects buffering? bits. Maybe most code expects the greedy read behaviour from output pipes, but I would say most code writing to an input pipe expects unbuffered behaviour. The big issue with buffering for me is that BufferedWriter.close() may raise a broken pipe condition. If you want to mention Python 2, maybe say that Python 2 did not use buffering by default, but that file.read() always had blocking read behaviour, which can be emulated by using buffered reading in Python 3. ---------- assignee: docs at python components: Documentation messages: 203010 nosy: docs at python, vadmium priority: normal severity: normal status: open title: Default buffering for input and output pipes in subprocess module type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 07:46:55 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 16 Nov 2013 06:46:55 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <1384584415.11.0.181726562577.issue19504@psf.upfronthosting.co.za> Georg Brandl added the comment: Can be closed? ---------- nosy: +georg.brandl, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 09:08:27 2013 From: report at bugs.python.org (Jason Yeo) Date: Sat, 16 Nov 2013 08:08:27 +0000 Subject: [issue19075] Add sorting algorithm visualization to turtledemo In-Reply-To: <1379872942.6.0.509488553247.issue19075@psf.upfronthosting.co.za> Message-ID: <1384589307.7.0.17431768782.issue19075@psf.upfronthosting.co.za> Jason Yeo added the comment: > Nothing much AFAIK, except that someone must be willing to maintain the code. I wrote the code, I guess I should be the one maintaining this. I am new to this, what must I look out for if I want to maintain this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 09:55:26 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 Nov 2013 08:55:26 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384592126.83.0.297190972689.issue19553@psf.upfronthosting.co.za> Ned Deily added the comment: Here's a patch for review. It implements: * a new configure option: --with(out)-ensurepip=[=upgrade] "install" or "upgrade" using bundled pip * a new makefile macro ENSUREPIP that can be supplied to a "make install" or "make altinstall" target to override the configure option: make [alt]install ENSUREPIP=[install|upgrade|no] While testing the above I've identified a number of issues. I haven't had time to do more than a quick triage on most of them so the initial analyses may be wrong. Wheel installation issues: 1. Files, but not directories, from the pip/setuptools wheel were installed with a different group id than when installed with pip from a source dist. (This was comparing the current checked-in wheel file versus a normal sdist pip install of pip, on OS X.) It appears that the files installed from wheels ended up with the effective gid of the installing process, while those from sdist files had the group id of the parent directory like other files installed by make [alt]install (POSIX allows either behavior but pip should be consistent). 2. It appears that .py files installed from wheels do not get compiled upon installation (no __pycache__ or .pyc) whereas non-wheel pip installed .py files do get compiled. (See also 7.) 3. The unversioned pip file name differs between wheel and non-wheel installs: pip3.4 vs pip-3.4. 4. No unversioned version of easy_install is created for wheel installs, only easy_install-3.4. General pip issues: 5. Various ResourceWarnings about unclosed files and sockets were observed when used with a debug python. 6. Perhaps more a Distutils issue but the files and directories created under lib/python3.4/site-packages use the process default umask and thus may have permissions different from the files installed for the standard library. The latter get standard "install" permissions because the main Python setup.py subclasses and overrides the default Distutils install_lib class to accomplish this. Since the Makefile does not know exactly what files have been installed by ensurepip, the install and altinstall targets could only guess at what files need to be fixed up. 7. Other standard library .py files installed by "make [alt]install" are compiled to both .pyc and .pyo versions. ensurepip issue: 8. "make install" is a superset of "make altinstall" and one would expect the results of (a) "make install" to be the same as (b) "make altinstall && make install". However (b) results in "python -m ensurepip --altinstall --upgrade && python -m ensurepip --upgrade" which results in no unversioned pip files being installed as the second call to pip does nothing: Requirement already up-to-date: setuptools in /py/dev/3x/root/uxd/lib/python3.4/site-packages Requirement already up-to-date: pip in /py/dev/3x/root/uxd/lib/python3.4/site-packages Perhaps ensurepip module should also set "--ignore-installed" when calling pip? Makefile: 9. I still need to create [alt]installunixtools links for pip* in Mac/Makefile.in. ---------- nosy: +dstufft, loewis stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 09:56:58 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 Nov 2013 08:56:58 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384592218.46.0.984053703955.issue19553@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- keywords: +patch Added file: http://bugs.python.org/file32646/issue19553.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 09:58:14 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 Nov 2013 08:58:14 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384592294.69.0.997463375541.issue19553@psf.upfronthosting.co.za> Changes by Ned Deily : Removed file: http://bugs.python.org/file32646/issue19553.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 09:59:12 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 Nov 2013 08:59:12 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384592352.5.0.587287301667.issue19553@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file32647/issue19553.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 10:00:45 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 09:00:45 +0000 Subject: [issue19608] devguide needs pictures In-Reply-To: <1384510390.93.0.961404476169.issue19608@psf.upfronthosting.co.za> Message-ID: <1384592445.82.0.792767569699.issue19608@psf.upfronthosting.co.za> Nick Coghlan added the comment: We're not designers either. However, something that *could* help is to investigate whether or not the blockdiag and seqdiag Sphinx extensions can be integrated into the build toolchain for the devguide and the main Python docs. That would drastically lower the barrier for including basic diagrams where appropriate (since it would just be ASCII art inside an appropriate Sphinx directive) and thus greatly increase the chance of it happening. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 10:01:59 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 09:01:59 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1384592519.45.0.699154683038.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adjusting the target version, since it isn't feasible to move away from the current behaviour any earlier than Python 3.5. ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 10:16:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 09:16:51 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384593411.8.0.669225419121.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: The full input/output type specifications can't be implemented sensibly without also defining at least a ByteSequence ABC. While I think it's a good idea in the long run, there's no feasible way to design such a system in the time remaining before the Python 3.4 feature freeze. However, we could do something much simpler as a blacklist API: def is_unicode_codec(name): """Returns true if this is the name of a known Unicode text encoding""" def set_as_non_unicode(name): """Indicates that the named codec is not a Unicode codec""" And then the codecs module would just maintain a set internally of all the names explicitly flagged as non-unicode. Such an API remains useful even if the input/output type support is added in Python 3.5 (since "codecs.is_unicode_codec(name)" is a bit simpler thing to explain than the exact type restrictions). Alternatively, implementing just the "encodes_to" and "decodes_to" attributes would be enough for str.encode, bytes.decode and bytearray.decode to reject known bad encodings early, leaving the input type checks to the codecs for now (since it is correctly defining "encode_from" and "decode_from" for many stdlib codecs that would need the ByteSequence ABC). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 10:34:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 09:34:43 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1384594483.28.0.0252618498266.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: Something else that this might make simpler: the unittest.TestCase.subTest API is currently kind of ugly. If the subtest details could be stored as a frame annotation instead... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 10:50:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 09:50:58 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384595458.26.0.31264005461.issue19619@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think internal blacklist for all standard non-unicode codecs will be enough to prevent the denial of service attack in maintenance releases. ---------- components: +Unicode nosy: +doerwalter, ezio.melotti priority: normal -> critical stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 11:24:39 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 10:24:39 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384597479.7.0.380566361319.issue19183@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks - are those numbers with the current feature branch, and hence no small string optimization? To be completely clear, I'm happy to accept a performance penalty to fix the hash algorithm. I'd just like to know exactly how big a penalty I'm accepting, and whether taking advantage of the small string optimization makes it measurably smaller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 11:49:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 10:49:44 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <1384598984.17.0.191543702732.issue19586@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Jason just have fixed assertEquals usage in 3.4. ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 11:51:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 10:51:35 +0000 Subject: [issue19535] Test failures with -OO In-Reply-To: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> Message-ID: <1384599095.6.0.678331616224.issue19535@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. ---------- assignee: -> serhiy.storchaka keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file32648/issue19535.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 11:57:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 10:57:04 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <3dMD000qjGzNQ8@mail.python.org> Roundup Robot added the comment: New changeset 27567e954cbe by Serhiy Storchaka in branch '2.7': Issue #19590: Use specific asserts in email tests. http://hg.python.org/cpython/rev/27567e954cbe New changeset db6ea9abd317 by Serhiy Storchaka in branch '3.3': Issue #19590: Use specific asserts in email tests. http://hg.python.org/cpython/rev/db6ea9abd317 New changeset cc8e56886807 by Serhiy Storchaka in branch 'default': Issue #19590: Use specific asserts in email tests. http://hg.python.org/cpython/rev/cc8e56886807 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 11:58:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 10:58:31 +0000 Subject: [issue19590] Use specific asserts in test_email In-Reply-To: <1384461842.17.0.928919651646.issue19590@psf.upfronthosting.co.za> Message-ID: <1384599511.36.0.0787442060505.issue19590@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 12:01:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 11:01:05 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384599665.09.0.00796451650683.issue19183@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, it's better to use a geometric mean when agregating benchmark results into a single score. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 12:04:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 11:04:27 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <3dMD8V2t5fz7Lpg@mail.python.org> Roundup Robot added the comment: New changeset 6a599249e8b7 by Serhiy Storchaka in branch 'default': Issue #5202: Added support for unseekable files in the wave module. http://hg.python.org/cpython/rev/6a599249e8b7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 12:07:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 11:07:26 +0000 Subject: [issue19618] test_sysconfig_module fails on Ubuntu 12.04 In-Reply-To: <1384562223.55.0.434561574175.issue19618@psf.upfronthosting.co.za> Message-ID: <1384600046.11.0.717412876543.issue19618@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 12:44:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 11:44:40 +0000 Subject: [issue19623] Support for writing aifc to unseekable file Message-ID: <1384602280.29.0.166311165953.issue19623@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The aifc module documentation mentions that underlying file can be unseekable if the number of frames are specified. When used for writing, the file object should be seekable, unless you know ahead of time how many samples you are going to write in total and use :meth:`writeframesraw` and :meth:`setnframes`. But this doesn't work. >>> import aifc >>> f = aifc.open('/dev/stdout', 'w') >>> f.setnchannels(1) >>> f.setsampwidth(1) >>> f.setframerate(8000) >>> f.setcomptype(b'NONE', b'not compressed') >>> f.setnframes(1) >>> f.writeframesraw(b'\0') Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/aifc.py", line 695, in writeframesraw self._ensure_header_written(len(data)) File "/home/serhiy/py/cpython/Lib/aifc.py", line 763, in _ensure_header_written self._write_header(datasize) File "/home/serhiy/py/cpython/Lib/aifc.py", line 791, in _write_header self._form_length_pos = self._file.tell() OSError: [Errno 29] Illegal seek Here is a patch which makes the code to conform with the documentation. ---------- components: Library (Lib) files: aifc_write_unseekable.patch keywords: patch messages: 203026 nosy: r.david.murray, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Support for writing aifc to unseekable file type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32649/aifc_write_unseekable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 12:48:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 11:48:27 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384602507.41.0.841342688421.issue19553@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the patch and the detailed feedback, Ned! I've pinged the pip folks on https://github.com/pypa/pip/issues/1322 to help triage these issues as existing pip upstream issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 12:57:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 11:57:36 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1384603056.48.0.0962900887384.issue5202@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 12:59:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 11:59:13 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384603153.53.0.793395121902.issue19553@psf.upfronthosting.co.za> Nick Coghlan added the comment: For 8 in particular, I'm inclined to push that over to the pip side of the fence (as with the first 7 points). pip knows that ensurepip is involved (due to ENSUREPIP_OPTIONS being set in the environment), so it may be able to check if the unversioned scripts are missing and generate them appropriately in that case. How do we want to proceed for the first beta? Given the integration timeline in the PEP (which doesn't require the shipped version of pip to be locked until just before beta 2), I'm inclined not to consider the additional quirks Ned found as blockers for beta 1, but we do need to get them fixed for beta 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:01:26 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 16 Nov 2013 12:01:26 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384593411.8.0.669225419121.issue19619@psf.upfronthosting.co.za> Message-ID: <52875E93.4020803@egenix.com> Marc-Andre Lemburg added the comment: On 16.11.2013 10:16, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > The full input/output type specifications can't be implemented sensibly without also defining at least a ByteSequence ABC. While I think it's a good idea in the long run, there's no feasible way to design such a system in the time remaining before the Python 3.4 feature freeze. > > However, we could do something much simpler as a blacklist API: > > def is_unicode_codec(name): > """Returns true if this is the name of a known Unicode text encoding""" > > def set_as_non_unicode(name): > """Indicates that the named codec is not a Unicode codec""" > > And then the codecs module would just maintain a set internally of all the names explicitly flagged as non-unicode. That doesn't look flexible enough to cover the various different input/output types. > Such an API remains useful even if the input/output type support is added in Python 3.5 (since "codecs.is_unicode_codec(name)" is a bit simpler thing to explain than the exact type restrictions). > > Alternatively, implementing just the "encodes_to" and "decodes_to" attributes would be enough for str.encode, bytes.decode and bytearray.decode to reject known bad encodings early, leaving the input type checks to the codecs for now (since it is correctly defining "encode_from" and "decode_from" for many stdlib codecs that would need the ByteSequence ABC). The original idea we discussed some time ago was to add a mapping or list attribute to CodecInfo which lists all supported type combinations. The codecs module could then make this information available through a simple type check API (which also caches the lookups for performance reasons), e.g. codecs.types_supported(encoding, input_type, output_type) -> boolean. Returns True/False depending on whether the codec for encoding supports the given input and output types. Usage: if not codecs.types_support(encoding, str, bytes): # not a Unicode -> 8-bit codec ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:02:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 12:02:35 +0000 Subject: [issue16685] audioop functions shouldn't accept strings In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <3dMFRZ5l4tz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset b96f4ee1b08b by Serhiy Storchaka in branch 'default': Issue #16685: Added support for writing any bytes-like objects in the aifc, http://hg.python.org/cpython/rev/b96f4ee1b08b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:04:26 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 16 Nov 2013 12:04:26 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <1384603466.34.0.591254520714.issue19504@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Can be closed? Not sure - I've just updated the logging, venv and launcher code and docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:06:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 12:06:03 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1384603563.31.0.856874181892.issue8311@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:07:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 12:07:43 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1384603663.05.0.465258716117.issue8311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Committed in changeset b96f4ee1b08b. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:09:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 12:09:22 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <3dMFbP6QQmz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 932db179585d by Serhiy Storchaka in branch 'default': Fixed issue number for issue #8311. http://hg.python.org/cpython/rev/932db179585d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:10:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 12:10:40 +0000 Subject: [issue15381] Optimize BytesIO to do less reallocations when written, similarly to StringIO In-Reply-To: <1342527166.53.0.694574948468.issue15381@psf.upfronthosting.co.za> Message-ID: <1384603840.04.0.245982454391.issue15381@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Only one week left before feature freeze. Please benchmark this patch on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:21:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 12:21:47 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum Message-ID: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: It will be good to switch constants in the errno module to IntEnum. ---------- components: Extension Modules, Library (Lib) messages: 203035 nosy: barry, eli.bendersky, ethan.furman, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Switch constants in the errno module to IntEnum versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:30:39 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 12:30:39 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384605039.56.0.360333589667.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that users can completely blacklist any codec that hasn't been imported yet by preventing imports of that codec definition: >>> import sys, encodings >>> blocked_codecs = "bz2_codec", "zlib_codec" >>> for name in blocked_codecs: ... sys.modules["encodings." + name] = None ... setattr(encodings, name, None) ... >>> b"payload".decode("bz2_codec") Traceback (most recent call last): File "", line 1, in LookupError: unknown encoding: bz2_codec >>> b"payload".decode("zlib_codec") Traceback (most recent call last): File "", line 1, in LookupError: unknown encoding: zlib_codec Add in an "encodings._cache.clear()" and you can also block the use of previously used codecs. Regardless of what else we do, we should document this so that users know how to do it. This means the case we're handling in this issue is just the one where we want to block a codec from the builtin method APIs, while still allowing it in the codecs module APIs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:44:33 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 12:44:33 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384605873.95.0.519157543259.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: Now that I understand Victor's proposal better, I actually agree with it, I just think the attribute names need to be "encodes_to" and "decodes_to". With Victor's proposal, *input* validity checks (including type checks) would remain the responsibility of the codec itself. What the new attributes would enable is *output* type checks *without having to perform the encoding or decoding operation first*. codecs will be free to leave these as None to retain the current behaviour of "try it and see". The specific field names "input_type" and "output_type" aren't accurate, since the acceptable input types for encoding or decoding are likely to be more permissive than the specific output type for the other operation. Most of the binary codecs, for example, accept any bytes-like object as input, but produce bytes objects as output for both encoding and decoding. For Unicode encodings, encoding is strictly str->bytes, but decoding is generally the more permissive bytes-like object -> str. I would still suggest providing the following helper function in the codecs module (the name has changed from my earlier suggestion and I now suggest implementing it in terms of Victor's suggestion with more appropriate field names): def is_text_encoding(name): """Returns true if the named encoding is a Unicode text encoding""" info = codecs.lookup(name) return info.encodes_to is bytes and info.decodes_to is str This approach covers all the current stdlib codecs: - the text encodings encode to bytes and decode to str - the binary transforms encode to bytes and also decode to bytes - the lone text transform (rot_13) encodes and decodes to str This approach also makes it possible for a type inference engine (like mypy) to potentially analyse codec use, and could be expanded in 3.5 to offer type checked binary and text transform APIs that filtered codecs appropriately according to their output types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 13:58:57 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 16 Nov 2013 12:58:57 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384606737.11.0.924471829108.issue16596@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 14:25:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 13:25:02 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1384608302.39.0.349312640487.issue19548@psf.upfronthosting.co.za> Nick Coghlan added the comment: Another big one: the encodings module API is not documented in the prose docs, and nor is the interface between the default search function and the individual encoding definitions. There's some decent info in help(encoding) though. The interaction with the import system could also be documented better - you can actually blacklist codecs by manipulating sys.modules and the encodings namespace, and you can search additional locations for codec modules by manipulating encodings.__path__ (even without it being declared as a namespace package) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 14:26:27 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 16 Nov 2013 13:26:27 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384605873.95.0.519157543259.issue19619@psf.upfronthosting.co.za> Message-ID: <5287727F.9020702@egenix.com> Marc-Andre Lemburg added the comment: On 16.11.2013 13:44, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Now that I understand Victor's proposal better, I actually agree with it, I just think the attribute names need to be "encodes_to" and "decodes_to". > > With Victor's proposal, *input* validity checks (including type checks) would remain the responsibility of the codec itself. What the new attributes would enable is *output* type checks *without having to perform the encoding or decoding operation first*. codecs will be free to leave these as None to retain the current behaviour of "try it and see". > > The specific field names "input_type" and "output_type" aren't accurate, since the acceptable input types for encoding or decoding are likely to be more permissive than the specific output type for the other operation. Most of the binary codecs, for example, accept any bytes-like object as input, but produce bytes objects as output for both encoding and decoding. For Unicode encodings, encoding is strictly str->bytes, but decoding is generally the more permissive bytes-like object -> str. > > I would still suggest providing the following helper function in the codecs module (the name has changed from my earlier suggestion and I now suggest implementing it in terms of Victor's suggestion with more appropriate field names): > > def is_text_encoding(name): > """Returns true if the named encoding is a Unicode text encoding""" > info = codecs.lookup(name) > return info.encodes_to is bytes and info.decodes_to is str > > This approach covers all the current stdlib codecs: > > - the text encodings encode to bytes and decode to str > - the binary transforms encode to bytes and also decode to bytes > - the lone text transform (rot_13) encodes and decodes to str > > This approach also makes it possible for a type inference engine (like mypy) to potentially analyse codec use, and could be expanded in 3.5 to offer type checked binary and text transform APIs that filtered codecs appropriately according to their output types. Nick, you are missing an important point: codecs can have any number of input/output type combinations, e.g. they may convert bytes -> str and str->str (output type depends on input type). For this reason the simplistic approach with just one type conversion will not work. Codecs will have to provide a *mapping* of input to output types for each direction (encoding and decoding) - either as Python mapping or as list of mapping tuples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 14:33:13 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 16 Nov 2013 13:33:13 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384608302.39.0.349312640487.issue19548@psf.upfronthosting.co.za> Message-ID: <52877416.9070908@egenix.com> Marc-Andre Lemburg added the comment: On 16.11.2013 14:25, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Another big one: the encodings module API is not documented in the prose docs, and nor is the interface between the default search function and the individual encoding definitions. There's some decent info in help(encoding) though. > > The interaction with the import system could also be documented better - you can actually blacklist codecs by manipulating sys.modules and the encodings namespace, and you can search additional locations for codec modules by manipulating encodings.__path__ (even without it being declared as a namespace package) Those were not documented on purpose, since they are an implementation detail of the encodings package search function. If you document them now, you'll set the implementation in stone, making future changes to the logic difficult. I'd advise against this to stay flexible, unless you want to open up the encodings package as namespace package - then you'd have to add documentation for the import interface. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 14:37:28 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 13:37:28 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384609048.96.0.735332629278.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: Such codecs can be represented (for 3.4) by simply not setting the attribute and leaving the output types unspecified. We don't need that complexity for the standard library, and the "not specified" escape hatch means complex codecs will be no worse off than they are now. The elegance of Victor's proposal is that it doesn't lock us out of solving the more complex cases later (where the codec's output type depends on the input type) by permitting a tuple or dict mapping input types to output types for "encodes_to" and "decodes_to", while still solving all of our immediate problems. This is especially relevant since we can't effectively represent codec input types until we have a ByteSequence ABC to cover the "bytes-like object" case, so demanding that the general case be handled immediately is the same as requesting that the feature be postponed completely to Python 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 14:59:32 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 16 Nov 2013 13:59:32 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384609048.96.0.735332629278.issue19619@psf.upfronthosting.co.za> Message-ID: <52877A41.7020706@egenix.com> Marc-Andre Lemburg added the comment: On 16.11.2013 14:37, Nick Coghlan wrote: > > Such codecs can be represented (for 3.4) by simply not setting the attribute and leaving the output types unspecified. We don't need that complexity for the standard library, and the "not specified" escape hatch means complex codecs will be no worse off than they are now. > > The elegance of Victor's proposal is that it doesn't lock us out of solving the more complex cases later (where the codec's output type depends on the input type) by permitting a tuple or dict mapping input types to output types for "encodes_to" and "decodes_to", while still solving all of our immediate problems. > > This is especially relevant since we can't effectively represent codec input types until we have a ByteSequence ABC to cover the "bytes-like object" case, so demanding that the general case be handled immediately is the same as requesting that the feature be postponed completely to Python 3.5. I don't agree. The mapping API is not much more complex than the single type combination proposal and it could well handle the case for which you'd have to add a ByteSequence ABC now to be able to define this single type combination using one ABC. Rather than adding the ABC now, you could simply add all relevant types to the mappings and then replace those mappings with an ABC in 3.5. BTW: I don't see a need to rush any of this. If more discussion is needed, then it's better to have a more complete proposal implemented in 3.5 than to try to do patchwork this late in the 3.4 release process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 15:03:59 2013 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 16 Nov 2013 14:03:59 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1384610639.68.0.328314640621.issue19548@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could they be documented with a massive warning in red "Cpython implementation detail - subject to change without notice"? Or documented in a place that is only accessible to developers and not users? Or...??? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 15:13:42 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 16 Nov 2013 14:13:42 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384610639.68.0.328314640621.issue19548@psf.upfronthosting.co.za> Message-ID: <52877D93.1070101@egenix.com> Marc-Andre Lemburg added the comment: On 16.11.2013 15:03, Mark Lawrence wrote: > > Mark Lawrence added the comment: > > Could they be documented with a massive warning in red "Cpython implementation detail - subject to change without notice"? Or documented in a place that is only accessible to developers and not users? Or...??? The API is documented in encodings/__init__.py for developers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 15:41:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Nov 2013 14:41:16 +0000 Subject: [issue15381] Optimize BytesIO to do less reallocations when written, similarly to StringIO In-Reply-To: <1342527166.53.0.694574948468.issue15381@psf.upfronthosting.co.za> Message-ID: <1384612876.4.0.992459320162.issue15381@psf.upfronthosting.co.za> STINNER Victor added the comment: > Only one week left before feature freeze. This issue is an optimization, not a new feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 15:52:09 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 14:52:09 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384613529.16.0.079419034375.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: The only reasonable way to accurately represent "anything that exposes a buffer memoryview can read" as a type check is to write an appropriately duck-typed ABC. You can't enumerate all the types that the binary codecs accept as input, because that list of types isn't finite (unlike the output types, which are far more tightly constrained). I'd also be fine with Serhiy's suggestion of a private "non Unicode codec" set that is maintained by hand and checked *before* the codec operations in the codec methods - that then just becomes an internal implementation detail to improve the efficiency of the output type checks where we have the additional info needed to save the interpreter some work. ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Sat Nov 16 14:26:23 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Sat, 16 Nov 2013 14:26:23 +0100 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384605873.95.0.519157543259.issue19619@psf.upfronthosting.co.za> References: <1384605873.95.0.519157543259.issue19619@psf.upfronthosting.co.za> Message-ID: <5287727F.9020702@egenix.com> On 16.11.2013 13:44, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Now that I understand Victor's proposal better, I actually agree with it, I just think the attribute names need to be "encodes_to" and "decodes_to". > > With Victor's proposal, *input* validity checks (including type checks) would remain the responsibility of the codec itself. What the new attributes would enable is *output* type checks *without having to perform the encoding or decoding operation first*. codecs will be free to leave these as None to retain the current behaviour of "try it and see". > > The specific field names "input_type" and "output_type" aren't accurate, since the acceptable input types for encoding or decoding are likely to be more permissive than the specific output type for the other operation. Most of the binary codecs, for example, accept any bytes-like object as input, but produce bytes objects as output for both encoding and decoding. For Unicode encodings, encoding is strictly str->bytes, but decoding is generally the more permissive bytes-like object -> str. > > I would still suggest providing the following helper function in the codecs module (the name has changed from my earlier suggestion and I now suggest implementing it in terms of Victor's suggestion with more appropriate field names): > > def is_text_encoding(name): > """Returns true if the named encoding is a Unicode text encoding""" > info = codecs.lookup(name) > return info.encodes_to is bytes and info.decodes_to is str > > This approach covers all the current stdlib codecs: > > - the text encodings encode to bytes and decode to str > - the binary transforms encode to bytes and also decode to bytes > - the lone text transform (rot_13) encodes and decodes to str > > This approach also makes it possible for a type inference engine (like mypy) to potentially analyse codec use, and could be expanded in 3.5 to offer type checked binary and text transform APIs that filtered codecs appropriately according to their output types. Nick, you are missing an important point: codecs can have any number of input/output type combinations, e.g. they may convert bytes -> str and str->str (output type depends on input type). For this reason the simplistic approach with just one type conversion will not work. Codecs will have to provide a *mapping* of input to output types for each direction (encoding and decoding) - either as Python mapping or as list of mapping tuples. -- Marc-Andre Lemburg eGenix.com From mal at egenix.com Sat Nov 16 14:33:10 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Sat, 16 Nov 2013 14:33:10 +0100 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384608302.39.0.349312640487.issue19548@psf.upfronthosting.co.za> References: <1384608302.39.0.349312640487.issue19548@psf.upfronthosting.co.za> Message-ID: <52877416.9070908@egenix.com> On 16.11.2013 14:25, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Another big one: the encodings module API is not documented in the prose docs, and nor is the interface between the default search function and the individual encoding definitions. There's some decent info in help(encoding) though. > > The interaction with the import system could also be documented better - you can actually blacklist codecs by manipulating sys.modules and the encodings namespace, and you can search additional locations for codec modules by manipulating encodings.__path__ (even without it being declared as a namespace package) Those were not documented on purpose, since they are an implementation detail of the encodings package search function. If you document them now, you'll set the implementation in stone, making future changes to the logic difficult. I'd advise against this to stay flexible, unless you want to open up the encodings package as namespace package - then you'd have to add documentation for the import interface. -- Marc-Andre Lemburg eGenix.com From mal at egenix.com Sat Nov 16 14:59:29 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Sat, 16 Nov 2013 14:59:29 +0100 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384609048.96.0.735332629278.issue19619@psf.upfronthosting.co.za> References: <1384609048.96.0.735332629278.issue19619@psf.upfronthosting.co.za> Message-ID: <52877A41.7020706@egenix.com> On 16.11.2013 14:37, Nick Coghlan wrote: > > Such codecs can be represented (for 3.4) by simply not setting the attribute and leaving the output types unspecified. We don't need that complexity for the standard library, and the "not specified" escape hatch means complex codecs will be no worse off than they are now. > > The elegance of Victor's proposal is that it doesn't lock us out of solving the more complex cases later (where the codec's output type depends on the input type) by permitting a tuple or dict mapping input types to output types for "encodes_to" and "decodes_to", while still solving all of our immediate problems. > > This is especially relevant since we can't effectively represent codec input types until we have a ByteSequence ABC to cover the "bytes-like object" case, so demanding that the general case be handled immediately is the same as requesting that the feature be postponed completely to Python 3.5. I don't agree. The mapping API is not much more complex than the single type combination proposal and it could well handle the case for which you'd have to add a ByteSequence ABC now to be able to define this single type combination using one ABC. Rather than adding the ABC now, you could simply add all relevant types to the mappings and then replace those mappings with an ABC in 3.5. BTW: I don't see a need to rush any of this. If more discussion is needed, then it's better to have a more complete proposal implemented in 3.5 than to try to do patchwork this late in the 3.4 release process. -- Marc-Andre Lemburg eGenix.com From mal at egenix.com Sat Nov 16 15:13:39 2013 From: mal at egenix.com (M.-A. Lemburg) Date: Sat, 16 Nov 2013 15:13:39 +0100 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384610639.68.0.328314640621.issue19548@psf.upfronthosting.co.za> References: <1384610639.68.0.328314640621.issue19548@psf.upfronthosting.co.za> Message-ID: <52877D93.1070101@egenix.com> On 16.11.2013 15:03, Mark Lawrence wrote: > > Mark Lawrence added the comment: > > Could they be documented with a massive warning in red "Cpython implementation detail - subject to change without notice"? Or documented in a place that is only accessible to developers and not users? Or...??? The API is documented in encodings/__init__.py for developers. -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Sat Nov 16 15:53:51 2013 From: report at bugs.python.org (irdb) Date: Sat, 16 Nov 2013 14:53:51 +0000 Subject: [issue19625] IDLE should use UTF-8 as it's default encoding Message-ID: <1384613631.52.0.52309466252.issue19625@psf.upfronthosting.co.za> New submission from irdb: >>> s = '?' Unsupported characters in input I'm using windows 8 and Python 2.7.6. The same line works perfectly if I save it in a module with encoding set to UTF-8; but it's really annoying that I can't test my code directly in IDLE. ---------- components: IDLE messages: 203047 nosy: irdb priority: normal severity: normal status: open title: IDLE should use UTF-8 as it's default encoding versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 15:54:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 14:54:28 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384613668.52.0.414736053361.issue19183@psf.upfronthosting.co.za> Antoine Pitrou added the comment: So, amusingly, Christian's patch seems to be 4-5% faster than vanilla on many benchmarks here (Sandy Bridge Core i5, 64-bit, gcc 4.8.1). A couple of benchmarks are a couple % slower, but nothing severe. This without the small strings optimization. On top of that, the small strings optimization seems to have varying effects, some positive, some negative, so it doesn't seem to be desirable (on this platform anyway). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 15:55:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 14:55:12 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <52877416.9070908@egenix.com> Message-ID: Nick Coghlan added the comment: On 16 November 2013 23:33, Marc-Andre Lemburg wrote: > On 16.11.2013 14:25, Nick Coghlan wrote: > Those were not documented on purpose, since they are an implementation > detail of the encodings package search function. > > If you document them now, you'll set the implementation in stone, > making future changes to the logic difficult. I'd advise against > this to stay flexible, unless you want to open up the encodings > package as namespace package - then you'd have to add documentation > for the import interface. Yes, that was what got me thinking along those lines, but to make that possible, the contents of encodings/__init__.py would need to be moved somewhere else. So this probably isn't on the table for 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 15:56:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 14:56:29 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384613789.7.0.472279041173.issue19183@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Benchmark report (without the small strings optimization): http://bpaste.net/show/UohtA8dmSREbrtsJYfTI/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 16:36:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 15:36:06 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <3dML9y2Ynyz7Lsc@mail.python.org> Roundup Robot added the comment: New changeset ff471d8526a8 by Jason R. Coombs in branch 'default': Issue #19586: Update remaining deprecated assertions to their preferred usage. http://hg.python.org/cpython/rev/ff471d8526a8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 16:37:26 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 15:37:26 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <1384616246.18.0.769202925837.issue19586@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Thanks Gregory for the report and patch. I was unaware of this ticket when I was correcting the deprecation warnings for distutils, so I've just used your patch as a reference and pushed the remaining fixes as you indicated. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 16:44:18 2013 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 16 Nov 2013 15:44:18 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384616658.97.0.400793251083.issue16510@psf.upfronthosting.co.za> Jason R. Coombs added the comment: A third counterargument is: 3. Newer developers (and even seasoned ones) adding new tests may use existing tests as a model for best practices. If the existing tests model sub-optimal practices, then those practices will be perpetuated both in the codebase and in the minds of contributors. Given that Serhiy has so diligently prepared and updated the patch, I'm inclined to say the codebase would be better off accepting the patch. David, can you imagine a process by which a patch like this could be acceptable? ---------- nosy: +jason.coombs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 16:47:01 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 Nov 2013 15:47:01 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384616821.06.0.642548117945.issue19553@psf.upfronthosting.co.za> Ned Deily added the comment: I think the most serious problem is 3 since it directly affects the end user. It would be good to have that fixed someway for 3.4.0b1. Resolutions to the other items could wait. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 16:53:32 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 16 Nov 2013 15:53:32 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384617212.14.0.528496264992.issue19553@psf.upfronthosting.co.za> Donald Stufft added the comment: 1. This is bound to be an issue that stems from the fact pip is doing the install instead of distutils. It probably makes sense to use the group id of the parent directory I think? 2. This is a side effect of Wheel being a whole new way to install, previously pip just did setup.py install which took care of this bit. It shouldn't be a problem to make this happen. 3. Which sdist were you testing? The one from PyPI? We switched the style of that in 1.5 in order to better match how Python itself handles it versioned commands. 4. You mean when you do --default-install? (Or whatever it's called if Nick changed it). 5. I don't think any of us have ever run pip under a debug build of Python so that's probably why. It should probably be fixed up. 6. I'm not sure what the right answer is here. We recently switched pip to install using the default umask because previously it was using whatever permissions where in the archive. If the make file wants to control the permissions of the files can't it simply adjust the umask before calling ensurepip? 7. See the answer to #2. 8. I'll need to think about this, we don't want to blindly add --ignore-installed because we don't want ensurepip to downgrade pip if a newer version is installed. Things that I see as issues so far I've created upstream tickets for, things that I still have questions on I didn't. https://github.com/pypa/pip/issues/1324 https://github.com/pypa/pip/issues/1325 https://github.com/pypa/pip/issues/1326 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 16:58:03 2013 From: report at bugs.python.org (Gregory Salvan) Date: Sat, 16 Nov 2013 15:58:03 +0000 Subject: [issue19586] distutils: Remove assertEquals and assert_ deprecation warnings In-Reply-To: <1384450078.17.0.0106605796399.issue19586@psf.upfronthosting.co.za> Message-ID: <1384617483.7.0.00550460913355.issue19586@psf.upfronthosting.co.za> Gregory Salvan added the comment: nice if it helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 17:03:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 16:03:24 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384617804.9.0.397939983524.issue16510@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is synchronized to tip the patch which doesn't include patches for already separated children issues. It touches 129 files and modifies over 600 lines. ---------- Added file: http://bugs.python.org/file32650/tests_asserts_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 17:13:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 16:13:21 +0000 Subject: [issue19625] IDLE should use UTF-8 as it's default encoding In-Reply-To: <1384613631.52.0.52309466252.issue19625@psf.upfronthosting.co.za> Message-ID: <1384618401.55.0.429107197854.issue19625@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue15809. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> IDLE console uses incorrect encoding. type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 17:30:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 16:30:15 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1384619415.91.0.373578533852.issue16203@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Matthew, could you please answer my question? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 17:31:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 16 Nov 2013 16:31:42 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384619502.76.0.485693327188.issue19553@psf.upfronthosting.co.za> Nick Coghlan added the comment: For the record: the current "--default-pip" option is the one that was previously "--default-install". I switched it because having the default installation behaviour be something other than the behaviour requested via the "--default-install" option really didn't sound right to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 17:33:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 16:33:36 +0000 Subject: [issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods In-Reply-To: <1377532757.24.0.123652540945.issue18842@psf.upfronthosting.co.za> Message-ID: <1384619616.06.0.205139493426.issue18842@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Should we add these methods to other concrete Number subclasses (as Fraction and complex)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 17:37:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 16:37:07 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1384619827.31.0.800218101717.issue13477@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have added comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 17:38:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 16:38:52 +0000 Subject: [issue19099] struct.pack fails first time with unicode fmt In-Reply-To: <1380270487.08.0.885911184861.issue19099@psf.upfronthosting.co.za> Message-ID: <1384619932.86.0.602094013247.issue19099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Any comments? ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 17:59:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 16:59:40 +0000 Subject: [issue17806] Add keyword args support to str/bytes.expandtabs() In-Reply-To: <1366507154.61.0.217389659931.issue17806@psf.upfronthosting.co.za> Message-ID: <1384621180.36.0.827154636695.issue17806@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ezio, you can commit the patch if you want. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 18:03:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 17:03:03 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1384621383.21.0.0203567383271.issue10712@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 18:11:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 17:11:11 +0000 Subject: [issue17806] Add keyword args support to str/bytes.expandtabs() In-Reply-To: <1366507154.61.0.217389659931.issue17806@psf.upfronthosting.co.za> Message-ID: <3dMNHf5nncz7Lrd@mail.python.org> Roundup Robot added the comment: New changeset 82b58807f481 by Ezio Melotti in branch 'default': #17806: Added keyword-argument support for "tabsize" to str/bytes.expandtabs(). http://hg.python.org/cpython/rev/82b58807f481 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 18:12:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 16 Nov 2013 17:12:59 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384621979.64.0.0500765503457.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: The numbers are between cpython default tip and my feature branch. I have pulled and merged all upstream changes into my feature branch yesterday. The results with "sso" in the file name are with small string optimization. Performance greatly depends on compiler and CPU. In general SipHash24 is faster on modern compilers and modern CPUs. MSVC generates slower code for SipHash24 but I haven't optimized the code for MSVC yet. Perhaps Serhiy is able to do his magic. :) PS: I have uploaded more benchmarks. The directories contain the raw output and CSV files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 18:18:12 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 17:18:12 +0000 Subject: [issue17806] Add keyword args support to str/bytes.expandtabs() In-Reply-To: <1366507154.61.0.217389659931.issue17806@psf.upfronthosting.co.za> Message-ID: <1384622292.95.0.589542922229.issue17806@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 18:35:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 17:35:42 +0000 Subject: [issue19255] Don't "wipe" builtins at shutdown In-Reply-To: <1381700055.32.0.691639350713.issue19255@psf.upfronthosting.co.za> Message-ID: <1384623342.54.0.761540876651.issue19255@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 18:47:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 17:47:22 +0000 Subject: [issue19535] Test failures with -OO In-Reply-To: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> Message-ID: <1384624042.69.0.793487417525.issue19535@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually test_inspect is affected by -O. Here is updated patch. ---------- Added file: http://bugs.python.org/file32651/issue19535_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 18:52:41 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 16 Nov 2013 17:52:41 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384613529.16.0.079419034375.issue19619@psf.upfronthosting.co.za> Message-ID: <5287B0E5.7040909@egenix.com> Marc-Andre Lemburg added the comment: On 16.11.2013 15:52, Nick Coghlan wrote: > > The only reasonable way to accurately represent "anything that exposes a buffer memoryview can read" as a type check is to write an appropriately duck-typed ABC. You can't enumerate all the types that the binary codecs accept as input, because that list of types isn't finite (unlike the output types, which are far more tightly constrained). Theoretically, yes. However, in practice, you'd only be interested in a few type combinations (until the ABC is available). > I'd also be fine with Serhiy's suggestion of a private "non Unicode codec" set that is maintained by hand and checked *before* the codec operations in the codec methods - that then just becomes an internal implementation detail to improve the efficiency of the output type checks where we have the additional info needed to save the interpreter some work. For 3.4 that would also do fine :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 18:54:01 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 Nov 2013 17:54:01 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1384624441.55.0.725917686965.issue19553@psf.upfronthosting.co.za> Ned Deily added the comment: 1. Yes, I think so. 2. OK 3. Ah, I was just using the default 1.4.1 from PyPI. With current dev from github, the result is now pip3.4 like the wheel install. So once 1.5.x is released, this shouldn't be a problem. 4. Sorry, I was imprecise. For "-m ensurepip --default-pip", both "easy_install" and "easy_install-3.4" are created. For just "-m ensurepip", only "easy_install-3.4". What differs from pip is that no "easy_install-3" is created in either case. But thinking about it, that's probably just fine if setuptools isn't creating it today; we're not trying to encourage its use! So, no action needed. 5. OK 6. Yes, the Makefile "install" and "altinstall" targets could set "umask 022" before calling ensurepip. That's sounds like an acceptable solution; I'll add that. There are other targets in the Makefile where permissions are currently not forced (for example, Issue15890). >Things that I see as issues so far I've created upstream tickets for Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 19:15:33 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Nov 2013 18:15:33 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1384625733.44.0.752468528139.issue16510@psf.upfronthosting.co.za> R. David Murray added the comment: Jason: yes, if it is broken down into small enough pieces for the module maintainer to be comfortable with the review :). I approved Serhiy's separate patch for test_email. I still wasn't sure about backporting, but I really don't like the 'unless' construct in test_email, so I decided to say OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 19:16:54 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 18:16:54 +0000 Subject: [issue19535] Test failures with -OO In-Reply-To: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> Message-ID: <1384625814.7.0.146372354021.issue19535@psf.upfronthosting.co.za> Ezio Melotti added the comment: Patch LGTM. I'm getting 4 additional failures on 3.4: test_asyncio test_contextlib test_email test_statistics * test_statistics is fixed by the attached patch. * test_email fails in Lib/email/_policybase.py:95 -- this probably deservers a separate issue. * test_contextlib fails in Lib/test/test_contextlib.py:107 even though these tests are decorated with @support.requires_docstrings (defined in Lib/test/support/__init__.py:1716). Even with -00 the _check_docstrings function seems to have a docstring (the exact line I used to run the tests is "./python -OO -m test -v test_contextlib"). * test_asyncio has lot of failures, and most of them look like: ====================================================================== ERROR: test_call_later (test.test_asyncio.test_events.PollEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/wolf/dev/py/py3k/Lib/test/test_asyncio/test_events.py", line 1315, in setUp super().setUp() File "/home/wolf/dev/py/py3k/Lib/test/test_asyncio/test_events.py", line 188, in setUp events.set_event_loop(None) File "/home/wolf/dev/py/py3k/Lib/asyncio/events.py", line 423, in set_event_loop get_event_loop_policy().set_event_loop(loop) AttributeError: 'object' object has no attribute 'set_event_loop' Without -OO test_asyncio works fine. I haven't investigated this further. ---------- nosy: +ezio.melotti, r.david.murray Added file: http://bugs.python.org/file32652/issue19535_statistics.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 19:21:09 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 18:21:09 +0000 Subject: [issue19626] test_email and Lib/email/_policybase.py failures with -OO Message-ID: <1384626069.77.0.304780424813.issue19626@psf.upfronthosting.co.za> New submission from Ezio Melotti: >From #19535: $ ./python -OO -m test -v test_email [...] ====================================================================== ERROR: test_policy (unittest.loader.ModuleImportFailure) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/wolf/dev/py/py3k/Lib/unittest/case.py", line 57, in testPartExecutor yield File "/home/wolf/dev/py/py3k/Lib/unittest/case.py", line 571, in run testMethod() File "/home/wolf/dev/py/py3k/Lib/unittest/loader.py", line 32, in testFailure raise exception ImportError: Failed to import test module: test_policy Traceback (most recent call last): File "/home/wolf/dev/py/py3k/Lib/unittest/loader.py", line 272, in _find_tests module = self._get_module_from_name(name) File "/home/wolf/dev/py/py3k/Lib/unittest/loader.py", line 250, in _get_module_from_name __import__(name) File "/home/wolf/dev/py/py3k/Lib/test/test_email/test_policy.py", line 5, in import email.policy File "/home/wolf/dev/py/py3k/Lib/email/policy.py", line 22, in class EmailPolicy(Policy): File "/home/wolf/dev/py/py3k/Lib/email/_policybase.py", line 101, in _extend_docstrings cls.__doc__ = _append_doc(cls.__bases__[0].__doc__, cls.__doc__) File "/home/wolf/dev/py/py3k/Lib/email/_policybase.py", line 95, in _append_doc doc = doc.rsplit('\n', 1)[0] AttributeError: 'NoneType' object has no attribute 'rsplit' ---------------------------------------------------------------------- Ran 68 tests in 0.028s FAILED (errors=11) Warning -- sys.path was modified by test_email test test_email failed 1 test failed: test_email ---------- components: Library (Lib) keywords: easy messages: 203072 nosy: barry, ezio.melotti, r.david.murray, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: test_email and Lib/email/_policybase.py failures with -OO type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 19:22:49 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 18:22:49 +0000 Subject: [issue19535] Test failures with -OO In-Reply-To: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> Message-ID: <1384626169.44.0.4355564607.issue19535@psf.upfronthosting.co.za> Ezio Melotti added the comment: I created #19626 for the test_email failures. ---------- dependencies: +test_email and Lib/email/_policybase.py failures with -OO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 19:44:05 2013 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 16 Nov 2013 18:44:05 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1384627445.54.0.237724637015.issue16203@psf.upfronthosting.co.za> Matthew Barnett added the comment: I don't know that it's not needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 19:53:01 2013 From: report at bugs.python.org (Bulwersator) Date: Sat, 16 Nov 2013 18:53:01 +0000 Subject: [issue19627] python open built-in function - "updating" is not defined Message-ID: <1384627981.21.0.789966534785.issue19627@psf.upfronthosting.co.za> New submission from Bulwersator: see http://stackoverflow.com/questions/1466000/python-open-built-in-function-difference-between-modes-a-a-w-w-and-r - "The Python docs conveniently leave out the crucial explanation that "open the file for updating" means "opens the file for both reading and writing", which answers my question." ---------- assignee: docs at python components: Documentation messages: 203075 nosy: Bulwersator, docs at python priority: normal severity: normal status: open title: python open built-in function - "updating" is not defined _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 19:59:28 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 18:59:28 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384628368.06.0.6489207413.issue19572@psf.upfronthosting.co.za> Ezio Melotti added the comment: I get a failure on Linux with test_posix: $ ./python -m test test_posix [1/1] test_posix test test_posix failed -- Traceback (most recent call last): File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 713, in test_getcwd_long_pathnames _create_and_do_getcwd(dirname) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 708, in _create_and_do_getcwd _create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1) File "/home/wolf/dev/py/py3k/Lib/test/test_posix.py", line 706, in _create_and_do_getcwd os.getcwd() OSError: [Errno 34] Numerical result out of range 1 test failed: test_posix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:05:08 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 19:05:08 +0000 Subject: [issue19573] Fix the docstring of inspect.Parameter and the implementation of _ParameterKind In-Reply-To: <1384371223.06.0.467962768293.issue19573@psf.upfronthosting.co.za> Message-ID: <1384628708.46.0.994036574033.issue19573@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Library (Lib) nosy: +ethan.furman, ezio.melotti, ncoghlan stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:17:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:17:43 +0000 Subject: [issue17681] Work with an extra field of gzip and zip files In-Reply-To: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> Message-ID: <1384629463.08.0.944895498208.issue17681@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file30411/gzip_extra.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:17:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:17:55 +0000 Subject: [issue17681] Work with an extra field of gzip and zip files In-Reply-To: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> Message-ID: <1384629475.88.0.131932533845.issue17681@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file30412/zip_extra.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:18:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:18:40 +0000 Subject: [issue17681] Work with an extra field of gzip and zip files In-Reply-To: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> Message-ID: <1384629520.77.0.472002676552.issue17681@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32653/gzip_extra.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:19:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:19:13 +0000 Subject: [issue17681] Work with an extra field of gzip and zip files In-Reply-To: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> Message-ID: <1384629553.03.0.614687152518.issue17681@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32654/zipfile_extra.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:19:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:19:58 +0000 Subject: [issue17681] Work with an extra field of gzip and zip files In-Reply-To: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> Message-ID: <1384629598.73.0.898484364621.issue17681@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32655/README.dz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:20:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:20:24 +0000 Subject: [issue17681] Work with an extra field of gzip and zip files In-Reply-To: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> Message-ID: <1384629624.1.0.902010251578.issue17681@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32656/README.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:24:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:24:33 +0000 Subject: [issue17681] Work with an extra field of gzip and zip files In-Reply-To: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> Message-ID: <1384629873.26.0.0418571692559.issue17681@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Some examples: >>> import zipfile >>> z = zipfile.ZipFile('README.zip') >>> z.filelist[0].extra b'UT\x05\x00\x03\xe0\xc3\x87Rux\x0b\x00\x01\x04\xe8\x03\x00\x00\x04\xe8\x03\x00\x00' >>> z.filelist[0].extra_map >>> list(z.filelist[0].extra_map.items()) [(21589, b'\x03\xe0\xc3\x87R'), (30837, b'\x01\x04\xe8\x03\x00\x00\x04\xe8\x03\x00\x00')] >>> import gzip >>> gz = gzip.open('README.dz') >>> gz.extra_bytes b'' >>> gz.extra_map >>> list(gz.extra_map.items()) [] >>> gz.read(1) b'T' >>> gz.extra_bytes b'RA\x08\x00\x01\x00\xcb\xe3\x01\x00T\x0b' >>> list(gz.extra_map.items()) [(b'RA', b'\x01\x00\xcb\xe3\x01\x00T\x0b')] ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:42:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:42:04 +0000 Subject: [issue19535] Test failures with -OO In-Reply-To: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> Message-ID: <1384630924.98.0.402439010325.issue19535@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch fixes test_contextlib and test_statistics too. I think test_asyncio is worth separated issue too. ---------- Added file: http://bugs.python.org/file32657/issue19535_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 20:45:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 19:45:52 +0000 Subject: [issue19535] Test failures with -OO In-Reply-To: <1383988883.0.0.831312717343.issue19535@psf.upfronthosting.co.za> Message-ID: <1384631152.04.0.502980881676.issue19535@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, test_contextlib shouldn't be fixed. It failed due to cached non-optimized test.support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 21:38:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 20:38:35 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384634315.8.0.367712387157.issue19572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Except pickletester and test_posix third patch LGTM. test_posix is worth separate issue. test_reduce and test_getinitargs in pickletester are always empty and can be just removed (if you don't want implement them). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 21:40:50 2013 From: report at bugs.python.org (Sworddragon) Date: Sat, 16 Nov 2013 20:40:50 +0000 Subject: [issue19628] maxlevels -1 on compileall for unlimited recursion Message-ID: <1384634450.77.0.212426893492.issue19628@psf.upfronthosting.co.za> New submission from Sworddragon: All functions of compileall are providing a maxlevels argument which defaults to 10. But it is currently not possible to disable this recursion limitation. Maybe it would be useful to have a special value like -1 to disable this limitation and allow to compile in an infinite amount of subdirectories. Also I'm noticing maxlevels is the only argument which is not available on command line. Does it default there to 10 too? Maybe it would be useful if it could be configured too (in this case it could theoretically replace -l). ---------- components: Library (Lib) messages: 203081 nosy: Sworddragon priority: normal severity: normal status: open title: maxlevels -1 on compileall for unlimited recursion type: enhancement versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:05:05 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:05:05 +0000 Subject: [issue19587] Remove empty tests in test_bytes.FixedStringTest In-Reply-To: <1384451242.84.0.0741219651505.issue19587@psf.upfronthosting.co.za> Message-ID: <1384635905.84.0.886944161292.issue19587@psf.upfronthosting.co.za> Ezio Melotti added the comment: I said this elsewhere but I'll repeat it here. I think the whole string_tests could/should be reorganized (and possibly documented). There are lot of classes and mixins on several files, and more than once I found tests that were accidentally not run or had other problems. This got worse after Python 3, where bytes and strings share even less code. Reorganizing this should make things easier to follow and will probably solve issues like this. This of course is a bigger project than simply fixing these methods, so it should probably be addressed in a separate issue. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:07:36 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:07:36 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1384636056.22.0.190239383336.issue19588@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:12:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:12:29 +0000 Subject: [issue19591] Use specific asserts in ctype tests In-Reply-To: <1384462192.45.0.696464665582.issue19591@psf.upfronthosting.co.za> Message-ID: <1384636349.44.0.754551195892.issue19591@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- nosy: +ezio.melotti stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:13:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:13:46 +0000 Subject: [issue19593] Use specific asserts in importlib tests In-Reply-To: <1384462583.85.0.490812724335.issue19593@psf.upfronthosting.co.za> Message-ID: <1384636426.6.0.833400845146.issue19593@psf.upfronthosting.co.za> Ezio Melotti added the comment: Patch LGTM. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:23:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 21:23:12 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows Message-ID: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> New submission from Antoine Pitrou: support.rmtree doesn't work under Windows when there are symlinks (the symlinks aren't deleted anymore), while shutil.rmtree() works fine: >>> support.rmtree("@test_2160_tmp") >>> os.listdir("@test_2160_tmp") ['dirA', 'dirB', 'dirC', 'fileA', 'linkA', 'linkB'] >>> shutil.rmtree("@test_2160_tmp") >>> os.listdir("@test_2160_tmp") Traceback (most recent call last): File "", line 1, in FileNotFoundError: [WinError 3] The system cannot find the path specified: '@test_2160_tmp' This breaks the pathlib tests under Windows with symlink privileges held. ---------- assignee: brian.curtin components: Library (Lib), Tests messages: 203085 nosy: brian.curtin, pitrou, tim.golden priority: normal severity: normal stage: needs patch status: open title: support.rmtree fails on symlinks under Windows type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:25:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 21:25:27 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> Message-ID: <1384637127.74.0.627176072406.issue19629@psf.upfronthosting.co.za> Antoine Pitrou added the comment: shutil.rmtree() uses os.lstat() while support.rmtree() calls os.path.isdir() instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:36:24 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:36:24 +0000 Subject: [issue19594] Use specific asserts in unittest tests In-Reply-To: <1384462710.0.0.524948910788.issue19594@psf.upfronthosting.co.za> Message-ID: <1384637784.34.0.252707682075.issue19594@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:40:52 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:40:52 +0000 Subject: [issue19595] Silently skipped test in test_winsound In-Reply-To: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> Message-ID: <1384638052.65.0.210321323084.issue19595@psf.upfronthosting.co.za> Ezio Melotti added the comment: Maybe someone else can try it, or just enable it and see if the buildbots are happy (I think you can use custom builds as well for this kind of experiments). > at least on 3.4 an unexpected success is silently ignored by regrtest is this expected? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:53:24 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:53:24 +0000 Subject: [issue19597] Add decorator for tests not yet implemented In-Reply-To: <1384468392.3.0.701563221168.issue19597@psf.upfronthosting.co.za> Message-ID: <1384638804.62.0.0202067693162.issue19597@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't think a new option for regrtest is necessary. I'm also not sure expected failure is a good idea -- in some cases it might be better to report a skip or an error. Do you have other examples where this can be used? If there aren't many occurrences we might also fix them and avoid adding a new decorator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:54:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 21:54:14 +0000 Subject: [issue19591] Use specific asserts in ctype tests In-Reply-To: <1384462192.45.0.696464665582.issue19591@psf.upfronthosting.co.za> Message-ID: <3dMVZF3J0lz7LlY@mail.python.org> Roundup Robot added the comment: New changeset 98adbaccaae3 by Serhiy Storchaka in branch '3.3': Issue #19591: Use specific asserts in ctype tests. http://hg.python.org/cpython/rev/98adbaccaae3 New changeset 5fa9293b6cde by Serhiy Storchaka in branch 'default': Issue #19591: Use specific asserts in ctype tests. http://hg.python.org/cpython/rev/5fa9293b6cde ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:56:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:56:17 +0000 Subject: [issue19600] Use specific asserts in distutils tests In-Reply-To: <1384502808.59.0.591173639176.issue19600@psf.upfronthosting.co.za> Message-ID: <1384638977.86.0.843515487451.issue19600@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM (I left a comment on rietveld). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:57:32 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 21:57:32 +0000 Subject: [issue19601] Use specific asserts in sqlite3 tests In-Reply-To: <1384502911.7.0.613780921305.issue19601@psf.upfronthosting.co.za> Message-ID: <1384639052.5.0.49097933191.issue19601@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- nosy: +ezio.melotti stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 22:58:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 21:58:19 +0000 Subject: [issue19597] Add decorator for tests not yet implemented In-Reply-To: <1384468392.3.0.701563221168.issue19597@psf.upfronthosting.co.za> Message-ID: <1384639099.83.0.621280203632.issue19597@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, this doesn't sound like a terrific idea to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:01:43 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 22:01:43 +0000 Subject: [issue19602] Use specific asserts in tkinter tests In-Reply-To: <1384502999.03.0.730675393841.issue19602@psf.upfronthosting.co.za> Message-ID: <1384639303.04.0.0116108147372.issue19602@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- nosy: +ezio.melotti stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:06:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 22:06:32 +0000 Subject: [issue19591] Use specific asserts in ctype tests In-Reply-To: <1384462192.45.0.696464665582.issue19591@psf.upfronthosting.co.za> Message-ID: <3dMVrR4gDhz7Lnv@mail.python.org> Roundup Robot added the comment: New changeset 8dbb78be2496 by Serhiy Storchaka in branch '2.7': Issue #19591: Use specific asserts in ctype tests. http://hg.python.org/cpython/rev/8dbb78be2496 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:09:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 22:09:14 +0000 Subject: [issue19603] Use specific asserts in test_decr In-Reply-To: <1384503127.94.0.904619557147.issue19603@psf.upfronthosting.co.za> Message-ID: <1384639754.23.0.429690367965.issue19603@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file32658/test_descr_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:09:45 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 22:09:45 +0000 Subject: [issue19604] Use specific asserts in array tests In-Reply-To: <1384509089.55.0.263530897465.issue19604@psf.upfronthosting.co.za> Message-ID: <1384639785.88.0.486979336326.issue19604@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:15:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 22:15:36 +0000 Subject: [issue19594] Use specific asserts in unittest tests In-Reply-To: <1384462710.0.0.524948910788.issue19594@psf.upfronthosting.co.za> Message-ID: <3dMW2w18xZz7LlF@mail.python.org> Roundup Robot added the comment: New changeset f32353baecc3 by Serhiy Storchaka in branch '3.3': Issue #19594: Use specific asserts in unittest tests. http://hg.python.org/cpython/rev/f32353baecc3 New changeset aacb0bd969e5 by Serhiy Storchaka in branch 'default': Issue #19594: Use specific asserts in unittest tests. http://hg.python.org/cpython/rev/aacb0bd969e5 New changeset 1d1bad272733 by Serhiy Storchaka in branch '2.7': Issue #19594: Use specific asserts in unittest tests. http://hg.python.org/cpython/rev/1d1bad272733 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:21:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 22:21:40 +0000 Subject: [issue19603] Use specific asserts in test_decr In-Reply-To: <1384503127.94.0.904619557147.issue19603@psf.upfronthosting.co.za> Message-ID: <1384640500.5.0.163434368506.issue19603@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left a few comments on rietveld. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:29:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Nov 2013 22:29:59 +0000 Subject: [issue19600] Use specific asserts in distutils tests In-Reply-To: <1384502808.59.0.591173639176.issue19600@psf.upfronthosting.co.za> Message-ID: <3dMWMW0QYdz7LlF@mail.python.org> Roundup Robot added the comment: New changeset 5a0236f3f972 by Serhiy Storchaka in branch '3.3': Issue #19600: Use specific asserts in distutils tests. http://hg.python.org/cpython/rev/5a0236f3f972 New changeset 6a3501aab559 by Serhiy Storchaka in branch 'default': Issue #19600: Use specific asserts in distutils tests. http://hg.python.org/cpython/rev/6a3501aab559 New changeset 097389413dd3 by Serhiy Storchaka in branch '2.7': Issue #19600: Use specific asserts in distutils tests. http://hg.python.org/cpython/rev/097389413dd3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:33:13 2013 From: report at bugs.python.org (Martin Panter) Date: Sat, 16 Nov 2013 22:33:13 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1384641193.79.0.242595239668.issue10712@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:37:55 2013 From: report at bugs.python.org (Martin Panter) Date: Sat, 16 Nov 2013 22:37:55 +0000 Subject: [issue19627] python open built-in function - "updating" is not defined In-Reply-To: <1384627981.21.0.789966534785.issue19627@psf.upfronthosting.co.za> Message-ID: <1384641475.52.0.747342901483.issue19627@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:42:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 22:42:04 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1384641724.92.0.563629148834.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch with suggested API changes, + docs. ---------- Added file: http://bugs.python.org/file32659/base85.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 16 23:58:02 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 22:58:02 +0000 Subject: [issue19605] Use specific asserts in datetime tests In-Reply-To: <1384509215.73.0.873700234251.issue19605@psf.upfronthosting.co.za> Message-ID: <1384642682.07.0.363572017941.issue19605@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM (I left a comment on rietveld). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 00:01:51 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 23:01:51 +0000 Subject: [issue19606] Use specific asserts in http.cookiejar tests In-Reply-To: <1384509320.61.0.0425135546952.issue19606@psf.upfronthosting.co.za> Message-ID: <1384642911.12.0.884028688772.issue19606@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM (I left a comment on rietveld). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 00:04:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 16 Nov 2013 23:04:48 +0000 Subject: [issue19603] Use specific asserts in test_decr In-Reply-To: <1384503127.94.0.904619557147.issue19603@psf.upfronthosting.co.za> Message-ID: <1384643088.63.0.6762945553.issue19603@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Ezio's comments. ---------- Added file: http://bugs.python.org/file32660/test_descr_asserts_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 00:05:30 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 23:05:30 +0000 Subject: [issue19607] Use specific asserts in weakref tests In-Reply-To: <1384509437.64.0.236253006497.issue19607@psf.upfronthosting.co.za> Message-ID: <1384643130.66.0.278992967954.issue19607@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM (I left a comment on rietveld). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 00:07:57 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 23:07:57 +0000 Subject: [issue19608] devguide needs pictures In-Reply-To: <1384510390.93.0.961404476169.issue19608@psf.upfronthosting.co.za> Message-ID: <1384643277.29.0.1059982884.issue19608@psf.upfronthosting.co.za> Ezio Melotti added the comment: Plain ASCII-art might also be enough, but without specific indication of what kind of pictures you want and where you want them I'm going to close this. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 00:31:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Nov 2013 23:31:08 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1384644668.6.0.142784449124.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch incorporating Serhiy's self-review from 6 months ago (grr). ---------- Added file: http://bugs.python.org/file32661/base85-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 00:45:11 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 23:45:11 +0000 Subject: [issue19383] nturl2path test coverage In-Reply-To: <1382657614.74.0.213729784079.issue19383@psf.upfronthosting.co.za> Message-ID: <1384645511.61.0.983575275112.issue19383@psf.upfronthosting.co.za> Ezio Melotti added the comment: The assertions have their arguments in the wrong order, it should be (actual, expected). In the code of the module there are also some examples in the comments, e.g.: # path is something like ////host/path/on/remote/host # convert this to \\host\path\on\remote\host Even though the path is covered, there's no similar test in this patch. I would suggest you to include all the examples from the module in the tests. Also note that this module is already indirectly tested in test_urllib. ---------- nosy: +ezio.melotti stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 00:50:47 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 16 Nov 2013 23:50:47 +0000 Subject: [issue19382] tabnanny unit tests In-Reply-To: <1382655525.74.0.119259261788.issue19382@psf.upfronthosting.co.za> Message-ID: <1384645847.12.0.363991787022.issue19382@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left a few comments on rietveld. ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:07:34 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 00:07:34 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1384646854.5.0.890748154868.issue19362@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think it's better to do: -Return the number of items of a sequence or mapping. +Return the number of items of a sequence or container. While it's true that most sequences are clearly containers (e.g. lists), the same is not so evident for other types like bytes or strings. I'm also starting from the assumption that people reading the docstring of len just started with Python or programming in general, so it's more important to keep it simple and understandable rather than being 100% accurate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:12:52 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 00:12:52 +0000 Subject: [issue19412] Add docs for test.support.requires_docstrings decorator In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1384647172.89.0.20810223494.issue19412@psf.upfronthosting.co.za> Ezio Melotti added the comment: I was bitten by this in #19535. See the third point about test_contextlib in msg203071. I would expect support.requires_docstring to skip the test if -OO is used and the docstrings are missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:23:18 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 00:23:18 +0000 Subject: [issue19454] devguide: Document what a "platform support" is In-Reply-To: <1383159116.46.0.184690879028.issue19454@psf.upfronthosting.co.za> Message-ID: <1384647798.14.0.685558979704.issue19454@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:39:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 00:39:46 +0000 Subject: [issue13248] deprecated in 3.2/3.3, should be removed in 3.4 In-Reply-To: <1319392186.66.0.823106983991.issue13248@psf.upfronthosting.co.za> Message-ID: <1384648786.33.0.00417523063263.issue13248@psf.upfronthosting.co.za> Ezio Melotti added the comment: The attached patch removes assertDictContainsSubset(). ---------- Added file: http://bugs.python.org/file32662/issue13248.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:43:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 00:43:50 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1384649030.03.0.156026384628.issue17457@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left a couple of comments on rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:47:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 00:47:51 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <3dMZQb0xvsz7Lkd@mail.python.org> Roundup Robot added the comment: New changeset 2b0690c9a026 by Ezio Melotti in branch '2.7': #19238: fix typo in documentation. http://hg.python.org/cpython/rev/2b0690c9a026 New changeset 7e3f8026ed30 by Ezio Melotti in branch '3.3': #19238: fix typo in documentation. http://hg.python.org/cpython/rev/7e3f8026ed30 New changeset 829b95824867 by Ezio Melotti in branch 'default': #19238: merge with 3.3. http://hg.python.org/cpython/rev/829b95824867 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:48:33 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 00:48:33 +0000 Subject: [issue19238] Misleading explanation of fill and align in format_spec In-Reply-To: <1381616869.75.0.196962613989.issue19238@psf.upfronthosting.co.za> Message-ID: <1384649313.08.0.398422161501.issue19238@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for noticing! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:53:48 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 00:53:48 +0000 Subject: [issue18326] Mention 'keyword only' for list.sort, improve glossary. In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <1384649628.43.0.111392588786.issue18326@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think v2 is enough, but v3 is fine with me if people think v3 it's better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 01:57:58 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 00:57:58 +0000 Subject: [issue19371] timing test too tight In-Reply-To: <1382566801.77.0.760747140726.issue19371@psf.upfronthosting.co.za> Message-ID: <1384649878.68.0.0173243599074.issue19371@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 02:04:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 01:04:50 +0000 Subject: [issue19594] Use specific asserts in unittest tests In-Reply-To: <1384462710.0.0.524948910788.issue19594@psf.upfronthosting.co.za> Message-ID: <1384650290.7.0.904457926412.issue19594@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 02:06:45 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 01:06:45 +0000 Subject: [issue19600] Use specific asserts in distutils tests In-Reply-To: <1384502808.59.0.591173639176.issue19600@psf.upfronthosting.co.za> Message-ID: <1384650405.98.0.719902797663.issue19600@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 03:37:38 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 02:37:38 +0000 Subject: [issue13633] Handling of hex character references in HTMLParser.handle_charref In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1384655858.47.0.629078775251.issue13633@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +eli.bendersky, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 04:55:11 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 17 Nov 2013 03:55:11 +0000 Subject: [issue19618] test_sysconfig_module fails on Ubuntu 12.04 In-Reply-To: <1384562223.55.0.434561574175.issue19618@psf.upfronthosting.co.za> Message-ID: <1384660511.92.0.122586153534.issue19618@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please add system/os/py-version info. On my Win7-64 machine, C:\Programs\Python34>python -m test -v test_sysconfig C:\Programs\Python34>python -m distutils.tests.test_sysconfig both pass (and run slightly different sets of tests). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 04:57:50 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 17 Nov 2013 03:57:50 +0000 Subject: [issue19618] test_sysconfig_module fails on Ubuntu 12.04 In-Reply-To: <1384562223.55.0.434561574175.issue19618@psf.upfronthosting.co.za> Message-ID: <1384660670.37.0.564513809196.issue19618@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Sorry, about system comment. Got here by link on mail list and read message, not title. Py version is still relevant, as one should try latest releases before reporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 06:45:09 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 17 Nov 2013 05:45:09 +0000 Subject: [issue19296] Compiler warning when compiling dbm module In-Reply-To: <1382180566.13.0.638248121089.issue19296@psf.upfronthosting.co.za> Message-ID: <1384667109.52.0.185825887111.issue19296@psf.upfronthosting.co.za> Nick Coghlan added the comment: I get the same warning on Fedora 19. However, the signature of dbmopen_impl is generated by argument clinic, so it isn't simply a matter of patching the signature in place. I'm also inclined to consider the *platform* header to be wrong, since the dbm_open API really should be accepting "const char *" rather than "char *". We should find a way to silence the warning to avoid the false alarm in the build output (a cast to "char *" with a reference to this issue would be the brute force approach), but propagating the incorrect type declaration higher up the call stack is unlikely to be the right approach. ---------- nosy: +larry, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 07:00:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 06:00:20 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <3dMjM7741vz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset c2f1bb56760d by Nick Coghlan in branch 'default': Close #19282: Native context management in dbm http://hg.python.org/cpython/rev/c2f1bb56760d ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 07:03:22 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 17 Nov 2013 06:03:22 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1384668202.45.0.641795282988.issue19282@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks Claudiu! Additional tweaks in the committed version: - added a paragraph to the docs about the with statement support and moved the versionchanged note there - changed the example in the docs to use a with statement - added a basic test that the dumbdbm impl was actually closed, with a comment referencing issue 19385 (since that isn't subject to the beta 1 deadline) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 07:04:57 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 17 Nov 2013 06:04:57 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1384668297.76.0.736912025827.issue19282@psf.upfronthosting.co.za> Nick Coghlan added the comment: I also changed the signature of the enter/exit methods to just use PyObject * (rather than dbmobject *), since that allowed a bunch of casts to be removed and eliminated a couple of compiler warnings about type mismatches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 08:14:10 2013 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 17 Nov 2013 07:14:10 +0000 Subject: [issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods In-Reply-To: <1384619616.06.0.205139493426.issue18842@psf.upfronthosting.co.za> Message-ID: <20131117071403.GT2085@ando> Steven D'Aprano added the comment: On Sat, Nov 16, 2013 at 04:33:36PM +0000, Serhiy Storchaka wrote: > > Should we add these methods to other concrete Number subclasses (as Fraction and complex)? Seems like a good idea to me. Is it worth making them part of the Number ABC, or is that too much of a change? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 08:34:11 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 17 Nov 2013 07:34:11 +0000 Subject: [issue19282] dbm.open should be a context manager In-Reply-To: <1382082310.98.0.0309554787542.issue19282@psf.upfronthosting.co.za> Message-ID: <1384673651.42.0.150659229597.issue19282@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Cool, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 08:41:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 17 Nov 2013 07:41:29 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1384674089.19.0.0835319316947.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attached patch restores the aliases for the binary and text transforms, adds a test to ensure they exist and restores the "Aliases" column to the relevant tables in the documentation. It also updates the relevant section in the What's New document. I also tweaked the wording in the docs to use the phrases "binary transform" and "text transform" for the affected tables and version added/changed notices. Given the discussions on python-dev, the main condition that needs to be met before I commit this is for Victor to change his current -1 to a -0 or higher. ---------- Added file: http://bugs.python.org/file32663/issue7475_restore_codec_aliases_in_py34.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 09:09:50 2013 From: report at bugs.python.org (Lukasz Mielicki) Date: Sun, 17 Nov 2013 08:09:50 +0000 Subject: [issue19630] marshal.dump cannot write to temporary file Message-ID: <1384675790.16.0.0477801542512.issue19630@psf.upfronthosting.co.za> New submission from Lukasz Mielicki: marshal.dump yields error when temporary file is given as a second argument. import tempfile import marshal tmpfile = tempfile.TemporaryFile(mode='w+b') # TypeError: marshal.dump() 2nd arg must be file marshal.dump({}, tmpfile) ---------- components: Library (Lib) messages: 203125 nosy: lm1 priority: normal severity: normal status: open title: marshal.dump cannot write to temporary file type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 09:11:52 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 17 Nov 2013 08:11:52 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1384675912.34.0.170435373287.issue17457@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Attached new patch, which addresses Ezio's comments on Rietveld. ---------- Added file: http://bugs.python.org/file32664/unittest-17457-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 09:19:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 08:19:32 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3dMmRm1gr9z7LjN@mail.python.org> Roundup Robot added the comment: New changeset f9927dcc85cf by Ned Deily in branch '3.3': Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.3.3. http://hg.python.org/cpython/rev/f9927dcc85cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 09:19:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 08:19:33 +0000 Subject: [issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots In-Reply-To: <1381517472.99.0.071022574131.issue19227@psf.upfronthosting.co.za> Message-ID: <3dMmRm74Rsz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 4e6aa98bb11c by Christian Heimes in branch '3.3': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/4e6aa98bb11c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 09:19:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 08:19:34 +0000 Subject: [issue18747] Re-seed OpenSSL's PRNG after fork In-Reply-To: <1376570101.71.0.249202475923.issue18747@psf.upfronthosting.co.za> Message-ID: <3dMmRn5K7kz7Lkc@mail.python.org> Roundup Robot added the comment: New changeset 4e6aa98bb11c by Christian Heimes in branch '3.3': Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding http://hg.python.org/cpython/rev/4e6aa98bb11c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 09:44:55 2013 From: report at bugs.python.org (Berker Peksag) Date: Sun, 17 Nov 2013 08:44:55 +0000 Subject: [issue19610] TypeError in distutils.command.upload In-Reply-To: <1384514692.62.0.115546674646.issue19610@psf.upfronthosting.co.za> Message-ID: <1384677895.66.0.816793876196.issue19610@psf.upfronthosting.co.za> Berker Peksag added the comment: > [...] but the first bug (accept tuple for classifiers) should be fixed > before or you will get an unexpected behaviour (only send 1 > classifier?). Here is a new patch that accepts tuple for classifiers. Thanks for the review, Victor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 09:46:07 2013 From: report at bugs.python.org (Berker Peksag) Date: Sun, 17 Nov 2013 08:46:07 +0000 Subject: [issue19610] TypeError in distutils.command.upload In-Reply-To: <1384514692.62.0.115546674646.issue19610@psf.upfronthosting.co.za> Message-ID: <1384677967.82.0.15369198478.issue19610@psf.upfronthosting.co.za> Changes by Berker Peksag : Added file: http://bugs.python.org/file32665/issue19610.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 10:57:41 2013 From: report at bugs.python.org (Avichal Dayal) Date: Sun, 17 Nov 2013 09:57:41 +0000 Subject: [issue19618] test_sysconfig_module fails on Ubuntu 12.04 In-Reply-To: <1384562223.55.0.434561574175.issue19618@psf.upfronthosting.co.za> Message-ID: <1384682261.28.0.289441517825.issue19618@psf.upfronthosting.co.za> Avichal Dayal added the comment: On my system Ubuntu 12.04 -64bit ./python -m test -v test_sysconfig ./python -m distutils/tests/test_sysconfig both run fine ---------- nosy: +Avichal.Dayal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 11:36:39 2013 From: report at bugs.python.org (Gregory Salvan) Date: Sun, 17 Nov 2013 10:36:39 +0000 Subject: [issue19630] marshal.dump cannot write to temporary file In-Reply-To: <1384675790.16.0.0477801542512.issue19630@psf.upfronthosting.co.za> Message-ID: <1384684599.25.0.236421530767.issue19630@psf.upfronthosting.co.za> Gregory Salvan added the comment: I can't reproduce this issue (on linux). Are you sure you've necessary rights to write to tempdir ? ---------- nosy: +Gregory.Salvan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 11:39:38 2013 From: report at bugs.python.org (Lukasz Mielicki) Date: Sun, 17 Nov 2013 10:39:38 +0000 Subject: [issue19630] marshal.dump cannot write to temporary file In-Reply-To: <1384684599.25.0.236421530767.issue19630@psf.upfronthosting.co.za> Message-ID: Lukasz Mielicki added the comment: I'm seeing this on Windows with Python 2.7.6 (amd64). I can write to the same file with other methods. On 17 November 2013 18:36, Gregory Salvan wrote: > > Gregory Salvan added the comment: > > I can't reproduce this issue (on linux). > Are you sure you've necessary rights to write to tempdir ? > > ---------- > nosy: +Gregory.Salvan > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 11:49:57 2013 From: report at bugs.python.org (Gregory Salvan) Date: Sun, 17 Nov 2013 10:49:57 +0000 Subject: [issue19630] marshal.dump cannot write to temporary file In-Reply-To: <1384675790.16.0.0477801542512.issue19630@psf.upfronthosting.co.za> Message-ID: <1384685397.6.0.0591293232946.issue19630@psf.upfronthosting.co.za> Gregory Salvan added the comment: Sorry I don't have windows to test. Try to set the temporary directory to a path you're sure you've rights, either by setting tempfile.tempdir (http://docs.python.org/2/library/tempfile.html#tempfile.tempdir) or by adding the argument dir="C:\\user\path" in tempfile.TemporaryFile function. Otherwise I can't help you. Maybe you should show us the result of tempfile.gettempdir(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 11:58:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 10:58:19 +0000 Subject: [issue19604] Use specific asserts in array tests In-Reply-To: <1384509089.55.0.263530897465.issue19604@psf.upfronthosting.co.za> Message-ID: <3dMqyy5132z7LkH@mail.python.org> Roundup Robot added the comment: New changeset f7d8c7a176fb by Serhiy Storchaka in branch '2.7': Issue #19604: Use specific asserts in array tests. http://hg.python.org/cpython/rev/f7d8c7a176fb New changeset 3650790ca33a by Serhiy Storchaka in branch '3.3': Issue #19604: Use specific asserts in array tests. http://hg.python.org/cpython/rev/3650790ca33a New changeset e8276bb6a156 by Serhiy Storchaka in branch 'default': Issue #19604: Use specific asserts in array tests. http://hg.python.org/cpython/rev/e8276bb6a156 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 11:58:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 10:58:20 +0000 Subject: [issue19601] Use specific asserts in sqlite3 tests In-Reply-To: <1384502911.7.0.613780921305.issue19601@psf.upfronthosting.co.za> Message-ID: <3dMqyz3HjTz7LkH@mail.python.org> Roundup Robot added the comment: New changeset 981d161a52be by Serhiy Storchaka in branch '3.3': Issue #19601: Use specific asserts in sqlite3 tests. http://hg.python.org/cpython/rev/981d161a52be New changeset d004ccdd6a57 by Serhiy Storchaka in branch '2.7': Issue #19601: Use specific asserts in sqlite3 tests. http://hg.python.org/cpython/rev/d004ccdd6a57 New changeset 6a6ecc7149f4 by Serhiy Storchaka in branch 'default': Issue #19601: Use specific asserts in sqlite3 tests. http://hg.python.org/cpython/rev/6a6ecc7149f4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 11:58:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 10:58:21 +0000 Subject: [issue19602] Use specific asserts in tkinter tests In-Reply-To: <1384502999.03.0.730675393841.issue19602@psf.upfronthosting.co.za> Message-ID: <3dMqz01Z2gz7LkH@mail.python.org> Roundup Robot added the comment: New changeset 9d1309e31491 by Serhiy Storchaka in branch '3.3': Issue #19602: Use specific asserts in tkinter tests. http://hg.python.org/cpython/rev/9d1309e31491 New changeset a3ed49cf7c70 by Serhiy Storchaka in branch 'default': Issue #19602: Use specific asserts in tkinter tests. http://hg.python.org/cpython/rev/a3ed49cf7c70 New changeset 0aed137d0d49 by Serhiy Storchaka in branch '2.7': Issue #19602: Use specific asserts in tkinter tests. http://hg.python.org/cpython/rev/0aed137d0d49 New changeset 6bd5e4325506 by Serhiy Storchaka in branch '2.7': Fix merge error in issue #19602. http://hg.python.org/cpython/rev/6bd5e4325506 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 11:58:36 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 17 Nov 2013 10:58:36 +0000 Subject: [issue19630] marshal.dump cannot write to temporary file In-Reply-To: <1384675790.16.0.0477801542512.issue19630@psf.upfronthosting.co.za> Message-ID: <1384685916.9.0.912432901925.issue19630@psf.upfronthosting.co.za> Tim Golden added the comment: marshal.c does a check that the 2nd arg is a subclass of the builtin file class. On non-Posix platforms, TemporaryFile is a wrapper class providing context manager support for delete-on-close. This fails the subclass test. The docs for TemporaryFile: http://docs.python.org/2/library/tempfile.html?highlight=temporaryfile#tempfile.TemporaryFile do state that, on non-Posix systems, the object is not a true file. The docs for marshal: http://docs.python.org/2/library/marshal.html?highlight=marshal#marshal.dump more or less state the 2nd param must be a true file object. So I think we're within rights here. But I accept that it's not an ideal. The best we can opt for here, I think, is a doc patch to marshal.dump reinforcing that the file must a true file. BTW, why are you marshalling into a file which will be deleted as soon as it's closed? ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 12:25:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 11:25:07 +0000 Subject: [issue19605] Use specific asserts in datetime tests In-Reply-To: <1384509215.73.0.873700234251.issue19605@psf.upfronthosting.co.za> Message-ID: <3dMrYt6wQRz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset bc67e8d39164 by Serhiy Storchaka in branch '3.3': Issue #19605: Use specific asserts in datetime tests http://hg.python.org/cpython/rev/bc67e8d39164 New changeset 0b7a519cb58f by Serhiy Storchaka in branch 'default': Issue #19605: Use specific asserts in datetime tests http://hg.python.org/cpython/rev/0b7a519cb58f New changeset 648be7ea8b1d by Serhiy Storchaka in branch '2.7': Issue #19605: Use specific asserts in datetime tests http://hg.python.org/cpython/rev/648be7ea8b1d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 12:25:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 11:25:08 +0000 Subject: [issue19607] Use specific asserts in weakref tests In-Reply-To: <1384509437.64.0.236253006497.issue19607@psf.upfronthosting.co.za> Message-ID: <3dMrYv5Hyfz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset d187eae08b8a by Serhiy Storchaka in branch '3.3': Issue #19607: Use specific asserts in weakref tests. http://hg.python.org/cpython/rev/d187eae08b8a New changeset 8deab371850b by Serhiy Storchaka in branch 'default': Issue #19607: Use specific asserts in weakref tests. http://hg.python.org/cpython/rev/8deab371850b New changeset 3d2cfeea8950 by Serhiy Storchaka in branch '2.7': Issue #19607: Use specific asserts in weakref tests. http://hg.python.org/cpython/rev/3d2cfeea8950 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 12:50:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 11:50:14 +0000 Subject: [issue19606] Use specific asserts in http.cookiejar tests In-Reply-To: <1384509320.61.0.0425135546952.issue19606@psf.upfronthosting.co.za> Message-ID: <3dMs6s4VNKz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 9444ee6864b3 by Serhiy Storchaka in branch '3.3': Issue #19606: Use specific asserts in http.cookiejar tests. http://hg.python.org/cpython/rev/9444ee6864b3 New changeset c1f2b3fc965d by Serhiy Storchaka in branch 'default': Issue #19606: Use specific asserts in http.cookiejar tests. http://hg.python.org/cpython/rev/c1f2b3fc965d New changeset 1479ba6bc511 by Serhiy Storchaka in branch '2.7': Issue #19606: Use specific asserts in cookielib tests. http://hg.python.org/cpython/rev/1479ba6bc511 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 13:19:14 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 17 Nov 2013 12:19:14 +0000 Subject: [issue9731] Add ABCMeta.has_methods and tests that use it In-Reply-To: <1283346153.7.0.611629242062.issue9731@psf.upfronthosting.co.za> Message-ID: <1384690754.85.0.627864153534.issue9731@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hello! Here's a preliminary implementation, with tests for collections ABC. It doesn't have any docs yet, though. I chose the name verify_full_api, but I'm ok with check_methods as well. ---------- keywords: +patch nosy: +Claudiu.Popa versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file32666/abc_9731.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 13:47:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 12:47:09 +0000 Subject: [issue19606] Use specific asserts in http.cookiejar tests In-Reply-To: <1384509320.61.0.0425135546952.issue19606@psf.upfronthosting.co.za> Message-ID: <1384692429.44.0.791147453814.issue19606@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 13:47:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 12:47:38 +0000 Subject: [issue19607] Use specific asserts in weakref tests In-Reply-To: <1384509437.64.0.236253006497.issue19607@psf.upfronthosting.co.za> Message-ID: <1384692458.29.0.480311430813.issue19607@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 13:47:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 12:47:56 +0000 Subject: [issue19605] Use specific asserts in datetime tests In-Reply-To: <1384509215.73.0.873700234251.issue19605@psf.upfronthosting.co.za> Message-ID: <1384692476.1.0.345251116491.issue19605@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 13:48:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 12:48:30 +0000 Subject: [issue19602] Use specific asserts in tkinter tests In-Reply-To: <1384502999.03.0.730675393841.issue19602@psf.upfronthosting.co.za> Message-ID: <1384692510.28.0.118973791942.issue19602@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 13:48:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 12:48:51 +0000 Subject: [issue19601] Use specific asserts in sqlite3 tests In-Reply-To: <1384502911.7.0.613780921305.issue19601@psf.upfronthosting.co.za> Message-ID: <1384692531.25.0.453816607194.issue19601@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 13:49:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 12:49:13 +0000 Subject: [issue19604] Use specific asserts in array tests In-Reply-To: <1384509089.55.0.263530897465.issue19604@psf.upfronthosting.co.za> Message-ID: <1384692553.47.0.381721357227.issue19604@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 13:59:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 12:59:41 +0000 Subject: [issue19603] Use specific asserts in test_decr In-Reply-To: <1384503127.94.0.904619557147.issue19603@psf.upfronthosting.co.za> Message-ID: <1384693181.09.0.729689769216.issue19603@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Try to regenerate the patch for Rietveld. ---------- Added file: http://bugs.python.org/file32667/test_descr_asserts_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:20:24 2013 From: report at bugs.python.org (Lukasz Mielicki) Date: Sun, 17 Nov 2013 13:20:24 +0000 Subject: [issue19630] marshal.dump cannot write to temporary file In-Reply-To: <1384685916.9.0.912432901925.issue19630@psf.upfronthosting.co.za> Message-ID: Lukasz Mielicki added the comment: Thank you for detailed explanation. Too bad tempfile is inherently non-portable, but I'm fine with marshal.dumps as a w/a in this case. I marshal to a temporary file to serialize input for Perforce command line client which is capable of accepting marshaled Python objects as input for some commands. Unfortunately writing directly to its stdin deadlocks (at least on Windows, where streams seems not be fully buffered). My guess is that Perforce client performs seek to end of file before reading it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:24:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 13:24:30 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <3dMvCd5dYzzR28@mail.python.org> Roundup Robot added the comment: New changeset da10196b94f4 by Richard Oudkerk in branch 'default': Issue #19565: Prevent warnings at shutdown about pending overlapped ops. http://hg.python.org/cpython/rev/da10196b94f4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:35:47 2013 From: report at bugs.python.org (engelbert gruber) Date: Sun, 17 Nov 2013 13:35:47 +0000 Subject: [issue19631] "exec" BNF in simple statements Message-ID: <1384695347.39.0.482466517942.issue19631@psf.upfronthosting.co.za> New submission from engelbert gruber: the doc says:: exec_stmt ::= "exec" or_expr ["in" expression ["," expression]] imho it should read :: exec_stmt ::= "exec" expression ["in" expression ["," expression]] | "exec(" expression [ ", expression" [ ", expression" ]] ")" ---------- assignee: docs at python components: Documentation messages: 203146 nosy: docs at python, grubert priority: normal severity: normal status: open title: "exec" BNF in simple statements versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:37:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 13:37:23 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1384695443.75.0.662712072074.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added more comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:47:53 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 13:47:53 +0000 Subject: [issue19520] Win32 compiler warning in _sha3 In-Reply-To: <1383838912.21.0.108258927136.issue19520@psf.upfronthosting.co.za> Message-ID: <1384696073.67.0.530629630807.issue19520@psf.upfronthosting.co.za> Christian Heimes added the comment: Go ahead! Although I'd rather follow upstream as close as possible, this one is harmless. ---------- assignee: christian.heimes -> zach.ware stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:49:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 13:49:08 +0000 Subject: [issue19507] ssl.wrap_socket() with server_hostname should imply match_hostname() In-Reply-To: <1383691650.31.0.697174756225.issue19507@psf.upfronthosting.co.za> Message-ID: <1384696148.97.0.763336369961.issue19507@psf.upfronthosting.co.za> Christian Heimes added the comment: I'll work on a PEP for 3.5 that will handle this issue. ---------- assignee: -> christian.heimes resolution: -> later status: open -> closed versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:49:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 13:49:23 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1384696163.13.0.104747571839.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I added more comments on Rietveld. Did you forget to publish them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:49:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 13:49:54 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> Message-ID: <1384696194.91.0.967742586798.issue19448@psf.upfronthosting.co.za> Christian Heimes added the comment: Does anybody want to do a review of the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:53:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 13:53:37 +0000 Subject: [issue17405] Add _Py_memset_s() to securely clear memory In-Reply-To: <1363107252.29.0.782882608.issue17405@psf.upfronthosting.co.za> Message-ID: <1384696417.62.0.310094645904.issue17405@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't have enough time to work in this issue before 3.4 beta1. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:57:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 13:57:40 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1384696660.09.0.139754413631.issue17134@psf.upfronthosting.co.za> Christian Heimes added the comment: The feature is not yet production-ready but part of the feature is already in 3.4. It depends on #19448 and #16487, too. What shall I do about it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:58:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 13:58:16 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1384696696.28.0.792499182014.issue19438@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: -christian.heimes priority: normal -> low versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:59:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 13:59:28 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> Message-ID: <1384696768.44.0.00770198985433.issue19448@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If it's for #17134, couldn't it remain a private API? I'm rather uncomfortable about exposing such things unless we make the ssl module a full-fledged toolbox to handle X509 certificates (and perhaps think a bit more about the APIs). Are there any common use cases? ---------- nosy: +dstufft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 14:59:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 13:59:43 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1384696783.04.0.791488473792.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Grr. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:00:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:00:05 +0000 Subject: [issue19377] Backport SVG mime type to Python 2 In-Reply-To: <1382622251.64.0.363936372729.issue19377@psf.upfronthosting.co.za> Message-ID: <1384696805.96.0.688967356073.issue19377@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:00:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:00:30 +0000 Subject: [issue19420] Leak in _hashopenssl.c In-Reply-To: <1382961198.75.0.11599120872.issue19420@psf.upfronthosting.co.za> Message-ID: <1384696830.0.0.0842290676644.issue19420@psf.upfronthosting.co.za> Christian Heimes added the comment: ping ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:01:35 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:01:35 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default In-Reply-To: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> Message-ID: <1384696895.71.0.405317836103.issue19508@psf.upfronthosting.co.za> Christian Heimes added the comment: I suggest that we add a red warning box at the top of the SSL module, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:03:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:03:40 +0000 Subject: [issue19343] Expose FreeBSD-specific APIs in resource module In-Reply-To: <1382434038.91.0.920002784924.issue19343@psf.upfronthosting.co.za> Message-ID: <1384697020.16.0.982277957627.issue19343@psf.upfronthosting.co.za> Christian Heimes added the comment: LGTM I'll submit the patch later. ---------- assignee: -> christian.heimes stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:08:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:08:01 +0000 Subject: [issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix In-Reply-To: <1368799493.86.0.504478450601.issue17997@psf.upfronthosting.co.za> Message-ID: <1384697281.76.0.75689355761.issue17997@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 3.2 hasn't been fixed yet. Should acquire a CVE for the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:10:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:10:25 +0000 Subject: [issue16353] add function to os module for getting path to default shell In-Reply-To: <1351473560.4.0.147895276383.issue16353@psf.upfronthosting.co.za> Message-ID: <1384697425.18.0.304922152649.issue16353@psf.upfronthosting.co.za> Christian Heimes added the comment: 3.4 beta1 will be released next weekend. I'll try to submit a patch in the next couple of days. ---------- assignee: -> christian.heimes stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:11:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:11:17 +0000 Subject: [issue17006] Warn users about hashing secrets? In-Reply-To: <1358758082.76.0.415880124971.issue17006@psf.upfronthosting.co.za> Message-ID: <1384697476.99.0.66983113553.issue17006@psf.upfronthosting.co.za> Christian Heimes added the comment: ping :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:13:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:13:51 +0000 Subject: [issue17791] PC/pyconfig.h defines PREFIX macro In-Reply-To: <1366314379.89.0.227357780835.issue17791@psf.upfronthosting.co.za> Message-ID: <1384697631.86.0.589233470473.issue17791@psf.upfronthosting.co.za> Christian Heimes added the comment: I'll remove the offending lines later. ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:15:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 14:15:36 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default In-Reply-To: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> Message-ID: <1384697736.44.0.236733993229.issue19508@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Something like the following? ---------- keywords: +patch Added file: http://bugs.python.org/file32668/sslsec.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:17:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:17:49 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <1384697869.92.0.086777784794.issue18742@psf.upfronthosting.co.za> Christian Heimes added the comment: Raymond: Good idea! to all: Do we need more discussion about the ABC, e.g. on the pycrypto mailing list? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:18:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:18:33 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <1384697913.67.0.565258766448.issue17276@psf.upfronthosting.co.za> Christian Heimes added the comment: I'll commit the patch later. ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:19:34 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:19:34 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1384697974.68.0.843795009754.issue18369@psf.upfronthosting.co.za> Christian Heimes added the comment: The feature won't be ready for 3.4. I'll work on a PEP for 3.5 ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:19:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:19:54 +0000 Subject: [issue18775] name attribute for HMAC In-Reply-To: <1376843757.16.0.673413061043.issue18775@psf.upfronthosting.co.za> Message-ID: <1384697994.93.0.979126076785.issue18775@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:20:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:20:07 +0000 Subject: [issue18550] internal_setblocking() doesn't check return value of fcntl() In-Reply-To: <1374694779.19.0.0902694218162.issue18550@psf.upfronthosting.co.za> Message-ID: <1384698007.36.0.362584385548.issue18550@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:21:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:21:22 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1384698082.85.0.0707816786724.issue18528@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch has been languishing for some time. Commit or close? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:22:18 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:22:18 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1384698138.77.0.568441260469.issue18709@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch hasn't been committed to 3.2 yet. ---------- assignee: -> georg.brandl versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:23:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:23:16 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1384698196.98.0.578318346433.issue16296@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:24:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 14:24:05 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <1384698245.19.0.1313293.issue18742@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some comments: - AbstractCryptoHashFunction should be called CryptoHashBase or something (but does it warrant being public? I don't think so) - having "Function" in a class name is a bit confusing to me. Why not simply "CryptoHash"? - you don't need to add a __slots__ to your ABCs, IMO - the default hexdigest() implementation looks a bit suboptimal to me, why not use binascii? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:24:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:24:45 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1384698285.22.0.943292345243.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, you are right. OpenSSL uses the same API to load certs and CRLs. CRL checks must be enabled, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:26:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 14:26:05 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1384698365.36.0.530217223165.issue18528@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If none of use really understands the problem Coverity is trying to warn us about, I'd say "let languish or close". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:26:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:26:24 +0000 Subject: [issue14518] Add bcrypt $2a$ to crypt.py In-Reply-To: <1333741347.69.0.597224923936.issue14518@psf.upfronthosting.co.za> Message-ID: <1384698384.12.0.73321675808.issue14518@psf.upfronthosting.co.za> Christian Heimes added the comment: I think it would be better to provide a dedicated implementation of bcrypt. Most operating systems do not provide bcrypt (Linux, Windows). ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:27:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:27:49 +0000 Subject: [issue15464] ssl: add set_msg_callback function In-Reply-To: <1343352856.85.0.212414509347.issue15464@psf.upfronthosting.co.za> Message-ID: <1384698469.0.0.339875364068.issue15464@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch won't be ready for 3.4 beta1 next weekend. Deferring to 3.5 ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:29:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:29:49 +0000 Subject: [issue18617] TLS and Intermediate Certificates In-Reply-To: <1375376317.99.0.429350247521.issue18617@psf.upfronthosting.co.za> Message-ID: <1384698589.82.0.077652663686.issue18617@psf.upfronthosting.co.za> Christian Heimes added the comment: Donald, could you please provide a doc update that explains the problem? ---------- assignee: -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:30:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 14:30:55 +0000 Subject: [issue18617] TLS and Intermediate Certificates In-Reply-To: <1375376317.99.0.429350247521.issue18617@psf.upfronthosting.co.za> Message-ID: <1384698655.75.0.548907697741.issue18617@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm afraid downloading certs on the fly would open a whole new can of worms, so I'd rather have it documented indeed :) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:35:19 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Nov 2013 14:35:19 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default In-Reply-To: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> Message-ID: <1384698919.63.0.478421220783.issue19508@psf.upfronthosting.co.za> Georg Brandl added the comment: Sounds good. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:35:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 14:35:49 +0000 Subject: [issue13968] Support recursive globs In-Reply-To: <1328700146.65.0.884103301197.issue13968@psf.upfronthosting.co.za> Message-ID: <1384698949.31.0.122113405971.issue13968@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In updated patch fixed warning/errors when ran with -b or -bb options. ---------- Added file: http://bugs.python.org/file32669/glob_recursive_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:36:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 14:36:13 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default In-Reply-To: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> Message-ID: <3dMwpN2Nnzz7Ljl@mail.python.org> Roundup Robot added the comment: New changeset f86fdaf529ea by Antoine Pitrou in branch '3.3': Issue #19508: direct the user to read the security considerations for the ssl module http://hg.python.org/cpython/rev/f86fdaf529ea New changeset 18d95780100e by Antoine Pitrou in branch 'default': Issue #19508: direct the user to read the security considerations for the ssl module http://hg.python.org/cpython/rev/18d95780100e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:37:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 14:37:43 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1384699063.86.0.73923728075.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could anyone please review the patch before feature freeze? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:37:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 14:37:44 +0000 Subject: [issue19632] doc build warning Message-ID: <1384699064.41.0.714714605877.issue19632@psf.upfronthosting.co.za> New submission from Antoine Pitrou: This is on 2.7: reading sources... [100%] whatsnew/index /home/antoine/cpython/27/Doc/library/functions.rst:1186: WARNING: duplicate object description of repr, other instance in /home/antoine/cpython/27/Doc/library/repr.rst, use :noindex: for one of them looking for now-outdated files... none found ---------- assignee: docs at python components: Documentation messages: 203180 nosy: docs at python, pitrou priority: low severity: normal stage: needs patch status: open title: doc build warning versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:42:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:42:04 +0000 Subject: [issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates In-Reply-To: <1372100693.76.0.99629035685.issue18293@psf.upfronthosting.co.za> Message-ID: <1384699324.02.0.748842724296.issue18293@psf.upfronthosting.co.za> Christian Heimes added the comment: I may address the issue in my PEP for Python 3.5. Python 3.4 beta 1 will be released next week and no new features are allowed in beta and RC phase. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:43:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 14:43:04 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default In-Reply-To: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> Message-ID: <3dMwyH4yzdz7Ln5@mail.python.org> Roundup Robot added the comment: New changeset a197b3c3b2c9 by Antoine Pitrou in branch '2.7': Issue #19508: warn that ssl doesn't validate certificates by default http://hg.python.org/cpython/rev/a197b3c3b2c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:43:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:43:17 +0000 Subject: [issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general In-Reply-To: <1373153632.08.0.45299629619.issue18391@psf.upfronthosting.co.za> Message-ID: <1384699397.74.0.738231632799.issue18391@psf.upfronthosting.co.za> Christian Heimes added the comment: Do you want to work on a patch for 3.4? You have about five days until 3.4 is going into feature freeze. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:43:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 14:43:40 +0000 Subject: [issue19508] Add warning that Python doesn't verify SSL certs by default In-Reply-To: <1383691927.99.0.022250098505.issue19508@psf.upfronthosting.co.za> Message-ID: <1384699420.76.0.881869543259.issue19508@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've added a different warning to 2.7, as the ssl docs there don't have the "security considerations" section. ---------- resolution: -> fixed stage: needs patch -> committed/rejected versions: -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:45:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:45:24 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1384699524.89.0.835763984818.issue16632@psf.upfronthosting.co.za> Christian Heimes added the comment: I no longer see the crashs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:45:48 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:45:48 +0000 Subject: [issue19336] No API to get events from epoll without allocating a list In-Reply-To: <1382373266.71.0.522503434319.issue19336@psf.upfronthosting.co.za> Message-ID: <1384699548.47.0.794029611075.issue19336@psf.upfronthosting.co.za> Christian Heimes added the comment: @Alex: ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:46:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 14:46:29 +0000 Subject: [issue1763] Get path to shell/known folders on Windows In-Reply-To: <1199812378.67.0.278096816271.issue1763@psf.upfronthosting.co.za> Message-ID: <1384699589.41.0.166677461927.issue1763@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:54:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:54:20 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1384700060.14.0.825964698195.issue18233@psf.upfronthosting.co.za> Christian Heimes added the comment: I'd rather return a list or tuple of X509 objects but #18369 won't be ready for 3.4. Ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 15:59:07 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 14:59:07 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs In-Reply-To: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> Message-ID: <1384700347.56.0.359415271908.issue18379@psf.upfronthosting.co.za> Christian Heimes added the comment: Are you satisfied with my patch? I'd like to commit it before beta 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:00:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 15:00:04 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1384700404.58.0.728804144231.issue18233@psf.upfronthosting.co.za> Antoine Pitrou added the comment: @Dustin > My two-cents is to leave it a tuple (why not?). Because tuples are more used for struct-like data. Here we are returning an unknown number of homogenous objects, which generally calls for a list. @Christian > I'd rather return a list or tuple of X509 objects but #18369 won't be ready for 3.4. Ideas? Unless the feature is really important to have right now, I think it's ok to defer it until we have X509 objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:04:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 15:04:51 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1384700691.45.0.955865527284.issue18233@psf.upfronthosting.co.za> Christian Heimes added the comment: It's just nice to have for debugging and extended verification. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:15:53 2013 From: report at bugs.python.org (fhahn) Date: Sun, 17 Nov 2013 15:15:53 +0000 Subject: [issue2292] Missing *-unpacking generalizations In-Reply-To: <1205595680.3.0.859525264867.issue2292@psf.upfronthosting.co.za> Message-ID: <1384701353.49.0.259903232401.issue2292@psf.upfronthosting.co.za> fhahn added the comment: I've updated the patch to apply to the current tip. But this patch breaks *-unpacking, I'll try to take a closer look during the next week. ---------- nosy: +fhahn Added file: http://bugs.python.org/file32670/starunpack2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:25:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 15:25:30 +0000 Subject: [issue1684] CGIHTTPServer does not chdir prior to executing the CGI script In-Reply-To: <1198274242.65.0.204698066624.issue1684@psf.upfronthosting.co.za> Message-ID: <1384701930.35.0.63182823692.issue1684@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:25:53 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 15:25:53 +0000 Subject: [issue979658] Improve HTML documentation of a directory Message-ID: <1384701953.91.0.738955276203.issue979658@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:27:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 15:27:09 +0000 Subject: [issue1299] distutils.sysconfig is not cross-platform compatible In-Reply-To: <1192727810.38.0.522851261061.issue1299@psf.upfronthosting.co.za> Message-ID: <1384702029.81.0.140875241832.issue1299@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: tarek -> status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:27:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 15:27:51 +0000 Subject: [issue1744456] Patch for feat. 1713877 Expose callbackAPI in readline module Message-ID: <1384702071.37.0.668985833065.issue1744456@psf.upfronthosting.co.za> Christian Heimes added the comment: Closing as duplicate ---------- stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:28:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 15:28:20 +0000 Subject: [issue2213] build_tkinter.py does not handle paths with spaces In-Reply-To: <1204331742.92.0.0412981555519.issue2213@psf.upfronthosting.co.za> Message-ID: <1384702100.84.0.577404432476.issue2213@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:30:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 15:30:21 +0000 Subject: [issue1625576] add ability to specify name to os.fdopen Message-ID: <1384702221.05.0.467086296033.issue1625576@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> languishing versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:33:30 2013 From: report at bugs.python.org (Tim Golden) Date: Sun, 17 Nov 2013 15:33:30 +0000 Subject: [issue19630] marshal.dump cannot write to temporary file In-Reply-To: <1384675790.16.0.0477801542512.issue19630@psf.upfronthosting.co.za> Message-ID: <1384702410.83.0.794654380615.issue19630@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- resolution: -> wont fix stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:37:19 2013 From: report at bugs.python.org (irdb) Date: Sun, 17 Nov 2013 15:37:19 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1384702639.35.0.637795726869.issue15809@psf.upfronthosting.co.za> irdb added the comment: Well, if there is no other way around this, I think it's better to apply Martin's patch. At least then we will be able to enter any valid utf-8 character in IDLE (although print statement won't print correctly unless the string is decoded first). (As a Windows user, currently I can't print u'????' in interactive mode and get an "Unsupported characters in input" error because my default system encoding (cp1256) can't encode Russian.) Also it will be more Unicode friendly which is not a bad thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:47:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 15:47:02 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1384703222.35.0.669890051264.issue15809@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch with a hack which corrects a line number in displayed traceback. It doesn't solve a problem totally, but perhaps it is a good enough approximation. ---------- Added file: http://bugs.python.org/file32671/idle_compile_coding_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:47:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 15:47:27 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1384703247.98.0.812948862464.issue15809@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:48:06 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Sun, 17 Nov 2013 15:48:06 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1384703286.48.0.0159718528763.issue8402@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: -maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:51:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 15:51:41 +0000 Subject: [issue18528] Possible fd leak in socketmodule In-Reply-To: <1374496496.68.0.51305379842.issue18528@psf.upfronthosting.co.za> Message-ID: <1384703501.27.0.500753643084.issue18528@psf.upfronthosting.co.za> Christian Heimes added the comment: OK, I'm rejecting it. ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 16:59:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 15:59:18 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1384703958.24.0.168924584518.issue11344@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The pathlib module is not in the stdlib yet, while a patch for splitpath() waits for review almost a year. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 17:39:19 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 16:39:19 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <1384706359.75.0.846563165136.issue18742@psf.upfronthosting.co.za> Christian Heimes added the comment: * "Cryptographic Hash Function" is the correct technical term for algorithms like SHA-1. http://en.wikipedia.org/wiki/Cryptographic_hash_function * PEP 452 is going to suggest that 3rd party libraries register their hash function as subclasses of the ABC. * __slots__ are required for subclassing. All our ABCs in Python 3.x have __slots__ * I don't want to import yet another module just for the ABC. I'd rather not provide a sample implementation of hexdigest() if you think it is too slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 17:46:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 16:46:58 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1384706359.75.0.846563165136.issue18742@psf.upfronthosting.co.za> Message-ID: <1384706813.2291.10.camel@fsol> Antoine Pitrou added the comment: > * "Cryptographic Hash Function" is the correct technical term for > algorithms like SHA-1. Sure, but in a programming context, it's confusing when the "function" is implemented by a class with additional properties and methods. Why not simply "CryptoHash"? It sounds descriptive enough to me. > * I don't want to import yet another module just for the ABC. I'd > rather not provide a sample implementation of hexdigest() if you think > it is too slow. Well, it's probably not excruciatingly slow, so if you don't want another import, I guess the current implementation is ok :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 17:47:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 16:47:54 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> Message-ID: <1384706874.81.0.654337517238.issue19448@psf.upfronthosting.co.za> Christian Heimes added the comment: OK, let's keep it as private API for now and maybe make it public in 3.5. I'm going to rename ASN1Object to _ASN1Object, remove the docs and adjust the tests. Agreed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 17:51:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 16:51:42 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1384706874.81.0.654337517238.issue19448@psf.upfronthosting.co.za> Message-ID: <1384707100.2291.12.camel@fsol> Antoine Pitrou added the comment: > OK, let's keep it as private API for now and maybe make it public in > 3.5. I'm going to rename ASN1Object to _ASN1Object, remove the docs > and adjust the tests. Agreed? Yup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 17:55:18 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 16:55:18 +0000 Subject: [issue18742] Abstract base class for hashlib In-Reply-To: <1376519472.63.0.753349393836.issue18742@psf.upfronthosting.co.za> Message-ID: <1384707318.51.0.262061913253.issue18742@psf.upfronthosting.co.za> Christian Heimes added the comment: It seems the name of the ABC needs more discussion. I'll address it in PEP 452 for Python 3.5. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 17:55:53 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 16:55:53 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> Message-ID: <1384707353.56.0.538708312729.issue19448@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 18:04:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 17:04:48 +0000 Subject: [issue16998] Lost updates with multiprocessing.Value In-Reply-To: <1358622837.13.0.603431337609.issue16998@psf.upfronthosting.co.za> Message-ID: <3dN05n6WlPz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 7aabbe919f55 by Richard Oudkerk in branch '2.7': Issue 16998: Clarify that += on a shared value is not atomic. http://hg.python.org/cpython/rev/7aabbe919f55 New changeset 11cafbe6519f by Richard Oudkerk in branch '3.3': Issue 16998: Clarify that += on a shared value is not atomic. http://hg.python.org/cpython/rev/11cafbe6519f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 18:10:06 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 17 Nov 2013 17:10:06 +0000 Subject: [issue16998] Lost updates with multiprocessing.Value In-Reply-To: <1358622837.13.0.603431337609.issue16998@psf.upfronthosting.co.za> Message-ID: <1384708206.5.0.270023743043.issue16998@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 18:29:43 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 17 Nov 2013 17:29:43 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> Message-ID: <1384709383.74.0.17269433027.issue19629@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 18:39:38 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 17 Nov 2013 17:39:38 +0000 Subject: [issue19338] multiprocessing: sys.exit() from a child with a non-int exit code exits with 0 In-Reply-To: <1382385505.82.0.388398051493.issue19338@psf.upfronthosting.co.za> Message-ID: <1384709978.25.0.43198442629.issue19338@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Thanks for the patches. Fixed in 7aabbe919f55, 11cafbe6519f. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 18:48:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 17:48:41 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <3dN14S3FMXz7Ljs@mail.python.org> Roundup Robot added the comment: New changeset ba7d53b5f3de by Richard Oudkerk in branch '2.7': Issue #19599: Increase sleep period. http://hg.python.org/cpython/rev/ba7d53b5f3de New changeset 7d6a9e7060c7 by Richard Oudkerk in branch '3.3': Issue #19599: Increase sleep period. http://hg.python.org/cpython/rev/7d6a9e7060c7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 19:42:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 18:42:13 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1384713733.54.0.537236729708.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch after Serhiy's comments. ---------- Added file: http://bugs.python.org/file32672/base85-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 19:46:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 18:46:17 +0000 Subject: [issue19603] Use specific asserts in test_decr In-Reply-To: <1384503127.94.0.904619557147.issue19603@psf.upfronthosting.co.za> Message-ID: <1384713977.44.0.946861066443.issue19603@psf.upfronthosting.co.za> Ezio Melotti added the comment: New patch LGTM. In addition to the assertHasNoAttr that I suggested, on IRC David suggested assertNotHasAttr to mimic assertNotIn and assertNotIsinstance, and someone else suggested assertNoAttr. Since it's only used within this file and all the suggestions are equally understandable to me, I don't think it matters too much, but feel free to change it if you think any of the alternative is better. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 19:51:00 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 17 Nov 2013 18:51:00 +0000 Subject: [issue17006] Warn users about hashing secrets? In-Reply-To: <1358758082.76.0.415880124971.issue17006@psf.upfronthosting.co.za> Message-ID: <1384714260.52.0.849498091139.issue17006@psf.upfronthosting.co.za> Ezio Melotti added the comment: This might be useful to whoever attempts to write a patch: http://docs.python.org/devguide/documenting.html#security-considerations-and-other-concerns ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 19:58:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 18:58:09 +0000 Subject: [issue1684] CGIHTTPServer does not chdir prior to executing the CGI script In-Reply-To: <1198274242.65.0.204698066624.issue1684@psf.upfronthosting.co.za> Message-ID: <1384714689.85.0.709606289922.issue1684@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 20:04:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 19:04:54 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> Message-ID: <3dN2mP5jR8z7LmD@mail.python.org> Roundup Robot added the comment: New changeset f43f65038e2a by Christian Heimes in branch 'default': Issue #19448: Add private API to SSL module to lookup ASN.1 objects by OID, NID, short name and long name. http://hg.python.org/cpython/rev/f43f65038e2a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 20:10:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 17 Nov 2013 19:10:22 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> Message-ID: <1384715422.65.0.348266877199.issue19448@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 21:47:36 2013 From: report at bugs.python.org (Andrei Dorian Duma) Date: Sun, 17 Nov 2013 20:47:36 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1384721256.57.0.563725934682.issue15216@psf.upfronthosting.co.za> Andrei Dorian Duma added the comment: I have to postpone this for a few weeks. Sorry if I stayed in anyone's way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 22:13:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 21:13:51 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <1384722831.01.0.966610731593.issue14455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added a lot of comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 22:21:00 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 17 Nov 2013 21:21:00 +0000 Subject: [issue17893] Refactor reduce protocol implementation In-Reply-To: <1367488387.09.0.179973942781.issue17893@psf.upfronthosting.co.za> Message-ID: <1384723260.55.0.954791890452.issue17893@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Merged with issue #17810 ---------- resolution: -> duplicate status: open -> closed superseder: -> Implement PEP 3154 (pickle protocol 4) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 22:39:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 21:39:40 +0000 Subject: [issue19603] Use specific asserts in test_decr In-Reply-To: <1384503127.94.0.904619557147.issue19603@psf.upfronthosting.co.za> Message-ID: <3dN6By68gLz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 2407ecebcf7d by Serhiy Storchaka in branch '3.3': Issue #19603: Use specific asserts in test_decr. http://hg.python.org/cpython/rev/2407ecebcf7d New changeset 6049c954a703 by Serhiy Storchaka in branch 'default': Issue #19603: Use specific asserts in test_decr. http://hg.python.org/cpython/rev/6049c954a703 New changeset 38fcb9a63398 by Serhiy Storchaka in branch '2.7': Issue #19603: Use specific asserts in test_decr. http://hg.python.org/cpython/rev/38fcb9a63398 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 22:41:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 21:41:07 +0000 Subject: [issue19603] Use specific asserts in test_decr In-Reply-To: <1384503127.94.0.904619557147.issue19603@psf.upfronthosting.co.za> Message-ID: <1384724467.65.0.135810926877.issue19603@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Mimicing assertNotIsinstance looks fine. Thank you for your review. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 22:44:15 2013 From: report at bugs.python.org (Evgeny Kapun) Date: Sun, 17 Nov 2013 21:44:15 +0000 Subject: [issue7434] general pprint rewrite In-Reply-To: <1259944363.21.0.149882342014.issue7434@psf.upfronthosting.co.za> Message-ID: <1384724655.21.0.382654069897.issue7434@psf.upfronthosting.co.za> Changes by Evgeny Kapun : ---------- nosy: +abacabadabacaba _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 22:49:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 21:49:54 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1384724994.06.0.47786403081.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one nitpick and the patch LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:04:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 22:04:44 +0000 Subject: [issue19591] Use specific asserts in ctype tests In-Reply-To: <1384462192.45.0.696464665582.issue19591@psf.upfronthosting.co.za> Message-ID: <1384725884.01.0.509065080109.issue19591@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:14:07 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 17 Nov 2013 22:14:07 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <1384726447.97.0.149407378032.issue19599@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Hopefully the applied change will fix failure (or at least make this much less likey). ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:26:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 22:26:57 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot Message-ID: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> New submission from STINNER Victor: Some test_wave are failing, but only on PPC64 (big endian, right?). It may be related to issue #1575020. http://buildbot.python.org/all/builders/PPC64%20PowerLinux%203.x/builds/1099/steps/test/logs/stdio ====================================================================== ERROR: test_unseekable_incompleted_write (test.test_wave.WavePCM16Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 243, in test_unseekable_incompleted_write self.check_file(testfile, self.nframes + 1, self.frames) File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 84, in check_file self.assertEqual(f.readframes(nframes), frames) File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/wave.py", line 257, in readframes data.fromfile(chunk.file.file, nitems) EOFError: read() didn't return enough bytes ====================================================================== ERROR: test_unseekable_incompleted_write (test.test_wave.WavePCM32Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 243, in test_unseekable_incompleted_write self.check_file(testfile, self.nframes + 1, self.frames) File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 84, in check_file self.assertEqual(f.readframes(nframes), frames) File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/wave.py", line 257, in readframes data.fromfile(chunk.file.file, nitems) EOFError: read() didn't return enough bytes ====================================================================== FAIL: test_write_array (test.test_wave.WavePCM16Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 163, in test_write_array self.check_file(TESTFN, self.nframes, self.frames) File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 83, in check_file self.assertEqual(f.getnframes(), nframes) AssertionError: 96 != 48 ====================================================================== FAIL: test_write_memoryview (test.test_wave.WavePCM16Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 171, in test_write_memoryview self.check_file(TESTFN, self.nframes, self.frames) File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 83, in check_file self.assertEqual(f.getnframes(), nframes) AssertionError: 96 != 48 ====================================================================== FAIL: test_write_array (test.test_wave.WavePCM32Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 163, in test_write_array self.check_file(TESTFN, self.nframes, self.frames) File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 83, in check_file self.assertEqual(f.getnframes(), nframes) AssertionError: 192 != 48 ====================================================================== FAIL: test_write_memoryview (test.test_wave.WavePCM32Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 171, in test_write_memoryview self.check_file(TESTFN, self.nframes, self.frames) File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/audiotests.py", line 83, in check_file self.assertEqual(f.getnframes(), nframes) AssertionError: 192 != 48 ---------- components: Tests messages: 203217 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: test_wave: failures on PPC64 buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:33:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 22:33:29 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX Message-ID: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> New submission from STINNER Victor: The isuse #13674 added tests on strftime() for %y format with year < 1900 on Windows. It looks like AIX doesn't support them. http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/1039/steps/test/logs/stdio ====================================================================== FAIL: test_y_before_1900_nonwin (test.test_strftime.Y1900Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_strftime.py", line 193, in test_y_before_1900_nonwin time.strftime("%y", (1899, 1, 1, 0, 0, 0, 0, 0, 0)), "99") AssertionError: '0/' != '99' - 0/ + 99 ---------- components: Tests messages: 203218 nosy: haypo, tim.golden priority: normal severity: normal status: open title: test_strftime.test_y_before_1900_nonwin() fails on AIX versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:40:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 22:40:15 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <3dN7Xt4bdNz7LxZ@mail.python.org> Roundup Robot added the comment: New changeset fd9ce1d4b820 by Victor Stinner in branch 'default': Issue #19634: time.strftime("%y") now raises a ValueError on AIX when given a http://hg.python.org/cpython/rev/fd9ce1d4b820 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:40:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 22:40:41 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1384728041.42.0.89621018161.issue19634@psf.upfronthosting.co.za> STINNER Victor added the comment: I keep the issue open until the test succeed on AIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:44:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 22:44:37 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1384728277.94.0.797586123031.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Ezio's and Eric's comments. ---------- Added file: http://bugs.python.org/file32673/glob_escape_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:53:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 22:53:22 +0000 Subject: [issue19635] asyncio should not depend on concurrent.futures, it is not always available Message-ID: <1384728802.8.0.137912295354.issue19635@psf.upfronthosting.co.za> New submission from STINNER Victor: On old FreeBSD versions, concurrent.futures cannot be used. I don't remember why, it's probably related to semaphores (something like a low hardcoded limit). See for example first lines of Lib/test/test_concurrent_futures.py: --- # Skip tests if _multiprocessing wasn't built. test.support.import_module('_multiprocessing') # Skip tests if sem_open implementation is broken. test.support.import_module('multiprocessing.synchronize') # import threading after _multiprocessing to raise a more revelant error # message: "No module named _multiprocessing". _multiprocessing is not compiled # without thread support. test.support.import_module('threading') --- The problem is that asyncio always try to import concurrent.futures. Example: http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/4213/steps/test/logs/stdio test test_asyncio crashed -- Traceback (most recent call last): File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/regrtest.py", line 1276, in runtest_inner test_runner() File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/__init__.py", line 31, in test_main run_unittest(suite()) File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/__init__.py", line 21, in suite __import__(mod_name) File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_asyncio/test_base_events.py", line 11, in from asyncio import base_events File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/asyncio/__init__.py", line 21, in from .futures import * File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/asyncio/futures.py", line 21, in Error = concurrent.futures._base.Error AttributeError: 'module' object has no attribute 'futures' ---------- messages: 203222 nosy: gvanrossum, haypo priority: normal severity: normal status: open title: asyncio should not depend on concurrent.futures, it is not always available versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:54:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Nov 2013 22:54:18 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <3dN7s52MGhz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 42366e293b7b by Antoine Pitrou in branch 'default': Issue #17618: Add Base85 and Ascii85 encoding/decoding to the base64 module. http://hg.python.org/cpython/rev/42366e293b7b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 17 23:55:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Nov 2013 22:55:05 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1384728905.32.0.253308607068.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now committed, thanks for the reviews and the code! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:05:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 23:05:47 +0000 Subject: [issue17006] Warn users about hashing secrets? In-Reply-To: <1358758082.76.0.415880124971.issue17006@psf.upfronthosting.co.za> Message-ID: <1384729547.18.0.0955878925289.issue17006@psf.upfronthosting.co.za> STINNER Victor added the comment: > For passwords a key stretching and key derivation function like PBKDF2, bcrypt or scrypt is much more secure. It looks like Python 3.4 now provides something for pbkdf2, so it may be interested to mention it on the top of the hashlib in your warning. http://docs.python.org/dev/library/hashlib.html#hashlib.pbkdf2_hmac ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:11:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 23:11:14 +0000 Subject: [issue19630] marshal.dump cannot write to temporary file In-Reply-To: <1384675790.16.0.0477801542512.issue19630@psf.upfronthosting.co.za> Message-ID: <1384729874.28.0.85654503837.issue19630@psf.upfronthosting.co.za> STINNER Victor added the comment: I cannot reproduce the issue on Python 3 (on Linux), I suppose that it is specific to Python 2. On Python 3, mashal.dump(obj, fileobj) only calls fileobj.write(data), no test on fileobj type is done. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:12:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 17 Nov 2013 23:12:55 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1384729975.61.0.0990512074257.issue19633@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report. This patch should fix the issue. ---------- components: +Library (Lib) -Tests keywords: +patch stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file32674/wave_byteswap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:13:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 23:13:29 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <1384730009.82.0.417875646575.issue17276@psf.upfronthosting.co.za> STINNER Victor added the comment: Well, if deprecating is not an option, it's probably better to add a red warning explaining why the default choice may not fit all use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:21:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 23:21:01 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1384730461.34.0.323996209754.issue19633@psf.upfronthosting.co.za> STINNER Victor added the comment: - a = array.array('h', data) + a = array.array('h') + a.frombytes(data) I don't understand why it would change anything. According to the doc, passing data to the construction is like calling array.frombytes(): http://docs.python.org/dev/library/array.html#array.array If it behaves differently, it looks like a bug a in the array module. Am I wrong? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:44:28 2013 From: report at bugs.python.org (Michael Foord) Date: Sun, 17 Nov 2013 23:44:28 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1384731868.03.0.370629178265.issue17457@psf.upfronthosting.co.za> Michael Foord added the comment: I do want to get this into 3.4. The logic is non-trivial though, so I need to understand it before I can add it to discovery. It certainly *looks* good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:45:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 23:45:50 +0000 Subject: [issue19636] Fix usage of MAX_PATH in posixmodule.c Message-ID: <1384731950.1.0.229673291292.issue19636@psf.upfronthosting.co.za> New submission from STINNER Victor: The length of a path is not always correctly handled in posixmodule.c, the worst case is posix__getvolumepathname() which pass a length two times smaller than the buffer (GetVolumePathNameW() expects a number of WCHAR characters, not a number of bytes). MAX_PATH includes the final null character, so no need to write MAX_PATH+1, especially when the function supports path longer than MAX_PATH-1 wide characters by allocating a larget buffer. http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx " Maximum Path Length Limitation In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:\some 256-character path string" where "" represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.)" Attached patch fixes usage of MAX_PATH in posixmodule.c. ---------- files: win_max_path.patch keywords: patch messages: 203231 nosy: haypo priority: normal severity: normal status: open title: Fix usage of MAX_PATH in posixmodule.c Added file: http://bugs.python.org/file32675/win_max_path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:52:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 23:52:11 +0000 Subject: [issue19636] Fix usage of MAX_PATH in posixmodule.c In-Reply-To: <1384731950.1.0.229673291292.issue19636@psf.upfronthosting.co.za> Message-ID: <1384732331.52.0.187694066839.issue19636@psf.upfronthosting.co.za> STINNER Victor added the comment: posix__getfullpathname(): - char outbuf[MAX_PATH*2]; + char outbuf[MAX_PATH]; ... - wchar_t woutbuf[MAX_PATH*2], *woutbufp = woutbuf; + wchar_t woutbuf[MAX_PATH], *woutbufp = woutbuf; I don't know what "*2" was used here, probably a mistake with sizeof(wchar_t)=2? (try to allocate bytes, where the length is a number of wide characters) posix__getvolumepathname() is new in Python 3.4, so not need to backport its fix. path_converter(): length = PyBytes_GET_SIZE(bytes); #ifdef MS_WINDOWS - if (length > MAX_PATH) { + if (length > MAX_PATH-1) { FORMAT_EXCEPTION(PyExc_ValueError, "%s too long for Windows"); Py_DECREF(bytes); return 0; I don't know if this fix should be backported to Python 3.3. ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:52:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Nov 2013 23:52:22 +0000 Subject: [issue19636] Fix usage of MAX_PATH in posixmodule.c In-Reply-To: <1384731950.1.0.229673291292.issue19636@psf.upfronthosting.co.za> Message-ID: <1384732342.24.0.973379619112.issue19636@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 00:58:16 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 17 Nov 2013 23:58:16 +0000 Subject: [issue19635] asyncio should not depend on concurrent.futures, it is not always available In-Reply-To: <1384728802.8.0.137912295354.issue19635@psf.upfronthosting.co.za> Message-ID: <1384732696.91.0.045583492523.issue19635@psf.upfronthosting.co.za> Guido van Rossum added the comment: I don't think it's worth complicating the code for this (except perhaps by making the tests fail more gracefully). The tasks and futures modules import various things from concurrent.futures (some exceptions, and some constants for wait()). If a platform doesn't have threads, asyncio is not very useful anyway -- you can't create network connections or servers because of the way getaddrinfo() is called. I recall that this was reported before and I decided I just didn't care. Who would be using such an old FreeBSD version anyway (while wanting to use a bleeding edge Python version and the bleeding edge asyncio package)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 01:00:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 00:00:30 +0000 Subject: [issue19635] asyncio should not depend on concurrent.futures, it is not always available In-Reply-To: <1384728802.8.0.137912295354.issue19635@psf.upfronthosting.co.za> Message-ID: <1384732830.44.0.631407679643.issue19635@psf.upfronthosting.co.za> STINNER Victor added the comment: > Who would be using such an old FreeBSD version anyway (while wanting to use a bleeding edge Python version and the bleeding edge asyncio package)? If we want to drop support of old FreeBSD versions, something can be done using the PEP 11. We have FreeBSD 6.4 and 7.2 buildbots. I'm trying to fix all buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 01:12:02 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 Nov 2013 00:12:02 +0000 Subject: [issue19635] asyncio should not depend on concurrent.futures, it is not always available In-Reply-To: <1384728802.8.0.137912295354.issue19635@psf.upfronthosting.co.za> Message-ID: <1384733522.33.0.314838834882.issue19635@psf.upfronthosting.co.za> Guido van Rossum added the comment: Well, what would be the incantation to just skip the tests if concurrent.futures can't be imported? (Although it seems that there's a problem with concurrent.futures if the whole thing refuses to import just because multiprocessing isn't supported -- couldn't the threadpool executor still work? Asyncio doesn't use any of the multiprocessing stuff.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 01:14:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 00:14:00 +0000 Subject: [issue19635] asyncio should not depend on concurrent.futures, it is not always available In-Reply-To: <1384728802.8.0.137912295354.issue19635@psf.upfronthosting.co.za> Message-ID: <1384733640.43.0.63767010205.issue19635@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 01:37:51 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 Nov 2013 00:37:51 +0000 Subject: [issue19635] asyncio should not depend on concurrent.futures, it is not always available In-Reply-To: <1384728802.8.0.137912295354.issue19635@psf.upfronthosting.co.za> Message-ID: <1384735071.54.0.328597339395.issue19635@psf.upfronthosting.co.za> Guido van Rossum added the comment: Can you try this patch? It tweaks the test to skip everything if it can't import concurrent.futures. ---------- keywords: +patch Added file: http://bugs.python.org/file32676/skipit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 01:57:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 00:57:38 +0000 Subject: [issue19635] asyncio should not depend on concurrent.futures, it is not always available In-Reply-To: <1384728802.8.0.137912295354.issue19635@psf.upfronthosting.co.za> Message-ID: <1384736258.9.0.809332480452.issue19635@psf.upfronthosting.co.za> STINNER Victor added the comment: > Can you try this patch? I don't have access to the buildbot. You may try the custom buildbot if you don't want to commit directly: http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%20custom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 01:59:25 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 Nov 2013 00:59:25 +0000 Subject: [issue19635] asyncio should not depend on concurrent.futures, it is not always available In-Reply-To: <1384736258.9.0.809332480452.issue19635@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I'll just commit it and pray. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 02:10:30 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 18 Nov 2013 01:10:30 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <1384737030.73.0.676091657467.issue19504@psf.upfronthosting.co.za> Eric V. Smith added the comment: This patch covers the files that Vinay did not update. ---------- Added file: http://bugs.python.org/file32677/customise-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 02:10:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 01:10:37 +0000 Subject: [issue19636] Fix usage of MAX_PATH in posixmodule.c In-Reply-To: <1384731950.1.0.229673291292.issue19636@psf.upfronthosting.co.za> Message-ID: <1384737037.44.0.679088580882.issue19636@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I forgot to mention that my initial concern was the following warning: ..\Modules\posixmodule.c(4057): warning C4267: 'function' : conversion from 'size_t' to 'DWORD', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\pythoncore.vcxproj] bufsize (Py_ssize_t) is passed to GetVolumePathNameW() which expected a DWORD. An OverflowError must be raised if bufsize is larger than DWORD_MAX (the constant is defined in Modules/_winapi.c, not in posixmodule.c). But I prefer to fix the warning after this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 02:16:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 01:16:33 +0000 Subject: [issue19637] test_subprocess.test_undecodable_env() failure on AIX Message-ID: <1384737393.4.0.145203729418.issue19637@psf.upfronthosting.co.za> New submission from STINNER Victor: To analyze the following issue, I would like to know which locale encoding is used on AIX with the C locale. Example: $ LC_ALL=C python -c 'import locale; print(locale.getpreferredencoding(False))' ANSI_X3.4-1968 http://buildbot.python.org/all/builders/PPC64%20AIX%203.x ====================================================================== FAIL: test_undecodable_env (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_subprocess.py", line 1696, in test_undecodable_env self.assertEqual(stdout.decode('ascii'), ascii(value)) AssertionError: "'abc\\xff'" != "'abc\\udcff'" - 'abc\xff' ? ^ + 'abc\udcff' ? ^^^ ---------- components: Tests keywords: buildbot messages: 203241 nosy: David.Edelsohn, haypo priority: normal severity: normal status: open title: test_subprocess.test_undecodable_env() failure on AIX versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 02:44:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 18 Nov 2013 01:44:30 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <3dNCdP4DC2zQLH@mail.python.org> Roundup Robot added the comment: New changeset 652de09a3a1a by Victor Stinner in branch 'default': Issue #19634: Fix time_strftime() on AIX, format is a wchar_t* not a PyObject* http://hg.python.org/cpython/rev/652de09a3a1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 04:05:28 2013 From: report at bugs.python.org (Jon Gauthier) Date: Mon, 18 Nov 2013 03:05:28 +0000 Subject: [issue19164] Update uuid.UUID TypeError exception: integer should not be an argument. In-Reply-To: <1380885490.13.0.480584034262.issue19164@psf.upfronthosting.co.za> Message-ID: <1384743928.47.0.600769130262.issue19164@psf.upfronthosting.co.za> Changes by Jon Gauthier : ---------- keywords: +patch Added file: http://bugs.python.org/file32678/issue19164.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 05:08:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 18 Nov 2013 04:08:31 +0000 Subject: [issue19520] Win32 compiler warning in _sha3 In-Reply-To: <1383838912.21.0.108258927136.issue19520@psf.upfronthosting.co.za> Message-ID: <3dNGqf4pFbzPZD@mail.python.org> Roundup Robot added the comment: New changeset 259c82332199 by Zachary Ware in branch 'default': Issue #19520: Fix (the last!) compiler warning on 32bit Windows, in _sha3 http://hg.python.org/cpython/rev/259c82332199 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 05:10:42 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 18 Nov 2013 04:10:42 +0000 Subject: [issue19520] Win32 compiler warning in _sha3 In-Reply-To: <1383838912.21.0.108258927136.issue19520@psf.upfronthosting.co.za> Message-ID: <1384747842.56.0.917357058565.issue19520@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks Christian, now committed. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 05:27:59 2013 From: report at bugs.python.org (David Edelsohn) Date: Mon, 18 Nov 2013 04:27:59 +0000 Subject: [issue19637] test_subprocess.test_undecodable_env() failure on AIX In-Reply-To: <1384737393.4.0.145203729418.issue19637@psf.upfronthosting.co.za> Message-ID: <1384748879.35.0.163907517339.issue19637@psf.upfronthosting.co.za> David Edelsohn added the comment: $ LC_ALL=C python -c 'import locale; print(locale.getpreferredencoding(False))' ISO8859-1 It's possible that some additional locales were not installed by default with the system, e.g., UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 05:28:15 2013 From: report at bugs.python.org (David Edelsohn) Date: Mon, 18 Nov 2013 04:28:15 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1384748895.69.0.0622947235843.issue19634@psf.upfronthosting.co.za> Changes by David Edelsohn : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 05:29:29 2013 From: report at bugs.python.org (David Edelsohn) Date: Mon, 18 Nov 2013 04:29:29 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1384748969.96.0.406516044278.issue19633@psf.upfronthosting.co.za> Changes by David Edelsohn : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 05:49:49 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 18 Nov 2013 04:49:49 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384750189.86.0.285388291029.issue19596@psf.upfronthosting.co.za> Zachary Ware added the comment: How does this one strike you, Brett? Setting the empty tests to None seems to keep the ABC happy and reduces the total number of tests from 632 to 598. ---------- Added file: http://bugs.python.org/file32679/skipped_importlib_tests.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 05:54:39 2013 From: report at bugs.python.org (irdb) Date: Mon, 18 Nov 2013 04:54:39 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1384750479.8.0.631393486979.issue15809@psf.upfronthosting.co.za> irdb added the comment: Thank you Serhiy for working on this. This patch solves the problem when all your input characters are encodable using system preferred encoding. But issue19625 persists. I still can't print something like '??????? ?????' in interactive mode. Another problem is that output of interactive mode and running a module is different if source encoding is something other that system's default. For example: (With current patch) in interactive mode: >>> print '?' ? >>> print u'?' ? But in when running same commands from a file with utf-8 encoding: ?? ? I know, you siad to use cp1256 encoding in my source file. But I really prefer to work with utf-8 than working with a codepage that is not fully compatible with my language and I believe many other programmers are the same as me (even if there is a codepage they can work with). (cp1256 is only for Arabic, but (when a program does not support unicode) Microsoft uses it as a second option for some other similar languages like Urdu, Persian. But it does not include all the characters they need.) IMO these two problems -- being a able to type any Unicode characters in interactive mode and getting the same output as running modules -- are more important than a mere representation problem in interactive mode. (and considering that I use utf-8 for my source files, both of them were solved by martin's patch. [Of course I'm not saying it's the solution, just that it worked better for me]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 06:27:18 2013 From: report at bugs.python.org (Debarshi Goswami) Date: Mon, 18 Nov 2013 05:27:18 +0000 Subject: [issue19582] Tkinter is not working with Py_SetPath In-Reply-To: <1384427555.71.0.261717374261.issue19582@psf.upfronthosting.co.za> Message-ID: <1384752438.6.0.718263261241.issue19582@psf.upfronthosting.co.za> Debarshi Goswami added the comment: Anyone tried this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:13:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:13:54 +0000 Subject: [issue7060] test_multiprocessing dictionary changed size errors and hang In-Reply-To: <1254706857.52.0.165302672738.issue7060@psf.upfronthosting.co.za> Message-ID: <1384762434.25.0.235563918348.issue7060@psf.upfronthosting.co.za> STINNER Victor added the comment: I never seen this issue, can we close it? #7105 has been fixed in Python 3, not in Python 2.7. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:14:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:14:57 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1384762497.59.0.07335848358.issue7105@psf.upfronthosting.co.za> STINNER Victor added the comment: What is the status of this issue? Does anyone still want to backport the fix to Python 2.7? (I found this issue while searching for test_multiprocessing failures, and I found #7060 which refers this issue.) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:15:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 08:15:57 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1384762557.67.0.713342529405.issue19633@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: array's constructor interprets its second memoryview argument as an iterable of integers. >>> import array >>> array.array('h', b'abcd') array('h', [25185, 25699]) >>> array.array('h', memoryview(b'abcd')) array('h', [97, 98, 99, 100]) array.frombytes() always interpret its argument as bytes-like object. >>> a = array.array('h') >>> a.frombytes(memoryview(b'abcd')) >>> a array('h', [25185, 25699]) First patch fixes only a half of the issue. test_unseekable_incompleted_write() still failed because array.fromfile() fails read incomplete data. Second patch also adds unittest.expectedFailure decorators for these tests. ---------- Added file: http://bugs.python.org/file32680/wave_byteswap_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:25:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:25:00 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1384763100.94.0.806717276697.issue19633@psf.upfronthosting.co.za> STINNER Victor added the comment: > array's constructor interprets its second memoryview argument as an iterable of integers. Ok so, so your fix is correct. > First patch fixes only a half of the issue. test_unseekable_incompleted_write() still failed because array.fromfile() fails read incomplete data. Why the test succeeded on little endian? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:27:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:27:05 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1384763225.85.0.795987798044.issue19634@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, the test passed with the second fix. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:30:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 08:30:08 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1384763408.59.0.852556825569.issue19633@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Why the test succeeded on little endian? Because array.fromfile() is used only to swap 16- and 32-bit samples on bigendian platform. Perhaps we need the byteswap() function in the audioop module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:30:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:30:50 +0000 Subject: [issue10158] BadInternalCall running test_multiprocessing In-Reply-To: <1287608062.36.0.615501498317.issue10158@psf.upfronthosting.co.za> Message-ID: <1384763450.8.0.669221686012.issue10158@psf.upfronthosting.co.za> STINNER Victor added the comment: Even with PyTrash_UNWIND_LEVEL in Include/object.h defined to 10 instead of 50, I cannot reproduce the issue on the 2.7 branch of Mercurial. I guess that the bug was already fixed in Python 2.7 and this issue has no activity since 3 years, so I'm closing it. ---------- nosy: +haypo resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:32:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:32:22 +0000 Subject: [issue16158] sporadic test_multiprocessing failure In-Reply-To: <1349632536.58.0.00638810333077.issue16158@psf.upfronthosting.co.za> Message-ID: <1384763542.24.0.589592810274.issue16158@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this failure recently. The issue doesn't contain useful information, and has no activity since more than 1 year, so I'm closing it. Reopen the issue with more information if it was reproduced recently. ---------- nosy: +haypo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:38:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:38:15 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1384763895.98.0.554661317342.issue19633@psf.upfronthosting.co.za> STINNER Victor added the comment: > Because array.fromfile() is used only to swap 16- and 32-bit samples on bigendian platform. If the file is truncated, why would the test suceed on little endian? The file doesn't have the same size in bytes? The test doesn't check the number of frames? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:39:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:39:37 +0000 Subject: [issue18887] test_multiprocessing.test_connection failure on Python 2.7 In-Reply-To: <1377901644.63.0.505553589029.issue18887@psf.upfronthosting.co.za> Message-ID: <1384763977.32.0.877983057095.issue18887@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_multiprocessing.test_connection failure -> test_multiprocessing.test_connection failure on Python 2.7 versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:42:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:42:03 +0000 Subject: [issue19565] test_multiprocessing_spawn: RuntimeError and assertion error on windows xp buildbot In-Reply-To: <1384294298.49.0.172308180032.issue19565@psf.upfronthosting.co.za> Message-ID: <1384764123.89.0.839648954251.issue19565@psf.upfronthosting.co.za> STINNER Victor added the comment: The initial issue (RuntimeError messages) has been fixed, I'm closing the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:45:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:45:45 +0000 Subject: [issue13090] test_multiprocessing: memory leaks In-Reply-To: <1317546629.79.0.861373881282.issue13090@psf.upfronthosting.co.za> Message-ID: <1384764345.55.0.668488489321.issue13090@psf.upfronthosting.co.za> STINNER Victor added the comment: If the result of os.read() was stored in a Python daemon thread, the memory should be released since the following changeset. Can someone check if this issue still exist? changeset: 87070:c2a13acd5e2b user: Victor Stinner date: Tue Nov 12 16:37:55 2013 +0100 files: Lib/test/test_threading.py Misc/NEWS Python/pythonrun.c description: Close #19466: Clear the frames of daemon threads earlier during the Python shutdown to call objects destructors. So "unclosed file" resource warnings are now corretly emitted for daemon threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:46:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:46:23 +0000 Subject: [issue19564] test_context() of test_multiprocessing_spawn hangs on "x86 Gentoo Non-Debug 3.x" buildbot In-Reply-To: <1384293991.33.0.242857083412.issue19564@psf.upfronthosting.co.za> Message-ID: <1384764383.97.0.712118586772.issue19564@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_multiprocessing_spawn hangs -> test_context() of test_multiprocessing_spawn hangs on "x86 Gentoo Non-Debug 3.x" buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:47:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 08:47:14 +0000 Subject: [issue19564] test_context() of test_multiprocessing_spawn hangs on "x86 Gentoo Non-Debug 3.x" buildbot In-Reply-To: <1384293991.33.0.242857083412.issue19564@psf.upfronthosting.co.za> Message-ID: <1384764434.38.0.189067657521.issue19564@psf.upfronthosting.co.za> STINNER Victor added the comment: See issue #12413 which may help to analyze this hang. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 09:59:05 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 18 Nov 2013 08:59:05 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1384765145.47.0.0230932451309.issue19634@psf.upfronthosting.co.za> Tim Golden added the comment: Thanks, guys; I'm afraid I only watched the stable buildbots when I committed - the AIX doesn't seem to be included. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:02:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 09:02:43 +0000 Subject: [issue19564] test_context() of test_multiprocessing_spawn hangs on "x86 Gentoo Non-Debug 3.x" buildbot In-Reply-To: <1384293991.33.0.242857083412.issue19564@psf.upfronthosting.co.za> Message-ID: <1384765363.71.0.00644140738293.issue19564@psf.upfronthosting.co.za> STINNER Victor added the comment: multiprocessing_faulthandler_timeout.patch: Dump the traceback of all Python threads in a child process if it takes more than 10 minutes to succeed. On the buildbot, the process hangs more than 1 hour. I guess that 10 minutes in enough for a single unit test. The patch adds a private attribute "_faulthandler_timeout" to Popen classes, but also a "_faulthandler_timeout" parameter to spawn_main(). If you think that it is really too ugly, the patch may be reverted after the bug is analyzed. Or would it be possible to pass a command to "prepare" a child process, like preexec_fn of the subprocess module? ---------- keywords: +patch nosy: +neologix Added file: http://bugs.python.org/file32681/multiprocessing_faulthandler_timeout.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:14:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 09:14:15 +0000 Subject: [issue19617] Fix usage of Py_ssize_t type in Python/compile.c In-Reply-To: <1384556887.78.0.0801644931994.issue19617@psf.upfronthosting.co.za> Message-ID: <1384766055.62.0.133518488825.issue19617@psf.upfronthosting.co.za> STINNER Victor added the comment: > You could use the Py_SAFE_DOWNCAST macro everywhere. I prefer to store sizes in a size type (Py_ssize_t), and only downcast where it is really needed, in compiler_addop_i(). So in the future, if someone wants to support values larger than INT_MAX, only one function need to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:23:21 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 18 Nov 2013 09:23:21 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1384766601.57.0.988603962035.issue2927@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file32682/issue2927.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:23:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 18 Nov 2013 09:23:21 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data Message-ID: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> New submission from Christian Heimes: The patch silences three compiler warnings on Win64 ---------- components: Windows files: dtoa.patch keywords: patch messages: 203264 nosy: christian.heimes, haypo, zach.ware priority: normal severity: normal stage: patch review status: open title: dtoa: conversion from '__int64' to 'int', possible loss of data type: compile error versions: Python 3.4 Added file: http://bugs.python.org/file32683/dtoa.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:28:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 09:28:14 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows In-Reply-To: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> Message-ID: <1384766893.99.0.44471250119.issue19581@psf.upfronthosting.co.za> STINNER Victor added the comment: > Your patch implies that the two only supported OSes are Linux and Windows :-) It more means that Windows memory allocator is different to the one used on all other operating systems. Well, if you are not convinced, we can keep the overallocation factor of 25%: performances are not so bad. The difference between 25% and 50% is low. -- Benchmark on patched repr(list) (to use PyUnicodeWriter, see issue #19513) using different overallocation factors on Linux. The best factor is 25% (the current factor). Platform: Linux-3.9.4-200.fc18.x86_64-x86_64-with-fedora-18-Spherical_Cow Bits: int=32, long=64, long long=64, size_t=64, void*=64 Timer: time.perf_counter SCM: hg revision=00348c0518f8+ tag=tip branch=default date="2013-11-18 10:04 +0100" Python unicode implementation: PEP 393 CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, resolution=1e-09) Python version: 3.4.0a4+ (default:00348c0518f8+, Nov 18 2013, 10:11:42) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] Timer precision: 40 ns -----------------------------+-------------+----------------+----------------+-------------- Tests??????????????????????? | ??writer-25 | ???writer-12.5 | ?????writer-50 | ???writer-100 -----------------------------+-------------+----------------+----------------+-------------- list("a")??????????????????? | ?247 ns (*) | ?272 ns (+10%) | ??265 ns (+7%) | 283 ns (+14%) list("abc")????????????????? | ?435 ns (*) | ??407 ns (-7%) | ????????430 ns | ???????427 ns ["a"]*(100)????????????????? | 8.26 us (*) | ????????8.4 us | ?8.76 us (+6%) | ??????7.93 us ["abc"]*(100)??????????????? | 7.97 us (*) | 8.75 us (+10%) | 9.19 us (+15%) | ??????8.37 us ["a" * 100]*(100)??????????? | 35.7 us (*) | ???????36.8 us | ???????36.6 us | ??????35.6 us ["a"]*(10**6)??????????????? | ??73 ms (*) | ?77.4 ms (+6%) | 84.9 ms (+16%) | 78.3 ms (+7%) ["abc"]*(10**6)????????????? | 76.6 ms (*) | ?81.1 ms (+6%) | 90.3 ms (+18%) | 82.4 ms (+8%) ["a" * 100]*(10**5)????????? | 35.1 ms (*) | ???????35.3 ms | ???????35.8 ms | 37.6 ms (+7%) list(range(10**6))?????????? | 93.4 ms (*) | ?102 ms (+10%) | ?103 ms (+10%) | 105 ms (+12%) list(map(str, range(10**6))) | ??97 ms (*) | ???????94.1 ms | ???????99.7 ms | 91.2 ms (-6%) -----------------------------+-------------+----------------+----------------+-------------- Total??????????????????????? | ?375 ms (*) | ????????390 ms | ?414 ms (+10%) | ?394 ms (+5%) -----------------------------+-------------+----------------+----------------+-------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:30:54 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Mon, 18 Nov 2013 09:30:54 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384767054.89.0.596299908404.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: I just tested on 3.4a0. Observed the following changes: - subprocess_devnull now NEVER fails. - subprocess_redirfile does not fail as often as before, but still fails. I changed the number of tasks to 20 and increased max_workers to 5 to get subprocess_redirfile to fail at least one of twenty times every time I invoked the test script. A typical result on 3.4 looks like this: Platform: Windows-XP-5.1.2600-SP3 task_type #threads result subprocess_redirfile 5 3 errors subprocess_redirfile 1 OK subprocess_devnull 5 OK subprocess_devnull 1 OK subprocess_noredirect 5 OK subprocess_noredirect 1 OK nosubprocess 5 OK nosubprocess 1 OK ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:31:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 09:31:33 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1384767093.22.0.588092832672.issue9566@psf.upfronthosting.co.za> STINNER Victor added the comment: I forgot to mention this issue in the following changesets. changeset: 87128:f0a7924fac56 user: Victor Stinner date: Fri Nov 15 23:16:15 2013 +0100 files: Modules/_randommodule.c description: Fix compiler warning on Windows 64-bit: explicit cast size_t to unsigned long changeset: 87129:8adbd8a3a626 user: Victor Stinner date: Fri Nov 15 23:21:11 2013 +0100 files: Modules/_sre.c description: Fix compiler warning (especially on Windows 64-bit): don't truncate Py_ssize_t to int changeset: 87130:baab11a466ab user: Victor Stinner date: Fri Nov 15 23:26:25 2013 +0100 files: Python/random.c description: Fix compiler warning in win32_urandom(): explicit cast to DWORD in CryptGenRandom() changeset: 87131:e086cb1c6e5a user: Victor Stinner date: Sat Nov 16 00:13:29 2013 +0100 files: Python/marshal.c description: Fix compiler warning (on Windows 64-bit): explicit cast Py_ssize_t to unsigned char, n is in range [0; 255] (a tuple cannot have a negative length) changeset: 87132:cf399d13a707 user: Victor Stinner date: Sat Nov 16 00:16:58 2013 +0100 files: Include/asdl.h description: Fix compiler warning on Windows 64-bit: asdl_seq_SET() stores the index parameter into a Py_ssize_t, instead of an int changeset: 87133:309d855ebc3e user: Victor Stinner date: Sat Nov 16 00:17:22 2013 +0100 files: Modules/_ctypes/_ctypes.c description: Fix compiler warning on Windows 64 bit: _init_pos_args() result type is Py_ssize_t, not int changeset: 87134:7cd4c3e9e310 user: Victor Stinner date: Sat Nov 16 00:18:58 2013 +0100 files: Modules/socketmodule.c description: Fix sock_recvfrom_guts(): recvfrom() size is limited to an int on Windows, not on other OSes! changeset: 87135:9e25367095c4 user: Victor Stinner date: Sat Nov 16 00:27:16 2013 +0100 files: Modules/_hashopenssl.c description: Fix compiler warnings on Windows 64 bit: add an explicit cast from Py_ssize_t to int, password.len was checked for being smaller than INT_MAX. changeset: 87229:ac4272df1af6 user: Victor Stinner date: Mon Nov 18 01:07:38 2013 +0100 files: Parser/grammar.c description: Fix compiler warnings on Windows 64-bit in grammar.c INT_MAX states and labels should be enough for everyone changeset: 87230:19e900e3033f user: Victor Stinner date: Mon Nov 18 01:09:51 2013 +0100 files: Parser/parsetok.c description: Fix a compiler warning on Windows 64-bit in parsetok.c Python parser doesn't support lines longer than INT_MAX bytes yet changeset: 87231:103998db4407 user: Victor Stinner date: Mon Nov 18 01:21:12 2013 +0100 files: Python/getargs.c description: Use Py_ssize_t type for sizes in getargs.c Fix compiler warnings on Windows 64-bit changeset: 87232:0f7f1f2121a1 user: Victor Stinner date: Mon Nov 18 01:24:31 2013 +0100 files: Modules/_sqlite/connection.c description: sqlite: raise an OverflowError if the result is longer than INT_MAX bytes Fix a compiler warning on Windows 64-bit changeset: 87233:855e172bcac4 user: Victor Stinner date: Mon Nov 18 01:27:30 2013 +0100 files: Modules/_sqlite/row.c description: Fix a compiler warning on Windows 64-bit: _sqlite module changeset: 87234:40d25b2b93f0 user: Victor Stinner date: Mon Nov 18 01:36:29 2013 +0100 files: Modules/_sqlite/statement.c description: sqlite: raise an OverflowError if a string or a BLOB is longer than INT_MAX bytes Fix compiler warnings on Windows 64-bit changeset: 87235:d1dc7888656f user: Victor Stinner date: Mon Nov 18 02:05:31 2013 +0100 files: Python/getargs.c description: PY_FORMAT_SIZE_T should not be used with PyErr_Format(), PyErr_Format("%zd") is portable changeset: 87236:2a01ca4b0edc user: Victor Stinner date: Mon Nov 18 02:07:29 2013 +0100 files: Modules/_sqlite/statement.c description: sqlite: Use Py_ssize_t to store a size instead of an int Fix a compiler warning on Windows 64-bit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:35:16 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Mon, 18 Nov 2013 09:35:16 +0000 Subject: [issue19639] Improve re match objects display Message-ID: <1384767316.36.0.259346591403.issue19639@psf.upfronthosting.co.za> New submission from Claudiu.Popa: When issue17087 was accepted, the documentation wasn't changed to reflect the new changes. The attached patch fixes this, replacing the old <_sre.Match object ...> with the deterministic repr of the match object. ---------- assignee: docs at python components: Documentation files: re_doc.patch keywords: patch messages: 203268 nosy: Claudiu.Popa, docs at python priority: normal severity: normal status: open title: Improve re match objects display versions: Python 3.4 Added file: http://bugs.python.org/file32684/re_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:40:50 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Mon, 18 Nov 2013 09:40:50 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384767650.03.0.421549601474.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: Increasing max_workers to 5 and running 20 tasks highlighs the 3.3-3.4 difference (code in attached file testscript4.py): Version: 3.4.0a4 (v3.4.0a4:e245b0d7209b, Oct 20 2013, 19:23:45) [MSC v.1600 32 b it (Intel)] Platform: Windows-XP-5.1.2600-SP3 Tasks: 20 task_type #threads result subprocess_redirfile 5 4 errors (of 20) subprocess_redirfile 1 OK subprocess_devnull 5 OK subprocess_devnull 1 OK subprocess_noredirect 5 OK subprocess_noredirect 1 OK nosubprocess 5 OK nosubprocess 1 OK Version: 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit ( Intel)] Platform: Windows-XP-5.1.2600-SP3 Tasks: 20 task_type #threads result subprocess_redirfile 5 18 errors (of 20) subprocess_redirfile 1 OK subprocess_devnull 5 19 errors (of 20) subprocess_devnull 1 OK subprocess_noredirect 5 OK subprocess_noredirect 1 OK nosubprocess 5 OK nosubprocess 1 OK ---------- Added file: http://bugs.python.org/file32685/testscript4.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:42:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 09:42:10 +0000 Subject: [issue19640] Drop _source attribute of namedtuple Message-ID: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> New submission from STINNER Victor: The definition of a new nametuple creates a large Python script to create the new type. The code stores the code in a private attribute: namespace = dict(__name__='namedtuple_%s' % typename) exec(class_definition, namespace) result = namespace[typename] result._source = class_definition This attribute wastes memory, I don't understand the purpose of the attribute. It was not discussed in an issue, so I guess that there is no real use case: changeset: 68879:bffdd7e9265c user: Raymond Hettinger date: Wed Mar 23 12:52:23 2011 -0700 files: Doc/library/collections.rst Lib/collections/__init__.py Lib/test/test_collections.py description: Expose the namedtuple source with a _source attribute. Can we just drop this attribute to reduce the Python memory footprint? ---------- messages: 203270 nosy: haypo, rhettinger priority: normal severity: normal status: open title: Drop _source attribute of namedtuple versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:43:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 09:43:38 +0000 Subject: [issue19640] Drop _source attribute of namedtuple In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1384767818.78.0.182684068993.issue19640@psf.upfronthosting.co.za> STINNER Victor added the comment: I found this issue while using my tracemalloc module to analyze the memory consumption of Python. On the Python test suite, the _source attribute is the 5th line allocating the memory memory: /usr/lib/python3.4/collections/__init__.py: 676.2 kB ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:50:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 18 Nov 2013 09:50:55 +0000 Subject: [issue19639] Improve re match objects display In-Reply-To: <1384767316.36.0.259346591403.issue19639@psf.upfronthosting.co.za> Message-ID: <1384768255.94.0.330143323937.issue19639@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:54:25 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 18 Nov 2013 09:54:25 +0000 Subject: [issue513840] entity unescape for sgml/htmllib Message-ID: <1384768465.21.0.93092833602.issue513840@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> expose html.parser.unescape _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:54:31 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Mon, 18 Nov 2013 09:54:31 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384768471.88.0.196672574376.issue19575@psf.upfronthosting.co.za> Changes by Bernt R?skar Brenna : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 10:55:18 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 18 Nov 2013 09:55:18 +0000 Subject: [issue19640] Drop _source attribute of namedtuple In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1384768518.79.0.370404979942.issue19640@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:05:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 10:05:23 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384763895.98.0.554661317342.issue19633@psf.upfronthosting.co.za> Message-ID: <69242746.yAeZ8fAuU9@raxxla> Serhiy Storchaka added the comment: > If the file is truncated, why would the test suceed on little endian? The > file doesn't have the same size in bytes? The test doesn't check the number > of frames? Because this code is not used on little endian. On little endian a data is read by file's read() method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:23:16 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 18 Nov 2013 10:23:16 +0000 Subject: [issue19640] Drop _source attribute of namedtuple In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1384770196.91.0.0465319306999.issue19640@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:25:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 10:25:07 +0000 Subject: [issue19641] Add audioop.byteswap() Message-ID: <1384770307.37.0.611849831444.issue19641@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The audio modules often need convert between little endian and big endian data. The array module can be used to byteswap 16- and 32-bit samples, but it can't help with 24-bit samples. Python implemented function for swapping bytes is not very efficient. In any case the use of array is not so simple (see issue19276, issue19633). The proposed patch adds efficient byteswap() function in the audioop module. byteswap(fragment, width) byteswaps every "width"-byte sample in the fragment and returns modified data. ---------- components: Library (Lib) files: audioop_byteswap.patch keywords: patch messages: 203273 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add audioop.byteswap() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32686/audioop_byteswap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:33:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 10:33:55 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1384770835.46.0.083682130932.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Eric's comment. ---------- Added file: http://bugs.python.org/file32687/glob_escape_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:36:42 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 18 Nov 2013 10:36:42 +0000 Subject: [issue19564] test_context() of test_multiprocessing_spawn hangs on "x86 Gentoo Non-Debug 3.x" buildbot In-Reply-To: <1384293991.33.0.242857083412.issue19564@psf.upfronthosting.co.za> Message-ID: <1384771002.33.0.52138723505.issue19564@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I don't think the patch to the _test_multiprocessing will work. It defines cls._Popen but I don't see how that would be used by cls.Pool to start the processes. I will have a think about a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:40:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 18 Nov 2013 10:40:10 +0000 Subject: [issue13633] Handling of hex character references in HTMLParser.handle_charref In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1384771210.45.0.516545131364.issue13633@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- dependencies: +expose html.parser.unescape _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:42:34 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Mon, 18 Nov 2013 10:42:34 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384771354.86.0.119269593904.issue19575@psf.upfronthosting.co.za> Changes by Bernt R?skar Brenna : ---------- components: +IO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:48:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 10:48:59 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384771739.21.0.89791046406.issue19575@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, this issue is the corner case of the PEP 446: http://www.python.org/dev/peps/pep-0446/#only-inherit-some-handles-on-windows The PEP explicitly does nothing for this case. It can change in the future. Until the point is fixed, you have to use a lock around the code spawning new processes to avoid that two threads spawn two processes and inherit unexpected files. Example: Thread 1 creates file 1, thread 2 creates file 2, child process inherits files 1 and 2, instead of just file 1. Richard proposed to use a trampoline process, the parent process would it the handles to inherit. Since Windows Vista, the trampoline process is no more needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 11:59:31 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 18 Nov 2013 10:59:31 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1384772371.1.0.300554781993.issue8402@psf.upfronthosting.co.za> Eric V. Smith added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:03:57 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 18 Nov 2013 11:03:57 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1384772637.74.0.0426236230256.issue19638@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:07:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 18 Nov 2013 11:07:37 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <3dNS7D59Rqz7Mdv@mail.python.org> Roundup Robot added the comment: New changeset 5fda36bff39d by Serhiy Storchaka in branch 'default': Issue #8402: Added the escape() function to the glob module. http://hg.python.org/cpython/rev/5fda36bff39d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:09:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 11:09:40 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1384772980.37.0.188171915421.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ezio and Eric for your reviews. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:28:15 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Mon, 18 Nov 2013 11:28:15 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384774095.94.0.848903000155.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: I tested, and locking around the subprocess.Popen call indeed works on Python 3.4. Thanks! Do you have any tips on how to accomplish the same thing on Python 3.3 (locking around Popen did not make any difference on 3.3)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:30:14 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 18 Nov 2013 11:30:14 +0000 Subject: [issue13090] test_multiprocessing: memory leaks In-Reply-To: <1317546629.79.0.861373881282.issue13090@psf.upfronthosting.co.za> Message-ID: <1384774214.46.0.0735767913877.issue13090@psf.upfronthosting.co.za> Stefan Krah added the comment: The leaks still exist here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:43:36 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Mon, 18 Nov 2013 11:43:36 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384775016.13.0.612707739221.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: Never mind, I figured it: On Python 3.3, the combination of locking around Popen and opening the file that I redirect to using the code below works (code from scons): def open_noinherit(*args, **kwargs): fp = open(*args, **kwargs) win32api.SetHandleInformation(msvcrt.get_osfhandle(fp.fileno()), win32con.HANDLE_FLAG_INHERIT, 0) return fp ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:45:26 2013 From: report at bugs.python.org (Ivan Radic) Date: Mon, 18 Nov 2013 11:45:26 +0000 Subject: [issue19642] shutil to support equivalent of: rm -f /dir/* Message-ID: <1384775126.27.0.181995142425.issue19642@psf.upfronthosting.co.za> New submission from Ivan Radic: Shutil supports deleting of files and directories but it offers no way to delete directory content (without deleting directory itself). Shell programming includes a lot of "rm -rf /dir" and "rm -f /dir/*", and there is no direct equivalent of these commands in Python. Educate me if I am wrong on this claim. Sure, I can write a quick for loop, and delete each subfile and subdirectory manually, but adding such ability to shutil would greatly enhance readability and simplicity of Python file handling scripts. Implementation could be as simply as : import os for root, dirs, files in os.walk(top, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) (example taken from http://docs.python.org/2/library/os.html#os.walk) ---------- components: IO messages: 203283 nosy: ivan.radic priority: normal severity: normal status: open title: shutil to support equivalent of: rm -f /dir/* type: enhancement versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:49:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 11:49:52 +0000 Subject: [issue19642] shutil to support equivalent of: rm -f /dir/* In-Reply-To: <1384775126.27.0.181995142425.issue19642@psf.upfronthosting.co.za> Message-ID: <1384775392.92.0.0671907719089.issue19642@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +hynek, tarek versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 12:58:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 11:58:24 +0000 Subject: [issue19641] Add audioop.byteswap() In-Reply-To: <1384770307.37.0.611849831444.issue19641@psf.upfronthosting.co.za> Message-ID: <1384775904.16.0.157220416174.issue19641@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses some Victor's comments. Added optimization for trivial case byteswap(bytes, 1). ---------- Added file: http://bugs.python.org/file32688/audioop_byteswap_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 13:11:11 2013 From: report at bugs.python.org (Ivan Radic) Date: Mon, 18 Nov 2013 12:11:11 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows Message-ID: <1384776671.66.0.696428447361.issue19643@psf.upfronthosting.co.za> New submission from Ivan Radic: shutil.rmtree works nice on Windows until it hits file with read only attribute set. Workaround is to provide a onerror parameter as a function that checks and removes file attribute before attempting to delete it. Can option to delete read_only files be integrated in shutil.rmtree? Example output in In Python 2.7: shutil.rmtree("C:\\2") Traceback (most recent call last): File "", line 1, in shutil.rmtree("C:\\2") File "C:\Program Files (x86)\Python.2.7.3\lib\shutil.py", line 250, in rmtree onerror(os.remove, fullname, sys.exc_info()) File "C:\Program Files (x86)\Python.2.7.3\lib\shutil.py", line 248, in rmtree os.remove(fullname) WindowsError: [Error 5] Access is denied: 'C:\\2\\read_only_file.txt' Example output in In Python 3.3: shutil.rmtree("C:\\2") Traceback (most recent call last): File "", line 1, in shutil.rmtree("C:\\2") File "C:\Program Files (x86)\Python.3.3.0\lib\shutil.py", line 460, in rmtree return _rmtree_unsafe(path, onerror) File "C:\Program Files (x86)\Python.3.3.0\lib\shutil.py", line 367, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "C:\Program Files (x86)\Python.3.3.0\lib\shutil.py", line 365, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 5] Access is denied: 'C:\\2\\read_only_file.txt' ---------- components: IO messages: 203285 nosy: ivan.radic priority: normal severity: normal status: open title: shutil rmtree fails on readonly files in Windows type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 13:14:04 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 18 Nov 2013 12:14:04 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1384776844.62.0.699047515363.issue7105@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Attached is a version for 2.7 Btw, I think a cleaner way to deal with unpredictable GC runs is to be able to temporarily disable GC with a context manager. ---------- nosy: +kristjan.jonsson Added file: http://bugs.python.org/file32689/issue7105.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 13:31:33 2013 From: report at bugs.python.org (Thomas Guettler) Date: Mon, 18 Nov 2013 12:31:33 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1384777893.14.0.0320711737161.issue5673@psf.upfronthosting.co.za> Thomas Guettler added the comment: For Python 2.x there is a backport of the subprocess module of 3.x: https://pypi.python.org/pypi/subprocess32. It has the timeout argument for call() and pipe.wait(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 13:32:45 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 18 Nov 2013 12:32:45 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1384777965.78.0.272379763786.issue19638@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 13:42:32 2013 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Mon, 18 Nov 2013 12:42:32 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1384778552.37.0.0082262544333.issue19575@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: And here's a function that does not require pywin32: def open_noinherit_ctypes(*args, **kwargs): HANDLE_FLAG_INHERIT = 1 import msvcrt from ctypes import windll, WinError fp = open(*args, **kwargs) if not windll.kernel32.SetHandleInformation(msvcrt.get_osfhandle(fp.fileno()), HANDLE_FLAG_INHERIT, 0): raise WinError() return fp ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 13:43:50 2013 From: report at bugs.python.org (Dmitry) Date: Mon, 18 Nov 2013 12:43:50 +0000 Subject: [issue19644] Failing of interpreter when slicing a string in MacOS X Maverics Message-ID: <1384778630.66.0.716752649372.issue19644@psf.upfronthosting.co.za> New submission from Dmitry: I launch python3 on MacOS X Maverics and do the following things: a = '12345' a[:-0] And the interpreter (application python3) crashes with sigfault. Everything is OK with python2 on this computer (the same code returnes '') and with the same version of Python on linux computer ---------- assignee: ronaldoussoren components: Macintosh files: ?????? ?????? 2013-11-18 ? 16.39.46.png messages: 203289 nosy: ronaldoussoren, torbad priority: normal severity: normal status: open title: Failing of interpreter when slicing a string in MacOS X Maverics versions: Python 3.3 Added file: http://bugs.python.org/file32690/?????? ?????? 2013-11-18 ? 16.39.46.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 13:45:45 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 18 Nov 2013 12:45:45 +0000 Subject: [issue19644] Failing of interpreter when slicing a string in MacOS X Maverics In-Reply-To: <1384778630.66.0.716752649372.issue19644@psf.upfronthosting.co.za> Message-ID: <1384778745.7.0.88130826012.issue19644@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is a duplicate of #18458. ---------- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 14:18:04 2013 From: report at bugs.python.org (Martin Panter) Date: Mon, 18 Nov 2013 13:18:04 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1384780684.08.0.658440776113.issue11344@psf.upfronthosting.co.za> Martin Panter added the comment: The ntpath.splitpath() version is easy to get lost in. It would probably help if you spelt out all the single-letter variable names, and explained that tri-state root/separator = None/True/False flag. Maybe there is a less convoluted way to write it too, I dunno. Also, maybe it is worth clearly documenting a couple special properties of the result: * The first element is always the root component (for an absolute path), or an empty string (for a relative path) * The last element is an empty string if the path name ended in a directory separator, except when the path is a root directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 14:18:31 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 18 Nov 2013 13:18:31 +0000 Subject: [issue19617] Fix usage of Py_ssize_t type in Python/compile.c In-Reply-To: <1384766055.62.0.133518488825.issue19617@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: I meant where you added casts, you could use it. 2013/11/18 STINNER Victor : > > STINNER Victor added the comment: > >> You could use the Py_SAFE_DOWNCAST macro everywhere. > > I prefer to store sizes in a size type (Py_ssize_t), and only downcast where it is really needed, in compiler_addop_i(). So in the future, if someone wants to support values larger than INT_MAX, only one function need to be changed. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 15:05:54 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 18 Nov 2013 14:05:54 +0000 Subject: [issue13090] test_multiprocessing: memory leaks In-Reply-To: <1317546629.79.0.861373881282.issue13090@psf.upfronthosting.co.za> Message-ID: <1384783554.78.0.748816233874.issue13090@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > If the result of os.read() was stored in a Python daemon thread, the > memory should be released since the following changeset. Can someone > check if this issue still exist? If a daemon thread is killed while it is blocking on os.read() then the bytes object used as the read buffer will never be decrefed. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 15:07:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 14:07:37 +0000 Subject: [issue13090] test_multiprocessing: memory leaks In-Reply-To: <1317546629.79.0.861373881282.issue13090@psf.upfronthosting.co.za> Message-ID: <1384783657.89.0.639748929638.issue13090@psf.upfronthosting.co.za> STINNER Victor added the comment: > If a daemon thread is killed while it is blocking on os.read() > then the bytes object used as the read buffer will never be decrefed. Ah yes, so another reason to ensure that daemon threads exit normally at Python shutdown :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 15:38:14 2013 From: report at bugs.python.org (Gregory Salvan) Date: Mon, 18 Nov 2013 14:38:14 +0000 Subject: [issue19645] Improving unittest assertions Message-ID: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> New submission from Gregory Salvan: Actually unittest assertions depends on testcase class forcing us to extend it to add assertions and to use it to make assertions outside tests. Seeing interests in rethinking the way assertions are done in unittest, this issue first intent to collect feedback in order to suggest an implementation that fit the most. Some notes from private discussions: - it was briefly discussed here #18054. - taking care of popular solutions like py.test's rich assert statements and the testtools matcher objects. - avoid unnecessary complexity, staying focused on value My opinion: - must not change unittest api - may be put in a seperate package (splitting "unittest" in "unittest" and "assertions") - Open to hide assertions exceptions in optimized mode or providing a simple way to change default behaviour (log, skip... instead of throwing unhandled exception). ---------- components: Tests messages: 203295 nosy: Gregory.Salvan, michael.foord, ncoghlan, rbcollins priority: normal severity: normal status: open title: Improving unittest assertions type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 15:42:48 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Nov 2013 14:42:48 +0000 Subject: [issue19642] shutil to support equivalent of: rm -f /dir/* In-Reply-To: <1384775126.27.0.181995142425.issue19642@psf.upfronthosting.co.za> Message-ID: <1384785768.01.0.00248967208673.issue19642@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 13229. You can replicate 'rm -f' like this: for p in glob.glob('/dir/*'): os.remove(p) That doesn't seem worth an extra function. The annoying one to emulate is 'rm -rf /dir/*', because with the current shutil tools you have to make different calls depending on whether the object is a file or a directory. Pathlib doesn't help with that (it has no generic 'remove' method that applies to both directories and files), but it does make the iteration easier. ---------- components: +Library (Lib) -IO nosy: +pitrou, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 15:53:21 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Nov 2013 14:53:21 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows In-Reply-To: <1384776671.66.0.696428447361.issue19643@psf.upfronthosting.co.za> Message-ID: <1384786401.88.0.642323079204.issue19643@psf.upfronthosting.co.za> R. David Murray added the comment: You are essentially asking that we have an option to make the windows behavior mirror the posix behavior? (A read only file in a writable directory can be deleted in posix, since only the directory entry, not the file, is being deleted.) That makes some sense to me. I wonder what the windows devs think? ---------- components: +Library (Lib), Windows -IO nosy: +r.david.murray, tim.golden, zach.ware type: behavior -> enhancement versions: +Python 3.5 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 16:08:59 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 18 Nov 2013 15:08:59 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows In-Reply-To: <1384776671.66.0.696428447361.issue19643@psf.upfronthosting.co.za> Message-ID: <1384787339.2.0.0365304980117.issue19643@psf.upfronthosting.co.za> Tim Golden added the comment: This, unfortunately, is the classic edge-case where intra-platform consistency and inter-platform consistency clash. I (on Windows) would certainly be surprised if a tree delete removed read-only files without my specifying some kind of override. I understand why cross-platform behaviour might be preferred, and I'm open to being convinced, but I start at -0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 16:28:57 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 18 Nov 2013 15:28:57 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1384788537.34.0.8105726645.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't much like the use of Py_SSIZE_T and Py_SAFE_DOWNCAST here: the dtoa.c code knows almost nothing about Python.h (aside from right at the top), and I'd like to keep it that way if possible. And in fact I'd say that we *shouldn't* be silencing these warnings; rather, we should take them seriously. It looks to me as though it is possible for that conversion to overflow. I'll try to take a look sometime soon. Adding 2.7 and 3.3, since the bug is present there, too. ---------- versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 16:29:10 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 18 Nov 2013 15:29:10 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1384788550.51.0.851888853682.issue19638@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 16:34:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 15:34:14 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1384788854.38.0.564449448479.issue19638@psf.upfronthosting.co.za> STINNER Victor added the comment: "I don't much like the use of Py_SSIZE_T and Py_SAFE_DOWNCAST here (...) And in fact I'd say that we *shouldn't* be silencing these warnings; rather, we should take them seriously." So size_t should be used instead ("s - s1" is unsigned, s >= s1). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 16:34:44 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Nov 2013 15:34:44 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows In-Reply-To: <1384776671.66.0.696428447361.issue19643@psf.upfronthosting.co.za> Message-ID: <1384788884.15.0.993503384738.issue19643@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it would *definitely* need to be a new explicit option whose default value was the current behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 16:38:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 15:38:11 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1384789091.33.0.182715237798.issue19638@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the "meta-issue" #9566: "Compilation warnings under x64 Windows". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 16:44:02 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Nov 2013 15:44:02 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1384789442.51.0.722138342024.issue19645@psf.upfronthosting.co.za> R. David Murray added the comment: You should probably start by summarizing the assertThat proposal from issue 18054, which suggested making a separate issue for assertThat. ---------- nosy: +r.david.murray title: Improving unittest assertions -> decouple unittest assertions from the TestCase class _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 16:51:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 15:51:48 +0000 Subject: [issue19640] Drop _source attribute of namedtuple In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1384789908.92.0.514258067223.issue19640@psf.upfronthosting.co.za> STINNER Victor added the comment: > the 5th line allocating the memory memory oops, the 5th line allocating the *most* memory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 17:06:35 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 18 Nov 2013 16:06:35 +0000 Subject: [issue9878] Avoid parsing pyconfig.h and Makefile by autogenerating extension module In-Reply-To: <1284660526.13.0.672517649262.issue9878@psf.upfronthosting.co.za> Message-ID: <1384790795.22.0.828158809753.issue9878@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I believe this has been fixed for a while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 17:07:58 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 18 Nov 2013 16:07:58 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384790878.17.0.319630844235.issue19596@psf.upfronthosting.co.za> Brett Cannon added the comment: I've actually started doing this in the PEP 451 repo and it's working out so far. When that all lands I should have all the loaders ported but not the finders. If you want, Zachary, you can make the chances in the PEP 451 repo so you don't have to wonder what has or has not been cleaned up. ---------- assignee: -> zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 17:19:19 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 18 Nov 2013 16:19:19 +0000 Subject: [issue19618] test_sysconfig_module fails on Ubuntu 12.04 In-Reply-To: <1384562223.55.0.434561574175.issue19618@psf.upfronthosting.co.za> Message-ID: <1384791559.21.0.732580537724.issue19618@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I also can't reproduce this in Python 3.3 or 3.4 on Trusty Tahr (what will be Ubuntu 14.04). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 17:51:37 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 18 Nov 2013 16:51:37 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1384793497.44.0.258137419122.issue19638@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 17:54:24 2013 From: report at bugs.python.org (Ivan Radic) Date: Mon, 18 Nov 2013 16:54:24 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows In-Reply-To: <1384776671.66.0.696428447361.issue19643@psf.upfronthosting.co.za> Message-ID: <1384793664.72.0.840937482533.issue19643@psf.upfronthosting.co.za> Ivan Radic added the comment: >You are essentially asking that we have an option to make the windows behavior mirror the posix behavior? (A read only file in a writable directory can be deleted in posix, since only the directory entry, not the file, is being deleted.) Actually, your explanation is perfect. I want to be able to remove some directory after I am done using it. When similar operation is done through file manager, dialog pops up asking for confirmation, I would like to have function parameter equivalent of "yes to all" dialog that file manager gives me. The thing is, anyone working with files is used to think in "rm -rf" kind of way, and on Windows read_only files break this workflow. I discovered this problem few days ago when I was working on custom backup script that needs to work both on Linux (at home) and Windows (at work). Currently, I need to have some extra *windows only* code just to be able to successfully remove a directory. Quick Google search discovered the workaround (http://stackoverflow.com/questions/1889597/deleting-directory-in-python), so I am set, but the original question: "Why oh why is this such a pain?" and the comment: "Maybe nobody has taken the five minutes to file a bug at bugs.python.org" resonated in my head long enough to give it a try. For me it makes sense to have this option configurable. And it make a ton of sense to support one line equivalent of "rm -rf". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 18:25:20 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 18 Nov 2013 17:25:20 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384795520.86.0.817520290544.issue16596@psf.upfronthosting.co.za> Xavier de Gaye added the comment: A description of what goes wrong when stepping out of the generator would be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 18:30:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 17:30:00 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1384795800.5.0.530097665783.issue11344@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added examples and Martin's notes to the documentation. ntpath implementation rewrote with regular expressions (it is now shorter and perhaps more clear). ---------- Added file: http://bugs.python.org/file32691/ospath_splitpath_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 18:41:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 18 Nov 2013 17:41:27 +0000 Subject: [issue19437] More failures found by pyfailmalloc In-Reply-To: <1383071047.38.0.937526854844.issue19437@psf.upfronthosting.co.za> Message-ID: <3dNcsf4hKLz7Mv1@mail.python.org> Roundup Robot added the comment: New changeset 8f770cdb7a19 by Victor Stinner in branch 'default': Issue #19437: Fix error handling of CDataType_from_buffer() http://hg.python.org/cpython/rev/8f770cdb7a19 New changeset 556bdd8d0dde by Victor Stinner in branch 'default': Issue #19437: Fix error handling of PyCArrayType_new(), don't decreases the http://hg.python.org/cpython/rev/556bdd8d0dde ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 19:09:24 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 18 Nov 2013 18:09:24 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384798164.91.0.948371681625.issue16596@psf.upfronthosting.co.za> Guido van Rossum added the comment: Basically the debugger lost control and the program ran to completion after I hit 'n' that returned from the coroutine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 20:06:40 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 18 Nov 2013 19:06:40 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows In-Reply-To: <1384776671.66.0.696428447361.issue19643@psf.upfronthosting.co.za> Message-ID: <1384801600.62.0.416716609751.issue19643@psf.upfronthosting.co.za> Zachary Ware added the comment: I like the idea of a remove_readonly flag. I was going to say that I'm a bit worried about the fact that shutil.rmtree already has a couple of keyword arguments, but it's nowhere near what, say, copytree has. Call me +0.75. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 20:24:13 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Nov 2013 19:24:13 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows In-Reply-To: <1384776671.66.0.696428447361.issue19643@psf.upfronthosting.co.za> Message-ID: <1384802653.85.0.680450566707.issue19643@psf.upfronthosting.co.za> R. David Murray added the comment: That's not a good name for the flag. The problem is that 'read-only' means different things on Windows than it does on Unix. Which is why I suggested that the flag control whether or not it acts "posix like" on Windows. So perhaps 'posix_compat'? That feels a bit odd, though, since on posix it does nothing...so it's really about behavioral consistency across platforms.... Hmm. It's really hard to think of a name that conveys succinctly what we are talking about here. A more radical notion would be something like 'delete_control' and have it be tri-valued: 'unixlike', 'windowslike', and 'native', with the default being native. Bad names, most likely, but you get the idea. The disadvantage is that it would be even more code to implement ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 20:32:45 2013 From: report at bugs.python.org (Tim Golden) Date: Mon, 18 Nov 2013 19:32:45 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows In-Reply-To: <1384802653.85.0.680450566707.issue19643@psf.upfronthosting.co.za> Message-ID: <528A6B71.1070305@timgolden.me.uk> Tim Golden added the comment: TBH I'm still fairly -0 and edging towards -0.5. If we didn't already have two keyword args I might be convinced towards a jfdi=True flag. But, as the OP described, the current params already allow for a workaround of sorts and another param of the semantics we're discussing would surely just be confusing? (Or you could just "preprocess" on Windows, eg attrib -r /s) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 20:33:24 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 18 Nov 2013 19:33:24 +0000 Subject: [issue19643] shutil rmtree fails on readonly files in Windows In-Reply-To: <1384776671.66.0.696428447361.issue19643@psf.upfronthosting.co.za> Message-ID: <1384803204.47.0.667895048049.issue19643@psf.upfronthosting.co.za> Zachary Ware added the comment: I make no claims of being good at naming things :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 20:34:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 19:34:31 +0000 Subject: [issue17397] ttk::themes missing from ttk.py In-Reply-To: <1363005797.61.0.988966555267.issue17397@psf.upfronthosting.co.za> Message-ID: <1384803271.64.0.016180315734.issue17397@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since splitlist() works with Tcl_Obj-s, proposed test should pass. klappnase, could you please sign a Contributor Licensing Agreement? http://www.python.org/psf/contrib/contrib-form/ What is your real name? What should I add in the Misc/ACKS file? ---------- assignee: -> serhiy.storchaka stage: test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 21:11:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 18 Nov 2013 20:11:32 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1384805492.97.0.505023731161.issue7105@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Btw, I think a cleaner way to deal with unpredictable GC runs is to be able to temporarily disable GC with a context manager Disabling the GC in a library function sounds very ugly to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 21:19:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 18 Nov 2013 20:19:06 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <3dNhMY4NdbzPZr@mail.python.org> Roundup Robot added the comment: New changeset fc7ceb001eec by Victor Stinner in branch 'default': Issue #19513: repr(list) now uses the PyUnicodeWriter API, it is faster than http://hg.python.org/cpython/rev/fc7ceb001eec ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 21:19:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 18 Nov 2013 20:19:07 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows In-Reply-To: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> Message-ID: <3dNhMZ2qFczPZr@mail.python.org> Roundup Robot added the comment: New changeset 093b9838a41c by Victor Stinner in branch 'default': Issue #19581: Change the overallocation factor of _PyUnicodeWriter on Windows http://hg.python.org/cpython/rev/093b9838a41c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 21:30:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 20:30:50 +0000 Subject: [issue19581] PyUnicodeWriter: change the overallocation factor for Windows In-Reply-To: <1384421845.71.0.644153662303.issue19581@psf.upfronthosting.co.za> Message-ID: <1384806650.95.0.526631062655.issue19581@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 21:32:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 20:32:37 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1384806757.89.0.677586921662.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: I checked in list_repr_writer-2.patch, thanks Serhiy for your review. And now the patch for repr(tuple). Result of bench_tuple_repr.py: Common platform: CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Bits: int=32, long=64, long long=64, size_t=64, void*=64 Platform: Linux-3.9.4-200.fc18.x86_64-x86_64-with-fedora-18-Spherical_Cow CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, resolution=1e-09) Timer: time.perf_counter Python unicode implementation: PEP 393 Platform of campaign pyaccu: SCM: hg revision=fc7ceb001eec tag=tip branch=default date="2013-11-18 21:11 +0100" Timer precision: 41 ns Date: 2013-11-18 21:29:45 Python version: 3.4.0a4+ (default:fc7ceb001eec, Nov 18 2013, 21:29:41) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] Platform of campaign writer: SCM: hg revision=fc7ceb001eec+ tag=tip branch=default date="2013-11-18 21:11 +0100" Timer precision: 39 ns Date: 2013-11-18 21:28:53 Python version: 3.4.0a4+ (default:fc7ceb001eec+, Nov 18 2013, 21:28:24) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] ------------------------------+-------------+--------------- Tests | pyaccu | writer ------------------------------+-------------+--------------- tuple("a") | 355 ns (*) | 318 ns (-11%) tuple("abc") | 492 ns (*) | 481 ns ("a",)*(100) | 8.1 us (*) | 7.39 us (-9%) ("abc",)*(100) | 8.16 us (*) | 7.51 us (-8%) ("a" * 100,)*(100) | 35.2 us (*) | 36.3 us ("a",)*(10**6) | 88 ms (*) | 75.9 ms (-14%) ("abc",)*(10**6) | 88.5 ms (*) | 75.3 ms (-15%) ("a" * 100,)*(10**5) | 44.8 ms (*) | 34.9 ms (-22%) tuple(range(10**6)) | 104 ms (*) | 92.5 ms (-11%) tuple(map(str, range(10**6))) | 105 ms (*) | 90.5 ms (-14%) ------------------------------+-------------+--------------- Total | 431 ms (*) | 369 ms (-14%) ------------------------------+-------------+--------------- ---------- Added file: http://bugs.python.org/file32692/tuple_repr_writer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 21:32:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 20:32:47 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1384806767.75.0.132245710351.issue19513@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file32693/bench_tuple_repr.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 22:15:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 21:15:06 +0000 Subject: [issue19646] Use PyUnicodeWriter in repr(dict) Message-ID: <1384809306.12.0.437955519329.issue19646@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch modify dict_repr() function to use the _PyUnicodeWriter API instead of building a list of short strings with PyUnicode_AppendAndDel() and calling PyUnicode_Join() at the end to join the list. PyUnicode_Append() is inefficient because it has to allocate a new string instead of reusing the same buffer. _PyUnicodeWriter API has a different design. It overallocates a buffer to write Unicode characters and shrink the buffer at the end. It is faster according to my micro benchmark. $ ./python ~/prog/HG/misc/python/benchmark.py compare_to pyaccu writer Common platform: CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Python unicode implementation: PEP 393 CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Timer precision: 40 ns Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, resolution=1e-09) Platform: Linux-3.9.4-200.fc18.x86_64-x86_64-with-fedora-18-Spherical_Cow Bits: int=32, long=64, long long=64, size_t=64, void*=64 Timer: time.perf_counter Platform of campaign pyaccu: Date: 2013-11-18 21:37:44 Python version: 3.4.0a4+ (default:fc7ceb001eec, Nov 18 2013, 21:29:41) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] SCM: hg revision=fc7ceb001eec tag=tip branch=default date="2013-11-18 21:11 +0100" Platform of campaign writer: Date: 2013-11-18 22:10:40 Python version: 3.4.0a4+ (default:fc7ceb001eec+, Nov 18 2013, 22:10:12) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] SCM: hg revision=fc7ceb001eec+ tag=tip branch=default date="2013-11-18 21:11 +0100" --------------------------------------+-------------+-------------- Tests???????????????????????????????? | ?????pyaccu | ???????writer --------------------------------------+-------------+-------------- {"a": 1}????????????????????????????? | ?603 ns (*) | 496 ns (-18%) dict(zip("abc", range(3)))??????????? | 1.05 us (*) | 904 ns (-14%) {"%03d":"abc" for k in range(10)}???? | ?631 ns (*) | 501 ns (-21%) {"%100d":"abc" for k in range(10)}??? | ?660 ns (*) | 484 ns (-27%) {k:"a" for k in range(10**3)}???????? | ?235 us (*) | 166 us (-30%) {k:"abc" for k in range(10**3)}?????? | ?245 us (*) | 177 us (-28%) {"%100d":"abc" for k in range(10**3)} | ?668 ns (*) | 478 ns (-28%) {k:"a" for k in range(10**6)}???????? | ?258 ms (*) | 186 ms (-28%) {k:"abc" for k in range(10**6)}?????? | ?265 ms (*) | 184 ms (-31%) {"%100d":"abc" for k in range(10**6)} | ?652 ns (*) | 489 ns (-25%) --------------------------------------+-------------+-------------- Total???????????????????????????????? | ?523 ms (*) | 369 ms (-29%) --------------------------------------+-------------+-------------- ---------- components: Unicode files: dict_repr_writer.patch keywords: patch messages: 203322 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal status: open title: Use PyUnicodeWriter in repr(dict) type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32694/dict_repr_writer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 22:15:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 21:15:14 +0000 Subject: [issue19646] Use PyUnicodeWriter in repr(dict) In-Reply-To: <1384809306.12.0.437955519329.issue19646@psf.upfronthosting.co.za> Message-ID: <1384809314.95.0.998037066869.issue19646@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file32695/bench_dict_repr.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 22:16:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 18 Nov 2013 21:16:31 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <3dNjdq2lktz7Ljc@mail.python.org> Roundup Robot added the comment: New changeset ead9043f69df by Victor Stinner in branch 'default': Issue #19513: Simplify list_repr() http://hg.python.org/cpython/rev/ead9043f69df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 22:19:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Nov 2013 21:19:08 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1384809548.77.0.868076207636.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, here is a new version hyper optimized for the final ",)" string :-) ---------- Added file: http://bugs.python.org/file32696/tuple_repr_writer-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 22:35:56 2013 From: report at bugs.python.org (Stefan Holek) Date: Mon, 18 Nov 2013 21:35:56 +0000 Subject: [issue19647] unittest.TestSuite consumes tests Message-ID: <1384810556.81.0.647879257341.issue19647@psf.upfronthosting.co.za> New submission from Stefan Holek: This test passed in Python <= 3.3 but fails in 3.4: def testTestSuiteConsumesTest(self): class MyTestCase(unittest.TestCase): def testMethod(self): pass test = MyTestCase('testMethod') suite = unittest.TestSuite((test,)) result = unittest.TestResult() self.assertEqual(next(iter(suite)), test) suite.run(result) self.assertEqual(next(iter(suite)), test) The suite contains None after it has been run in Python 3.4. ---------- components: Library (Lib) messages: 203325 nosy: stefanholek priority: normal severity: normal status: open title: unittest.TestSuite consumes tests type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 22:37:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 18 Nov 2013 21:37:23 +0000 Subject: [issue19647] unittest.TestSuite consumes tests In-Reply-To: <1384810556.81.0.647879257341.issue19647@psf.upfronthosting.co.za> Message-ID: <1384810643.45.0.0318230519111.issue19647@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 22:55:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 21:55:48 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1384811748.0.0.385558871397.issue19513@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Old version looks better to me (it is simpler and performance of writing final ",)" is not worth additional complication). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 23:11:43 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 18 Nov 2013 22:11:43 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384812703.39.0.694874751572.issue19596@psf.upfronthosting.co.za> Zachary Ware added the comment: Alright, I'll try to do that later this evening. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 23:17:58 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 18 Nov 2013 22:17:58 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1384813078.77.0.925456811865.issue17457@psf.upfronthosting.co.za> Eric Snow added the comment: I left a review relative to the use of the _path attribute (which shouldn't be used). ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 23:43:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 18 Nov 2013 22:43:59 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1384814639.93.0.938542806158.issue12892@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: ezio.melotti -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 23:47:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 18 Nov 2013 22:47:25 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1384491057.07.0.672144450269.issue18864@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Just a heads up - since the two of you appear to have this well in hand, don't wait for a review from me before committing it. I have plenty of other things to look at before the beta deadline :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 23:48:19 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Mon, 18 Nov 2013 22:48:19 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1384814899.8.0.83513369865.issue17457@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Eric, thank you for your comment! I modified the patch to check for __path__ instead, is this a safe enough check for this use case? Since ModuleSpec isn't landed yet, I didn't use your __spec__ example. ---------- Added file: http://bugs.python.org/file32697/unittest-17457-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 18 23:54:28 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Nov 2013 22:54:28 +0000 Subject: [issue19647] unittest.TestSuite consumes tests In-Reply-To: <1384810556.81.0.647879257341.issue19647@psf.upfronthosting.co.za> Message-ID: <1384815268.97.0.0922855201543.issue19647@psf.upfronthosting.co.za> R. David Murray added the comment: This is presumably a consequence of issue 11798. How did you run into it in actual code? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 00:51:07 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 18 Nov 2013 23:51:07 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1384818667.47.0.691944386655.issue17457@psf.upfronthosting.co.za> Eric Snow added the comment: Sorry for any confusion, Claudiu. the_module.__path__ only indicates that the module is a package. So until you can take advantage of PEP 451, you're stuck with the _path check (or several other unappealing hack) on line 224 of unittest-17457-3.patch. However, the use of __path__ on line 226 is correct now. :) Thanks for changing that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 01:37:01 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Nov 2013 00:37:01 +0000 Subject: [issue19626] test_email and Lib/email/_policybase.py failures with -OO In-Reply-To: <1384626069.77.0.304780424813.issue19626@psf.upfronthosting.co.za> Message-ID: <1384821421.75.0.901010247609.issue19626@psf.upfronthosting.co.za> R. David Murray added the comment: I can't get this to fail. The code handles None docstrings correctly (_append_doc is not called if the __doc__ attribute is None). The only way I can see this error arising would be if the _policybase.pyo file had docstrings stripped, but the policy.pyo file did not. I consider that a bug in .pyo and -O/-OO handling, so I'd like to close this as "works for me". ---------- resolution: -> works for me stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 02:03:36 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 19 Nov 2013 01:03:36 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1384823016.55.0.275886152663.issue2506@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 02:08:31 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Nov 2013 01:08:31 +0000 Subject: [issue19626] test_email and Lib/email/_policybase.py failures with -OO In-Reply-To: <1384626069.77.0.304780424813.issue19626@psf.upfronthosting.co.za> Message-ID: <1384823311.88.0.638877743864.issue19626@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: pending -> open superseder: -> pyo's are not overwritten by different optimization levels _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 02:08:41 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Nov 2013 01:08:41 +0000 Subject: [issue19626] test_email and Lib/email/_policybase.py failures with -OO In-Reply-To: <1384626069.77.0.304780424813.issue19626@psf.upfronthosting.co.za> Message-ID: <1384823321.57.0.883359402617.issue19626@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 04:20:30 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 19 Nov 2013 03:20:30 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384831230.57.0.333004241046.issue19572@psf.upfronthosting.co.za> Zachary Ware added the comment: I'll open new issues for test_posix and pickletester and commit the rest of the patch as soon as I can get it backported. Thanks for the reviews! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 04:47:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 03:47:53 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <3dNtKN5hTQz7PN7@mail.python.org> Roundup Robot added the comment: New changeset 1ac4f0645519 by Zachary Ware in branch '3.3': Issue #19596: Set untestable tests in test_importlib to None http://hg.python.org/cpython/rev/1ac4f0645519 New changeset 34a65109d191 by Zachary Ware in branch 'default': Issue #19596: Null merge with 3.3 http://hg.python.org/cpython/rev/34a65109d191 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 04:49:22 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 19 Nov 2013 03:49:22 +0000 Subject: [issue19596] Silently skipped tests in test_importlib In-Reply-To: <1384463542.16.0.0206714723077.issue19596@psf.upfronthosting.co.za> Message-ID: <1384832962.97.0.0415614796341.issue19596@psf.upfronthosting.co.za> Zachary Ware added the comment: Committed in 3.3 and as 5d38989191bb in features/pep-451. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 05:02:38 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 19 Nov 2013 04:02:38 +0000 Subject: [issue19597] Add decorator for tests not yet implemented In-Reply-To: <1384468392.3.0.701563221168.issue19597@psf.upfronthosting.co.za> Message-ID: <1384833758.65.0.254713367872.issue19597@psf.upfronthosting.co.za> Zachary Ware added the comment: There are a couple in pickletester, one in test_io, a few in test_reprlib, and the ones in the patch from test_minidom; some 10 test methods in total that I've found and remembered. I suppose with that few, it would be best to just open issues for each test module and have them implemented. Most of them will be getting explicit skips as part of #19572 anyway. This would tend to make it easier to get away with checking in new unimplemented tests, which isn't really a good thing. Closing as rejected. ---------- assignee: -> zach.ware resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 05:10:17 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 19 Nov 2013 04:10:17 +0000 Subject: [issue19648] Empty tests in pickletester need to be implemented or removed Message-ID: <1384834217.52.0.300793745392.issue19648@psf.upfronthosting.co.za> New submission from Zachary Ware: There are a couple of tests in pickletester that should either be implemented or removed, namely test_reduce and test_getinitargs of AbstractPickleTests. I don't know enough about pickling to suggest which route should be taken or how, so I'll leave that up to anyone who wants to write a patch :) ---------- components: Tests keywords: easy messages: 203338 nosy: alexandre.vassalotti, pitrou, zach.ware priority: normal severity: normal stage: needs patch status: open title: Empty tests in pickletester need to be implemented or removed type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 08:16:38 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 19 Nov 2013 07:16:38 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1384845398.45.0.941599669229.issue17810@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I have been looking again at Stefan's previous proposal of making memoization implicit in the new pickle protocol. While I liked the smaller pickles it produced, I didn't the invasiveness of the implementation, which requires a change for almost every opcode processed by the Unpickler. This led me to, what I think is, a reasonable compromise between what we have right now and Stefan's proposal. That is we can make the argument of the PUT opcodes implicit, without making the whole opcode implicit. I've implemented this by introducing a new opcode MEMOIZE, which stores the top of the pickle stack using the size of the memo as the index. Using the memo size as the index avoids us some extra bookkeeping variables and handles nicely situations where Pickler.memo.clear() or Unpickler.memo.clear() are used. Size-wise, this brings some good improvements for pickles containing a lot of dicts and lists. # Before $ ./python.exe -c "import pickle; print(len(pickle.dumps([[] for _ in range(1000)], 4)))" 5251 # After with new MEMOIZE opcode ./python.exe -c "import pickle; print(len(pickle.dumps([[] for _ in range(1000)], 4)))" 2015 Time-wise, the change is mostly neutral. It makes pickling dicts and lists slightly faster because it simplifies the code for memo_put() in _pickle. Report on Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 i386 Total CPU cores: 4 ### pickle4_dict ### Min: 0.714912 -> 0.667203: 1.07x faster Avg: 0.741616 -> 0.685567: 1.08x faster Significant (t=16.25) Stddev: 0.02033 -> 0.01346: 1.5102x smaller Timeline: http://goo.gl/iHqCfB ### pickle4_list ### Min: 0.414151 -> 0.398913: 1.04x faster Avg: 0.432094 -> 0.409058: 1.06x faster Significant (t=11.83) Stddev: 0.01049 -> 0.00893: 1.1749x smaller Timeline: http://goo.gl/wfQzgL Anyhow, I have committed this improvement in my pep-3154 branch (http://hg.python.org/features/pep-3154-alexandre/rev/8a2861aaef82) for now, though I will happily revert it if people oppose to the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 08:36:10 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 19 Nov 2013 07:36:10 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384846570.08.0.197405981507.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Brett: looks like something frozen-related broke due to 6d1656ab2c85a527c. test_frozen in test_frozen.py is failing now because frozen modules no longer have a __cached__ attribute (which was previously set to None). Previously it was set in PyImport_ExecCodeModuleObject() in import.c. I'm guessing that simply setting __cached__ (and __file__?) in FrozenImporter.exec_module() should restore the previous behavior. Doing so makes the test pass at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 08:39:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 07:39:05 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1384846745.35.0.346280654963.issue2927@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I added comments on Rietveld. Yet one thing. For now the html module is very simple and has no dependencies. The patch adds an import of re and html.escapes and relative heavy re.compile operations. Due to the fact that the html module is implicitly imported when any of the html submodules is imported, this can affect a code which doesn't use unescape(). However a cure for this problem (lazy import and initialization) may be worse than the problem itself, perhaps we should live with it. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 08:44:40 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Nov 2013 07:44:40 +0000 Subject: [issue19649] Clean up OS X framework and universal bin directories Message-ID: <1384847080.69.0.0507465882105.issue19649@psf.upfronthosting.co.za> New submission from Ned Deily: There are currently various differences in the files installed by "make altinstall" and "make install" for OS X framework (./configure --enable-framework) and/or OS X universal (--with-universal-archs) configurations. Some of the differences are cosmetic; some are just wrong (e.g. broken symlinks). This issue proposes to fix the differences such that the same set of file names will be installed to the $exec_prefix/bin directory for non-framework ("unix" or "shared") configures, and to the framework bin and unixtools directories for framework configurations. The current standard altinstall and install non-framework configurations are the baselines. For framework configurations: - "make altinstall" creates a complete set of symlinks in the unixtools directory ($prefix/bin, default /usr/local/bin) to each file/link installed to the framework bin directory. (fixed) - "make install" creates symlinks to the additional (unversioned) files/links created in the framework bin directory. (fixed) - The obsolete and undocumented pythonw* symlinks will no longer be installed anywhere. Currently, these are all linked to or copies of their python* counterparts; there is no difference in behavior between them on OS X and hasn't been for many years and releases. (Note, these are not to be confused with the unchanged "pythonw.c" executable which is what is executed to "boostrap" from the command line into the Python app bundle within a framework install.) - pythonX.Ym will be fixed to be replaced by a link to "python.c" executable; currently it is a copy of the python interpreter. (bug) For OS X universal non-framework build configurations with a combination of 32-bit and 64-bit architectures, "make altinstall" will now additionally install a 32-bit-only Python executable as pythonX.Y-32, like the universal framework configurations currently do (new). (Actually, the framework build installs a 32-bit-only "pythonw.c" bootstrap executable ... but that's not important now). This ensures that users have a consistent and reliable way to invoke universal 64-/32-bit Pythons in 32-bit mode. FTR, using "arch -i386 python3" is not reliable in that any subprocesses created by the interpreter will revert to the system's default mode which is 64-bit (where possible) for 10.6+. With "python3-32", 32-bit mode is maintained in subprocesses if sys.executable is used to supply the interpreter name for the subprocess, as of Python 3.3+. For reference, here are current 3.3 bin layouts: left side is the baseline, right side indicates variances from the baseline with "X.Y" and "X" referring to the Python version ("3.4" and "3"), "(..)" indicating a missing file, directory, or Makefile target, and "m" referring to the PEP 3149 ABI identifier: ================= ========================= install framework install altinstall framework altinstall ================= ========================= 2to3 2to3-X.Y idleX idleX.Y pydocX pydocX.Y pythonX pythonwX pythonX.Y pythonX,pythonwX.Y pythonX.Ym pythonX-config pythonX.Y-config pythonX.Ym-config pyvenv pyvenv-X.Y ----------------- ------------------------- (for universal builds) pythonX.Y-32,pythonX-32, pythonwX.Y-32,pythonwX-32 ================= ========================= ================= ========================= install (framework unixtools) altinstall framework altunixtools ================= ========================= 2to3 2to3-X.Y idleX idleX.Y pydocX pydocX.Y pythonX pythonwX pythonX.Y pythonwX.Y pythonX.Ym (pythonX.Ym) pythonX-config pythonX.Y-config pythonX.Ym-config (pythonX.Ym-config) pyvenv pyvenv-X.Y ----------------- ------------------------- (for universal builds) pythonX.Y-32,pythonX-32, pythonwX.Y-32,pythonwX-32 ================= ========================= Proposed for 3.4 - for non-framework, framework bin, and framework unixtools directories: ================= install altinstall ================= 2to3 2to3-X.Y idleX idleX.Y pydocX pydocX.Y pythonX pythonX.Y pythonX.Ym pythonX-config pythonX.Y-config pythonX.Ym-config pyvenv pyvenv-X.Y ----------------- (for universal builds) pythonX-32 pythonX.Y-32 ================= ---------- assignee: ned.deily components: Build, Macintosh messages: 203342 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: patch review status: open title: Clean up OS X framework and universal bin directories versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 08:50:33 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Nov 2013 07:50:33 +0000 Subject: [issue19649] Clean up OS X framework and universal bin directories In-Reply-To: <1384847080.69.0.0507465882105.issue19649@psf.upfronthosting.co.za> Message-ID: <1384847433.15.0.304919329599.issue19649@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- keywords: +patch Added file: http://bugs.python.org/file32698/issue19649_bin_install_targets.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 09:08:40 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 19 Nov 2013 08:08:40 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1384848520.88.0.520443193607.issue18874@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Would it be possible to generate a clean patch? The latest one contains many unrelated commits. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 10:33:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 09:33:20 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <3dP1zz2Q4yzSW4@mail.python.org> Roundup Robot added the comment: New changeset 0d9624f2ff43 by Serhiy Storchaka in branch 'default': Issue #12892: The utf-16* and utf-32* codecs now reject (lone) surrogates. http://hg.python.org/cpython/rev/0d9624f2ff43 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 10:51:03 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 19 Nov 2013 09:51:03 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1384854663.74.0.917361386967.issue7105@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: No matter how it sounds, it certainly looks cleaner in code. Look at all this code, designed to work around an unexpected GC collection with various pointy bits and edge cases and special corners. Compare to explicitly just asking GC to relent, for a bit: def getitems(self): with gc.disabled(): for each in self.data.items(): yield each That's it. While a native implementation of such a context manager would be better (faster, and could be made overriding), a simple one can be constructed thus: @contextlib.contextmanagerd def gc_disabled(): enabled = gc.isenabled() gs.disable() try: yield finally: if enabled: gc.enable() Such global "atomic" context managers are well known to stackless programmers. It's a very common idiom when building higher level primitives (such as locks) from lower level ones. with stackless.atomic(): do() various() stuff_that_does_not_like_being_interrupted() (stackless.atomic prevents involuntary tasklet switching _and_ involuntary thread switching) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 10:53:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 09:53:29 +0000 Subject: [issue19650] test_multiprocessing_spawn.test_mymanager_context() crashed with STATUS_ACCESS_VIOLATION Message-ID: <1384854809.52.0.780579914331.issue19650@psf.upfronthosting.co.za> New submission from STINNER Victor: The following failure may be related to #19466. I failed to reproduce it on my Windows 7 VM (I compiled Python in 32-bit mode). http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1697/steps/test/logs/stdio ====================================================================== FAIL: test_mymanager_context (test.test_multiprocessing_spawn.WithManagerTestMyManager) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\_test_multiprocessing.py", line 1960, in test_mymanager_context self.assertEqual(manager._process.exitcode, 0) AssertionError: 3221225477 != 0 3221225477 is 0xC0000005 in hex, Windows error code: #define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005L) ---------- components: Windows messages: 203346 nosy: haypo, sbt priority: normal severity: normal status: open title: test_multiprocessing_spawn.test_mymanager_context() crashed with STATUS_ACCESS_VIOLATION _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:05:20 2013 From: report at bugs.python.org (John Dobson) Date: Tue, 19 Nov 2013 10:05:20 +0000 Subject: [issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3 Message-ID: <1384855520.97.0.361030514177.issue19651@psf.upfronthosting.co.za> New submission from John Dobson: 2 consecutive commands into interactive shell still results in segmentation fault 11, patch 18458 reports skipped as patch not needed for 3.3 ---------- assignee: ronaldoussoren components: Macintosh messages: 203347 nosy: johndobson, ronaldoussoren priority: normal severity: normal status: open title: Mac OSX 10.9 segmentation fault 11 with Python 3.3.3 type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:06:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 10:06:19 +0000 Subject: [issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3 In-Reply-To: <1384855520.97.0.361030514177.issue19651@psf.upfronthosting.co.za> Message-ID: <1384855579.06.0.0378154094861.issue19651@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +hynek, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:08:05 2013 From: report at bugs.python.org (koobs) Date: Tue, 19 Nov 2013 10:08:05 +0000 Subject: [issue15819] Unable to build Python out-of-tree when source tree is readonly. In-Reply-To: <1346309362.14.0.312540957077.issue15819@psf.upfronthosting.co.za> Message-ID: <1384855685.63.0.605886437127.issue15819@psf.upfronthosting.co.za> koobs added the comment: I'm not sure how I missed this, but our FreeBSD ports that build out-of-tree required adding a local patchthat reverts the Makefile.pre.in change in ab6ab44921b2 when we updated each port to the latest releases of 2.7, 3.2 and 3.3: https://svnweb.freebsd.org/ports?view=revision&revision=318353 Without it, builds fail with: cc -c -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -DNDEBUG -I. -IInclude -I./../Include -I/usr/local/include -fPIC -DPy_BUILD_CORE -o Python/Python-ast.o Python/Python-ast.c cc: Python/Python-ast.c: No such file or directory cc: No input files specified *** [Python/Python-ast.o] Error code 1 Stop in /freebsd/ports/lang/python27/work/Python-2.7.6/portbld.shared. I also note Trents msg173160 in issue #15298, which may be related?, but seems only resolved for OSX. What needs to be done to remove the need for this patch? ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:24:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 19 Nov 2013 10:24:05 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1384854663.74.0.917361386967.issue7105@psf.upfronthosting.co.za> Message-ID: <1384856643.2287.2.camel@fsol> Antoine Pitrou added the comment: > No matter how it sounds, it certainly looks cleaner in code. It's also unsafe and invasive, since it's a process-wide setting. An iterator can be long-lived if it's being consumed slowly, so you've disabled garbage collection for an unknown amount of time, without the user knowing about it. Another thread could kick in and perhaps re-enable it for whatever reason. Oh if someone calls gc.collect() explicitly, the solution is suddenly defeated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:27:25 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 19 Nov 2013 10:27:25 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384856845.67.0.251793509052.issue16596@psf.upfronthosting.co.za> Xavier de Gaye added the comment: This is a consequence of the problem mentioned in msg 177059 above. New patch 'issue16596_nostate_3.diff' fixes both problems by having the interpreter issue an exception debug event when processing a StopIteration in target FOR_ITER: * The same debug events are issued now, wether the generator is run within a for loop or not. * 'n' stops now at both the return and exception debug events on returning from the generator. ---------- Added file: http://bugs.python.org/file32699/issue16596_nostate_3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:30:42 2013 From: report at bugs.python.org (Gregory Salvan) Date: Tue, 19 Nov 2013 10:30:42 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1384857042.98.0.324896574303.issue19645@psf.upfronthosting.co.za> Gregory Salvan added the comment: issue18054 : - adding assertCleanError in the ipaddress module, - suggesting assertCleanTraceback, assertRaisedFrom in unittest -> usefull but TestCase has already a wide api. A solution like Testtools assertThat with matcher protocol (https://testtools.readthedocs.org/en/latest/for-test-authors.html#matchers) would not expand too much TestCase api and permit to easily extend assertions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:30:47 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 19 Nov 2013 10:30:47 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384857047.71.0.944219168213.issue16596@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Forgot to say that the only difference between this patch and the previous one is in Python/ceval.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:31:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 10:31:20 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1384857080.48.0.767713843954.issue12892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ezio have approved the patch and I have committed it. Thank you Victor and Kang-Hao for your patches. Thanks all for the reviews. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:34:59 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 19 Nov 2013 10:34:59 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1384857299.95.0.555113972838.issue7105@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Yes, the "long iterator" scenario is the reason it is not ideal for this scenario. The other one (gc.collect()) is easily solved by implementing this construct natively. It can be done rather simply by adding an overriding "pause" property to gc, with the following api: def pause(increment): """ pause or unpause garbage collection. A positive value increases the pause level, while a negative one reduces it. when paused, gc won't happen even when explicitly requested with gc.collect(), until the pause level drops to 0. """ I'm sure there are other places in the code with local execution that would benefit from not having an accidental GC run happen. I'm sure I've seen such places, with elaborate scaffolding to safeguard itself from such cases. Anyway, my 2 aurar worth of lateral thinking applied to the problem at hand :) What about the patch itself? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:39:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 19 Nov 2013 10:39:12 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1384857552.36.0.814492140115.issue7105@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Speaking of which, this is not only about GC runs, although it is the most annoying scenario (since you basically don't control when it happens). Regular resource reaping because of reference counting can also wreak havoc. About the patch, I don't know. It introduces new complexity in 2.7 which should be fairly stable by now. The one thing I don't like is your replacement of "iterator" by "iterable" in the docs. (you also have one line commented out in the tests) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 11:47:25 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 19 Nov 2013 10:47:25 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1384858045.94.0.101364861902.issue7105@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The changes for the docs are just a port of the original patch. And indeed, these functions don't return an iterator, but a generator object. I admit I'm confused by the difference, since next() can be called directly on the generator. Still, a lot of code in the test explicitly calls iter() on the iterators before doing next(). Not sure why. The commented out line is an artifact, I'll remove it, the correct one is the test for 20 items. Otherwise, I have no vested interest in getting this in. My porting this is just me contributing to 2.7. If it's vetoed, we'll just put it in 2.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 12:13:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 11:13:11 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <3dP4CB4L6xzSn4@mail.python.org> Roundup Robot added the comment: New changeset 27461e6a7763 by Victor Stinner in branch 'default': Issue #19513: Disable overallocation of the PyUnicodeWriter before the last write http://hg.python.org/cpython/rev/27461e6a7763 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 12:20:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 11:20:25 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" Message-ID: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> New submission from STINNER Victor: I didn't understand the purpose of the issue #19334: it doesn't mention the OS nor the test. I prefer to create a more specific issue, so here you have one specific hang. http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/517/steps/test/logs/stdio [385/385] test_asyncio Timeout (1:00:00)! Thread 0x00007fff71296cc0 (most recent call first): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/selectors.py", line 291 in select File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/asyncio/base_events.py", line 614 in _run_once File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/asyncio/base_events.py", line 153 in run_forever File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/asyncio/base_events.py", line 172 in run_until_complete File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_asyncio/test_events.py", line 1155 in test_subprocess_send_signal File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/case.py", line 571 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/case.py", line 610 in __call__ File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 117 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 79 in __call__ File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 117 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 79 in __call__ File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 117 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 79 in __call__ File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/runner.py", line 168 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/support/__init__.py", line 1685 in _run_suite File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/support/__init__.py", line 1719 in run_unittest File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_asyncio/__init__.py", line 31 in test_main File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1276 in runtest_inner File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 965 in runtest File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 532 in main File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1560 in main_in_temp_cwd File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1585 in File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py", line 73 in _run_code File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py", line 160 in _run_module_as_main Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/__main__.py", line 3, in regrtest.main_in_temp_cwd() File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1560, in main_in_temp_cwd main() File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 736, in main raise Exception("Child error on {}: {}".format(test, result[1])) Exception: Child error on test_asyncio: Exit code 1 make: *** [buildbottest] Error 1 ---------- messages: 203358 nosy: David.Edelsohn, db3l, gvanrossum, haypo, koobs, larry, ncoghlan, neologix, pitrou, python-dev, sbt, skrah priority: normal severity: normal status: open title: test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 12:20:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 11:20:49 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1384860049.34.0.506322233643.issue19334@psf.upfronthosting.co.za> STINNER Victor added the comment: I created the issue #19652: test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 12:21:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 11:21:45 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1384860105.21.0.674074927539.issue19334@psf.upfronthosting.co.za> STINNER Victor added the comment: > The original report and build logs were attached to the original issue covering the import of asyncio: #19262 > Also attaching here. Extract of the most important part: [382/382] test_asyncio Timeout (1:00:00)! Thread 0x0000000805c18000: File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/threading.py", line 290 in wait File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/queue.py", line 167 in get File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/concurrent/futures/thread.py", line 63 in _worker File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/threading.py", line 869 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/threading.py", line 921 in _bootstrap_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/threading.py", line 889 in _bootstrap Thread 0x0000000801407400: File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/selectors.py", line 265 in select File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/asyncio/base_events.py", line 576 in _run_once File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/asyncio/base_events.py", line 153 in run_forever File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_asyncio/test_events.py", line 450 in test_signal_handling_while_selecting File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/case.py", line 571 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/case.py", line 610 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 117 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 79 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 117 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 79 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 117 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 79 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/runner.py", line 168 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/__init__.py", line 1661 in _run_suite File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/__init__.py", line 1695 in run_unittest File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_asyncio/__init__.py", line 26 in test_main File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1276 in runtest_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 965 in runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 532 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1560 in main_in_temp_cwd File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1585 in File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 73 in _run_code File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 160 in _run_module_as_main Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/__main__.py", line 3, in regrtest.main_in_temp_cwd() File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1560, in main_in_temp_cwd main() File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 736, in main raise Exception("Child error on {}: {}".format(test, result[1])) Exception: Child error on test_asyncio: Exit code 1 *** [buildbottest] Error code 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 12:38:17 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 19 Nov 2013 11:38:17 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384861097.76.0.4680084752.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: Given the time frame, how about we just go with Serhiy's suggestion of a "known non-Unicode codec" internal blacklist for both 3.3 and 3.4? I still like the idea of exposing codec type maps for introspection, but designing a decent API for that which also handles type preserving codecs is going to take some work, and can't realistically be included in 3.4. By my count, if we delay the blacklisting until after we do the codec lookup, there's only seven names we need to block: >>> from codecs import lookup >>> blacklist = "base64 uu quopri hex bz2 zlib rot13".split() >>> for name in blacklist: ... print(lookup(name).name) ... base64 uu quopri hex bz2 zlib rot-13 ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 12:41:27 2013 From: report at bugs.python.org (Stefan Holek) Date: Tue, 19 Nov 2013 11:41:27 +0000 Subject: [issue19647] unittest.TestSuite consumes tests In-Reply-To: <1384810556.81.0.647879257341.issue19647@psf.upfronthosting.co.za> Message-ID: <1384861287.23.0.460387829186.issue19647@psf.upfronthosting.co.za> Stefan Holek added the comment: I have some complex test fixtures that I have written tests for, and one of them started to fail because it assumed that the suite would still be valid after having run. That said, I was able to work around the issue and if you don't care neither do I. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 12:42:23 2013 From: report at bugs.python.org (Michael Foord) Date: Tue, 19 Nov 2013 11:42:23 +0000 Subject: [issue19647] unittest.TestSuite consumes tests In-Reply-To: <1384810556.81.0.647879257341.issue19647@psf.upfronthosting.co.za> Message-ID: <1384861343.14.0.372551387585.issue19647@psf.upfronthosting.co.za> Michael Foord added the comment: The new behaviour is intentional, glad you've managed to work around it. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 12:43:05 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 19 Nov 2013 11:43:05 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384861097.76.0.4680084752.issue19619@psf.upfronthosting.co.za> Message-ID: <528B4EC5.9010900@egenix.com> Marc-Andre Lemburg added the comment: On 19.11.2013 12:38, Nick Coghlan wrote: > > Given the time frame, how about we just go with Serhiy's suggestion of a "known non-Unicode codec" internal blacklist for both 3.3 and 3.4? +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 13:00:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 12:00:16 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <3dP5FX05DPzSBx@mail.python.org> Roundup Robot added the comment: New changeset 99141ab08e21 by Victor Stinner in branch 'default': Issue #19513: repr(tuple) now uses _PyUnicodeWriter for better performances http://hg.python.org/cpython/rev/99141ab08e21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 13:01:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 12:01:46 +0000 Subject: [issue19513] Use PyUnicodeWriter instead of PyAccu in repr(tuple) and repr(list) In-Reply-To: <1383784380.8.0.280742626622.issue19513@psf.upfronthosting.co.za> Message-ID: <1384862506.01.0.863938150942.issue19513@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Serhiy for your review. I added a new _PyUnicodeWriter_WriteASCIIString() function to write the separator (", ") and the suffix (",)"). changeset: 87263:d1ca05428c38 user: Victor Stinner date: Tue Nov 19 12:54:53 2013 +0100 files: Include/unicodeobject.h Objects/listobject.c Objects/unicodeobject.c Python/formatter_unicode.c description: Add _PyUnicodeWriter_WriteASCIIString() function ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 13:11:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 12:11:31 +0000 Subject: [issue19646] Use PyUnicodeWriter in repr(dict) In-Reply-To: <1384809306.12.0.437955519329.issue19646@psf.upfronthosting.co.za> Message-ID: <3dP5VV5Xl6zQmV@mail.python.org> Roundup Robot added the comment: New changeset 3a354b879d1f by Victor Stinner in branch 'default': Issue #19646: repr(dict) now uses _PyUnicodeWriter API for better performances http://hg.python.org/cpython/rev/3a354b879d1f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 13:13:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 12:13:52 +0000 Subject: [issue19646] Use PyUnicodeWriter in repr(dict) In-Reply-To: <1384809306.12.0.437955519329.issue19646@psf.upfronthosting.co.za> Message-ID: <1384863232.46.0.755239867621.issue19646@psf.upfronthosting.co.za> STINNER Victor added the comment: I added a new _PyUnicodeWriter_WriteASCIIString() function to reply to Serhiy's comment on Rietveld: "Perhaps it will be worth to add a helper function or macros _PyUnicodeWriter_WriteTwoAsciiChars()?" changeset: 87263:d1ca05428c38 user: Victor Stinner date: Tue Nov 19 12:54:53 2013 +0100 files: Include/unicodeobject.h Objects/listobject.c Objects/unicodeobject.c Python/formatter_unicode.c description: Add _PyUnicodeWriter_WriteASCIIString() function Using this function, there is no need to create temporary colon (": ") or sep (", ") strings, performances are a little better with the final commit. Common platform: Timer info: namespace(adjustable=False, implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, resolution=1e-09) CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Timer: time.perf_counter Platform: Linux-3.9.4-200.fc18.x86_64-x86_64-with-fedora-18-Spherical_Cow Python unicode implementation: PEP 393 CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Bits: int=32, long=64, long long=64, size_t=64, void*=64 Platform of campaign pyaccu: Python version: 3.4.0a4+ (default:99141ab08e21, Nov 19 2013, 13:10:27) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] Timer precision: 39 ns Date: 2013-11-19 13:10:28 SCM: hg revision=99141ab08e21 branch=default date="2013-11-19 12:59 +0100" Platform of campaign writer: Python version: 3.4.0a4+ (default:3a354b879d1f, Nov 19 2013, 13:08:42) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] Timer precision: 46 ns Date: 2013-11-19 13:09:20 SCM: hg revision=3a354b879d1f tag=tip branch=default date="2013-11-19 13:07 +0100" --------------------------------------+-------------+-------------- Tests???????????????????????????????? | ?????pyaccu | ???????writer --------------------------------------+-------------+-------------- {"a": 1}????????????????????????????? | ?613 ns (*) | 338 ns (-45%) dict(zip("abc", range(3)))??????????? | 1.05 us (*) | 640 ns (-39%) {"%03d":"abc" for k in range(10)}???? | ?635 ns (*) | 447 ns (-30%) {"%100d":"abc" for k in range(10)}??? | ?651 ns (*) | 424 ns (-35%) {k:"a" for k in range(10**3)}???????? | ?233 us (*) | 132 us (-44%) {k:"abc" for k in range(10**3)}?????? | ?251 us (*) | 154 us (-39%) {"%100d":"abc" for k in range(10**3)} | ?668 ns (*) | 412 ns (-38%) {k:"a" for k in range(10**6)}???????? | ?268 ms (*) | 158 ms (-41%) {k:"abc" for k in range(10**6)}?????? | ?276 ms (*) | 163 ms (-41%) {"%100d":"abc" for k in range(10**6)} | ?658 ns (*) | 422 ns (-36%) --------------------------------------+-------------+-------------- Total???????????????????????????????? | ?544 ms (*) | 321 ms (-41%) --------------------------------------+-------------+-------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 13:13:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 12:13:58 +0000 Subject: [issue19646] Use PyUnicodeWriter in repr(dict) In-Reply-To: <1384809306.12.0.437955519329.issue19646@psf.upfronthosting.co.za> Message-ID: <1384863238.39.0.719507751423.issue19646@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 13:31:39 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 19 Nov 2013 12:31:39 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1384864299.72.0.476331620278.issue2927@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's an updated patch that addresses comments on rietveld and adds a few more tests and docs. I should also update the what's new, but I have other upcoming changes in the html package so I'll probably do it at the end. Regarding your concern: * if people are only using html.escape, then they will get a couple of extra imports, including all the html5 entities, and a re.compile; * if people are using html.parser, they already have plenty of re.compiles there, and soon html.parser will use unescape too; * if people are using html.entities they only get an extra re.compile; Overall I don't think it's a big problem. As a side node, the "if '&' in s:" in the unescape function could be removed -- I'm not sure it brings any real advantage. This could/should be proved by benchmarks. ---------- Added file: http://bugs.python.org/file32700/issue2927-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 13:47:58 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 19 Nov 2013 12:47:58 +0000 Subject: [issue18861] Problems with recursive automatic exception chaining In-Reply-To: <1377657727.9.0.627993776621.issue18861@psf.upfronthosting.co.za> Message-ID: <1384865278.86.0.71924809742.issue18861@psf.upfronthosting.co.za> Nick Coghlan added the comment: Actually, this won't the subTest example because that actually *suppresses* the errors, and reports them later. Annotations only help when the exception is allowed to escape. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 14:00:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 13:00:58 +0000 Subject: [issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter() Message-ID: <1384866058.1.0.245171525218.issue19653@psf.upfronthosting.co.za> New submission from STINNER Victor: The _PyUnicodeWriter API avoids creation of temporary Unicode strings and has very good performances to build Unicode strings with the PEP 393 (compact unicode string). Attached patch adds a _PyObject_ReprWriter() function to avoid creation of tempory Unicode string while calling repr(obj) on containers like tuple, list or dict. I did something similar for str%args and str.format(args). To avoid the following code, we might add something to PyTypeObject, maybe a new tp_repr_writer field. + if (PyLong_CheckExact(v)) { + return _PyLong_FormatWriter(writer, v, 10, 0); + } + if (PyUnicode_CheckExact(v)) { + return _PyUnicode_ReprWriter(writer, v); + } + if (PyList_CheckExact(v)) { + return _PyList_ReprWriter(writer, v); + } + if (PyTuple_CheckExact(v)) { + return _PyTuple_ReprWriter(writer, v); + } + if (PyList_CheckExact(v)) { + return _PyList_ReprWriter(writer, v); + } + if (PyDict_CheckExact(v)) { + return _PyDict_ReprWriter(writer, v); + } For example, repr(list(range(10))) ('[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]') should only allocate one buffer of 37 bytes and then shink it to 30 bytes. I guess that benchmarks are required to justify such changes. ---------- files: repr_writer.patch keywords: patch messages: 203371 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter() versions: Python 3.4 Added file: http://bugs.python.org/file32701/repr_writer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 14:18:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 13:18:33 +0000 Subject: [issue19646] Use PyUnicodeWriter in repr(dict) In-Reply-To: <1384809306.12.0.437955519329.issue19646@psf.upfronthosting.co.za> Message-ID: <1384867113.1.0.627505971097.issue19646@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Using this function, there is no need to create temporary colon (": ") or sep (", ") strings, performances are a little better with the final commit. I'm surprised that this has given such large effect. ;) I hoped only on more clear code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 14:21:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 13:21:33 +0000 Subject: [issue19646] Use PyUnicodeWriter in repr(dict) In-Reply-To: <1384809306.12.0.437955519329.issue19646@psf.upfronthosting.co.za> Message-ID: <1384867293.5.0.0759935611156.issue19646@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm surprised that this has given such large effect. ;) I hoped only on more clear code. To be honest, I expected shorter code but worse performances using _PyUnicodeWriter_WriteASCIIString(). dict_repr() was not really super fast: it did call PyUnicode_FromString() at each call to decode ": " and ", " from UTF-8. list_repr() and tuplerepr() kept ", " separator cached in a static variable. This is probably why the code is now faster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 14:44:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 13:44:01 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot Message-ID: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/7331/steps/test/logs/stdio ====================================================================== FAIL: test_debug (tkinter.test.test_tkinter.test_text.TextTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/test_tkinter/test_text.py", line 22, in test_debug self.assertEqual(text.debug(), 0) AssertionError: '0' != 0 ====================================================================== FAIL: test_insertborderwidth (tkinter.test.test_tkinter.test_widgets.EntryTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/test_tkinter/test_widgets.py", line 329, in test_insertborderwidth self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, -2) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/widget_tests.py", line 167, in checkPixelsParam conv=conv1, **kwargs) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/widget_tests.py", line 57, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 0 != 1 ====================================================================== FAIL: test_insertborderwidth (tkinter.test.test_tkinter.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/test_tkinter/test_widgets.py", line 329, in test_insertborderwidth self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, -2) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/widget_tests.py", line 167, in checkPixelsParam conv=conv1, **kwargs) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/widget_tests.py", line 57, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/tkinter/test/widget_tests.py", line 41, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 0 != 1 ---------- assignee: ronaldoussoren components: Macintosh, Tkinter keywords: buildbot messages: 203374 nosy: haypo, ronaldoussoren priority: normal severity: normal status: open title: test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 14:56:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 13:56:11 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <3dP7qG53vGz7M2Z@mail.python.org> Roundup Robot added the comment: New changeset 130597102dac by Serhiy Storchaka in branch 'default': Remove dead code committed in issue #12892. http://hg.python.org/cpython/rev/130597102dac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:01:36 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 19 Nov 2013 14:01:36 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython Message-ID: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> New submission from Eli Bendersky: It was mentioned in one of the recent python-dev threads that making the Python code-base simpler to encourage involvement of contributors is a goal, so I figured this may be relevant. I've recently written a new parser for the ASDL specification language from scratch and think it may be beneficial to replace the existing parser we use: * The existing parser uses an external parser-generator (Spark) that we carry around in the Parser/ directory; the new parser is a very simple stand-alone recursive descent, which makes it easier to maintain and doesn't require a familiarity with Spark. * The new code is significantly smaller. ~400 LOC for the whole stand-alone parser (asdl.py) as opposed to >1200 LOC for the existing parser+Spark. * The existing asdl.py is old code and was only superficially ported to Python 3.x - this shows, and isn't a good example of using modern Python techniques. My asdl.py uses Python 3.4 with modern idioms like dict comprehensions, generators and enums. For a start, it may be easier to review the parser separately and not as a patch file. I split it to a stand-alone project here: https://github.com/eliben/asdl_parser The asdl.py there is a drop-in replacement for Parser/asdl.py; asdl_c.py is for Parser/asdl_c.py - with tiny modifications to interface the new parser (mainly getting rid of some Spark-induced quirks). The AST .c and .h files produced are identical. The repo also has some tests for the parser, which we may find useful in adding to the test suite or the Parser directory. ---------- assignee: eli.bendersky components: Build messages: 203376 nosy: brett.cannon, eli.bendersky, ncoghlan priority: normal severity: normal stage: patch review status: open title: Replace the ASDL parser carried with CPython type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:02:28 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 19 Nov 2013 14:02:28 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1384869748.74.0.424760818524.issue19654@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:03:08 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 19 Nov 2013 14:03:08 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1384869788.75.0.886186712365.issue19655@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:10:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 19 Nov 2013 14:10:44 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384870244.85.0.128914371924.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attached is a proof of concept for the blacklist approach (for 3.4, but without the fixes needed for the transform codec handling tests in test_codecs) This does have the potential to add a reasonable amount of additional overhead to encoding and decoding for shortstrings. Since it isn't obvious where to store a set for faster checking against the blacklist, it may be worth benchmarking this naive approach before doing something more complicated. Regardless, I don't plan to take this further myself any time soon - I just wanted to give it a firm nudge in the direction of the blacklist approach by providing a proof of concept. ---------- keywords: +patch Added file: http://bugs.python.org/file32702/issue19619_blacklist_proof_of_concept.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:25:41 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 19 Nov 2013 14:25:41 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1384871141.06.0.270315276287.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: Victor is still -1, so to Python 3.5 it goes. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:26:30 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Nov 2013 14:26:30 +0000 Subject: [issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3 In-Reply-To: <1384855520.97.0.361030514177.issue19651@psf.upfronthosting.co.za> Message-ID: <1384871190.69.0.586473841865.issue19651@psf.upfronthosting.co.za> Ned Deily added the comment: Works for me using the python.org 3.3.3 64-/32-bit installer. Are you using that Python 3.3.3? Please show the results of typing the following commamds and substituting for "python3.3" whatever command name you are using that causes the segfault. python3.3 -c 'import sys;print(sys.version)' python3.3 -c 'import readline;print(readline.__file__)' ls -l $(python3.3 -c 'import readline;print(readline.__file__)') python3.3 1 2 3 quit() You should see: $ python3.3 -c 'import sys;print(sys.version)' 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] $ python3.3 -c 'import readline;print(readline.__file__)' /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so $ ls -l $(python3.3 -c 'import readline;print(readline.__file__)') -rwxrwxr-x 1 root admin 66472 Nov 16 23:40 /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so $ python3.3 Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 1 1 >>> 2 2 >>> 3 3 >>> quit() $ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:27:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 14:27:23 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384871243.26.0.0846102721639.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: + /* A set would be faster, but when to build it, where to store it? */ + if (_PyUnicode_CompareWithId(codec_name, &PyId_base64) == 0 || + _PyUnicode_CompareWithId(codec_name, &PyId_uu) == 0 || + _PyUnicode_CompareWithId(codec_name, &PyId_quopri) == 0 || + _PyUnicode_CompareWithId(codec_name, &PyId_hex) == 0 || + _PyUnicode_CompareWithId(codec_name, &PyId_bz2) == 0 || + _PyUnicode_CompareWithId(codec_name, &PyId_zlib) == 0 || + PyUnicode_CompareWithASCIIString(codec_name, "rot-13") == 0 + ) { + is_text_codec = 0; + } This is slow and not future proof. It would be faster and simpler to have two registries: a register only for bytes.decode()/str.encode() and another for "custom codecs" for codecs.encode/decode (or (bytes|str).transform()/untransform()). So "abc".encode("rot13") would simply fail with a LookupError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:30:52 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 19 Nov 2013 14:30:52 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1384871452.79.0.559077808512.issue19655@psf.upfronthosting.co.za> Eli Bendersky added the comment: FWIW, asdl_c.py could use some "modernization", but I'll defer this to a later cleanup in order to do things gradually. The same can be said for the Makefile rules - they can be simpler and more efficient (no need to invoke asdl_c / parse the ASDL twice, for example). Incidentally, where would be a good place to put the ASDL tests? Can/should we reach into the Parser/ directory when running the Python regression tests (will this even work in an installed Python)? Or should I just plop asdl_test.py alongside asdl.py and mention that it should be run when asdl.py changes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:37:00 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 19 Nov 2013 14:37:00 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1384871820.95.0.33954664935.issue19655@psf.upfronthosting.co.za> Larry Hastings added the comment: A week before beta? How confident are you in this new parser? ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:38:04 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Nov 2013 14:38:04 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1384871884.5.0.600381579188.issue19654@psf.upfronthosting.co.za> Ned Deily added the comment: There's something odd going on with that buildbot. The failures are from Serhly's new tests. For 10.4 Tiger, the buildbot should be running Tk 8.4. It does seem to have a third-party Tcl and Tk installed in /Library/Frameworks, which is good, but the logs don't show exactly what patch level it is. David, can you identify what patch levels of Tcl and Tk are installed? more /Library/Frameworks/Tcl.framework/tclConfig.sh /Library/Frameworks/Tk.framework/tkConfig.sh should work. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:39:24 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Nov 2013 14:39:24 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1384871964.79.0.391942806624.issue19654@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:40:32 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 19 Nov 2013 14:40:32 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1384872032.27.0.205125823073.issue19655@psf.upfronthosting.co.za> Eli Bendersky added the comment: Larry, ease your worries: note that I only tagged this on version 3.5! That said, this parser runs during the build and produces a .h file and .c file - these partake in the build; I verified that the generated code is *identical* to before, so there's not much to worry about. Still, I don't see a reason to land this before the beta branches. I'll do it onto the default branch after this weekend (assuming the reviews come through). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:40:40 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 19 Nov 2013 14:40:40 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1384872040.01.0.530487797648.issue19655@psf.upfronthosting.co.za> Mark Lawrence added the comment: Are we at beta for 3.5 already? :) ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:46:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 19 Nov 2013 14:46:02 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384871243.26.0.0846102721639.issue19619@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Future proofing is irrelevant at this point - this is just about what can realistically be implemented in 3.4, not what can be implemented with the luxury of several months to rearchitect the codec system (and if we were going to do that, we'd just fix the type mapping introspection problem). There is no "codec registry" - there is only the default codec search function, the encodings import namespace, the normalisation algorithm and the alias dictionary. It sounds to me like you still believe it is possible to stick the genie back in the bottle and limit the codec system to what *you* think is a good idea. It doesn't work like that - the codecs module already provides a fully general data transformation system backed by lazy imports, and that isn't going to change due to backwards compatibility constraints. The only option we have is whether or not we file off the rough edges and try to ease the transition for users migrating from Python 2, where all of the standard library codecs fit within the limits of the text model, so the general purpose codec infrastructure almost never came into play. Getting rid of it is no longer a realistic option - documenting it, improving the failure modes and potentially adding some features (in Python 3.5+) are the only improvements that are genuinely feasible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 15:47:07 2013 From: report at bugs.python.org (John Dobson) Date: Tue, 19 Nov 2013 14:47:07 +0000 Subject: [issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3 In-Reply-To: <1384871190.69.0.586473841865.issue19651@psf.upfronthosting.co.za> Message-ID: <528B79E5.5010604@thedobsons.me.uk> John Dobson added the comment: mysite $ python -c 'import sys;print(sys.version)' 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] mysite $ python -c 'import readline;print(readline.__file__)' /System/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so mysite $ ls -l $(python -c 'import readline;print(readline.__file__)') -rwxrwxr-x 1 root wheel 66400 13 May 2013 /System/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so mysite $ python Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 1 1 >>> 2 Segmentation fault: 11 mysite $ I don't get to enter the final 3, the segmentation fault happens after the second input line. *John Dobson,* On 19/11/2013 14:26, Ned Deily wrote: > Ned Deily added the comment: > > Works for me using the python.org 3.3.3 64-/32-bit installer. Are you using that Python 3.3.3? Please show the results of typing the following commamds and substituting for "python3.3" whatever command name you are using that causes the segfault. > > python3.3 -c 'import sys;print(sys.version)' > python3.3 -c 'import readline;print(readline.__file__)' > ls -l $(python3.3 -c 'import readline;print(readline.__file__)') > python3.3 > 1 > 2 > 3 > quit() > > You should see: > $ python3.3 -c 'import sys;print(sys.version)' > 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] > $ python3.3 -c 'import readline;print(readline.__file__)' > /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so > $ ls -l $(python3.3 -c 'import readline;print(readline.__file__)') > -rwxrwxr-x 1 root admin 66472 Nov 16 23:40 /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/readline.so > $ python3.3 > Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> 1 > 1 >>>> 2 > 2 >>>> 3 > 3 >>>> quit() > $ > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 16:07:03 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 19 Nov 2013 15:07:03 +0000 Subject: [issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3 In-Reply-To: <1384855520.97.0.361030514177.issue19651@psf.upfronthosting.co.za> Message-ID: <1384873623.39.0.743501474437.issue19651@psf.upfronthosting.co.za> Christian Heimes added the comment: Your Python installation picks up the wrong readline module. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 16:17:13 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Nov 2013 15:17:13 +0000 Subject: [issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3 In-Reply-To: <1384873623.39.0.743501474437.issue19651@psf.upfronthosting.co.za> Message-ID: <83712D62-84C1-4E4D-9952-1752116F3A3E@acm.org> Ned Deily added the comment: Christian is correct. /System/Library/Frameworks is the location of the Apple supplied system Pythons and further Apple does not ship any version of Python 3. So you should figure out how your /System/Library got altered and restore it to release state. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 16:31:37 2013 From: report at bugs.python.org (John Dobson) Date: Tue, 19 Nov 2013 15:31:37 +0000 Subject: [issue19651] Mac OSX 10.9 segmentation fault 11 with Python 3.3.3 In-Reply-To: <1384855520.97.0.361030514177.issue19651@psf.upfronthosting.co.za> Message-ID: <1384875097.89.0.733394557554.issue19651@psf.upfronthosting.co.za> John Dobson added the comment: Many thanks for your prompt assistance ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 16:41:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 15:41:40 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1384875700.08.0.383874659581.issue19619@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Blacklisting by name is slow and it prevents a user from defining a codec with blacklisted name. What if just add private attribute ("_not_text"?) to unsafe codecs? If a codec has this attribute, than it should not be used it text encoding/decoding. Checking an attribute is much faster than comparing with a couple of strings. Another possibility is an inheriting all unsafe codecs from special class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 16:43:44 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 19 Nov 2013 15:43:44 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" In-Reply-To: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> Message-ID: <1384875824.6.0.632074870129.issue19652@psf.upfronthosting.co.za> Guido van Rossum added the comment: The traceback is pretty useless. So is the title of the other bug report "hangs for 1 hour" (which just means it hangs forever but the test runner kills it after one hour). We would need to run the tests with -v so at least we can pinpoint which of the 600 or so tests in test_asyncio is failing. PS. Off-topic: "raise Exception(...)" is poor coding style: File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 736, in main raise Exception("Child error on {}: {}".format(test, result[1])) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 16:51:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 15:51:44 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" In-Reply-To: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> Message-ID: <1384876304.01.0.140702789853.issue19652@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, it looks like the test uses a child process. The following issue has a similar problem, we don't know that status of the child process: http://bugs.python.org/issue19564 I proposed a patch in this issue for multiprocessing, to enable also faulthandler in the child process. We can probably do something similar in asyncio with child process (enable faulthandler in unit tests with a short timeout). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 17:03:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 16:03:06 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> Message-ID: <3dPBdj3g20z7M3J@mail.python.org> Roundup Robot added the comment: New changeset e0c4a5b2b739 by Martin v. L?wis in branch 'default': Issue #19550: Implement Windows installer changes of PEP 453 (ensurepip). http://hg.python.org/cpython/rev/e0c4a5b2b739 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 17:05:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 16:05:40 +0000 Subject: [issue1098749] Single-line option to pygettext.py Message-ID: <3dPBhg60Qwz7M3k@mail.python.org> Roundup Robot added the comment: New changeset 4fe87b5df2d0 by Andrew Kuchling in branch '3.3': #1098749: re-word gettext docs to not encourage using pygettext so much. http://hg.python.org/cpython/rev/4fe87b5df2d0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 17:11:49 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Tue, 19 Nov 2013 16:11:49 +0000 Subject: [issue1098749] Single-line option to pygettext.py Message-ID: <1384877509.88.0.0752622838111.issue1098749@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I've applied a patch from #8502 that doesn't encourage the use of pygettext.py so strongly. I raised the issue of deprecating pygettext.py on python-dev on Nov 11 2013; the thread starts at . Barry Warsaw and Philip Jenvey suggested deprecating it; Martin von Loewis was OK with continuing to maintain pygettext. So I'll leave this issue open, in case anyone wants to review the patch and commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 17:12:41 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Tue, 19 Nov 2013 16:12:41 +0000 Subject: [issue8502] support plurals in pygettext In-Reply-To: <1271985007.3.0.675755685137.issue8502@psf.upfronthosting.co.za> Message-ID: <1384877561.67.0.282880923227.issue8502@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Applied my documentation patch. New changeset 4fe87b5df2d0 by Andrew Kuchling in branch '3.3': #1098749: re-word gettext docs to not encourage using pygettext so much. http://hg.python.org/cpython/rev/4fe87b5df2d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 17:18:58 2013 From: report at bugs.python.org (Erik Purins) Date: Tue, 19 Nov 2013 16:18:58 +0000 Subject: [issue12585] distutils dereferences symlinks for zip but not for bztar/gztar target In-Reply-To: <1311084837.3.0.496870465183.issue12585@psf.upfronthosting.co.za> Message-ID: <1384877938.53.0.824788878639.issue12585@psf.upfronthosting.co.za> Erik Purins added the comment: Note that the zipfile module does not include a dereference option, but tarfile does. The following links to python examples show that users are writing zipfiles with symlinks, so it is possible to preserve them in a zip archive. https://gist.github.com/kgn/610907 http://doeidoei.wordpress.com/2010/11/23/compressing-files-with-python-symlink-trouble/ Maybe the right start is to add a dereference option to zipfile module? ---------- nosy: +epu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 17:39:08 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 19 Nov 2013 16:39:08 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1384879148.49.0.742171243779.issue19655@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 18:06:46 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 19 Nov 2013 17:06:46 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> Message-ID: <1384880806.23.0.53408707988.issue19550@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I have now committed the changes to the installer. A demo installer can be found at http://prof.beuth-hochschule.de/fileadmin/user/mvon_loewis/python-3.4.16027.msi I'm skeptical about the lack of proper deinstallation: per convention, uninstallation of software ought to be "clean" on windows, i.e. return the system to the state it had before the installation. Uninstallation currently isn't clean when pip installation is selected. I know this is what the PEP says, but I'm still unhappy, and I know that users will dislike it. So as a compromise, I made the installation of pip non-default, meaning that users have to opt into installing something that doesn't properly uninstall. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 18:07:35 2013 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 19 Nov 2013 17:07:35 +0000 Subject: [issue19541] ast.dump(indent=True) prettyprinting In-Reply-To: <1384060618.33.0.960245227555.issue19541@psf.upfronthosting.co.za> Message-ID: <1384880855.96.0.828487589867.issue19541@psf.upfronthosting.co.za> anatoly techtonik added the comment: Implemented more advanced interface with filtering and tests - here - https://bitbucket.org/techtonik/astdump/ Right now the output is not so detailed, but it may change if the need arises. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 18:11:26 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 19 Nov 2013 17:11:26 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384875700.08.0.383874659581.issue19619@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Yes, a private attribute on CodecInfo is probably better - the rest of the patch would stay the same, it would just check for that attribute instead of particular names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 18:14:02 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 19 Nov 2013 17:14:02 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384880806.23.0.53408707988.issue19550@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: That sounds reasonable to me - thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 18:41:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 19 Nov 2013 17:41:17 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1384882877.77.0.81204621386.issue2927@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is the last iteration with a few minor tweaks and a couple more tests. ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file32703/issue2927-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 18:43:34 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 19 Nov 2013 17:43:34 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" In-Reply-To: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> Message-ID: <1384883014.7.0.838762087092.issue19652@psf.upfronthosting.co.za> Guido van Rossum added the comment: I cannot help you unless you tell me which specific test is failing. But once you have a proposed fix I will review it. Thanks for advocating for the minority platforms! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:02:34 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 19 Nov 2013 18:02:34 +0000 Subject: [issue19595] Silently skipped test in test_winsound In-Reply-To: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> Message-ID: <1384884154.93.0.0543263741687.issue19595@psf.upfronthosting.co.za> Zachary Ware added the comment: I don't know that it's expected, but it doesn't appear to be unexpected. regrtest doesn't appear to know anything about expected failures or unexpected successes, mostly because both concepts appear at the individual test level while regrtest deals at the test module level. unittest docs don't actually say what happens when an expected failure fails to fail. As for this issue, it looks like the skipping of the test predates _have_soundcard and has_sound. If there are no objections, I'll try the attached patch on default; if it causes failures, I'll try a 'skipUnless(has_sound('SystemDefault')...', and if that work's I'll backport it to the other two branches. ---------- assignee: -> zach.ware keywords: +patch stage: test needed -> patch review Added file: http://bugs.python.org/file32704/issue19595.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:09:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 18:09:47 +0000 Subject: [issue19656] Add Py3k warning for non-ascii bytes literals Message-ID: <1384884587.46.0.636196916046.issue19656@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: PEP 3112 had added bytes literals in 2.6. But bytes literals in 2.x are just synonyms to 8-bit string literals and allow non-ascii characters, while bytes literals in 3.x allows only ascii characters. For better forward compatibility with 3.x the proposed patch adds Py3k syntax warning for non-ascii bytes literals in 2.7. ---------- components: Interpreter Core files: py3kwarn_nonascii_bytes_literals.patch keywords: patch messages: 203406 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add Py3k warning for non-ascii bytes literals type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file32705/py3kwarn_nonascii_bytes_literals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:23:36 2013 From: report at bugs.python.org (Tim Golden) Date: Tue, 19 Nov 2013 18:23:36 +0000 Subject: [issue19636] Fix usage of MAX_PATH in posixmodule.c In-Reply-To: <1384731950.1.0.229673291292.issue19636@psf.upfronthosting.co.za> Message-ID: <1384885416.57.0.19785979619.issue19636@psf.upfronthosting.co.za> Tim Golden added the comment: Fine with your volumepathname patch. The core of the code was contributed and I didn't check it too carefully as it clearly worked. (For some definition of "worked"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:25:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 18:25:51 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields In-Reply-To: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> Message-ID: <3dPFpR0qRpz7M4n@mail.python.org> Roundup Robot added the comment: New changeset 6e5afeada7ca by R David Murray in branch '3.3': #19449: Handle non-string keys when generating 'fieldnames' error. http://hg.python.org/cpython/rev/6e5afeada7ca New changeset ee2c80eeca2a by R David Murray in branch 'default': Merge: #19449: Handle non-string keys when generating 'fieldnames' error. http://hg.python.org/cpython/rev/ee2c80eeca2a New changeset e52d7b173ab5 by R David Murray in branch '2.7': #19449: Handle non-string keys when generating 'fieldnames' error. http://hg.python.org/cpython/rev/e52d7b173ab5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:26:54 2013 From: report at bugs.python.org (Garrett Cooper) Date: Tue, 19 Nov 2013 18:26:54 +0000 Subject: [issue19657] List comprehension conditional evaluation order seems backwards Message-ID: <1384885614.87.0.844122195952.issue19657@psf.upfronthosting.co.za> New submission from Garrett Cooper: I was a bit surprised when I ran into this issue when porting some nose tests from Windows to Linux: #!/usr/bin/env python with open('/etc/services') as fd: lines = fd.readlines() lines.append('') SERVICES = [line.split()[0] for line in lines if (line and not line.startswith('#'))] $ python list_comprehension.py Traceback (most recent call last): File "list_comprehension.py", line 5, in if (line and not line.startswith('#'))] IndexError: list index out of range $ python3.2 list_comprehension.py Traceback (most recent call last): File "list_comprehension.py", line 4, in SERVICES = [line.split()[0] for line in lines File "list_comprehension.py", line 5, in if (line and not line.startswith('#'))] IndexError: list index out of range $ python -V Python 2.7.5 $ python3.2 -V Python 3.2.5 This is occurring of course because the .split() is being done on an empty line. The docs don't note (at least in the list comprehension section [*]) that if-statements are evaluated after the value is generated for the current index in the loop. This seems very backwards because generating a value could in fact be very expensive, whereas determining whether or not a precondition has been met should be less expensive. What could/should be done is one of two things: 1. evaluation order should be clearly spelled out in the docs, or 2. the list comprehension handling code should be changed to support evaluating the conditional statements before calculating a result. Otherwise discouraging use of [map+]filter (at least pylint does that) seems incredibly unwise as I can get the functionality I want in a single line as opposed to an unrolled loop. [*] http://docs.python.org/2/tutorial/datastructures.html#list-comprehensions ---------- messages: 203409 nosy: yaneurabeya priority: normal severity: normal status: open title: List comprehension conditional evaluation order seems backwards _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:27:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 18:27:13 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1384885633.75.0.097276375835.issue2927@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:28:24 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 19 Nov 2013 18:28:24 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1384885704.98.0.870021997411.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: That's not the right fix for that test failure. If exec_module() is not meant to set import-related attributes like __cached__ because import itself (through _SpecMethods.init_module_attrs()) then test_frozen needs to be updated to not expect such attributes. Honestly test_frozen should probably either be rolled into test_importlib.frozen or deleted instead of existing separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:28:49 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Nov 2013 18:28:49 +0000 Subject: [issue19449] csv.DictWriter can't handle extra non-string fields In-Reply-To: <1383130772.27.0.178945173135.issue19449@psf.upfronthosting.co.za> Message-ID: <1384885729.58.0.643053291468.issue19449@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Tomas and Vajrasky. I tweaked the patch slightly: Thomas's fix was better, since it doesn't incur the overhead of the repr unless an an error is detected (a micro-optimization, true, but an easy one). I also chose to only check that 'fieldnames' is mentioned in the non-variable exception text; exactly how the rest of the message text is worded is not part of the API. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:29:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 18:29:15 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <3dPFtM0lJrz7M43@mail.python.org> Roundup Robot added the comment: New changeset 7b9235852b3b by Ezio Melotti in branch 'default': #2927: Added the unescape() function to the html module. http://hg.python.org/cpython/rev/7b9235852b3b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:50:47 2013 From: report at bugs.python.org (Peter Otten) Date: Tue, 19 Nov 2013 18:50:47 +0000 Subject: [issue19657] List comprehension conditional evaluation order seems backwards In-Reply-To: <1384885614.87.0.844122195952.issue19657@psf.upfronthosting.co.za> Message-ID: <1384887047.4.0.849993022887.issue19657@psf.upfronthosting.co.za> Peter Otten added the comment: I believe you are misinterpreting what you are seeing. Empty lines read from a file do not produce an empty string, you get "\n" instead which is true in a boolean context. Try [line.split()[0] for line in lines if line.strip() and not line.startswith("#")] or add an extra check for all-whitespace line [... if line and not line.isspace() and not line.startswith("#")] ---------- nosy: +peter.otten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 19:51:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 19 Nov 2013 18:51:50 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1384887110.37.0.304526857985.issue2927@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the reviews! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 20:07:26 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Nov 2013 19:07:26 +0000 Subject: [issue19657] List comprehension conditional evaluation order seems backwards In-Reply-To: <1384885614.87.0.844122195952.issue19657@psf.upfronthosting.co.za> Message-ID: <1384888046.15.0.136491938417.issue19657@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 20:19:32 2013 From: report at bugs.python.org (Dustin Haffner) Date: Tue, 19 Nov 2013 19:19:32 +0000 Subject: [issue18032] set methods should specify whether they consume iterators "lazily" In-Reply-To: <1369223923.83.0.620034016791.issue18032@psf.upfronthosting.co.za> Message-ID: <1384888772.96.0.548609324586.issue18032@psf.upfronthosting.co.za> Dustin Haffner added the comment: I've made an attempt at patching set_issubset() to match the Python from Raymond's message. I've rearranged the set_issubset function so that it checks for a set/frozenset, dict, or iterable in that order. In the iterable case it will create a temporary set and add elements to it as it consumes them from the iterable, returning early when possible. This is my first patch, please let me know how I may improve it! ---------- keywords: +patch nosy: +dhaffner Added file: http://bugs.python.org/file32706/issubset_improvement.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 20:49:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 19:49:58 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1384890598.57.0.412641059199.issue19654@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We can add a print for a patchlevel. ---------- keywords: +patch Added file: http://bugs.python.org/file32707/test_tcl_patchlevel.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 20:59:06 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 19 Nov 2013 19:59:06 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <1384891146.59.0.930937881752.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I for the most part agree with the comments and will provide an updated patch on thursday. Would you mind if I committed that without further review (due to cutting it awfully close to the deadline for beta 1)? Some comments I want to reply to specifically: * "Can the code be simpler, with only one pass?" Maybe, but not right now. * "This is inconsistent with _flatten()." I'll add a comment that explains why this is: _flatten (and this code) can deal with arbitrary keys, but that is not supported by Apple's code. The type check in _write_object ensures that it is not possible to write archives that cannot be read back by Apple's Cocoa frameworks. * "unusual indentation" (several times) I'll have to look at other stdlib code to find suitable indentation, this is indentation I've used in my code for a long time (I've also used camelCase instead of pep8_style names for methods for a long time, which is probably why I never noticed that I forgot to convert some method name when cleaning up the naming conventions used in this module). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 21:12:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 20:12:37 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <1384891957.7.0.215819391074.issue14455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It's too large and complicated patch. I would like to have a chance to quick review it before committing. You will have time to commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 21:20:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 20:20:29 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1384892429.52.0.648917167434.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I propose to include frame size in previous frame. This will twice decrease the number of file reads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 21:28:54 2013 From: report at bugs.python.org (Eric Snow) Date: Tue, 19 Nov 2013 20:28:54 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1384892934.02.0.177227122564.issue19655@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 21:38:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 20:38:36 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1384893516.76.0.508358908306.issue15204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could anyone please review the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 21:59:26 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Tue, 19 Nov 2013 20:59:26 +0000 Subject: [issue18615] sndhdr.whathdr could return a namedtuple In-Reply-To: <1375370275.79.0.808837089288.issue18615@psf.upfronthosting.co.za> Message-ID: <1384894766.25.0.95094722846.issue18615@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Ping, please review. I guess it is minimal enough to get into 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:21:13 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 19 Nov 2013 21:21:13 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384896073.08.0.724853076774.issue16596@psf.upfronthosting.co.za> Guido van Rossum added the comment: It's not fixed. Let me paste in a session. This uses the latest Tulip repo (simple_tcp_server.py was just added). I've added "import pdb; pdb.set_trace()" to the top of the client() coroutine, to set a breakpoint (I'm a very unsophisticated pdb user :-). I step over a yield-from, great. Then I step into recv(). Note the final 'n' command. This is at the return statement in recv(). At this point I expect to go back into the client() coroutine, but somehow the debugger loses control and the program finishes execution without giving control back. bash-3.2$ ~/cpython/python.exe -m examples.simple_tcp_server ~/cpython/python.exe -m examples.simple_tcp_server > /Users/guido/tulip/examples/simple_tcp_server.py(119)client() -> reader, writer = yield from asyncio.streams.open_connection( (Pdb) n n > /Users/guido/tulip/examples/simple_tcp_server.py(120)client() -> '127.0.0.1', 12345, loop=loop) (Pdb) > /Users/guido/tulip/examples/simple_tcp_server.py(122)client() -> def send(msg): (Pdb) > /Users/guido/tulip/examples/simple_tcp_server.py(126)client() -> def recv(): (Pdb) > /Users/guido/tulip/examples/simple_tcp_server.py(132)client() -> send("add 1 2") (Pdb) > add 1 2 > /Users/guido/tulip/examples/simple_tcp_server.py(133)client() -> msg = yield from recv() (Pdb) s s --Call-- > /Users/guido/tulip/examples/simple_tcp_server.py(126)recv() -> def recv(): (Pdb) n n > /Users/guido/tulip/examples/simple_tcp_server.py(127)recv() -> msgback = (yield from reader.readline()).decode("utf-8").rstrip() (Pdb) n n > /Users/guido/tulip/examples/simple_tcp_server.py(128)recv() -> print("< " + msgback) (Pdb) n n < 3.0 > /Users/guido/tulip/examples/simple_tcp_server.py(129)recv() -> return msgback (Pdb) n n > repeat 5 hello < begin < 1. hello < 2. hello < 3. hello < 4. hello < 5. hello < end client task done: Task(<_handle_client>) bash-3.2$ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:22:46 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 19 Nov 2013 21:22:46 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1384896165.99.0.357436194824.issue15204@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum, jackjansen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:23:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 21:23:35 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <3dPKlV3mCxz7M52@mail.python.org> Roundup Robot added the comment: New changeset 68fd86a83ece by Victor Stinner in branch 'default': Issue #9566: compile.c uses Py_ssize_t instead of int to store sizes to fix http://hg.python.org/cpython/rev/68fd86a83ece ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:24:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 21:24:37 +0000 Subject: [issue19617] Fix usage of Py_ssize_t type in Python/compile.c In-Reply-To: <1384556887.78.0.0801644931994.issue19617@psf.upfronthosting.co.za> Message-ID: <1384896277.93.0.841154897503.issue19617@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, I forgot to mention this issue number in the commit: --- changeset: 87277:68fd86a83ece tag: tip user: Victor Stinner date: Tue Nov 19 22:23:20 2013 +0100 files: Python/compile.c description: Issue #9566: compile.c uses Py_ssize_t instead of int to store sizes to fix compiler warnings on Windows 64-bit. Use Py_SAFE_DOWNCAST() where the final downcast is needed. The bytecode doesn't support integer parameters larger than 32-bit yet. --- I added some more Py_SAFE_DOWNCAST() in the final commit. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:25:21 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 21:25:21 +0000 Subject: [issue19578] del list[a:b:c] doesn't handle correctly list_resize() failure In-Reply-To: <1384389720.61.0.338181274078.issue19578@psf.upfronthosting.co.za> Message-ID: <1384896321.27.0.834881957394.issue19578@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:25:43 2013 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Tue, 19 Nov 2013 21:25:43 +0000 Subject: [issue19658] inspect.getsource weird case Message-ID: <1384896343.05.0.723899962428.issue19658@psf.upfronthosting.co.za> New submission from Ronny Pfannschmidt: got: >>> l = {} >>> import inspect >>> exec(compile('def fun(): pass', '', 'exec'), l, l) >>> inspect.getsource(l['fun']) Traceback (most recent call last): File "", line 1, in File "/home/private/.local/lib/python3.3/inspect.py", line 726, in getsource lines, lnum = getsourcelines(object) File "/home/private/.local/lib/python3.3/inspect.py", line 715, in getsourcelines lines, lnum = findsource(object) File "/home/private/.local/lib/python3.3/inspect.py", line 553, in findsource if not sourcefile and file[0] + file[-1] != '<>': IndexError: string index out of range expected: >>> l = {} >>> import inspect >>> exec(compile('def fun(): pass', '', 'exec'), l, l) >>> inspect.getsource(l['fun']) Traceback (most recent call last): File "", line 1, in File "/home/private/.local/lib/python3.3/inspect.py", line 726, in getsource lines, lnum = getsourcelines(object) File "/home/private/.local/lib/python3.3/inspect.py", line 715, in getsourcelines lines, lnum = findsource(object) File "/home/private/.local/lib/python3.3/inspect.py", line 563, in findsource raise IOError('could not get source code') OSError: could not get source code this is a extraction, it appears that python in certein circumstances creates code objects with that setup on its own, im still further investigating ---------- messages: 203426 nosy: Ronny.Pfannschmidt priority: normal severity: normal status: open title: inspect.getsource weird case type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:28:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 21:28:14 +0000 Subject: [issue19617] Fix usage of Py_ssize_t type in Python/compile.c In-Reply-To: <1384556887.78.0.0801644931994.issue19617@psf.upfronthosting.co.za> Message-ID: <3dPKrs1Zpbz7Lmt@mail.python.org> Roundup Robot added the comment: New changeset 8d3e85dfa46f by Victor Stinner in branch 'default': Issue #9566, #19617: Fix compilation on Windows http://hg.python.org/cpython/rev/8d3e85dfa46f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:28:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 21:28:14 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <3dPKrt0MQtz7Lmt@mail.python.org> Roundup Robot added the comment: New changeset 8d3e85dfa46f by Victor Stinner in branch 'default': Issue #9566, #19617: Fix compilation on Windows http://hg.python.org/cpython/rev/8d3e85dfa46f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:43:55 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 19 Nov 2013 21:43:55 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1384897435.37.0.195487165298.issue19655@psf.upfronthosting.co.za> Benjamin Peterson added the comment: We could take the opportunity to ast scripts to a Tools/ subdir. Then you could use whatever it is test_tools.py uses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:49:52 2013 From: report at bugs.python.org (=?utf-8?q?Francisco_Mart=C3=ADn_Brugu=C3=A9?=) Date: Tue, 19 Nov 2013 21:49:52 +0000 Subject: [issue19626] test_email and Lib/email/_policybase.py failures with -OO In-Reply-To: <1384626069.77.0.304780424813.issue19626@psf.upfronthosting.co.za> Message-ID: <1384897792.27.0.0999567730405.issue19626@psf.upfronthosting.co.za> Francisco Mart?n Brugu? added the comment: Actual tip: changeset: 87276:2012e85638d9 date: Tue Nov 19 11:43:38 2013 -0800 It's a fresh clone, then: make clean ./configure --with-pydebug make -j4 ./python -OO -m test -v test_email == CPython 3.4.0a4+ (default:2012e85638d9, Nov 19 2013, 22:40:39) [GCC 4.7.2] == Linux-3.2.0-4-amd64-x86_64-with-debian-7.2 little-endian == /home/ci/Prog/cpython_test/cpython/build/test_python_30828 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=2, dont_write_bytecode=0, no_user_site=0, no_site=0, igno re_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) [1/1] test_email test_b_case_ignored (test__encoded_words.TestDecode) ... ok .... and so on .... Ran 1516 tests in 8.313s OK (skipped=1) 1 test OK. ---------- nosy: +francismb status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:52:38 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 19 Nov 2013 21:52:38 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1384897958.52.0.206645052125.issue3158@psf.upfronthosting.co.za> Zachary Ware added the comment: Does this qualify as a new feature that needs to be in before beta 1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 22:58:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 19 Nov 2013 21:58:11 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1384898291.2.0.482492945849.issue15204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Victor's comments. ---------- Added file: http://bugs.python.org/file32708/deprecate-U-mode_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:03:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 22:03:46 +0000 Subject: [issue19617] Fix usage of Py_ssize_t type in Python/compile.c In-Reply-To: <1384556887.78.0.0801644931994.issue19617@psf.upfronthosting.co.za> Message-ID: <3dPLds3XBpz7M5m@mail.python.org> Roundup Robot added the comment: New changeset ee4da7291211 by Victor Stinner in branch 'default': Issue #9566, #19617: New try to fix compilation on Windows http://hg.python.org/cpython/rev/ee4da7291211 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:03:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 22:03:47 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <3dPLdt2cp0z7M6M@mail.python.org> Roundup Robot added the comment: New changeset ee4da7291211 by Victor Stinner in branch 'default': Issue #9566, #19617: New try to fix compilation on Windows http://hg.python.org/cpython/rev/ee4da7291211 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:04:24 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 19 Nov 2013 22:04:24 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1384898664.67.0.82292132331.issue17810@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Attached is a patch that takes a different approach to framing, putting it into an optional framing layer by means of a buffered reader/writer. The framing structure is the same as in PEP 3154; a separate PYFRAMES magic is prepended to guard against protocol inconsistencies and to allow for automatic detection of framing. ---------- nosy: +loewis Added file: http://bugs.python.org/file32709/framing.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:05:33 2013 From: report at bugs.python.org (=?utf-8?q?Francisco_Mart=C3=ADn_Brugu=C3=A9?=) Date: Tue, 19 Nov 2013 22:05:33 +0000 Subject: [issue19626] test_email and Lib/email/_policybase.py failures with -OO In-Reply-To: <1384626069.77.0.304780424813.issue19626@psf.upfronthosting.co.za> Message-ID: <1384898733.69.0.0065136887256.issue19626@psf.upfronthosting.co.za> Francisco Mart?n Brugu? added the comment: small correction: a fresh clone, then: ./configure --with-pydebug make -j4 ./python -OO -m test -v test_email ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:22:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 22:22:27 +0000 Subject: [issue18294] zlib module is not completly 64-bit safe In-Reply-To: <1372107882.97.0.731855490225.issue18294@psf.upfronthosting.co.za> Message-ID: <1384899747.62.0.64771707887.issue18294@psf.upfronthosting.co.za> STINNER Victor added the comment: zlib_64bit-3.patch: updated patch which fixes also the PyArg_ParseTuple() convert for C int and C unsigned int. ---------- Added file: http://bugs.python.org/file32710/zlib_64bit-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:30:10 2013 From: report at bugs.python.org (Julian Gindi) Date: Tue, 19 Nov 2013 22:30:10 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1384900210.58.0.141496323404.issue19588@psf.upfronthosting.co.za> Julian Gindi added the comment: Maybe some documentation could help express the purpose of this test, but I was able to make the changes mentioned below and the test seems to work better than it used to. The test no longer returns if a value is 'skipped'. This is my first attempt at a patch so apologies if this is not perfect. ---------- keywords: +patch nosy: +Julian.Gindi Added file: http://bugs.python.org/file32711/issue19588.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:47:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 22:47:05 +0000 Subject: [issue19637] test_subprocess.test_undecodable_env() failure on AIX In-Reply-To: <1384737393.4.0.145203729418.issue19637@psf.upfronthosting.co.za> Message-ID: <3dPMbs03GDz7M74@mail.python.org> Roundup Robot added the comment: New changeset e651036191ad by Victor Stinner in branch 'default': Issue #19637: fix test_undecodable_env() of test_subprocess on AIX http://hg.python.org/cpython/rev/e651036191ad ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:47:52 2013 From: report at bugs.python.org (Matt Hickford) Date: Tue, 19 Nov 2013 22:47:52 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1384901272.24.0.234128929875.issue2943@psf.upfronthosting.co.za> Matt Hickford added the comment: For comparison, Ruby ships with a package manager, Gem. If a user tries to install a package with C extensions, they are given this user-friendly message: > Please update your PATH to include build tools or download the DevKit from 'http://rubyinstaller.org/downloads' and follow the instructions at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:56:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 22:56:55 +0000 Subject: [issue19617] Fix usage of Py_ssize_t type in Python/compile.c In-Reply-To: <1384556887.78.0.0801644931994.issue19617@psf.upfronthosting.co.za> Message-ID: <3dPMqC1vTMz7M43@mail.python.org> Roundup Robot added the comment: New changeset 116bd550e309 by Victor Stinner in branch 'default': Issue #9566, #19617: Fix more compiler warnings in compile.c on Windows 64-bit http://hg.python.org/cpython/rev/116bd550e309 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 19 23:56:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Nov 2013 22:56:56 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <3dPMqD0Fm3z7M43@mail.python.org> Roundup Robot added the comment: New changeset 116bd550e309 by Victor Stinner in branch 'default': Issue #9566, #19617: Fix more compiler warnings in compile.c on Windows 64-bit http://hg.python.org/cpython/rev/116bd550e309 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 00:09:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 23:09:44 +0000 Subject: [issue18295] Possible integer overflow in PyCode_New() In-Reply-To: <1372108745.44.0.114375127897.issue18295@psf.upfronthosting.co.za> Message-ID: <1384902584.15.0.191837098846.issue18295@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch adding Py_SAFE_DOWNCAST(). For update_star_args(), I changed the type instead, because I prefer to avoid Py_SAFE_DOWNCAST() when possible. Modify PyEval_EvalCodeEx() and PyCode_New() to use Py_ssize_t would be more correct, but it may be slower if Py_ssize_t is larger than int, and I hope that nobody calls functions with more than INT_MAX parameters! It would be completly inefficient! ---------- keywords: +patch nosy: +christian.heimes, serhiy.storchaka Added file: http://bugs.python.org/file32712/code_ssize_t.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 00:44:51 2013 From: report at bugs.python.org (David Edelsohn) Date: Tue, 19 Nov 2013 23:44:51 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1384904691.89.0.087034683417.issue19633@psf.upfronthosting.co.za> David Edelsohn added the comment: By the way, test_wave also fails on zLinux, which also is Big Endian. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 00:51:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 23:51:17 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1384905077.13.0.251325220327.issue19568@psf.upfronthosting.co.za> STINNER Victor added the comment: > Can you suppress the MemoryError if deletion succeeds? That would be ok IMO. In case (1) and (3) (see below), the MemoryError might be suppressed, but I prefer to keep the exception to warn the user that something bad happened and its program will slowly leak memory. Reminder that I found the error using failmalloc which is stupid tool: it injects random MemoryError errors. In practice, realloc() should never fail if the buffer is shrinked (becomes smaller). So I don't think that you should worry too much on the exact behaviour of this case :-) Only the case (3) (bytearray grows) may appear in practice, and this case is handleded correctly (do nothing if realloc() failed, leave the bytearray object unchanged). > Yes, but if a MemoryError occurred during slice assignment b[3:6] = b'ab', the bytearray will be not consistent. For consistency we should copy replacement bytes. Correct, fixed in new patch. New patch copying bytes if the memory allocation failed but we cannot restore removed bytes (case 2). I also added a long comment explaining the issue. Behaviour with the patch 3: Case 1: growth<0, lo == 0 >>> b=bytearray(b'asciiUNICODE'); b[:5]=b'#' Traceback (most recent call last): File "", line 1, in MemoryError >>> b bytearray(b'asciiUNICODE') => b leaved unchanged (ok) Case 2: growth<0, lo != 0 >>> b=bytearray(b'asciiUNICODE'); b[1:5]=b'#' Traceback (most recent call last): File "", line 1, in MemoryError >>> b bytearray(b'a#UNICODE') => function succeed, but exception raised (and memory block not resized) Case 3: growth>0 >>> b=bytearray(b'asciiUNICODE'); b[5:5]=b'###' Traceback (most recent call last): File "", line 1, in MemoryError >>> b bytearray(b'asciiUNICODE') => b leaved unchanged (ok) ---------- Added file: http://bugs.python.org/file32713/bytearray_setslice_mem_error-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 00:55:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 23:55:27 +0000 Subject: [issue19578] del list[a:b:c] doesn't handle correctly list_resize() failure In-Reply-To: <1384389720.61.0.338181274078.issue19578@psf.upfronthosting.co.za> Message-ID: <1384905327.63.0.452006042085.issue19578@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, my explanation is maybe not clear. Without the patch, the operation succeed, but a MemoryError is raised, and the caller is not notified. So you enter an inconsistent state because your function may "succeed" whereas an exception is set. With the patch, the operation succeed, but you get a MemoryError and the caller is notified of the failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 00:57:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 23:57:54 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1384905474.37.0.385328223485.issue19518@psf.upfronthosting.co.za> STINNER Victor added the comment: > Updated patch addressing some remarks of Serhiy and adding documentation. Anyone for a new review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 00:58:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Nov 2013 23:58:52 +0000 Subject: [issue19512] Avoid temporary Unicode strings, use identifiers to only create the string once In-Reply-To: <1383757505.5.0.780170182234.issue19512@psf.upfronthosting.co.za> Message-ID: <1384905532.41.0.562977930811.issue19512@psf.upfronthosting.co.za> STINNER Victor added the comment: No reaction, I close the issue. Reopen it if you still have complains ;-) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 01:01:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 00:01:45 +0000 Subject: [issue19656] Add Py3k warning for non-ascii bytes literals In-Reply-To: <1384884587.46.0.636196916046.issue19656@psf.upfronthosting.co.za> Message-ID: <1384905705.96.0.229517242607.issue19656@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 01:07:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 00:07:13 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1384906033.69.0.630062656731.issue19506@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached subprocess_memoryview.patch uses a memoryview() to avoid memory copies. The behaviour is undefined if two threads share the same Popen object and call the communicate() method at the same time. But I'm not sure that Popen is thread safe, it doesn't use any lock. ---------- keywords: +patch nosy: +pitrou, sbt Added file: http://bugs.python.org/file32714/subprocess_memoryview.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 01:18:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 00:18:57 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1384906737.23.0.599187920216.issue19506@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hi, why does your patch change listobject.c? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 01:19:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 00:19:51 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1384906791.1.0.267392375484.issue19506@psf.upfronthosting.co.za> STINNER Victor added the comment: > Hi, why does your patch change listobject.c? Oops, the change is unrelated (#19578). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 01:24:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 00:24:41 +0000 Subject: [issue19659] Document Argument Clinic? Message-ID: <1384907080.98.0.430269997716.issue19659@psf.upfronthosting.co.za> New submission from STINNER Victor: While modifying zlibmodule.c, Serhiy told me that argument clinic is now used in zlibmodule.c. Running "./python Tools/clinic/clinic.py -f Modules/zlibmodule.c" does modify the file, so I misuse argument clinic. I saw Argument Clinic on Youtube but it didn't help... http://www.youtube.com/watch?v=kQFKtI6gn9Y Would it be possible to explain how to use clinic.py, explain the format, etc. in the Python documentation? Somewhere near Doc/c-api/. ---------- messages: 203452 nosy: haypo, larry priority: normal severity: normal status: open title: Document Argument Clinic? versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 02:06:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 01:06:25 +0000 Subject: [issue18294] zlib module is not completly 64-bit safe In-Reply-To: <1372107882.97.0.731855490225.issue18294@psf.upfronthosting.co.za> Message-ID: <1384909585.17.0.00592564226055.issue18294@psf.upfronthosting.co.za> STINNER Victor added the comment: zlib_64bit-4.patch: * fix usage of argument clinic, add a uint_converter * fix zlib_Decompress_decompress(): use an unsigned int, not an int (remove int_converter()) * fix two bugs and unit tests ---------- Added file: http://bugs.python.org/file32715/zlib_64bit-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 02:15:28 2013 From: report at bugs.python.org (Julian Gindi) Date: Wed, 20 Nov 2013 01:15:28 +0000 Subject: [issue18566] In unittest.TestCase docs for setUp() and tearDown() don't mention AssertionError In-Reply-To: <1374901937.1.0.747872580847.issue18566@psf.upfronthosting.co.za> Message-ID: <1384910128.54.0.111114670341.issue18566@psf.upfronthosting.co.za> Julian Gindi added the comment: I did some further testing and it seems that you are right, testcase.SkipTest() never causes an error in setUp or tearDown but "raise AssertionError" does (even in setUp or tearDown). I went ahead and made relevant documentation changes, let me know what you think. ---------- keywords: +patch nosy: +Julian.Gindi Added file: http://bugs.python.org/file32716/issue18566.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 02:23:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 01:23:09 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" In-Reply-To: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> Message-ID: <1384910589.56.0.035512852914.issue19652@psf.upfronthosting.co.za> STINNER Victor added the comment: > I cannot help you unless you tell me which specific test is failing. Oh, I didn't notice that test_subprocess_send_signal() is part of a mixin: SubprocessTestsMixin. Configure output: checking sys/devpoll.h usability... no checking sys/devpoll.h presence... no checking for sys/devpoll.h... no checking sys/epoll.h usability... no checking sys/epoll.h presence... no checking for sys/epoll.h... no checking poll.h usability... yes checking poll.h presence... yes checking for broken poll()... no checking for kqueue... yes I don't know which selector was used: select, poll or maybe kqueue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 02:27:05 2013 From: report at bugs.python.org (James Powell) Date: Wed, 20 Nov 2013 01:27:05 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name Message-ID: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> New submission from James Powell: Decorator syntax currently allows only a dotted_name after the @. As far as I can tell, this was a gut-feeling decision made by Guido. [1] I spoke with Nick Coghlan at PyTexas about this, and he suggested that if someone did the work, there might be interest in revisiting this restriction. The attached patch allows any testlist to follow the @. The following are now valid: @(lambda x:x) def f(): pass @(spam if p else eggs) def f(): pass @spam().ham().eggs() def f(): pass [1] http://mail.python.org/pipermail/python-dev/2004-August/046711.html ---------- components: Interpreter Core messages: 203456 nosy: james priority: normal severity: normal status: open title: decorator syntax: allow testlist instead of just dotted_name type: enhancement versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 02:27:52 2013 From: report at bugs.python.org (James Powell) Date: Wed, 20 Nov 2013 01:27:52 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384910872.98.0.650081990661.issue19660@psf.upfronthosting.co.za> Changes by James Powell : ---------- keywords: +patch Added file: http://bugs.python.org/file32717/decorator-syntax.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 02:51:15 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 01:51:15 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384912275.62.0.395174472365.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: The PEP should be ready now. I have addressed your input in http://hg.python.org/peps/rev/fbe779221a7a ---------- assignee: christian.heimes -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 03:26:38 2013 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 20 Nov 2013 02:26:38 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384914398.76.0.957766086769.issue19660@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 04:06:11 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 20 Nov 2013 03:06:11 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" In-Reply-To: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> Message-ID: <1384916770.99.0.99798019162.issue19652@psf.upfronthosting.co.za> Guido van Rossum added the comment: Oh, sorry, I didn't realize the name of the failing test was in the issue title. But even that's no excuse, because it's also in the log. :-( Fortunately the line where we're hanging is also in the log: line 291 in selectors.py is in PollSelector. So that's settled. But we don't know if that's the first of the three tests that runs or not. What's also strange is that several other tests (test_subprocess_kill() and test_subprocess_terminate()) also send signals, so they should work exactly the same way. But again we don't know if any of them are being run before the signal test. Do you have any other traces from the same bot? Do they all fail in the same test? Is the test order randomized? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 06:12:44 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 20 Nov 2013 05:12:44 +0000 Subject: [issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter() In-Reply-To: <1384866058.1.0.245171525218.issue19653@psf.upfronthosting.co.za> Message-ID: <1384924364.11.0.42084728954.issue19653@psf.upfronthosting.co.za> Eric Snow added the comment: As far as I'm aware, the performance of __repr__() for any object is not much of a concern. Repr is mostly for debugging and interactive use, so it's already fast/efficient enough for the target consumers: us. :) Making __repr__() easier to write or maintain is worth it as long as benefit outweighs the cost of the churn. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 08:05:24 2013 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Wed, 20 Nov 2013 07:05:24 +0000 Subject: [issue19658] inspect.getsource weird case In-Reply-To: <1384896343.05.0.723899962428.issue19658@psf.upfronthosting.co.za> Message-ID: <1384931124.1.0.0547836646393.issue19658@psf.upfronthosting.co.za> Changes by Ronny Pfannschmidt : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 08:13:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 07:13:39 +0000 Subject: [issue18294] zlib module is not completly 64-bit safe In-Reply-To: <1372107882.97.0.731855490225.issue18294@psf.upfronthosting.co.za> Message-ID: <1384931619.71.0.730788170195.issue18294@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 08:19:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 07:19:23 +0000 Subject: [issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter() In-Reply-To: <1384866058.1.0.245171525218.issue19653@psf.upfronthosting.co.za> Message-ID: <1384931963.96.0.989912154739.issue19653@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I supported patches for repr(list), repr(tuple) and repr(dict) because they made the code shorter and cleaner. But this patch is more questionable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 08:28:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 07:28:30 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1384932510.95.0.0463149483755.issue19506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is a performance for small chunks? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 08:34:12 2013 From: report at bugs.python.org (Eric Snow) Date: Wed, 20 Nov 2013 07:34:12 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1384932852.5.0.559082364695.issue3158@psf.upfronthosting.co.za> Eric Snow added the comment: Larry: thoughts? ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 08:45:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 07:45:57 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1384933557.85.0.625740199972.issue19518@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyRun_FileObject() looks misleading, because it works with FILE*, not with a file object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 08:49:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 07:49:59 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1384933799.3.0.0273924533107.issue15204@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file26198/deprecate-U-mode-stage2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 08:50:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 07:50:58 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1384933858.75.0.493589876581.issue15204@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27345/deprecate-U-mode-stage1_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 10:45:07 2013 From: report at bugs.python.org (dellair jie) Date: Wed, 20 Nov 2013 09:45:07 +0000 Subject: [issue19661] Python: RuntimeError: invalid slot offset when importing a module Message-ID: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> New submission from dellair jie: Dear all, I am getting above error when trying to import ssl module. In fact, the error showed up during the build and _ssl module was added to the failed module list. However, the compilation and link went well. There was no error on compilation and link phases, only some warnings. However, during Python build, there is an import phase right after the link, which shows the same error as stated. building '_ssl' extension xlc_r -DNDEBUG -O -IInclude -I. -I/usr/local/include -c /aix/Modules/_ssl.c -o build/temp.aix-6.1-3.3/aix/Modules/_ssl.o "/aix/Modules/_ssl.c", line 262.17: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(struct {...}*)" is not allowed. /aix/Modules/ld_so_aix xlc_r -bI:/aix/Modules/python.exp build/temp.aix-6.1-3.3/aix/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.aix-6.1-3.3/_ssl.so ld: 0711-224 WARNING: Duplicate symbol: .bcopy ld: 0711-224 WARNING: Duplicate symbol: .memcpy ld: 0711-224 WARNING: Duplicate symbol: .memmove ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. *** WARNING: importing extension "_ssl" failed with build/lib.aix-6.1-3.3/_ssl.so: : invalid slot offset: I went through google to search for similar issue/solution however no succeeds. Hence I suppose it is a bug. Env: Python: 3.3.2 OpenSSL: 0.9.8y (also tried 0.9.7) OS: AIX 6.1 (also tried on HPUX_1131_IA, same problem) ---------- components: Build messages: 203465 nosy: dellair.jie priority: normal severity: normal status: open title: Python: RuntimeError: invalid slot offset when importing a module type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 11:46:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 10:46:31 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <3dPgYy2NtdzSpt@mail.python.org> Roundup Robot added the comment: New changeset adb471b9cba1 by Christian Heimes in branch 'default': ssue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'. http://hg.python.org/cpython/rev/adb471b9cba1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 11:51:43 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Wed, 20 Nov 2013 10:51:43 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 Message-ID: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> New submission from Leslie P. Polzer: http://hg.python.org/cpython/file/3.3/Lib/smtpd.py#l289 as of now decodes incoming bytes as UTF-8. An SMTP server must not attempt to interpret characters beyond ASCII, however. Originally mail servers were not 8-bit clean, meaning they would only guarantee the lower 7 bits of each octet to be preserved. However even then they were not expected to choke on any input because of attempts to decode it into a specific extended charset. Whenever a mail server does not need to interpret data (like base64-encoded auth information) it is simply left alone and passed through. I am not aware of the reasons that caused the current state, but to correct this behavior and make it possible to support the 8BITMIME feature I suggest decoding received bytes as latin1, leaving it to the user to reinterpret it as UTF-8 or whatever charset they need. Any other simple extended encoding could be used for this, but latin1 is the default in asynchat. The documentation should also mention charset handling. I'll be happy to submit a patch for both code and docs. ---------- components: Library (Lib) messages: 203467 nosy: skypher priority: normal severity: normal status: open title: smtpd.py should not decode utf-8 type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 11:52:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 10:52:31 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1384944751.71.0.224212471156.issue19662@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 11:54:06 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Wed, 20 Nov 2013 10:54:06 +0000 Subject: [issue16462] smtpd should return greeting In-Reply-To: <1352732891.73.0.549374987784.issue16462@psf.upfronthosting.co.za> Message-ID: <1384944846.03.0.170844982984.issue16462@psf.upfronthosting.co.za> Changes by Leslie P. Polzer : ---------- nosy: +lpolzer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 11:54:11 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Wed, 20 Nov 2013 10:54:11 +0000 Subject: [issue12816] smtpd uses library outside of the standard libraries In-Reply-To: <1314002733.23.0.776557128792.issue12816@psf.upfronthosting.co.za> Message-ID: <1384944851.33.0.206565019003.issue12816@psf.upfronthosting.co.za> Changes by Leslie P. Polzer : ---------- nosy: +lpolzer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 11:54:27 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Wed, 20 Nov 2013 10:54:27 +0000 Subject: [issue8503] smtpd SMTPServer does not allow domain filtering In-Reply-To: <1272009372.5.0.274856265398.issue8503@psf.upfronthosting.co.za> Message-ID: <1384944867.1.0.214076856618.issue8503@psf.upfronthosting.co.za> Changes by Leslie P. Polzer : ---------- nosy: +lpolzer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 11:54:37 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Wed, 20 Nov 2013 10:54:37 +0000 Subject: [issue3802] smtpd.py __getaddr insufficient handling In-Reply-To: <1220849998.55.0.777734204126.issue3802@psf.upfronthosting.co.za> Message-ID: <1384944877.75.0.659105469151.issue3802@psf.upfronthosting.co.za> Changes by Leslie P. Polzer : ---------- nosy: +lpolzer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 12:00:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 11:00:44 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <3dPgtM6hSMz7LkB@mail.python.org> Roundup Robot added the comment: New changeset 422ed27b62ce by Christian Heimes in branch 'default': Issue #19183: test_gdb's test_dict was failing on some machines as the order or dict keys has changed again. http://hg.python.org/cpython/rev/422ed27b62ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 12:03:47 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 11:03:47 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384945427.49.0.237824427883.issue19183@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: ncoghlan -> christian.heimes resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 12:28:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 11:28:22 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <3dPhVF5ljLzSFM@mail.python.org> Roundup Robot added the comment: New changeset 11cb1c8faf11 by Victor Stinner in branch 'default': Issue #19183: Fix repr() tests of test_gdb, hash() is now platform dependent http://hg.python.org/cpython/rev/11cb1c8faf11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 12:47:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 11:47:04 +0000 Subject: [issue11489] json.dumps not parsable by json.loads (on Linux only) In-Reply-To: <1300058240.59.0.513243746739.issue11489@psf.upfronthosting.co.za> Message-ID: <1384948024.43.0.274763572554.issue11489@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I there are no objections I'll commit this patch soon. ---------- assignee: -> serhiy.storchaka Added file: http://bugs.python.org/file32718/json_decode_lone_surrogates_3-3.4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 12:48:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 11:48:33 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384948113.88.0.485902496334.issue19183@psf.upfronthosting.co.za> STINNER Victor added the comment: Not only test_gdb relies on repr() exact value, there is also test_functools: http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6875/steps/test/logs/stdio ====================================================================== FAIL: test_repr (test.test_functools.TestPartialC) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_functools.py", line 174, in test_repr repr(f)) AssertionError: 'func[51 chars]88>, b=, [36 chars]00>)' != 'func[51 chars]88>, a=, [36 chars]40>)' - functools.partial(, b=, a=) + functools.partial(, a=, b=) ====================================================================== FAIL: test_repr (test.test_functools.TestPartialCSubclass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_functools.py", line 174, in test_repr repr(f)) AssertionError: 'Part[49 chars]88>, b=, [36 chars]00>)' != 'Part[49 chars]88>, a=, [36 chars]40>)' - PartialSubclass(, b=, a=) + PartialSubclass(, a=, b=) ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 12:49:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 11:49:11 +0000 Subject: [issue18290] json encoder does not support JSONP/JavaScript safe escaping In-Reply-To: <1372049179.79.0.237326954931.issue18290@psf.upfronthosting.co.za> Message-ID: <1384948151.44.0.126658942601.issue18290@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 12:49:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 11:49:13 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <3dPhyJ4XvmzSsT@mail.python.org> Roundup Robot added the comment: New changeset 961d832d8734 by Christian Heimes in branch 'default': Issue #19183: too many tests depend on the sort order of repr(). http://hg.python.org/cpython/rev/961d832d8734 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 13:48:27 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Wed, 20 Nov 2013 12:48:27 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1384951707.17.0.0412521209179.issue19662@psf.upfronthosting.co.za> Leslie P. Polzer added the comment: Patch attached. This also adds some more charset clarification to the docs and corrects a minor spelling issue. It is also conceivable that we add a charset attribute to the class. This should have the safe default of latin1, and some notes in the docs that setting this to utf-8 (and probably other utf-* encodings) is not really standards-compliant. ---------- keywords: +patch Added file: http://bugs.python.org/file32719/smtpd_charset_latin1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 14:38:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 13:38:59 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1384954739.92.0.394953525582.issue19518@psf.upfronthosting.co.za> STINNER Victor added the comment: > PyRun_FileObject() looks misleading, because it works with FILE*, not with a file object. I simply replaced the current suffix with Object(). Only filename is converted from char* to PyObject*. Do you have a better suggestion for the new name? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 14:43:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 13:43:37 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1384955017.03.0.252547232505.issue19506@psf.upfronthosting.co.za> STINNER Victor added the comment: > What is a performance for small chunks? I have no idea. Does it matter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 14:48:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 13:48:25 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1384955305.27.0.438151399506.issue19518@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No I have not a better suggestion. But I afraid that one day you will wanted to extend PyRun_File*() function to work with a general Python file object (perhaps there is such issue already) and then you will encountered a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 14:51:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 13:51:08 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1384955468.26.0.641468850894.issue1065986@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 14:53:53 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 13:53:53 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1384955633.6.0.814798659092.issue19662@psf.upfronthosting.co.za> R. David Murray added the comment: This bug was apparently introduced as part of the work from issue 4184 in python 3.2. My guess, looking at the code, is that the module simply didn't work before that patch, since it would have been attempting to join binary data using a string join (''.join(...)). Richard says in the issue that he wrote tests, so he probably figured out it wasn't working and "fixed" it. It looks like there was no final review of his patch (at least not via the tracker...the patch uploaded to the tracker did not include the decode). Not that a final review would necessarily have caught the bug... The problem here is backward compatibility. In terms of the API, it really ought to be producing binary data, and not decoding at all. But, at the time he wrote the patch the email package couldn't handle binary data (Richard's patch landed in July 2010, binary support in the email package landed in October), so presumably nobody was thinking about binary emails. I'm really not sure what to do here, I'll have to give it some thought. ---------- components: +email nosy: +barry, r.david.murray, richard versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 14:54:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 13:54:27 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1384955667.86.0.561016551342.issue19506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know. But a function call have a cost. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 14:58:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 13:58:29 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1384955909.38.0.823248850038.issue19506@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch without the unwanted change in listobject.c. ---------- Added file: http://bugs.python.org/file32720/subprocess_memoryview-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 14:58:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 13:58:36 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1384955916.27.0.0714138476874.issue19506@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file32714/subprocess_memoryview.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 15:13:57 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 20 Nov 2013 14:13:57 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1384956837.86.0.540271421301.issue19518@psf.upfronthosting.co.za> Nick Coghlan added the comment: Perhaps we could we use the suffix "Unicode" rather than "Object"? These don't work with arbitrary objects, they expect a unicode string. PyRun_InteractiveOneObject would be updated to use the new suffix as well. That would both be clearer for the user, and address Serhiy's concern about the possible ambiguity: PyRun_FileUnicode still isn't crystal clear, but it's clearer than PyRun_FileObject. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 15:17:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 14:17:03 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1384957023.12.0.109975533677.issue19518@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI I already added a bunch of new functions with Object suffix when I replaced char* with PyObject*. Example: http://hg.python.org/cpython/rev/df2fdd42b375 http://bugs.python.org/issue11619 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 15:23:50 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 14:23:50 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1384957430.43.0.0090661211515.issue1065986@psf.upfronthosting.co.za> R. David Murray added the comment: Benjamin: the patch looks pretty good to me, for fixing the problem of docstrings that are explicitly unicode. But before I go to the trouble of a full review and test, is this a level of change you think is acceptable in 2.7 at this point it its lifecycle? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 15:32:09 2013 From: report at bugs.python.org (Martin Panter) Date: Wed, 20 Nov 2013 14:32:09 +0000 Subject: [issue6490] os.popen documentation is probably wrong In-Reply-To: <1247646939.28.0.091306950041.issue6490@psf.upfronthosting.co.za> Message-ID: <1384957929.25.0.384879436972.issue6490@psf.upfronthosting.co.za> Martin Panter added the comment: Please apply Neil Muller?s documentation patch. It is certainly better than the current state. If you want to improve it further, maybe get rid of the trailing comma, and mention that the close() method returns the exit status encoded like the wait() function. ---------- nosy: +vadmium versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 15:33:58 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 20 Nov 2013 14:33:58 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1384955667.86.0.561016551342.issue19506@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Serhiy Storchaka added the comment: > > I don't know. But a function call have a cost. I'm with Serhiy here. Writing a performance optimization without benchmark is generally a bad idea (I won't quote Knuth :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 15:51:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 20 Nov 2013 14:51:57 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1384959117.95.0.617465954788.issue18874@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I made a review at http://bugs.python.org/review/18874/#ps9860 (not sure you got notified). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 15:59:10 2013 From: report at bugs.python.org (Akira Kitada) Date: Wed, 20 Nov 2013 14:59:10 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1384959550.72.0.981624435632.issue1065986@psf.upfronthosting.co.za> Akira Kitada added the comment: Added to html pydoc generates. ---------- Added file: http://bugs.python.org/file32721/issue1065986-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:00:20 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 20 Nov 2013 15:00:20 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1384959620.23.0.50241248539.issue1065986@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Okay with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:02:42 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Wed, 20 Nov 2013 15:02:42 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1384959762.57.0.564114093266.issue19662@psf.upfronthosting.co.za> Leslie P. Polzer added the comment: Since this is my first contribution I'm not entirely sure about the fine details of backwards compatibility in Python, so please forgive me if I'm totally missing the mark here. There are facilities in smtpd's parent class asynchat that perform the necessary conversions automatically if the user sets an encoding, so smtpd should be adjusted to rely on that and thus give the user the opportunity to choose for themselves. Then it boils down to breaking backwards compatibility by setting a default encoding, which could be none as you suggest or latin1 as I suggest; either will probably be painful for current users. My take here is that whoever is using this code for their SMTP server and hasn't given the encoding issues any thought will need to take a look at their code in that respect anyway, so IMHO a break with compatibility might be a bit painful but necessary. If you agree then I will gladly rework the patch to have smtpd work with an underlying byte stream by default, rejecting anything non-ASCII where necessary. Later patches could bring 8BITMIME support to smtpd, with charset conversion as specified by the MIME metadata. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:03:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 20 Nov 2013 15:03:34 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1384957023.12.0.109975533677.issue19518@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Hmm, reading more of those and I think Serhiy is definitely right - Object is the wrong suffix. Unicode isn't right either, since the main problem is that ambiguity around *which* parameter is a Python Unicode object. The API names that end in *StringObject or *FileObject don't give the right idea at all. The shortest accurate suffix I can come up with at the moment is the verbose "WithUnicodeFilename": PyParser_ParseStringObject vs PyParser_ParseStringWithUnicodeFilename Other possibilities: PyParser_ParseStringUnicode # Huh? PyParser_ParseStringDecodedFilename # Slight fib on Windows, but mostly accurate PyParser_ParseStringAnyFilename Inserting an underscore before the suffix is another option (although I don't think it much matters either way). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:11:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 15:11:51 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1384960311.15.0.143372363696.issue19518@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > FYI I already added a bunch of new functions with Object suffix when I replaced char* with PyObject*. Most of them were added in 3.4. Unfortunately several functions were added earlier (e.g. PyImport_ExecCodeModuleObject, PyErr_SetFromErrnoWithFilenameObject). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:17:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 15:17:10 +0000 Subject: [issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter() In-Reply-To: <1384866058.1.0.245171525218.issue19653@psf.upfronthosting.co.za> Message-ID: <1384960630.18.0.21305647645.issue19653@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why would you want to speed up repr()? I'm -1 unless there's an use case. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:26:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 15:26:25 +0000 Subject: [issue19653] Generalize usage of _PyUnicodeWriter for repr(obj): add _PyObject_ReprWriter() In-Reply-To: <1384866058.1.0.245171525218.issue19653@psf.upfronthosting.co.za> Message-ID: <1384961185.02.0.865457822006.issue19653@psf.upfronthosting.co.za> STINNER Victor added the comment: After writing the patch, I realized that it adds a lot of new functions and add more code. Then I asked myself if repr() is really an important function or not :-) 3 other developers ask the same question, so it's probably better to reject this huge patch :-) ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:28:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 15:28:33 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1384961313.64.0.38711232086.issue19654@psf.upfronthosting.co.za> STINNER Victor added the comment: The failures are sporadic, I don't understand how the tests can pass sometimes... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:35:44 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 20 Nov 2013 15:35:44 +0000 Subject: [issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general In-Reply-To: <1373153632.08.0.45299629619.issue18391@psf.upfronthosting.co.za> Message-ID: <1384961744.72.0.855190584697.issue18391@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:39:52 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 20 Nov 2013 15:39:52 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1384961992.44.0.336248695934.issue9246@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:42:18 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 20 Nov 2013 15:42:18 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384962138.82.0.394380426601.issue19572@psf.upfronthosting.co.za> Zachary Ware added the comment: pickletester issue opened at #19648. The test_posix issue already has an open issue at #9246. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:44:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 15:44:57 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <3dPpBK0Wflz7LmG@mail.python.org> Roundup Robot added the comment: New changeset 74b76a726285 by Serhiy Storchaka in branch '3.3': Print Tk patchlevel in test_tcl in verbose mode (issue19654). http://hg.python.org/cpython/rev/74b76a726285 New changeset 1b58f14f5d60 by Serhiy Storchaka in branch 'default': Print Tk patchlevel in test_tcl in verbose mode (issue19654). http://hg.python.org/cpython/rev/1b58f14f5d60 New changeset 78c906600183 by Serhiy Storchaka in branch '2.7': Print Tk patchlevel in test_tcl in verbose mode (issue19654). http://hg.python.org/cpython/rev/78c906600183 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 16:55:14 2013 From: report at bugs.python.org (Andy Dirnberger) Date: Wed, 20 Nov 2013 15:55:14 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384962914.87.0.69338637409.issue19660@psf.upfronthosting.co.za> Changes by Andy Dirnberger : ---------- nosy: +dirn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:06:33 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 16:06:33 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1384963593.51.0.151257606834.issue19662@psf.upfronthosting.co.za> R. David Murray added the comment: I think the only backward compatible solution is to add a switch of *some* sort (exact API TBD), whose default is to continue to decode using utf-8, and document it as wrong. Conversion of an email to unicode should be handled by the email package, not by smtpd, which is why I say smtpd should be emitting binary. As I say, I need to find time to look at the current API in more detail before I'll be comfortable discussing the new API. I've put it on my list, but likely I won't get to it until the weekend. ---------- versions: +Python 3.5 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:10:56 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 16:10:56 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1384963856.3.0.188625216724.issue19662@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, and to clarify: the backward compatibility is that if code works with X.Y.Z, it should work with X.Y.Z+1. So even though correctly handling binary mail would indeed require someone to reexamine their code, if things happen to be working OK for them (eg: their program only needs to handle utf-8 email), we don't want to break their working program. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:23:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 16:23:31 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <3dPq2p4pGKz7Lld@mail.python.org> Roundup Robot added the comment: New changeset 86107e7e6ee5 by Christian Heimes in branch 'default': Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC http://hg.python.org/cpython/rev/86107e7e6ee5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:23:46 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:23:46 +0000 Subject: [issue17276] HMAC: deprecate default hash In-Reply-To: <1361535402.96.0.618065106631.issue17276@psf.upfronthosting.co.za> Message-ID: <1384964626.56.0.693800941151.issue17276@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:24:12 2013 From: report at bugs.python.org (Artem Ustinov) Date: Wed, 20 Nov 2013 16:24:12 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1384964652.31.0.920351683988.issue19462@psf.upfronthosting.co.za> Artem Ustinov added the comment: It does the trick with optionals but not the positionals. How the positional arguments can be removed/hidden? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:25:45 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 20 Nov 2013 16:25:45 +0000 Subject: [issue19663] Not so correct error message when initializing defaultdict Message-ID: <1384964745.34.0.550819526657.issue19663@psf.upfronthosting.co.za> New submission from Vajrasky Kok: >>> from collections import defaultdict >>> defaultdict('') Traceback (most recent call last): File "", line 1, in TypeError: first argument must be callable >>> defaultdict(None) defaultdict(None, {}) >>> None() Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not callable After patch: >>> from collections import defaultdict >>> defaultdict('') Traceback (most recent call last): File "", line 1, in TypeError: first argument must be callable or None ---------- components: Extension Modules files: fix_error_message_default_dict.patch keywords: patch messages: 203500 nosy: rhettinger, vajrasky priority: normal severity: normal status: open title: Not so correct error message when initializing defaultdict type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32722/fix_error_message_default_dict.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:35:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 16:35:16 +0000 Subject: [issue18775] name attribute for HMAC In-Reply-To: <1376843757.16.0.673413061043.issue18775@psf.upfronthosting.co.za> Message-ID: <3dPqJM3Lqxz7Llt@mail.python.org> Roundup Robot added the comment: New changeset 71f4a805d262 by Christian Heimes in branch 'default': Issue #18775: Add name and block_size attribute to HMAC object. They now http://hg.python.org/cpython/rev/71f4a805d262 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:37:19 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:37:19 +0000 Subject: [issue18775] name attribute for HMAC In-Reply-To: <1376843757.16.0.673413061043.issue18775@psf.upfronthosting.co.za> Message-ID: <1384965439.25.0.437169709998.issue18775@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:40:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 16:40:42 +0000 Subject: [issue17791] PC/pyconfig.h defines PREFIX macro In-Reply-To: <1366314379.89.0.227357780835.issue17791@psf.upfronthosting.co.za> Message-ID: <3dPqQd0kxGz7LlR@mail.python.org> Roundup Robot added the comment: New changeset fbd856e817a1 by Christian Heimes in branch 'default': Issue #17791: Drop PREFIX and EXEC_PREFIX definitions from PC/pyconfig.h http://hg.python.org/cpython/rev/fbd856e817a1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:40:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:40:52 +0000 Subject: [issue17791] PC/pyconfig.h defines PREFIX macro In-Reply-To: <1366314379.89.0.227357780835.issue17791@psf.upfronthosting.co.za> Message-ID: <1384965652.8.0.0970453702136.issue17791@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:42:15 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:42:15 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <1384965735.14.0.249253126398.issue19183@psf.upfronthosting.co.za> Christian Heimes added the comment: The problems have been resolved. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:43:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 16:43:32 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <3dPqTv6Nzlz7Ljj@mail.python.org> Roundup Robot added the comment: New changeset cb1691d42101 by Christian Heimes in branch 'default': Issue #16632: Enable DEP and ASLR on Windows. http://hg.python.org/cpython/rev/cb1691d42101 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:44:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:44:21 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1384965861.63.0.47138407961.issue16632@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:45:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:45:33 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1384965933.1.0.547662795465.issue16595@psf.upfronthosting.co.za> Christian Heimes added the comment: Tests are passing on all buildbots for quite some time now. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:47:33 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:47:33 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1384966053.08.0.283170953984.issue18233@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:47:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:47:45 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1384966065.95.0.611473839415.issue16487@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:48:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:48:02 +0000 Subject: [issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates In-Reply-To: <1372100693.76.0.99629035685.issue18293@psf.upfronthosting.co.za> Message-ID: <1384966082.5.0.0248333581123.issue18293@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:50:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:50:12 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1384966212.22.0.203640079241.issue14621@psf.upfronthosting.co.za> Christian Heimes added the comment: The issue has been solved for Python 3.4 with the integration of PEP 456. ---------- stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:50:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 16:50:37 +0000 Subject: [issue1208730] expat binding for XML_ParserReset Message-ID: <1384966237.9.0.944858320259.issue1208730@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: christian.heimes -> versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:50:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 16:50:56 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1384966256.2.0.847033807561.issue18874@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file32549/3bf73dcd0b42.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:50:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 16:50:57 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1384966257.94.0.196461263076.issue18874@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file32547/69fd2d766005.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 17:51:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 16:51:23 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1384966283.63.0.85091867583.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch updated for Charles Fran?ois's comments. ---------- Added file: http://bugs.python.org/file32724/4430e893d89f.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 18:09:42 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 20 Nov 2013 17:09:42 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr Message-ID: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> New submission from Larry Hastings: If you run Lib/test/test_userdict.py enough times, sooner or later it'll produce a spurious error. I wrote a shell script that ran "./python -m test test_userdict" a zillion times; here's a snippet of output from running that script: [...] 1 test OK. [1/1] test_userdict 1 test OK. [1/1] test_userdict 1 test OK. [1/1] test_userdict test test_userdict failed -- Traceback (most recent call last): File "/home/larry/src/python/clinic/Lib/test/test_userdict.py", line 48, in test_all self.assertEqual(repr(u2), repr(d2)) AssertionError: "{'one': 1, 'two': 2}" != "{'two': 2, 'one': 1}" - {'one': 1, 'two': 2} + {'two': 2, 'one': 1} 1 test failed: test_userdict [1/1] test_userdict 1 test OK. [1/1] test_userdict 1 test OK. [...] Line 48 reads as follows: self.assertEqual(repr(u2), repr(d2)) I realize this code is ancient--but it seems to rely on repr of a dict producing consistent output, which is silly and has always been wrong. Raymond, you want to take this? ---------- components: Library (Lib) messages: 203509 nosy: larry, rhettinger priority: normal severity: normal stage: needs patch status: open title: UserDict test assumes ordered dict repr type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 18:10:09 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 20 Nov 2013 17:10:09 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1384967409.65.0.00517086751611.issue13477@psf.upfronthosting.co.za> Berker Peksag added the comment: Attached an updated patch that addresses Serhiy's comments. Thanks! ---------- Added file: http://bugs.python.org/file32725/issue13477_v6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 18:14:01 2013 From: report at bugs.python.org (paul j3) Date: Wed, 20 Nov 2013 17:14:01 +0000 Subject: [issue19462] Add remove_argument() method to argparse.ArgumentParser In-Reply-To: <1383240778.45.0.779487488351.issue19462@psf.upfronthosting.co.za> Message-ID: <1384967641.31.0.601342461049.issue19462@psf.upfronthosting.co.za> paul j3 added the comment: f.nargs = '?' f.default = argparse.SUPPRESS f.help = argparse.SUPPRESS may be best set of tweaks to a positional Action `f`. In quick tests it removes `f` from the help, suppresses any complaints about a missing string, and does not put anything in the namespace. But if there is a string in the input that could match this positional, it will be use. f.nargs = 0 is another option. This puts a `[]` (empty list) in the namespace, since 'nothing' matches `f`. If there is an input string that might have matched it before, you will not get an 'unrecognized argument' error. `parse_known_args` can be used to get around that issue. I should stress, though, that fiddling with `nargs` like this is not part of the API. Tweak this at your own risk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 18:14:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 20 Nov 2013 17:14:30 +0000 Subject: [issue19474] Argument Clinic causing compiler warnings about uninitialized variables In-Reply-To: <1383316332.19.0.314587339416.issue19474@psf.upfronthosting.co.za> Message-ID: <3dPr9d5Mrbz7Lk0@mail.python.org> Roundup Robot added the comment: New changeset 4f0f496e482e by Larry Hastings in branch 'default': Issue #19474: Argument Clinic now always specifies a default value for http://hg.python.org/cpython/rev/4f0f496e482e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 18:14:53 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 20 Nov 2013 17:14:53 +0000 Subject: [issue19474] Argument Clinic causing compiler warnings about uninitialized variables In-Reply-To: <1383316332.19.0.314587339416.issue19474@psf.upfronthosting.co.za> Message-ID: <1384967693.43.0.747305283842.issue19474@psf.upfronthosting.co.za> Larry Hastings added the comment: Sigh. If dataflow analysis could inline the static _impl function, it would notice that there are no code paths where the variable is uninitialized and gets used. But I'm not surprised compilers aren't that sophisticated. So I beat the problem to death with a shoe: now, variables that are in option groups that don't otherwise have a default value always get one. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 18:16:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 17:16:13 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <1384967773.12.0.21268284112.issue19664@psf.upfronthosting.co.za> STINNER Victor added the comment: In test_set, I fixed the issue by parsing repr() output, sorting items and then compare sorted items :-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 19:02:46 2013 From: report at bugs.python.org (Mark Wolf) Date: Wed, 20 Nov 2013 18:02:46 +0000 Subject: [issue19665] test_logging fails with SMTPHandler timeout Message-ID: <1384970566.07.0.397875675827.issue19665@psf.upfronthosting.co.za> New submission from Mark Wolf: Similar to http://bugs.python.org/issue14644 but with Arch Linux instead of OS X. I built python according the dev guide then ran the test suite with `./python -m test -vj3 test_logging` and failed in the SMTPHandlerTest. `self.handled.is_set()` returns false after a 5 second timeout. In one of the comments in the OS X bug linked above, it suggests changing the timeout to 15 seconds. This causes the test to pass (actually anything slightly over 5 sec seems to be okay). Not sure if this is a fragile test or a bug in Lib.logging. The patch ups the timeout by a second, which passes on my machine but might still fail on others if it actually is a fragile test issue. The failing test runner output for test_logging can be found here: https://gist.github.com/m3wolf/7563541 I'm just jumping into python dev for the first time; any constructive comments are appreciated. ---------- components: Tests files: test_logging.patch keywords: patch messages: 203515 nosy: canisdirus priority: normal severity: normal status: open title: test_logging fails with SMTPHandler timeout type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32726/test_logging.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 19:14:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 18:14:16 +0000 Subject: [issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer Message-ID: <1384971256.72.0.0181602551145.issue19666@psf.upfronthosting.co.za> New submission from Christian Heimes: I could use a format string for either ASCII unicode or bytes buffer in a few places, e.g. a* (bytes, bytearray, bytes-like object or ASCII unicode) [Py_buffer] Like y* it should handle PyBUF_SIMPLE with 'C' contiguous but it should only accept one dimensional buffers. In case the object is an ASCII PyUnicode_Object it should return its ASCII data as Py_buffer. ---------- components: Interpreter Core messages: 203516 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Format string for ASCII unicode or bytes-like object as readonly buffer type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 19:19:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 18:19:36 +0000 Subject: [issue19667] Add the "htmlcharrefreplace" error handler Message-ID: <1384971576.04.0.0704268767649.issue19667@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds the htmlcharrefreplace_errors() function which implements the "htmlcharrefreplace" error handler in the html module. This error handler is almost same as the "xmlcharrefreplace" error handler, but first try to replace an unencodable character to HTML named character reference. Result is a little more human-readable than with "xmlcharrefreplace". See also a discussion on Python-Ideas: http://comments.gmane.org/gmane.comp.python.ideas/21307 . ---------- components: Library (Lib) files: htmlcharrefreplace.patch keywords: patch messages: 203517 nosy: ezio.melotti, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add the "htmlcharrefreplace" error handler type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32727/htmlcharrefreplace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 19:20:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 18:20:40 +0000 Subject: [issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer In-Reply-To: <1384971256.72.0.0181602551145.issue19666@psf.upfronthosting.co.za> Message-ID: <1384971640.05.0.860534841016.issue19666@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It seems this would add a dependency to the unicode implementation (other unicode representations may not allow you to take a Py_buffer to the ASCII data). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 19:22:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 18:22:35 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <1384971755.11.0.554895810942.issue19664@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I realize this code is ancient--but it seems to rely on repr of a dict > producing consistent output, which is silly Well, it sounds a bit weird to me... If you're building the dict always in the same way, intuitively it should always produce the same repr() during the same interpreter session. Do you know why it doesn't? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 19:28:00 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 20 Nov 2013 18:28:00 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384972080.14.0.463851501628.issue19572@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file32728/skiptest_not_return_or_pass.v4-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 19:46:21 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 20 Nov 2013 18:46:21 +0000 Subject: [issue13633] Handling of hex character references in HTMLParser.handle_charref In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1384973181.94.0.857162951401.issue13633@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is a patch. It might be also be a good idea to add warning when the option is not explicitly set to False, and change the default to True in 3.5/3.6. ---------- keywords: +patch nosy: +serhiy.storchaka stage: test needed -> patch review Added file: http://bugs.python.org/file32729/issue13633.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:17:37 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 20 Nov 2013 19:17:37 +0000 Subject: [issue13633] Automatically convert character references in HTMLParser In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1384975057.73.0.0839414505153.issue13633@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- title: Handling of hex character references in HTMLParser.handle_charref -> Automatically convert character references in HTMLParser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:18:26 2013 From: report at bugs.python.org (Peyton Sherwood) Date: Wed, 20 Nov 2013 19:18:26 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384975106.86.0.0788249906871.issue19660@psf.upfronthosting.co.za> Changes by Peyton Sherwood : ---------- nosy: +peyton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:20:52 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 19:20:52 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1384975252.98.0.993176952574.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: Vajrasky: thanks for taking a crack at this, but, well, there are a lot of subtleties involved here, due to the way the organic growth of the email package over many years has led to some really bad design issues. It took me a lot of time to boot back up my understanding of how all this stuff hangs together (answer: badly). After wandering down many blind alleys, the problem turns out to be yet one more disconnect in the model. We previously fixed the issue where if set_payload was passed binary data bad things would happen. That made the model more consistent, in that _payload was now a surrogateescaped string when the payload was specified as binary data. But what the model *really* needs is that _payload *always* be an ascii+surrogateescape string, and never a full unicode string. (Yeah, this is a sucky model...it ought to always be binary instead, but we are dealing with legacy code here.) Currently it can be a unicode string. If it is, set_charset turns it into an ascii only string by encoding it with the qp or base64 CTE. This is pretty much just by luck, though. If you set body_encode to None what happens is that the encode_7or8bit encoder thinks the string is 7bit because it does get_payload(decode=True) which, because the model invariant was broken, turns into a raw-unicode-escape string, which is a 7bit representation. That doesn't affect the payload, but it does result in wrong CTE being used. The fix is to fix the model invariant by turning a unicode string passed in to set_payload into an ascii+surrogateescape string with the escaped bytes being the unicode encoded to the output charset. Unfortunately it is also possible to call set_payload without a charset, and *then* call set_charset. To keep from breaking the code of anyone currently doing that, I had to allow a full unicode _payload, and detect it in set_charset. My plan is to fix that in 3.4, causing a backward compatibility break because it will no longer be possible to call set_payload with a unicode string containing non-ascii if you don't also provide a character set. I believe this is an acceptable break, since otherwise you *must* leave the model in an ambiguous state, and you have the possibility "leaking" unicode characters out into your wire-format message, which would ultimately result in either an exception at serialization time or, worse, mojibake. Patch attached. ---------- stage: -> patch review type: -> behavior versions: -Python 3.2 Added file: http://bugs.python.org/file32730/support_8bit_charset_cte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:24:21 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 19:24:21 +0000 Subject: [issue18138] ssl.SSLContext.add_cert() In-Reply-To: <1370397033.84.0.295479011719.issue18138@psf.upfronthosting.co.za> Message-ID: <1384975461.62.0.88434315391.issue18138@psf.upfronthosting.co.za> Christian Heimes added the comment: I think the patch in #16487 does too many things at once. The new patch is a draft for a new patch that adds SSLContext.load_verify_locations(cadata) to the SSL module. cadata can be a bunch of PEM encoded certs (ASCII) or DER encoded certs (bytes-like). The patch may contain bugs as I haven't verified all error paths yet. ---------- Added file: http://bugs.python.org/file32731/ssl_cadata.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:27:42 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 19:27:42 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1384975662.61.0.980552802037.issue19063@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file32730/support_8bit_charset_cte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:28:03 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 19:28:03 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1384975683.85.0.461565122546.issue19063@psf.upfronthosting.co.za> Changes by R. David Murray : Added file: http://bugs.python.org/file32732/support_8bit_charset_cte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:35:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 19:35:02 +0000 Subject: [issue19668] Add support of the cp1125 encoding Message-ID: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds support of the CP1125 encoding. The CP1125 encoding (also known as IBM866, CP866U (in Microsoft), 866nav (in TeX), RUSCII) is standard DOS encoding for Ukrainian language. It is only one DOS encoding (or at least most popular) suitable for Ukrainian. It is Ukrainian government standard for DOS. The CP1125 encoding differs from CP866 encoding only in 6 codes for Ukrainian letters. http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp01125z.pdf http://cp866u.codeplex.com/ ftp://tug.org/texlive/Contents/live/texmf-dist/tex/latex/cyrillic/cp866nav.def http://segfault.kiev.ua/cyrillic-encodings/#ruscii ---------- components: Unicode files: encoding_cp1125.patch keywords: patch messages: 203523 nosy: doerwalter, ezio.melotti, haypo, lemburg, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add support of the cp1125 encoding type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32733/encoding_cp1125.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:35:16 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 20 Nov 2013 19:35:16 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <1384976116.94.0.442795145588.issue19664@psf.upfronthosting.co.za> Larry Hastings added the comment: I don't know for sure--I haven't stepped through it--but here's an informed guess. It relies on key collision. The first dict is created the normal way. It contains two values, "one" (set to 1) and "two" (set to 2), inserted in that order. The second dict is created by calling dict.update(), passing in the first dict. update() iterates over the keys of the dict's hash table with a simple for(;;) loop, copying the key and value each time. The order is effectively random. The repr() then iterates over the keys using the same simple for(;;) loop, spitting out key=value strings. Let's assume that the keys collide. "one" is inserted first, so it gets its first choice. "two" is inserted second so it must probe. Let's assume that its second choice is a key slot *lower* (nearer to [0]) than "one". Now when we use update(), the for(;;) loop sees "two" first. So "two" gets its first choice, which means "one" must now probe. If "one"'s second choice is a key slot *higher* (further from [0]) than "two", we'll see the behavior. (Why does this only happen sometimes? Because we're using "hash randomization".) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:40:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 19:40:45 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384976116.94.0.442795145588.issue19664@psf.upfronthosting.co.za> Message-ID: <1384976442.2311.2.camel@fsol> Antoine Pitrou added the comment: > I don't know for sure--I haven't stepped through it--but here's an > informed guess. It relies on key collision. Ok, I see. The frequency of the errors then depends on the frequency of collisions for two fixed keys and a varying hash seed... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 20:48:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 20 Nov 2013 19:48:50 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1384976930.85.0.243301596885.issue19572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: skiptest_not_return_or_pass.v4-3.3.diff LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 21:20:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 20:20:25 +0000 Subject: [issue19669] remove mention of the old LaTeX docs Message-ID: <1384978825.66.0.587760682432.issue19669@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The devguide mentions the old LaTeX doc format: http://docs.python.org/devguide/documenting.html#differences-to-the-latex-markup This doesn't really sound useful anymore, so many years later. ---------- assignee: docs at python components: Devguide, Documentation messages: 203527 nosy: docs at python, ezio.melotti, fdrake, georg.brandl, pitrou priority: low severity: normal status: open title: remove mention of the old LaTeX docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 21:23:07 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 20 Nov 2013 20:23:07 +0000 Subject: [issue19669] remove mention of the old LaTeX docs In-Reply-To: <1384978825.66.0.587760682432.issue19669@psf.upfronthosting.co.za> Message-ID: <1384978987.88.0.686066233988.issue19669@psf.upfronthosting.co.za> Ezio Melotti added the comment: SGTM. ---------- keywords: +easy stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 21:23:24 2013 From: report at bugs.python.org (Patrick Bogen) Date: Wed, 20 Nov 2013 20:23:24 +0000 Subject: [issue19670] SimpleCookie Generates Non-RFC6265-Compliant Cookies Message-ID: <1384979004.61.0.0353093814459.issue19670@psf.upfronthosting.co.za> New submission from Patrick Bogen: SimpleCookie uses _quote to quote cookie values, which converts special characters to \OCTAL notation. This is not RFC6265 compliance, which requires- in part- that cookie values do not contain backslashes: cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E ; US-ASCII characters excluding CTLs, ; whitespace DQUOTE, comma, semicolon, ; and backslash ---------- components: Library (Lib) messages: 203529 nosy: pdbogen priority: normal severity: normal status: open title: SimpleCookie Generates Non-RFC6265-Compliant Cookies type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 21:34:08 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 20 Nov 2013 20:34:08 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1384979648.78.0.829084765506.issue1065986@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. One thing: did you mean assertEqual in Lib/test/test_pydoc.py:466: self.assertTrue(open('pipe').read(), pydoc._encode(doc)) ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 21:36:04 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 20 Nov 2013 20:36:04 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384979764.22.0.347965146811.issue19660@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for this! Tests should exercise the now-valid syntaxes, which also need documentation. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 21:37:06 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 20 Nov 2013 20:37:06 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384979826.98.0.515278910554.issue19660@psf.upfronthosting.co.za> ?ric Araujo added the comment: On second thought, as this patch allows one form that Guido doesn?t want (bar().foo()), maybe there should be a discussion on python-ideas. ---------- nosy: +nick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 21:37:34 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 20 Nov 2013 20:37:34 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384979854.27.0.14976215687.issue19660@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +ncoghlan -nick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 22:29:40 2013 From: report at bugs.python.org (Sworddragon) Date: Wed, 20 Nov 2013 21:29:40 +0000 Subject: [issue19671] Option to select the optimization level on compileall Message-ID: <1384982980.31.0.989044075216.issue19671@psf.upfronthosting.co.za> New submission from Sworddragon: Currently on calling one of the compileall functions it is not possible to pass the optimization level as argument. The bytecode will be created depending of the optimization level of the current script instance. But if a script wants to compile .pyc files for one destination and .pyo files for another destination this will be a little tricky. ---------- components: Library (Lib) messages: 203533 nosy: Sworddragon priority: normal severity: normal status: open title: Option to select the optimization level on compileall type: enhancement versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 22:44:03 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 20 Nov 2013 21:44:03 +0000 Subject: [issue13633] Automatically convert character references in HTMLParser In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1384983843.22.0.0043349184473.issue13633@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: -eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 22:47:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 21:47:06 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1384984026.11.0.622605088373.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Charles-Fran?ois doesn't like packed structure (frame_t) because he fears crash on architectures not supporting non-aligned memory access or bad performances. Antoine and me want them to reduce the memory footprint of the tracemalloc module (tracemalloc.get_tracemalloc_memory()). I think that the memory footprint has an higher price than the performances for tracemalloc: I can wait longer for a result, whereas I may not be able to use tracemalloc if it uses too much memory. I propose to pack frame_t structure, and only disable it explicitly on architectures where tracemalloc does crash. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 22:49:29 2013 From: report at bugs.python.org (Sworddragon) Date: Wed, 20 Nov 2013 21:49:29 +0000 Subject: [issue19672] Listing of all exceptions for every function Message-ID: <1384984169.87.0.182568254733.issue19672@psf.upfronthosting.co.za> New submission from Sworddragon: Currently the documentation does sometimes say about specific exceptions but most times not. As I'm often catching exceptions to ensure a high stability this gets a little difficult. For example print() can trigger a BrokenPipeError and the most file functions like flush() can trigger other related IOError's. So I would like to see something like a listing on every function which contains all exceptions that may appear. Also there are some special cases like close(). For example it can trigger an IOError too if there are pending write operations due to an implicit call of flush(). But if the file object is opened in read-only mode or there are no write operations this can't happen. Maybe such additional information can be added too. ---------- assignee: docs at python components: Documentation messages: 203535 nosy: Sworddragon, docs at python priority: normal severity: normal status: open title: Listing of all exceptions for every function type: enhancement versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 22:52:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Nov 2013 21:52:18 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1384984338.82.0.56793156852.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: pack.patch: Patch to pack frame_t structure. I tested tracemalloc with packed structure on Linux/AMD64, FreeBSD/AMD64, OpenBSD/AMD64, OpenIndiana/AMD64, Windows/x86 (Windows 7 64-bit with Python compiled in 32-bit). I don't have access to SPARC. ---------- Added file: http://bugs.python.org/file32734/pack.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:02:54 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 20 Nov 2013 22:02:54 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384984974.59.0.740444810879.issue16596@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Hopefully issue16596_nostate_4.diff should fix this. The patch issues a StopIteration debug event in ceval.c (similar to the change made in the previous patch for the for loop), when the subgenerator is exhausted. This debug event is printed as 'Internal StopIteration' by pdb to indicate that it is not a real user exception. Two tests have been added: test 'next' when returning from a generator in a for loop and 'test' next when returning from a subgenerator. ---------- Added file: http://bugs.python.org/file32735/issue16596_nostate_4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:04:14 2013 From: report at bugs.python.org (Martin Panter) Date: Wed, 20 Nov 2013 22:04:14 +0000 Subject: [issue19656] Add Py3k warning for non-ascii bytes literals In-Reply-To: <1384884587.46.0.636196916046.issue19656@psf.upfronthosting.co.za> Message-ID: <1384985054.01.0.659495867581.issue19656@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:12:45 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 20 Nov 2013 22:12:45 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384985565.54.0.120934958637.issue19660@psf.upfronthosting.co.za> Nick Coghlan added the comment: Nice! As a syntax change (albeit a minor one), I believe this will require a PEP for Python 3.5. I know Guido indicated he was OK with relaxing the current restrictions, but I don't remember exactly where he said it, or how far he was willing to relax them. ---------- nosy: +Guido.van.Rossum versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:15:47 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 20 Nov 2013 22:15:47 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384985747.38.0.838068020753.issue19660@psf.upfronthosting.co.za> Guido van Rossum added the comment: I don't feel very strongly, but I do think that most of the things the new syntax allows are not improvements -- they make the decorator harder to read. It was intentional to force you to compute a variable before you can use it as a decorator, e.g. spamify = (spam if p else eggs) @spamify def f(): pass ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:20:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 22:20:46 +0000 Subject: [issue19673] PEP 428 implementation Message-ID: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Here is a patch integrating pathlib and its docs. Note that this was already briefly reviewed by Guido. ---------- components: Library (Lib) files: pathlib.patch keywords: patch messages: 203540 nosy: larry, pitrou priority: release blocker severity: normal stage: patch review status: open title: PEP 428 implementation type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32736/pathlib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:25:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 20 Nov 2013 22:25:22 +0000 Subject: [issue18138] ctx.load_verify_locations(cadata) In-Reply-To: <1370397033.84.0.295479011719.issue18138@psf.upfronthosting.co.za> Message-ID: <1384986322.73.0.852080105315.issue18138@psf.upfronthosting.co.za> Christian Heimes added the comment: Final patch ---------- title: ssl.SSLContext.add_cert() -> ctx.load_verify_locations(cadata) Added file: http://bugs.python.org/file32737/ssl_cadata2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:39:38 2013 From: report at bugs.python.org (Martin Panter) Date: Wed, 20 Nov 2013 22:39:38 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1384987178.02.0.22004357559.issue15204@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:45:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 20 Nov 2013 22:45:50 +0000 Subject: [issue19667] Add the "htmlcharrefreplace" error handler In-Reply-To: <1384971576.04.0.0704268767649.issue19667@psf.upfronthosting.co.za> Message-ID: <1384987550.29.0.771934014224.issue19667@psf.upfronthosting.co.za> Ezio Melotti added the comment: As I wrote in the thread, I don't like this too much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 20 23:46:53 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 20 Nov 2013 22:46:53 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1384987613.34.0.923696700928.issue16596@psf.upfronthosting.co.za> Guido van Rossum added the comment: This version works beautifully in that scenario! Does anyone else reading this bug report object to this being committed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 00:04:09 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 23:04:09 +0000 Subject: [issue19672] Listing of all exceptions for every function In-Reply-To: <1384984169.87.0.182568254733.issue19672@psf.upfronthosting.co.za> Message-ID: <1384988649.73.0.370265228503.issue19672@psf.upfronthosting.co.za> R. David Murray added the comment: This is not something we are going to do. We don't know what every exception is that every function can raise. Adding mentions of unusual special cases that aren't currently documented would be OK, though. You should open specific issues for things you think should be clarified. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 00:21:58 2013 From: report at bugs.python.org (Sworddragon) Date: Wed, 20 Nov 2013 23:21:58 +0000 Subject: [issue19672] Listing of all exceptions for every function In-Reply-To: <1384984169.87.0.182568254733.issue19672@psf.upfronthosting.co.za> Message-ID: <1384989718.5.0.51375065517.issue19672@psf.upfronthosting.co.za> Sworddragon added the comment: I'm fine with this decision as it will be really much work. But this also means programming with Python isn't considered for high stability applications - due to the lack of important informations in the documentation. An alternate way would be to rely on error codes and abandon exceptions. But this would be a case for a PEP and I'm assuming that it is absolutely unrealistic that this will be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 00:30:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Nov 2013 23:30:06 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1384990206.28.0.440976174458.issue17810@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +larry priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 00:30:47 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Nov 2013 23:30:47 +0000 Subject: [issue19672] Listing of all exceptions for every function In-Reply-To: <1384984169.87.0.182568254733.issue19672@psf.upfronthosting.co.za> Message-ID: <1384990247.22.0.790464448967.issue19672@psf.upfronthosting.co.za> R. David Murray added the comment: If switching to error codes would solve your problem, then catching Exception at appropriate places should also solve your problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 00:35:16 2013 From: report at bugs.python.org (Sworddragon) Date: Wed, 20 Nov 2013 23:35:16 +0000 Subject: [issue19672] Listing of all exceptions for every function In-Reply-To: <1384984169.87.0.182568254733.issue19672@psf.upfronthosting.co.za> Message-ID: <1384990516.06.0.306716455738.issue19672@psf.upfronthosting.co.za> Sworddragon added the comment: Correct, but the second part of my last message was just my opinion that I would prefer error codes over exceptions because it implies already a completed documentation for this part due to return codes/error arguments/other potential ways. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 00:43:40 2013 From: report at bugs.python.org (Akira Kitada) Date: Wed, 20 Nov 2013 23:43:40 +0000 Subject: [issue1065986] Fix pydoc crashing on unicode strings Message-ID: <1384991020.59.0.238001701764.issue1065986@psf.upfronthosting.co.za> Akira Kitada added the comment: Good catch. Fixed. ---------- Added file: http://bugs.python.org/file32738/issue1065986-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 00:52:27 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 20 Nov 2013 23:52:27 +0000 Subject: [issue19674] Add introspection information for builtins Message-ID: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> New submission from Larry Hastings: Let's see if we can get introspection information for builtins using the Clinic for 3.4. Georg suggested part of the approach while we were hanging out in Tokyo. I'd considered it previously before but dispensed with the idea because it seemed too loopy. Actually it seems to work great. The approach: * Clinic generates an extra first line for the docstring, that looks like "def (...)\n". (Note: no function name!) * The PyCFunctionObject __doc__ getter detects this line and skips it if present. * Add a new getter to PyCFunctionObject, which I've called "__textsig__", that returns this first line if present in the docstring. (It skips the "def " at the front, and clips it at the newline.) * inspect now notices if it's passed in a PyCFunctionObject. If it gets one, it checks to see if it has a valid __textsig__. If it does, it parses it (using ast.parse) and produces a valid signature. Advantages of this approach: * It was easy to do and took very few lines of code. * For signatures that are impossible to convert to Clinic, we can write the metadata by hand. Disadvantages of this approach: * Uh, nothing, really! The next step is probably to convert pydoc to use inspect.signature instead of the manky old methods it currently uses. After that, clean up the patch, and add a unit test or two. What do you think? ---------- assignee: larry components: Interpreter Core files: larry.introspection.for.builtins.patch.1.txt messages: 203549 nosy: brett.cannon, georg.brandl, gvanrossum, larry priority: normal severity: normal stage: patch review status: open title: Add introspection information for builtins type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32739/larry.introspection.for.builtins.patch.1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 00:59:24 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 20 Nov 2013 23:59:24 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1384991964.75.0.100777728541.issue19674@psf.upfronthosting.co.za> Larry Hastings added the comment: If you review, you can ignore the changes to the .c files, those only got touched because of the new autogenerated "def (" lines in the docstrings. No other changes there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 01:00:08 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 21 Nov 2013 00:00:08 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1384992008.5.0.979840117721.issue19674@psf.upfronthosting.co.za> Larry Hastings added the comment: (Well, except for Object/methodobject.c.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 01:53:31 2013 From: report at bugs.python.org (Julian Gindi) Date: Thu, 21 Nov 2013 00:53:31 +0000 Subject: [issue17951] TypeError during gdb backtracing In-Reply-To: <1368228204.29.0.543705311064.issue17951@psf.upfronthosting.co.za> Message-ID: <1384995211.15.0.00680026739731.issue17951@psf.upfronthosting.co.za> Julian Gindi added the comment: Could you provide some more details on how to reproduce this issue? If I am able to reproduce the issue, I'll write a few unit tests and get this patch rolling again. ---------- nosy: +Julian.Gindi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 02:08:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Nov 2013 01:08:02 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1384996082.36.0.557258818254.issue19673@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New patch with a whatsnew entry. ---------- Added file: http://bugs.python.org/file32740/pathlib2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 02:34:13 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 21 Nov 2013 01:34:13 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384997653.57.0.870436124115.issue19660@psf.upfronthosting.co.za> Eric Snow added the comment: > they make the decorator harder to read. I agree. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 02:36:22 2013 From: report at bugs.python.org (James Powell) Date: Thu, 21 Nov 2013 01:36:22 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1384997782.98.0.228351558707.issue19660@psf.upfronthosting.co.za> James Powell added the comment: I see this as removing a restriction and a special-case from the decorator syntax (noting, of course, that these were introduced deliberately.) In terms of whether the new forms are improvements, my preference is to leave this up to the judgement of the programmer, moderated of course by their prevailing coding guide. I would argue that this change does not force any additional complexity on the programmer (who is free to take or leave it) or on the interpreter (- the straightforwardness of the patch corroborates this.) I would also argue that there are certainly cases where, in the midst of some large codebase, the dotted_name restriction may seem a bit arbitrary. This is likely true for: class Foo: def bar(self, func): return func @staticmethod def baz(func): return func @staticmethod def quux(): def dec(func): return func return dec # invalid @Foo().bar def f(): pass # valid @Foo.baz def f(): pass # valid @Foo.quux() def f(): pass For completeness' sake, I have attached a patch with an additional unit test and amended documentation. Should we proceed with writing a PEP for Python 3.5? ---------- Added file: http://bugs.python.org/file32741/decorator-syntax.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 02:52:19 2013 From: report at bugs.python.org (Dustin Oprea) Date: Thu, 21 Nov 2013 01:52:19 +0000 Subject: [issue19675] Pool dies with excessive workers, but does not cleanup Message-ID: <1384998739.89.0.441869255184.issue19675@psf.upfronthosting.co.za> New submission from Dustin Oprea: If you provide a number of processes to a Pool that the OS can't fulfill, Pool will raise an OSError and die, but does not cleanup any of the processes that it has forked. This is a session in Python where I can allocate a large, but fulfillable, number of processes (just to exhibit what's possible in my current system): >>> from multiprocessing import Pool >>> p = Pool(500) >>> p.close() >>> p.join() Now, this is a request that will fail. However, even after this fails, I can't allocate even a single worker: >>> p = Pool(700) Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/__init__.py", line 232, in Pool return Pool(processes, initializer, initargs, maxtasksperchild) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 159, in __init__ self._repopulate_pool() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 222, in _repopulate_pool w.start() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 130, in start self._popen = Popen(self) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/forking.py", line 121, in __init__ self.pid = os.fork() OSError: [Errno 35] Resource temporarily unavailable >>> p = Pool(1) Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/__init__.py", line 232, in Pool return Pool(processes, initializer, initargs, maxtasksperchild) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 159, in __init__ self._repopulate_pool() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 222, in _repopulate_pool w.start() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 130, in start self._popen = Popen(self) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/forking.py", line 121, in __init__ self.pid = os.fork() OSError: [Errno 35] Resource temporarily unavailable The only way to clean this up is to close the parent (the interpreter). I'm submitting a patch for 2.7.6 that intercepts exceptions and cleans-up the workers before bubbling. The affected method is _repopulate_pool(), and appears to be the same in 2.7.6, 3.3.3, and probably every other recent version of Python. This is the old version: for i in range(self._processes - len(self._pool)): w = self.Process(target=worker, args=(self._inqueue, self._outqueue, self._initializer, self._initargs, self._maxtasksperchild) ) self._pool.append(w) w.name = w.name.replace('Process', 'PoolWorker') w.daemon = True w.start() debug('added worker') This is the new version: try: for i in range(self._processes - len(self._pool)): w = self.Process(target=worker, args=(self._inqueue, self._outqueue, self._initializer, self._initargs, self._maxtasksperchild) ) self._pool.append(w) w.name = w.name.replace('Process', 'PoolWorker') w.daemon = True w.start() debug('added worker') except: debug("Process creation error. Cleaning-up (%d) workers." % (len(self._pool))) for process in self._pool: if process.is_alive() is False: continue process.terminate() process.join() debug("Processing cleaning-up. Bubbling error.") raise This is what happens, now: I can go from requesting a number that's too high to immediately requesting one that's also high but within limits, and there's now no problem as all resources have been freed: >>> from multiprocessing import Pool >>> p = Pool(700) Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/__init__.py", line 232, in Pool return Pool(processes, initializer, initargs, maxtasksperchild) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 159, in __init__ self._repopulate_pool() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 224, in _repopulate_pool w.start() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 130, in start self._popen = Popen(self) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/forking.py", line 121, in __init__ self.pid = os.fork() OSError: [Errno 35] Resource temporarily unavailable >>> p = Pool(500) >>> p.close() >>> p.join() ---------- components: Library (Lib) files: pool.py.patch_2.7.6_20131120-1959 messages: 203556 nosy: dsoprea priority: normal severity: normal status: open title: Pool dies with excessive workers, but does not cleanup type: resource usage versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32742/pool.py.patch_2.7.6_20131120-1959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 02:57:22 2013 From: report at bugs.python.org (Martin Panter) Date: Thu, 21 Nov 2013 01:57:22 +0000 Subject: [issue6490] os.popen documentation is probably wrong In-Reply-To: <1247646939.28.0.091306950041.issue6490@psf.upfronthosting.co.za> Message-ID: <1384999042.16.0.332040785272.issue6490@psf.upfronthosting.co.za> Martin Panter added the comment: Also it would be good to document that it returns a text stream, not a binary stream. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:15:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 02:15:24 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <1385000124.46.0.0219774862161.issue19668@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #19459. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:18:03 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 21 Nov 2013 02:18:03 +0000 Subject: [issue19675] Pool dies with excessive workers, but does not cleanup In-Reply-To: <1384998739.89.0.441869255184.issue19675@psf.upfronthosting.co.za> Message-ID: <1385000283.69.0.0116829808779.issue19675@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- keywords: +patch nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:19:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 02:19:06 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <1385000346.07.0.990262682886.issue19668@psf.upfronthosting.co.za> STINNER Victor added the comment: > The proposed patch adds support of the CP1125 encoding. Nowadays, a good motivation for supporting a new codec is to be able to start Python 3. For example, I added cp65001 because some using try Python 3 with this Windows code page. It looks like at least one user is unable to start Python 3 because he/she uses GEORGIAN-PS as the locale encoding (issue #19459). For cp1125: is it used as the ANSI code page on Windows? Otherwise, how do you use this encoding. Supporting all encodings in the world is meaningless because they are too many encodings. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:22:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 02:22:03 +0000 Subject: [issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer In-Reply-To: <1384971256.72.0.0181602551145.issue19666@psf.upfronthosting.co.za> Message-ID: <1385000523.55.0.815205526153.issue19666@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:22:48 2013 From: report at bugs.python.org (koobs) Date: Thu, 21 Nov 2013 02:22:48 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <1385000568.66.0.788700882902.issue19599@psf.upfronthosting.co.za> koobs added the comment: 2.7 builds are failing on koobs-freebsd9 buildbot since ba7d53b5f3de ------------------------ test_multiprocessing [74777 refs] test test_multiprocessing failed -- Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd9/build/Lib/test/test_multiprocessing.py", line 1194, in test_terminate self.assertTrue(join.elapsed < 0.2) AssertionError: False is not true 1 test failed: test_multiprocessing ------------------------ Full log of build #116 attached. ---------- nosy: +koobs Added file: http://bugs.python.org/file32743/koobs-freebsd9-py27-build116.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:23:34 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 02:23:34 +0000 Subject: [issue19661] Python: RuntimeError: invalid slot offset when importing a module In-Reply-To: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> Message-ID: <1385000614.59.0.751923007639.issue19661@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:26:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 02:26:28 +0000 Subject: [issue19661] Python: RuntimeError: invalid slot offset when importing a module In-Reply-To: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> Message-ID: <1385000788.6.0.791064277246.issue19661@psf.upfronthosting.co.za> STINNER Victor added the comment: This warning is interesting: "/aix/Modules/_ssl.c", line 262.17: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(struct {...}*)" is not allowed. It looks like the following line: static PyType_Slot sslerror_type_slots[] = { {Py_tp_base, NULL}, /* Filled out in module init as it's not a constant */ <===== HERE ===== {Py_tp_doc, SSLError_doc}, {Py_tp_str, SSLError_str}, {0, 0}, }; NULL is replaced in PyInit__ssl(): sslerror_type_slots[0].pfunc = PyExc_OSError; ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:26:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 02:26:45 +0000 Subject: [issue19661] AIX: Python: RuntimeError "invalid slot offset when importing a module" in _ssl module In-Reply-To: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> Message-ID: <1385000805.33.0.588208061871.issue19661@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Python: RuntimeError: invalid slot offset when importing a module -> AIX: Python: RuntimeError "invalid slot offset when importing a module" in _ssl module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:30:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 02:30:22 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385001022.8.0.173689263064.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch implements SSLContext.verify_flags in order to enable CRL checks. It comes with documentation, a unit test and a new CRL file. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file32744/verify_flags_crl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:31:33 2013 From: report at bugs.python.org (James Powell) Date: Thu, 21 Nov 2013 02:31:33 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1385001093.83.0.131108516486.issue19660@psf.upfronthosting.co.za> Changes by James Powell : Added file: http://bugs.python.org/file32745/decorator-syntax.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:34:09 2013 From: report at bugs.python.org (koobs) Date: Thu, 21 Nov 2013 02:34:09 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <1385001249.47.0.911842887928.issue19599@psf.upfronthosting.co.za> koobs added the comment: koobs-freebsd10 (2.7) is also seeing identical test failures since the change (slightly more intermittent than freebsd9) Is the increased sleep period now bumping against a test timing threshold (0.2) ? ====================================================================== FAIL: test_terminate (test.test_multiprocessing.WithThreadsTestPool) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/koobs-freebsd10/2.7.koobs-freebsd10/build/Lib/test/test_multiprocessing.py", line 1194, in test_terminate self.assertTrue(join.elapsed < 0.2) AssertionError: False is not true ---------------------------------------------------------------------- Full build log of #236 attached Adding 3.3 and 2.7 to versions since changes were backported ---------- versions: +Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32746/koobs-freebsd10-py27-build236.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:35:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 02:35:11 +0000 Subject: [issue18138] ctx.load_verify_locations(cadata) In-Reply-To: <1370397033.84.0.295479011719.issue18138@psf.upfronthosting.co.za> Message-ID: <3dQ4cZ3bLvz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 234e3c8dc52f by Christian Heimes in branch 'default': Issue #18138: Implement cadata argument of SSLContext.load_verify_location() http://hg.python.org/cpython/rev/234e3c8dc52f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:36:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 02:36:13 +0000 Subject: [issue18138] ctx.load_verify_locations(cadata) In-Reply-To: <1370397033.84.0.295479011719.issue18138@psf.upfronthosting.co.za> Message-ID: <1385001373.47.0.44489244193.issue18138@psf.upfronthosting.co.za> Christian Heimes added the comment: Memo to me: update whatsnew ---------- assignee: -> christian.heimes resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:40:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 02:40:29 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs In-Reply-To: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> Message-ID: <3dQ4kg6MpCz7LkF@mail.python.org> Roundup Robot added the comment: New changeset 468d18bffdea by Christian Heimes in branch 'default': Issue #18379: SSLSocket.getpeercert() returns CA issuer AIA fields, OCSP http://hg.python.org/cpython/rev/468d18bffdea ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:41:01 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 02:41:01 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs In-Reply-To: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> Message-ID: <1385001661.38.0.921425974865.issue18379@psf.upfronthosting.co.za> Christian Heimes added the comment: memo to me: update whatsnew ---------- assignee: -> christian.heimes resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 03:43:46 2013 From: report at bugs.python.org (David Edelsohn) Date: Thu, 21 Nov 2013 02:43:46 +0000 Subject: [issue19661] AIX: Python: RuntimeError "invalid slot offset when importing a module" in _ssl module In-Reply-To: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> Message-ID: <1385001826.37.0.781147272407.issue19661@psf.upfronthosting.co.za> David Edelsohn added the comment: Can you try compiling the module using xlc_r without -O ? One possible guess is XLC optimizations can speculate through NULL pointers because AIX maps address 0 as valid in processes. I don't know why Python is finding an invalid value in the structure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 04:32:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 03:32:27 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384997782.98.0.228351558707.issue19660@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Yes, a PEP for 3.5 on this will be valuable, whether it's accepted or not (although I personally favour moving these restrictions out of the compiler and into the PEP 8 style guide). If I recall the past python-ideas threads correctly, the main objections to the current syntax restrictions were: - you can't look up decorators through a registry by default, since "@registry[name]" is disallowed - it's not really a limitation anyway, since a pass through function still lets you write whatever you want: def deco(x): return x @deco(registry[name]) def f(): ... Now that the precedent of keeping decorator expressions simple has been well and truly established, simplification of the grammar is the main reason removing the special casing of decorator syntax from the compilation toolchain appeals to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 05:02:47 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 Nov 2013 04:02:47 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385006567.29.0.535696737419.issue19588@psf.upfronthosting.co.za> Zachary Ware added the comment: The patch looks good to me, Julian. Have you signed a contributor agreement? If you haven't done so yet and are planning on contributing anything more than the most trivial of changes, you'll need to do so (see http://www.python.org/psf/contrib/). ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 05:06:11 2013 From: report at bugs.python.org (Julian Gindi) Date: Thu, 21 Nov 2013 04:06:11 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385006771.99.0.107389529401.issue19588@psf.upfronthosting.co.za> Julian Gindi added the comment: Awesome! I signed the contributor agreement today via "E-sign". I look forward to making more significant contributions soon :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 05:11:06 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 Nov 2013 04:11:06 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385007066.89.0.0665840078141.issue19588@psf.upfronthosting.co.za> Zachary Ware added the comment: Hmm, actually, I take it back...this is half of the needed patch :). There's another test method of the same name in MersenneTwister_TestBasicOps, with the same issue. But this half looks good! I'll leave a comment on Rietveld (which will send you a 'review' email) pointing out the other test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 05:38:53 2013 From: report at bugs.python.org (Tim Peters) Date: Thu, 21 Nov 2013 04:38:53 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385008733.25.0.332053731655.issue19588@psf.upfronthosting.co.za> Tim Peters added the comment: Yup, the patch is semantically correct. But I'd also swap the order of the `start =` and `stop =` lines - *everyone* expects `start` to be set first ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 05:58:09 2013 From: report at bugs.python.org (Julian Gindi) Date: Thu, 21 Nov 2013 04:58:09 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385009889.4.0.0139714593802.issue19588@psf.upfronthosting.co.za> Julian Gindi added the comment: That makes perfect sense :) Here is an updated patch. I also made the change to the other test of the same name in MersenneTwister_TestBasicOps ---------- Added file: http://bugs.python.org/file32747/issue19588_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 06:35:28 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 21 Nov 2013 05:35:28 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385012128.81.0.958526180157.issue19674@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 06:45:00 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 21 Nov 2013 05:45:00 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1385012128.85.0.734071185902.issue19674@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I think there's a similar but slightly different convention in Sphinx autodoc -- the first line of the docstring can be "name(...)" . Isn't that better than def? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 06:50:40 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 21 Nov 2013 05:50:40 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385013040.29.0.0717638678859.issue19674@psf.upfronthosting.co.za> Larry Hastings added the comment: I was deliberately trying to avoid something that a person might do by accident. Also, "def (" is consistently only five bytes, whereas "pterodactyl (" or whatever will often be much longer, in case static data size is a concern. But I could switch it to that if you think that's better. Certainly it's a tiny amount more readable. (I don't think this would make the docstrings compatible with sphinx autodoc though.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 07:20:47 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 21 Nov 2013 06:20:47 +0000 Subject: [issue19671] Option to select the optimization level on compileall In-Reply-To: <1384982980.31.0.989044075216.issue19671@psf.upfronthosting.co.za> Message-ID: <1385014847.85.0.865361040031.issue19671@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hi. Since Python 3.2, compileall functions supports the optimization level through the `optimize` parameter. I guess you are using Python2.7 or so? Also, there's a note in compileall's documentation regarding the command line switch for the optimization level: " There is no command-line option to control the optimization level used by the compile() function, because the Python interpreter itself already provides the option: python -O -m compileall. " http://docs.python.org/3.2/library/compileall.html#command-line-use ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 08:30:49 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 21 Nov 2013 07:30:49 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385019049.4.0.529878335141.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: I've updated the TODO a little as well as cleaning up the XXX markers. The relevant ones are mostly just open questions on implementation tweaks, so nothing major. Otherwise my goal is to finish as much as possible of the non-critical items before the beta. Brett: Any opinions on priority for the non-critical items? Also, do you have a plan in mind for "Python can function w/ find_module(), find_loader(), and load_module() removed"? Do you mean comment out the deprecated methods and see what happens? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 08:41:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 07:41:47 +0000 Subject: [issue19676] Add the "namereplace" error handler Message-ID: <1385019706.69.0.579937406555.issue19676@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds the "namereplace" error handler. This error handler is almost same as the "backslashreplace" error handler, but use \N{...} escape sequences if there is a character name in Unicode database. Result is a little more human-readable (but less portable) than with "backslashreplace". >>> '? x??'.encode('ascii', 'namereplace') b'\\N{FOR ALL} x\\N{ELEMENT OF}\\N{BLACK-LETTER CAPITAL R}' The proposition was discussed and bikeshedded on Python-Ideas: http://comments.gmane.org/gmane.comp.python.ideas/21296 . ---------- components: Unicode files: namereplace_errors.patch keywords: patch messages: 203579 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add the "namereplace" error handler type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32748/namereplace_errors.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 08:56:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 07:56:24 +0000 Subject: [issue19676] Add the "namereplace" error handler In-Reply-To: <1385019706.69.0.579937406555.issue19676@psf.upfronthosting.co.za> Message-ID: <1385020584.88.0.515746331989.issue19676@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #18234. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 08:59:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 07:59:03 +0000 Subject: [issue19667] Add the "htmlcharrefreplace" error handler In-Reply-To: <1384971576.04.0.0704268767649.issue19667@psf.upfronthosting.co.za> Message-ID: <1385020743.68.0.347216638481.issue19667@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What should be done to make it more like you? Paul Moore, Marc-Andre Lemburg, Ethan Furman and Terry Jan Reedy voted for it. Steven D'Aprano proposed same idea on comp.python.general: http://comments.gmane.org/gmane.comp.python.general/742886 . And there are a number of implementations (partially buggy) in third-party code. One of them in CPython testsuite. It would be good to have one standard implementation. ---------- nosy: +ethan.furman, lemburg, pmoore, stevenjd, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:09:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 08:09:25 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385021365.14.0.156750198241.issue19588@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Original test was added in issue812202. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:12:31 2013 From: report at bugs.python.org (mpb) Date: Thu, 21 Nov 2013 08:12:31 +0000 Subject: [issue17145] memoryview(array.array) In-Reply-To: <1360170754.31.0.614797074916.issue17145@psf.upfronthosting.co.za> Message-ID: <1385021551.97.0.538350874686.issue17145@psf.upfronthosting.co.za> Changes by mpb : ---------- nosy: +mpb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:12:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 08:12:59 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385021579.7.0.446133838612.issue19674@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Great! See also issue16842 and issue16638. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:21:34 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 Nov 2013 08:21:34 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <1385022094.97.0.641261364379.issue19664@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:34:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 08:34:12 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <1385022852.42.0.134061994324.issue19668@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No, it is not official Microsoft codepage (it was introduced by IBM in its PC-DOS). AFAIK this encoding yet widely used in banking software. My old text files were written in this encoding, ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:34:50 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 21 Nov 2013 08:34:50 +0000 Subject: [issue11854] __or__ et al instantiate subclass of set without calling __init__ In-Reply-To: <1302931795.31.0.443472549499.issue11854@psf.upfronthosting.co.za> Message-ID: <1385022890.18.0.296469154113.issue11854@psf.upfronthosting.co.za> Mark Dickinson added the comment: Can this issue be closed as 'wont fix'? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:46:01 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 Nov 2013 08:46:01 +0000 Subject: [issue19663] Not so correct error message when initializing defaultdict In-Reply-To: <1384964745.34.0.550819526657.issue19663@psf.upfronthosting.co.za> Message-ID: <1385023561.64.0.935106076894.issue19663@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is a reasonable patch. I'll apply it when I have some spare time. ---------- assignee: -> rhettinger priority: normal -> low versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:46:11 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 21 Nov 2013 08:46:11 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1384984338.82.0.56793156852.issue18874@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: If you really want to use packing, keep it. But please remove this: """ + /* ensure that the frame_t structure is packed */ + assert(sizeof(frame_t) == (sizeof(PyObject*) + sizeof(int))); """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:54:34 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 Nov 2013 08:54:34 +0000 Subject: [issue19677] IDLE displaying a CoreAnimation warning Message-ID: <1385024074.44.0.183399663193.issue19677@psf.upfronthosting.co.za> New submission from Raymond Hettinger: When running IDLE on a fresh 2.7.6 install on OS X 10.9, I'm seeing the following message generated periodically: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces. ---------- components: IDLE messages: 203588 nosy: rhettinger priority: low severity: normal status: open title: IDLE displaying a CoreAnimation warning type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 09:56:21 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 08:56:21 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385024181.74.0.381901861181.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: > If you really want to use packing, keep it. > > But please remove this: > """ > + /* ensure that the frame_t structure is packed */ > + assert(sizeof(frame_t) == (sizeof(PyObject*) + sizeof(int))); > """ I added this assertion to ensure that I used correct GCC __attribute__((packed)) and Visual Studio #pragma pack(4). It can now be removed, I checked at least one per compiler that the structure is packed :-) I will add a comment explaining that packing the structure is an optimization to reduce the memory footprint, it can be disabled if tracemalloc does crash because of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:05:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 09:05:19 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <3dQFGk3nmgz7LkP@mail.python.org> Roundup Robot added the comment: New changeset 7b040bc289e8 by Serhiy Storchaka in branch '3.3': Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on http://hg.python.org/cpython/rev/7b040bc289e8 New changeset 7cf7f19445ba by Serhiy Storchaka in branch 'default': Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on http://hg.python.org/cpython/rev/7cf7f19445ba New changeset 03a32ead9c7d by Serhiy Storchaka in branch '2.7': Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on http://hg.python.org/cpython/rev/03a32ead9c7d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:07:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 09:07:08 +0000 Subject: [issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates In-Reply-To: <1315133370.95.0.855318807974.issue12892@psf.upfronthosting.co.za> Message-ID: <1385024828.84.0.396614871875.issue12892@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Ezio and Serhiy for having fix UTF-16 and UTF-32 codecs! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:09:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 09:09:13 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1384960311.15.0.143372363696.issue19518@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: So, which suffix should be used? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:18:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 09:18:38 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1385025518.32.0.807455604383.issue19518@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: "*Unicode" suffix in existing functions means Py_UNICODE* argument. May be "*Ex2"? It can't be misinterpreted but looks ugly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:24:42 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 21 Nov 2013 09:24:42 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1385022852.42.0.134061994324.issue19668@psf.upfronthosting.co.za> Message-ID: <528DD153.50302@egenix.com> Marc-Andre Lemburg added the comment: On 21.11.2013 09:34, Serhiy Storchaka wrote: > > No, it is not official Microsoft codepage (it was introduced by IBM in its PC-DOS). AFAIK this encoding yet widely used in banking software. My old text files were written in this encoding, ;) +1 for adding this. It gets enough Google hits to be worth adding. Please also add the aliases you mentioned. Thanks, -- Marc-Andre Lemburg eGenix.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:29:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 09:29:51 +0000 Subject: [issue19183] PEP 456 Secure and interchangeable hash algorithm In-Reply-To: <1381071507.59.0.633396312817.issue19183@psf.upfronthosting.co.za> Message-ID: <3dQFq25Wg0z7Ljb@mail.python.org> Roundup Robot added the comment: New changeset eec4758e3a45 by Victor Stinner in branch 'default': Issue #19183: Simplify test_gdb http://hg.python.org/cpython/rev/eec4758e3a45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:34:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 09:34:40 +0000 Subject: [issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1385026480.09.0.685532038185.issue19575@psf.upfronthosting.co.za> STINNER Victor added the comment: In Python 3.3, open_noinherit_ctypes() can be written: def opener_noinherit(filename, flags): return os.open(filename, flags | os.O_NOINHERIT) f = open(filename, opener=opener_noinherit) Example on Linux with O_CLOEXEC: $ python3 Python 3.3.0 (default, Sep 29 2012, 22:07:38) [GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> def opener_noinherit(filename, flags): ... return os.open(filename, flags | os.O_CLOEXEC) ... >>> f=open("/etc/issue", opener=opener_noinherit) >>> import fcntl >>> fcntl.fcntl(f.fileno(), fcntl.F_GETFD) & fcntl.FD_CLOEXEC 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:34:58 2013 From: report at bugs.python.org (Brecht Machiels) Date: Thu, 21 Nov 2013 09:34:58 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1385026498.89.0.6112511823.issue14373@psf.upfronthosting.co.za> Brecht Machiels added the comment: What's the status of this patch? What still needs to be done for it to be accepted? ---------- nosy: +brechtm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:35:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 09:35:53 +0000 Subject: [issue19575] subprocess: on Windows, unwanted file handles are inherit by child processes in a multithreaded application In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1385026553.14.0.815692148769.issue19575@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close -> subprocess: on Windows, unwanted file handles are inherit by child processes in a multithreaded application _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:43:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 09:43:18 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <1385026998.27.0.618107512053.issue19668@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Please also add the aliases you mentioned. I have already added these aliases. I should remove added in last moment the 'cp866nav' alias from Lib/encodings/aliases.py because it is actually a little different encoding (it have two Byelorussian letters "??" instead cp866 characters "??" at positions 0xfa-0xfb). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 10:45:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 09:45:30 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1385027130.51.0.302143468724.issue14373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm working on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:05:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 10:05:25 +0000 Subject: [issue19578] del list[a:b:c] doesn't handle correctly list_resize() failure In-Reply-To: <1384389720.61.0.338181274078.issue19578@psf.upfronthosting.co.za> Message-ID: <1385028325.17.0.056943311131.issue19578@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch is very simple and LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:14:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 10:14:30 +0000 Subject: [issue19641] Add audioop.byteswap() In-Reply-To: <1384770307.37.0.611849831444.issue19641@psf.upfronthosting.co.za> Message-ID: <1385028870.55.0.462032617636.issue19641@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch is synchronized with tip (after committing issue19633). It enables temporary disabled in issue19633 tests. ---------- Added file: http://bugs.python.org/file32749/audioop_byteswap_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:17:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 10:17:15 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" In-Reply-To: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> Message-ID: <1385029035.96.0.00502441214031.issue19652@psf.upfronthosting.co.za> STINNER Victor added the comment: asyncio_subprocess_watchdog.patch: * add test_asyncio.watchdog.setup_watchdog(): use faulthandler.dump_traceback_later() to kill the process if it hangs more than 'timeout' seconds (do nothing if faulthandler is not present, eg. on other Python VMs than CPython) * add SubprocessTestsMixin.debug_info(): return returncode, stdout, stderr * use debug_info() on functions using subprocess may may hang The patch should give more information on the child process if it hangs. I didn't see the test_asyncio hang on "AMD64 Snow Leop 3.x" recently. The hang is probably random :-/ I chose a default timeout of 5 minutes, it should be enough for the short tests of test_asyncio. You may set the timeout to 15 minutes if a buildbot is too slow. Or set the timeout to 1 minute if you prefer to not hang a buildbot too long. I tested asyncio_subprocess_watchdog.patch manually with a shorter timeout and by adding time.sleep(60) in echo.py, echo2.py and echo3.py. ---------- keywords: +patch Added file: http://bugs.python.org/file32750/asyncio_subprocess_watchdog.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:24:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 10:24:58 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <1385029498.24.0.905152894279.issue19599@psf.upfronthosting.co.za> STINNER Victor added the comment: > 2.7 builds are failing on koobs-freebsd9 buildbot since ba7d53b5f3de I reopen the issue. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:28:16 2013 From: report at bugs.python.org (dellair jie) Date: Thu, 21 Nov 2013 10:28:16 +0000 Subject: [issue19661] AIX: Python: RuntimeError "invalid slot offset when importing a module" in _ssl module In-Reply-To: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> Message-ID: <1385029696.86.0.475950114401.issue19661@psf.upfronthosting.co.za> dellair jie added the comment: Still seeing the same error without optimization, the build log from HPUX 11.31IA is also attached for reference (maybe irrelevance though ^^): AIX 6.1: cc -qlanglvl=extc89 -O0 -IInclude -I. -I/usr/local/include -c /aix/Modules/_ssl.c -o build/temp.aix-6.1-3.3-pydebug/aix/Modules/_ssl.o "/aix/Modules/_ssl.c", line 262.17: 1506-196 (W) Initialization between types "void*" and "struct _object*(*)(struct {...}*)" is not allowed. /aix/Modules/ld_so_aix cc -qlanglvl=extc89 -bI:/aix/Modules/python.exp build/temp.aix-6.1-3.3-pydebug/aix/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.aix-6.1-3.3-pydebug/_ssl.so ld: 0711-224 WARNING: Duplicate symbol: .bcopy ld: 0711-224 WARNING: Duplicate symbol: .memcpy ld: 0711-224 WARNING: Duplicate symbol: .memmove ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. *** WARNING: importing extension "_ssl" failed with build/lib.aix-6.1-3.3-pydebug/_ssl.so: : invalid slot offset: HPUX11.31: building '_ssl' extension cc +z -O0 -IInclude -I. -I/hpux/Include -I/hpux -c /hpux/Modules/_ssl.c -o build/temp.hp-ux-B.11.31-ia64-3.3-pydebug/hpux/Modules/_ssl.o "/hpux/Modules/_ssl.c", line 383: warning #4232-D: conversion from "PyObject *" to a more strictly aligned type "PySocketSockObject *" may cause misaligned access = (PySocketSockObject *) PyWeakref_GetObject(obj->Socket); ^ "/hpux/Modules/_ssl.c", line 499: warning #4232-D: conversion from "PyObject *" to a more strictly aligned type "PySocketSockObject *" may cause misaligned access = (PySocketSockObject *) PyWeakref_GetObject(self->Socket); ^ "/hpux/Modules/_ssl.c", line 1220: warning #2111-D: statement is unreachable if (!_PyIsSelectable_fd(s->sock_fd)) ^ "/hpux/Modules/_ssl.c", line 1253: warning #4232-D: conversion from "PyObject *" to a more strictly aligned type "PySocketSockObject *" may cause misaligned access = (PySocketSockObject *) PyWeakref_GetObject(self->Socket); ^ "/hpux/Modules/_ssl.c", line 1363: warning #4232-D: conversion from "PyObject *" to a more strictly aligned type "PySocketSockObject *" may cause misaligned access = (PySocketSockObject *) PyWeakref_GetObject(self->Socket); ^ "/hpux/Modules/_ssl.c", line 1484: warning #4232-D: conversion from "PyObject *" to a more strictly aligned type "PySocketSockObject *" may cause misaligned access = (PySocketSockObject *) PyWeakref_GetObject(self->Socket); ^ ld -b build/temp.hp-ux-B.11.31-ia64-3.3-pydebug/hpux/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.hp-ux-B.11.31-ia64-3.3-pydebug/_ssl.so *** WARNING: importing extension "_ssl" failed with : invalid slot offset Please let me know if further information is required. Br, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:30:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 10:30:48 +0000 Subject: [issue19637] test_subprocess.test_undecodable_env() failure on AIX In-Reply-To: <1384737393.4.0.145203729418.issue19637@psf.upfronthosting.co.za> Message-ID: <1385029848.62.0.449341276196.issue19637@psf.upfronthosting.co.za> STINNER Victor added the comment: test_subprocess now pass on the "PPC64 AIX 3.x" buildbot, I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:32:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 10:32:18 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1385029938.95.0.484132570385.issue19568@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps the code will be easier if reorganize it. ---------- Added file: http://bugs.python.org/file32751/bytearray_setslice_mem_error-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:36:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 10:36:25 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385030185.36.0.331708134428.issue19674@psf.upfronthosting.co.za> Nick Coghlan added the comment: Sounds good to me (with either Larry's or Guido's spelling). We should ensure this still works with the config option that disables docstrings entirely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:36:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 10:36:47 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1385025518.32.0.807455604383.issue19518@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > "*Unicode" suffix in existing functions means Py_UNICODE* argument. Yes, this is why I chose Object() suffix. Are you still opposed to "Object" suffix? (Yes, "*Ex2" is really ugly.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:56:50 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Thu, 21 Nov 2013 10:56:50 +0000 Subject: [issue19678] smtpd.py: channel should be passed to process_message Message-ID: <1385031410.17.0.520349427654.issue19678@psf.upfronthosting.co.za> New submission from Leslie P. Polzer: process_message needs to have access to the channel state since it needs to make decisions based on the authentication or transport associated with the channel. It should be either the first or the last arg. I can provide a patch for this. Should backwards compatibility be achieved by using the inspect module to check the signature of process_message and call it accordingly? ---------- components: Library (Lib), email messages: 203609 nosy: barry, lpolzer, r.david.murray priority: normal severity: normal status: open title: smtpd.py: channel should be passed to process_message type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 11:59:59 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Thu, 21 Nov 2013 10:59:59 +0000 Subject: [issue19679] smtpd.py: implement ESMTP status messages Message-ID: <1385031598.99.0.0454554803988.issue19679@psf.upfronthosting.co.za> New submission from Leslie P. Polzer: ESMTP status messages (of the form "xab x.y.z test") can be added easily to the current status message strings emitted by the SMTP server and channel classes. They are not harmful if the user's server only intends to support plain HELO-SMTP I will provide a patch within due time unless someone disagrees. ---------- components: Library (Lib), email messages: 203610 nosy: barry, lpolzer, r.david.murray priority: normal severity: normal status: open title: smtpd.py: implement ESMTP status messages type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 12:16:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 11:16:51 +0000 Subject: [issue19578] del list[a:b:c] doesn't handle correctly list_resize() failure In-Reply-To: <1384389720.61.0.338181274078.issue19578@psf.upfronthosting.co.za> Message-ID: <3dQJBW1vJjz7LkP@mail.python.org> Roundup Robot added the comment: New changeset b508253f2876 by Victor Stinner in branch 'default': Close #19578: Fix list_ass_subscript(), handle list_resize() failure http://hg.python.org/cpython/rev/b508253f2876 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 12:24:38 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 21 Nov 2013 11:24:38 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <1385033078.34.0.380190555637.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've attached an updated version of the patch that should fix most of the issues found during review. I've also changed the two FMT_ constants to an enum.Enum (but still expose the constants themselves as module global names because that's IMHO more convenient). FYI I'm completely away from the computer during the weekend and will have very limited time to work from later today (18:00 CET). ---------- Added file: http://bugs.python.org/file32752/issue-14455-v9.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 12:32:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 11:32:13 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <3dQJXD6dfYz7Ljt@mail.python.org> Roundup Robot added the comment: New changeset ab73b7fd7523 by Victor Stinner in branch 'default': Close #19568: Fix bytearray_setslice_linear(), fix handling of http://hg.python.org/cpython/rev/ab73b7fd7523 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 12:33:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 11:33:35 +0000 Subject: [issue19568] bytearray_setslice_linear() leaves the bytearray in an inconsistent state on memory allocation failure In-Reply-To: <1384345240.98.0.498941020154.issue19568@psf.upfronthosting.co.za> Message-ID: <1385033615.81.0.257969176542.issue19568@psf.upfronthosting.co.za> STINNER Victor added the comment: > Perhaps the code will be easier if reorganize it. Ah yes, your version is simpler. I commited your patch, thanks. I also fixed the XXX to check the integer overflow: if (Py_SIZE(self) > (Py_ssize_t)PY_SSIZE_T_MAX - growth) { PyErr_NoMemory(); return -1; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 12:34:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 11:34:14 +0000 Subject: [issue19575] subprocess: on Windows, unwanted file handles are inherited by child processes in a multithreaded application In-Reply-To: <1384376573.19.0.824450606517.issue19575@psf.upfronthosting.co.za> Message-ID: <1385033654.27.0.72126087681.issue19575@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: subprocess: on Windows, unwanted file handles are inherit by child processes in a multithreaded application -> subprocess: on Windows, unwanted file handles are inherited by child processes in a multithreaded application _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 12:43:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 11:43:28 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385034208.4.0.931312148509.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: 3de17d13002d.patch: - take in account Antoine Pitrou's and vajrasky's comments - pack again frame_t structure (without the assertion and with a comment) ---------- Added file: http://bugs.python.org/file32753/3de17d13002d.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 12:50:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 11:50:06 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385034606.68.0.574886532786.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh yes, Antoine also asked if Python/ and Include/ directories are the right place for hashtable.c and hashtable.h files. _Py_slist and _Py_hashtable are only used in Modules/_tracemalloc.c yet. It was discussed to reuse _Py_slist somewhere (I don't remember where) and _Py_hashtable for the methods cache. Reuse _Py_hashtable for the methods cache is not trivial, the API doesn't fit exactly. I didn't spend much time to try to adapt _Py_hashtable API or the methods cache. _Py_hashtable API is written for performances, not for usability. Useless function calls are denied: they are punished by an assertion error (ex: _Py_hashtable_delete() if the key does not exist). An hash entry contains directly data, so you have to add a pointer with a size to store or retrieve an entry. I like my own API, but others may prefer a different API :-) Anyway, the _Py_hashtable API is fully private and excluded from the stable ABI. What do you think? Should we start by moving them to Modules/ and only move them again if they are used in more than one place? (Another little issue is that "hashtable" looks like Python dict, whereas Python dict is implemeted in Objects/dictobject.c). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 12:55:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 11:55:25 +0000 Subject: [issue19666] Format string for ASCII unicode or bytes-like object as readonly buffer In-Reply-To: <1384971256.72.0.0181602551145.issue19666@psf.upfronthosting.co.za> Message-ID: <1385034925.9.0.0828284675294.issue19666@psf.upfronthosting.co.za> STINNER Victor added the comment: Where do you plan to use this new format? Can you please give examples? > (other unicode representations may not allow you to take a Py_buffer to the ASCII data). Py_buffer and PyArg_ParseTuple() are very specific to CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:04:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 12:04:49 +0000 Subject: [issue19518] Add new PyRun_xxx() functions to not encode the filename In-Reply-To: <1383824880.09.0.781641455514.issue19518@psf.upfronthosting.co.za> Message-ID: <1385035489.39.0.958202018909.issue19518@psf.upfronthosting.co.za> Nick Coghlan added the comment: How about "ExName"? This patch: PyRun_AnyFileExName PyRun_SimpleFileExName PyRun_InteractiveOneExName PyRun_InteractiveLoopExName PyRun_FileExName Previous patch: Py_CompileStringExName PyAST_FromNodeExName PyAST_CompileExName PyFuture_FromASTExName PyParser_ParseFileExName PyParser_ParseStringExName PyErr_SyntaxLocationExName PyErr_ProgramTextExName PyParser_ASTFromStringExName PyParser_ASTFromFileExName - "Ex" has precedent as indicating a largely functionally equivalent API with a different signature - "Name" suggests strongly that we're tinkering with the filename (since this APIs don't accept another name) - "ExName" is the same length as "Object" but far more explicit Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:04:58 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 21 Nov 2013 12:04:58 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <1385035498.7.0.701223998937.issue17916@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Nick, what's your opinion on my latest patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:07:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 12:07:12 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385035632.11.0.561460581792.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: > It was discussed to reuse _Py_slist somewhere (I don't remember where) (...) I did a quick search in Python code based using "link.*list" regex. Structures linked in a single-linked list (candidate for _Py_slist): * Modules/_curses_panel.c: list_of_panels * Modules/_elementtree.c: ParentLocator * Modules/floatobject.c: free_list * Objects/obmalloc.c: arena_object.freepools * Python/compile.c: basicblock * Python/pyarena.c: block * Include/pystate.h: PyInterpreterState.tstate_head * Python/thead.c: key Structures linked in a double-linked list: * Include/objimpl.h: PyGC_Head * Include/object.c: PyObject (in debug mode) * Modules/_collectionsmodule.c: block * Objects/obmalloc.c: arena_object * Include/weakrefobject.h: _PyWeakReference ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:09:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 12:09:27 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385035767.66.0.683015377381.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I just realized _Py_slist_init(), _Py_slist_prepend(), and _Py_slist_remove() functions are currently private (static in hashtable.c). These functions should be declared in hashtable.h if _Py_slist API is reused. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:15:45 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Thu, 21 Nov 2013 12:15:45 +0000 Subject: [issue19679] smtpd.py (SMTPChannel): get rid of "conn" attribute In-Reply-To: <1385031598.99.0.0454554803988.issue19679@psf.upfronthosting.co.za> Message-ID: <1385036145.05.0.912255281189.issue19679@psf.upfronthosting.co.za> Leslie P. Polzer added the comment: The contents of "conn" are already stored by asyncore's "socket" attribute, so there doesn't seem to be a need to keep it around. We should deprecate its usage and refer the user to the "socket" attribute. Furthermore I suggest renaming the "conn" argument to "socket" to make its semantics clearer. ---------- title: smtpd.py: implement ESMTP status messages -> smtpd.py (SMTPChannel): get rid of "conn" attribute _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:18:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 12:18:44 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <1385036324.25.0.19549515904.issue17916@psf.upfronthosting.co.za> Nick Coghlan added the comment: My apologies for not reviewing this earlier, it's been a somewhat hectic month. Thanks for pinging the ticket while there's still a chance to get this into 3.4 :) After my last round of updates to dis.Bytecode removed the potential for confusion between line_offset and current_offset, I'm back to thinking it makes more sense to build this feature directly into dis.Bytecode rather than using a separate type. 1. Add the "current_offset" attribute to dis.Bytecode 2. Add a "current_offset" parameter to dis.Bytecode.__init__ (defaulting to None) 3. In dis.Bytecode.dis(), pass "current_offset" as the value for "lasti" in the call to _disassemble_bytes (except for passing -1 if current_offset is None) 4. Add a "from_traceback()" class method that sets current_offset appropriately in the call to build the instance ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:24:32 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 12:24:32 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385036672.8.0.307552906516.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: "Reuse _Py_hashtable for the methods cache is not trivial, the API doesn't fit exactly. I didn't spend much time to try to adapt _Py_hashtable API or the methods cache." I don't understand which part is the key and which part is the enetry data in method_cache_entry structure: struct method_cache_entry { unsigned int version; PyObject *name; /* reference to exactly a str or None */ PyObject *value; /* borrowed */ }; _PyType_Lookup() compares name and version. Does it mean that version is part of the key? If it's possible to only store name as the key and store version and value in the data, it would be simple to reuse _Py_hashtable. I guess that it would be possible to get a cache entry using the name and later compare the version, it the version doesn't match: don't use the cache. It would require to copy the data (version+value: short structure, a few bytes) from the hash table entry to a local variable (allocated in the stack). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:29:46 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Thu, 21 Nov 2013 12:29:46 +0000 Subject: [issue19680] Help missing for exec and print Message-ID: <1385036985.98.0.128644104733.issue19680@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: Steps to reproduce: [bkabrda at zizalka python]$ python >>> help() help> keywords # prints lots of keywords including "print" and "exec" help> print no documentation found for 'print' So either keywords should not list "print" and "exec" or the documentation for them should be built. IIUC, the help for these should be part of pydoc_data/topics.py, which gets generated by Doc/tools/sphinxext/pyspecific.py. However, in revision [1] some topics got removed ("print" and "exec" amongst them) without the commit message saying anything helpful. Either way, this is inconsistent and should be fixed (assuming that Python 2.7 is still supposed to get this sort of fixes). Thanks. [1] http://hg.python.org/cpython/rev/76aa98f69251 ---------- assignee: docs at python components: Documentation messages: 203625 nosy: bkabrda, docs at python priority: normal severity: normal status: open title: Help missing for exec and print versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:53:09 2013 From: report at bugs.python.org (Sworddragon) Date: Thu, 21 Nov 2013 12:53:09 +0000 Subject: [issue19671] Option to select the optimization level on compileall In-Reply-To: <1384982980.31.0.989044075216.issue19671@psf.upfronthosting.co.za> Message-ID: <1385038389.23.0.311335594746.issue19671@psf.upfronthosting.co.za> Sworddragon added the comment: > Hi. Since Python 3.2, compileall functions supports the optimization level through the `optimize` parameter. > There is no command-line option to control the optimization level used by the compile() function, because the Python interpreter itself already provides the option: python -O -m compileall. This is the problem: You can't pass the optimization level to compile_dir|compile_file|compile_path. What, if you want for location a .pyc files and for location b .pyo files? Or even .pyc files and .pyo files for both locations? The only solution is to make a command call within the script which is a little bit ugly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:58:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 12:58:05 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385038685.65.0.936908535264.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: My patch is inspired by mod_ssl: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_init.c?view=markup#l697 CRLs can already be loaded with SSLContext.load_verify_locations(). The patch exposes the verification flags of SSLContext's X509_STORE. With X509_V_FLAG_CRL_CHECK OpenSSL requires (!) a CRL that matches the issuer of leaf certificate of the chain (the peer's cert). X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL also requires CRLs for all intermediate certs of the peer's cert chain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 13:58:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 12:58:47 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <1385038727.62.0.380846560545.issue14455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have added a few comments on Rietveld. Besides formatting nitpicks your have forgot third argument in new warns and missed some details in tests. As for the rest the patch LGTM. If you have no time I will fixed this minor issues and will commited the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 14:00:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 13:00:57 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <1385038857.39.0.0367189354394.issue14455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure about docstrings text ("return" vs "returns", I don't remember what is better), but we can bikeshed it after beta 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 14:07:19 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 21 Nov 2013 13:07:19 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <1385039239.92.0.405697482266.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Updated patch after next round of reviews. ---------- Added file: http://bugs.python.org/file32754/issue-14455-v10.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 14:12:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 13:12:27 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385039547.69.0.990464973569.issue19619@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 14:35:20 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 13:35:20 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1385040920.13.0.350815350877.issue7475@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 14:44:06 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 13:44:06 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385041446.24.0.374310371389.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: New patch for 3.4 that uses a private attribute on CodecInfo and a private class method to set it appropriately (as I believe that is a better approach than changing the signature of CodecInfo.__init__ at this point, especially if we end up pursuing the codec type map idea in 3.5) This version also updates the tests to check for the appropriate error messages. The integration into the text model related methods is that same as in the proof of concept: a parallel private text-encoding-only C API that is used in preference to the general purpose codec machinery where appropriate. If there aren't any objections to this approach, I'll commit this one tomorrow. ---------- Added file: http://bugs.python.org/file32755/issue19619_blacklist_transforms_py34.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 15:34:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 14:34:36 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures Message-ID: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> New submission from Christian Heimes: test_repr of test.test_functools.TestPartialC fails sometimes because the test scenario depends on the order of items in a Python dict. The order is not stable and may change. Before PEP 456 was committed the order of items was stable most of the time. Nowadays the random seed has an impact on the order. http://buildbot.python.org/all/builders/x86%20XP-4%203.x/builds/9609 ====================================================================== FAIL: test_repr (test.test_functools.TestPartialC) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_functools.py", line 174, in test_repr repr(f)) AssertionError: 'func[43 chars]D8>, b=, a=)' != 'func[43 chars]D8>, a=, b=)' - functools.partial(, b=, a=) + functools.partial(, a=, b=) ====================================================================== FAIL: test_repr (test.test_functools.TestPartialCSubclass) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_functools.py", line 174, in test_repr repr(f)) AssertionError: 'Part[41 chars]D8>, b=, a=)' != 'Part[41 chars]D8>, a=, b=)' - PartialSubclass(, b=, a=) + PartialSubclass(, a=, b=) ---------- components: Tests messages: 203632 nosy: christian.heimes priority: normal severity: normal status: open title: test_repr (test.test_functools.TestPartialC) failures versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 15:38:27 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 21 Nov 2013 14:38:27 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385044707.05.0.759391193915.issue19674@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 15:47:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 14:47:07 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <3dQNs656xgzSsT@mail.python.org> Roundup Robot added the comment: New changeset 673ca119dbd0 by Ronald Oussoren in branch 'default': Issue #14455: plistlib now supports binary plists and has an updated API. http://hg.python.org/cpython/rev/673ca119dbd0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:09:42 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 21 Nov 2013 15:09:42 +0000 Subject: [issue19682] _ssl won't compile with OSX 10.9 SDK Message-ID: <1385046582.33.0.832181733081.issue19682@psf.upfronthosting.co.za> New submission from Ronald Oussoren: I get a compilation error for _ssl when building on OSX 10.9 using the 10.9 SDK, the relevant error: /Users/ronald/Projects/python/rw/default/Modules/_ssl.c:1029:24: error: no member named 'crldp' in 'struct x509_st' dps = certificate->crldp; ~~~~~~~~~~~ ^ Looking at /usr/include/openssl/x509.h in the 10.9 SDK that does not have a crldp member: struct x509_st { X509_CINF *cert_info; X509_ALGOR *sig_alg; ASN1_BIT_STRING *signature; int valid; int references; char *name; CRYPTO_EX_DATA ex_data; /* These contain copies of various extension values */ long ex_pathlen; long ex_pcpathlen; unsigned long ex_flags; unsigned long ex_kusage; unsigned long ex_xkusage; unsigned long ex_nscert; ASN1_OCTET_STRING *skid; struct AUTHORITY_KEYID_st *akid; X509_POLICY_CACHE *policy_cache; #ifndef OPENSSL_NO_RFC3779 STACK_OF(IPAddressFamily) *rfc3779_addr; struct ASIdentifiers_st *rfc3779_asid; #endif #ifndef OPENSSL_NO_SHA unsigned char sha1_hash[SHA_DIGEST_LENGTH]; #endif X509_CERT_AUX *aux; } /* X509 */; Note that OSX ships a fairly ancient version of OpenSSL, libssl.dylib is 0.9.8. (Marked as a regression because 3.3 and 2.7 can be build with the system version of OpenSSL). ---------- assignee: ronaldoussoren components: Extension Modules, Macintosh keywords: 3.3regression messages: 203634 nosy: ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: _ssl won't compile with OSX 10.9 SDK type: compile error versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:14:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 15:14:59 +0000 Subject: [issue19682] _ssl won't compile with OSX 10.9 SDK In-Reply-To: <1385046582.33.0.832181733081.issue19682@psf.upfronthosting.co.za> Message-ID: <1385046899.8.0.0564610952646.issue19682@psf.upfronthosting.co.za> Christian Heimes added the comment: It's my fault and related to #18379. I'll fix it. ---------- assignee: ronaldoussoren -> christian.heimes nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:16:05 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 21 Nov 2013 15:16:05 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" In-Reply-To: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> Message-ID: <1385046965.77.0.290361295719.issue19652@psf.upfronthosting.co.za> Guido van Rossum added the comment: Hmm... When did you last see the hang? We've had a variety of checkins that might have affected this code. If you've seen at least one traceback later than the commit below, feel free to commit. Otherwise, let's wait. changeset: 87088:eb42adc53923 user: Guido van Rossum date: Wed Nov 13 15:50:08 2013 -0800 summary: asyncio: Fix from Anthony Baire for CPython issue 19566 (replaces earlier fix). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:17:39 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 Nov 2013 15:17:39 +0000 Subject: [issue19683] test_minidom has many empty tests Message-ID: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> New submission from Zachary Ware: Many of the tests in test_minidom on 2.7 are empty, that is they are defined as "def testSomeFunction(self): pass". I've marked this issue as "easy" since I suspect a lot of the tests can be either backported from 3.x, or removed if they don't exist in 3.x. ---------- components: Tests keywords: easy messages: 203637 nosy: zach.ware priority: normal severity: normal stage: needs patch status: open title: test_minidom has many empty tests type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:21:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 15:21:08 +0000 Subject: [issue19633] test_wave: failures on PPC64 buildbot In-Reply-To: <1384727217.05.0.199132089753.issue19633@psf.upfronthosting.co.za> Message-ID: <1385047268.03.0.223441905511.issue19633@psf.upfronthosting.co.za> STINNER Victor added the comment: "PPC64 PowerLinux 3.x" buildbot is green again! I'm closing the issue. I didn't check 2.7 and 3.3 buildbots. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:27:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 15:27:41 +0000 Subject: [issue18379] SSLSocket.getpeercert(): OCSP and CRL DP URIs In-Reply-To: <1373113820.69.0.993582296308.issue18379@psf.upfronthosting.co.za> Message-ID: <3dQPlx25jfz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 40bfddda43d4 by Christian Heimes in branch 'default': Issue #19682: Fix compatibility issue with old version of OpenSSL that http://hg.python.org/cpython/rev/40bfddda43d4 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:27:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 15:27:42 +0000 Subject: [issue19682] _ssl won't compile with OSX 10.9 SDK In-Reply-To: <1385046582.33.0.832181733081.issue19682@psf.upfronthosting.co.za> Message-ID: <3dQPly0ZKjz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 40bfddda43d4 by Christian Heimes in branch 'default': Issue #19682: Fix compatibility issue with old version of OpenSSL that http://hg.python.org/cpython/rev/40bfddda43d4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:36:56 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 15:36:56 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <1385048216.0.0.174280373319.issue19681@psf.upfronthosting.co.za> Christian Heimes added the comment: The issue is causing flaky build bots and should be resolved soonish. I don't know what's the best way to fix the problem. Either the test needs to change or partial_repr() must print the keys in sorted order. ---------- nosy: +haypo, ncoghlan, rhettinger priority: normal -> high stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:41:12 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Nov 2013 15:41:12 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <1385048472.56.0.157317153412.issue19683@psf.upfronthosting.co.za> R. David Murray added the comment: Well, we generally don't backport tests unless we are fixing related bugs. I think this should be left alone. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:43:35 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 Nov 2013 15:43:35 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <1385048615.26.0.0381060704117.issue19683@psf.upfronthosting.co.za> Zachary Ware added the comment: In that case, the empty tests should be removed, since they currently report success on doing nothing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:43:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 15:43:59 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <1385048639.69.0.659272273887.issue19681@psf.upfronthosting.co.za> Christian Heimes added the comment: The repr test of userdict fails sometimes, too. http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3120/steps/test/logs/stdio ====================================================================== FAIL: test_all (test.test_userdict.UserDictTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_userdict.py", line 48, in test_all self.assertEqual(repr(u2), repr(d2)) AssertionError: "{'one': 1, 'two': 2}" != "{'two': 2, 'one': 1}" - {'one': 1, 'two': 2} + {'two': 2, 'one': 1} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:47:34 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 21 Nov 2013 15:47:34 +0000 Subject: [issue19682] _ssl won't compile with OSX 10.9 SDK In-Reply-To: <1385046582.33.0.832181733081.issue19682@psf.upfronthosting.co.za> Message-ID: <1385048854.52.0.916039296447.issue19682@psf.upfronthosting.co.za> Ronald Oussoren added the comment: That's quick... The patch fixes the issue for me as well. Thanks! ---------- resolution: -> fixed stage: needs patch -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:48:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 15:48:20 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <1385048900.74.0.0504780845596.issue19681@psf.upfronthosting.co.za> STINNER Victor added the comment: See issue #19664 for userdict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:53:57 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 Nov 2013 15:53:57 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1385049237.75.0.616720669398.issue19572@psf.upfronthosting.co.za> Zachary Ware added the comment: The 2.7 patch has a lot of extra changes in it, extra review is probably in order for it. ---------- Added file: http://bugs.python.org/file32756/skiptest_not_return_or_pass.v4-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 16:58:02 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 21 Nov 2013 15:58:02 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385049482.5.0.299065336824.issue19063@psf.upfronthosting.co.za> Vajrasky Kok added the comment: No review link? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:00:09 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 21 Nov 2013 16:00:09 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385049609.06.0.936028721548.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: Semantic-affecting changes first, then fluffy bits in terms of priority. Basically go based on what is most critical to be in 3.4. And yes, basically can you comment out find_module/find_loader/load_module and execute the test suite (sans import-related tests) without import-related failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:06:32 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Nov 2013 16:06:32 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385049992.04.0.765045141176.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I posted a git-diff 3.3 patch. Let me repost it. ---------- Added file: http://bugs.python.org/file32757/support_8bit_charset_cte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:06:56 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Nov 2013 16:06:56 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385050016.9.0.210233909069.issue19063@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file32732/support_8bit_charset_cte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:18:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Nov 2013 16:18:09 +0000 Subject: [issue19667] Add the "htmlcharrefreplace" error handler In-Reply-To: <1384971576.04.0.0704268767649.issue19667@psf.upfronthosting.co.za> Message-ID: <1385050689.98.0.602813494122.issue19667@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As long as it isn't built-in, I see no problems for including it personally. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:21:32 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Nov 2013 16:21:32 +0000 Subject: [issue19386] selectors test_interrupted_retry is flaky In-Reply-To: <1382688391.49.0.741915274953.issue19386@psf.upfronthosting.co.za> Message-ID: <1385050892.77.0.0895452078441.issue19386@psf.upfronthosting.co.za> R. David Murray added the comment: Looking at the current buildbot history I don't see these errors any more. I'm not sure how frequent they were, but I think I'll mark this as resolved and we can reopen it if we see it again. ---------- resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:31:23 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 16:31:23 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <1385051483.04.0.928478288941.issue19664@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:36:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 16:36:48 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <3dQRHg73lpzRbh@mail.python.org> Roundup Robot added the comment: New changeset 086865ceefe1 by Richard Oudkerk in branch '2.7': Issue #19599: Use a separate pool for test_terminate(). http://hg.python.org/cpython/rev/086865ceefe1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:43:43 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 Nov 2013 16:43:43 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1385052223.38.0.786819736932.issue14373@psf.upfronthosting.co.za> Raymond Hettinger added the comment: After Serhiy looks at this, I need to review it for reentrancy thread-safety and reentrancy issues. ---------- priority: normal -> low versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 17:44:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 16:44:34 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385052274.24.0.012871903061.issue19619@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why return codecs.CodecInfo._declare_transform( name='base64', encode=base64_encode, decode=base64_decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamwriter=StreamWriter, streamreader=StreamReader, ) instead of codec = codecs.CodecInfo( name='base64', encode=base64_encode, decode=base64_decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamwriter=StreamWriter, streamreader=StreamReader, ) codec._is_text_encoding = False return codec ? I have added other minor comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 18:24:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 17:24:32 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <3dQSLl2FZTzSg4@mail.python.org> Roundup Robot added the comment: New changeset cfbd894f1df1 by Serhiy Storchaka in branch '3.3': Print Tk patchlevel in Tk and Ttk tests in verbose mode (issue19654). http://hg.python.org/cpython/rev/cfbd894f1df1 New changeset cf8ac1272e07 by Serhiy Storchaka in branch 'default': Print Tk patchlevel in Tk and Ttk tests in verbose mode (issue19654). http://hg.python.org/cpython/rev/cf8ac1272e07 New changeset 08f282c96fd1 by Serhiy Storchaka in branch '2.7': Print Tk patchlevel in Tk and Ttk tests in verbose mode (issue19654). http://hg.python.org/cpython/rev/08f282c96fd1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 18:36:57 2013 From: report at bugs.python.org (Will Adams) Date: Thu, 21 Nov 2013 17:36:57 +0000 Subject: [issue19684] OS X 10.6.8 Crash when opening a file Message-ID: <1385055415.68.0.92413833052.issue19684@psf.upfronthosting.co.za> New submission from Will Adams: Apologies in advance if I am posting incorrectly. This is my first post here. IDLE crashes when I open a *.py file on my old mac pro from IDLE. I haven't seen this on version 3.3.2, but I need to do some work in version 2.7 today so I downloaded 2.7.6 and ran into this system dump: Process: Python [1832] Path: /Applications/Python 2.7/IDLE.app/Contents/MacOS/Python Identifier: org.python.IDLE Version: 2.7.6 (2.7.6) Code Type: X86 (Native) Parent Process: launchd [143] Date/Time: 2013-11-21 11:24:30.080 -0600 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Interval Since Last Report: 3154609 sec Crashes Since Last Report: 42 Per-App Interval Since Last Report: 642 sec Per-App Crashes Since Last Report: 5 Anonymous UUID: 3134C4C6-DD18-4049-8638-9A3C0FBC6343 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000044014000 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: objc_msgSend() selector name: release Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x91b97f8b objc_msgSend + 27 1 com.apple.CoreFoundation 0x95f57bcd _CFAutoreleasePoolPop + 253 2 com.apple.Foundation 0x94287976 NSPopAutoreleasePool + 76 3 com.apple.Foundation 0x9428789e -[NSAutoreleasePool drain] + 130 4 Tk 0x0072df18 XQueryPointer + 2393 5 Tk 0x0072e219 Tk_MacOSXSetupTkNotifier + 634 6 Tcl 0x005f5ab4 Tcl_DoOneEvent + 310 7 _tkinter.so 0x002f1322 Tkapp_MainLoop + 450 8 org.python.python 0x000c4230 PyEval_EvalFrameEx + 25344 9 org.python.python 0x000c6a2c PyEval_EvalCodeEx + 2012 10 org.python.python 0x000c4825 PyEval_EvalFrameEx + 26869 11 org.python.python 0x000c554c PyEval_EvalFrameEx + 30236 12 org.python.python 0x000c6a2c PyEval_EvalCodeEx + 2012 13 org.python.python 0x000c6b77 PyEval_EvalCode + 87 14 org.python.python 0x000eaf5c PyRun_FileExFlags + 172 15 org.python.python 0x000eb284 PyRun_SimpleFileExFlags + 532 16 org.python.python 0x00103412 Py_Main + 3410 17 Python 0x00001f65 start + 53 Thread 1: Dispatch queue: com.apple.libdispatch-manager 0 libSystem.B.dylib 0x9196a382 kevent + 10 1 libSystem.B.dylib 0x9196aa9c _dispatch_mgr_invoke + 215 2 libSystem.B.dylib 0x91969f59 _dispatch_queue_invoke + 163 3 libSystem.B.dylib 0x91969cfe _dispatch_worker_thread2 + 240 4 libSystem.B.dylib 0x91969781 _pthread_wqthread + 390 5 libSystem.B.dylib 0x919695c6 start_wqthread + 30 Thread 2: 0 libSystem.B.dylib 0x91962ac6 select$DARWIN_EXTSN + 10 1 Tcl 0x0062b737 Tcl_InitNotifier + 1643 2 libSystem.B.dylib 0x91971259 _pthread_start + 345 3 libSystem.B.dylib 0x919710de thread_start + 34 Thread 3: 0 libSystem.B.dylib 0x91969412 __workq_kernreturn + 10 1 libSystem.B.dylib 0x919699a8 _pthread_wqthread + 941 2 libSystem.B.dylib 0x919695c6 start_wqthread + 30 Thread 4: com.apple.CFSocket.private 0 libSystem.B.dylib 0x91962ac6 select$DARWIN_EXTSN + 10 1 com.apple.CoreFoundation 0x95f9ac53 __CFSocketManager + 1091 2 libSystem.B.dylib 0x91971259 _pthread_start + 345 3 libSystem.B.dylib 0x919710de thread_start + 34 Thread 5: 0 libSystem.B.dylib 0x91943afa mach_msg_trap + 10 1 libSystem.B.dylib 0x91944267 mach_msg + 68 2 com.apple.CoreFoundation 0x95f5b2df __CFRunLoopRun + 2079 3 com.apple.CoreFoundation 0x95f5a3c4 CFRunLoopRunSpecific + 452 4 com.apple.CoreFoundation 0x95f60304 CFRunLoopRun + 84 5 com.apple.DesktopServices 0x947b1b3d TSystemNotificationTask::SystemNotificationTaskProc(void*) + 643 6 ...ple.CoreServices.CarbonCore 0x97ac554a PrivateMPEntryPoint + 68 7 libSystem.B.dylib 0x91971259 _pthread_start + 345 8 libSystem.B.dylib 0x919710de thread_start + 34 Thread 6: 0 libSystem.B.dylib 0x91969412 __workq_kernreturn + 10 1 libSystem.B.dylib 0x919699a8 _pthread_wqthread + 941 2 libSystem.B.dylib 0x919695c6 start_wqthread + 30 Thread 7: 0 libSystem.B.dylib 0x91969412 __workq_kernreturn + 10 1 libSystem.B.dylib 0x919699a8 _pthread_wqthread + 941 2 libSystem.B.dylib 0x919695c6 start_wqthread + 30 Thread 8: 0 libSystem.B.dylib 0x91969412 __workq_kernreturn + 10 1 libSystem.B.dylib 0x919699a8 _pthread_wqthread + 941 2 libSystem.B.dylib 0x919695c6 start_wqthread + 30 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x15f39ea0 ebx: 0x95f2ae2d ecx: 0x95c3b8b4 edx: 0x15f42110 edi: 0x44014000 esi: 0x15f39ea0 ebp: 0xbfffeb58 esp: 0xbfffeb34 ss: 0x0000001f efl: 0x00010206 eip: 0x91b97f8b cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x44014000 Binary Images: 0x1000 - 0x1ff7 +Python ??? (???) <5E42C8AF-4D60-8991-99DF-D9F7D9BE5018> /Applications/Python 2.7/IDLE.app/Contents/MacOS/Python 0x4000 - 0x146fff +org.python.python 2.7.6, (c) 2004-2013 Python Software Foundation. (2.7.6) <9C0C57BD-C006-1A8D-90F5-422FD3D05652> /Library/Frameworks/Python.framework/Versions/2.7/Python 0x2ed000 - 0x2f4ff7 +_tkinter.so ??? (???) <7DDA96E8-45E2-2385-2045-37F603882100> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so 0x577000 - 0x649fe7 Tcl 8.5.7 (8.5.7) <39BA8680-BB16-CC3D-15AC-B32ECE556FC6> /System/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl 0x662000 - 0x75bff7 Tk 8.5.7 (8.5.7) <17E7216E-45B5-BAFE-6F87-79AC9A3937D1> /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk 0x7e3000 - 0x7e6ff7 +strop.so ??? (???) <099FF8EE-ED78-C47B-C64F-6B0510025DEF> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so 0x7eb000 - 0x7f4ff7 +_socket.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so 0x1300000 - 0x1301ff7 +_functools.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so 0x1304000 - 0x1308ff7 +_ssl.so ??? (???) <5B67DF16-508B-3839-42DE-0270C85627CA> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so 0x130d000 - 0x130eff7 +cStringIO.so ??? (???) <721E10B1-65B4-ABA6-90E6-D92952BE3AF8> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so 0x1312000 - 0x1313ff7 +time.so ??? (???) <5ECA4EBE-2EC9-3107-DCF4-45050F936643> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so 0x1318000 - 0x131bff7 +_collections.so ??? (???) <78F6EE64-6C57-7632-ADBE-FABDF9630120> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so 0x1320000 - 0x1323ff7 +operator.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so 0x1369000 - 0x136eff7 +itertools.so ??? (???) <7FAA1ED6-582E-BEEA-379F-F82A7923D051> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so 0x1376000 - 0x1377ff7 +_heapq.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so 0x137b000 - 0x138eff7 +_io.so ??? (???) <1B9DFDC8-9D70-4256-B603-31A943100A2F> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so 0x1443000 - 0x1445ff7 +select.so ??? (???) <5DF162CA-80BD-B25D-0243-E8D56AC37868> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so 0x144a000 - 0x144bff7 +fcntl.so ??? (???) <7D79E04D-6165-E55E-0917-AC482EB3FC59> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so 0x144e000 - 0x1451ff7 +_struct.so ??? (???) <21694FA7-1A29-5746-7D5C-4F57EB4BA72A> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so 0x1458000 - 0x145afe7 +binascii.so ??? (???) <600CFC44-CBCF-E606-E378-AA5D6F00CB56> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so 0x14de000 - 0x14e2ff7 +math.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so 0x14e7000 - 0x14e8ff7 +_hashlib.so ??? (???) <8E1D90CA-C55F-B334-F047-8743905D87BD> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so 0x14ec000 - 0x14edff7 +_random.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so 0x1530000 - 0x1531ff7 +_locale.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so 0x1534000 - 0x1542ff7 +cPickle.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so 0x8fe00000 - 0x8fe4163b dyld 132.1 (???) <4CDE4F04-0DD6-224E-ACE5-3C06E169A801> /usr/lib/dyld 0x90003000 - 0x90419ff7 libBLAS.dylib 219.0.0 (compatibility 1.0.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x9042b000 - 0x904d3ffb com.apple.QD 3.36 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x904d4000 - 0x90516ff7 libvDSP.dylib 268.0.1 (compatibility 1.0.0) <8A4721DE-25C4-C8AA-EA90-9DA7812E3EBA> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x9051c000 - 0x90531fff com.apple.ImageCapture 6.1 (6.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture 0x90532000 - 0x90532ff7 com.apple.CoreServices 44 (44) <51CFA89A-33DB-90ED-26A8-67D461718A4A> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x90533000 - 0x90557ff7 libJPEG.dylib ??? (???) <50E17B4D-63D6-24D3-702F-6A6E912A55EA> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x90559000 - 0x905d4fff com.apple.AppleVAFramework 4.10.27 (4.10.27) /System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA 0x905d5000 - 0x90655feb com.apple.SearchKit 1.3.0 (1.3.0) <9E18AEA5-F4B4-8BE5-EEA9-818FC4F46FD9> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x9065c000 - 0x9065fffb com.apple.help 1.3.2 (41.1) <8AC20B01-4A3B-94BA-D8AF-E39034B97D8C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x90660000 - 0x9069eff7 com.apple.QuickLookFramework 2.3 (327.7) <6387A103-C7EF-D56B-10EF-5ED5FC7F33A5> /System/Library/Frameworks/QuickLook.framework/Versions/A/QuickLook 0x90711000 - 0x90742ff7 libGLImage.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x90743000 - 0x9077ffe7 libssl.0.9.8.dylib 0.9.8 (compatibility 0.9.8) /usr/lib/libssl.0.9.8.dylib 0x90780000 - 0x90882fef com.apple.MeshKitIO 1.1 (49.2) /System/Library/PrivateFrameworks/MeshKit.framework/Versions/A/Frameworks/MeshKitIO.framework/Versions/A/MeshKitIO 0x90883000 - 0x908c9ff7 libauto.dylib ??? (???) <29422A70-87CF-10E2-CE59-FEE1234CFAAE> /usr/lib/libauto.dylib 0x908d6000 - 0x90945ff7 libvMisc.dylib 268.0.1 (compatibility 1.0.0) <595A5539-9F54-63E6-7AAC-C04E1574B050> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x90948000 - 0x90954ff7 libkxld.dylib ??? (???) <9A441C48-2D18-E716-5F38-CBEAE6A0BB3E> /usr/lib/system/libkxld.dylib 0x90b5d000 - 0x90b61ff7 IOSurface ??? (???) <89D859B7-A26A-A5AB-8401-FC1E01AC7A60> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x90b62000 - 0x90e0ffff com.apple.JavaScriptCore 6534.59 (6534.59.11) <7F623AA5-A11B-4C26-D2FD-EB5B9DE73F85> /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore 0x90e10000 - 0x90eccfff com.apple.ColorSync 4.6.8 (4.6.8) <920DD017-8B41-7334-E554-A85DB99EBD5A> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x90ecd000 - 0x90ed8ff7 libCSync.A.dylib 545.0.0 (compatibility 64.0.0) <287DECA3-7821-32B6-724D-AE03A9A350F9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x90ed9000 - 0x90ed9ff7 com.apple.Accelerate 1.6 (Accelerate 1.6) <3891A689-4F38-FACD-38B2-4BF937DE30CF> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x90eda000 - 0x90ef8fe7 libPng.dylib ??? (???) <6C0B95D7-9634-E044-0B79-F1DD56961C33> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x90ef9000 - 0x90fb1feb libFontParser.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x9118f000 - 0x91192ff7 libCoreVMClient.dylib ??? (???) <37F56237-4ABA-E5B5-968D-70FFE357E8E0> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x912f6000 - 0x91391fe7 com.apple.ApplicationServices.ATS 275.19 (???) <2E83B3E9-AF39-36FC-5D05-CC1E952098AB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x91392000 - 0x91395ff7 libCGXType.A.dylib 545.0.0 (compatibility 64.0.0) <4D766435-EB76-C384-0127-1D20ACD74076> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib 0x91396000 - 0x91396ff7 com.apple.vecLib 3.6 (vecLib 3.6) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x913a4000 - 0x913a5ff7 com.apple.audio.units.AudioUnit 1.6.7 (1.6.7) <93EC71F1-4D4E-F456-8EFE-32E7EFD7A064> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x913e0000 - 0x913e6fe7 com.apple.CommerceCore 1.0 (9.1) <521D067B-3BDA-D04E-E1FA-CFA526C87EB5> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore 0x913e7000 - 0x91515fe7 com.apple.CoreData 102.1 (251) <87FE6861-F2D6-773D-ED45-345272E56463> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x91516000 - 0x91521ff7 libGL.dylib ??? (???) <3E34468F-E9A7-8EFB-FF66-5204BD5B4E21> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x9153b000 - 0x915b5fff com.apple.audio.CoreAudio 3.2.6 (3.2.6) <156A532C-0B60-55B0-EE27-D02B82AA6217> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x915b6000 - 0x91606ff7 com.apple.framework.familycontrols 2.0.2 (2020) <596ADD85-79F5-A613-537B-F83B6E19013C> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls 0x91607000 - 0x9165dff7 com.apple.MeshKitRuntime 1.1 (49.2) /System/Library/PrivateFrameworks/MeshKit.framework/Versions/A/Frameworks/MeshKitRuntime.framework/Versions/A/MeshKitRuntime 0x9165e000 - 0x918c4ff7 com.apple.security 6.1.2 (55002) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x9191c000 - 0x91942ffb com.apple.DictionaryServices 1.1.2 (1.1.2) <43E1D565-6E01-3681-F2E5-72AE4C3A097A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x91943000 - 0x91aeaff7 libSystem.B.dylib 125.2.11 (compatibility 1.0.0) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib 0x91aeb000 - 0x91b1efff libTrueTypeScaler.dylib ??? (???) <8ADB7D19-413E-4499-C874-13C383F97685> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib 0x91b1f000 - 0x91b24ff7 com.apple.OpenDirectory 10.6 (10.6) <0603680A-A002-D294-DE83-0D028C6BE884> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x91b25000 - 0x91b78ff7 com.apple.HIServices 1.8.3 (???) <1D3C4587-6318-C339-BD0F-1988F246BE2E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x91b79000 - 0x91b91ff7 com.apple.CFOpenDirectory 10.6 (10.6) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x91b92000 - 0x91c3ffe7 libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <9F8413A6-736D-37D9-8EB3-7986D4699957> /usr/lib/libobjc.A.dylib 0x91cf7000 - 0x91d13fe3 com.apple.openscripting 1.3.1 (???) <2A748037-D1C0-6D47-2C4A-0562AF799AC9> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting 0x91d14000 - 0x91db1fe3 com.apple.LaunchServices 362.3 (362.3) <15B47388-16C8-97DA-EEBB-1709E136169E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x91db2000 - 0x91e7dfef com.apple.CoreServices.OSServices 359.2 (359.2) <7C16D9C8-6F41-5754-17F7-2659D9DD9579> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x91ef6000 - 0x91efaff7 libGIF.dylib ??? (???) <2251F789-B187-0837-6E38-A0E5C7C4FA3C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x91f45000 - 0x91f55ff7 libsasl2.2.dylib 3.15.0 (compatibility 3.0.0) /usr/lib/libsasl2.2.dylib 0x91f7a000 - 0x91f8bff7 com.apple.LangAnalysis 1.6.6 (1.6.6) <3036AD83-4F1D-1028-54EE-54165E562650> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x91f8c000 - 0x92009ff7 com.apple.iLifeMediaBrowser 2.5.5 (468.2.2) <459C8983-EAC4-7067-3355-5299D111D339> /System/Library/PrivateFrameworks/iLifeMediaBrowser.framework/Versions/A/iLifeMediaBrowser 0x9200a000 - 0x9202afe7 libresolv.9.dylib 41.1.0 (compatibility 1.0.0) <8C2B5FA8-2469-21C7-D297-F95A0FFE5F19> /usr/lib/libresolv.9.dylib 0x9202b000 - 0x92061fff libtidy.A.dylib ??? (???) <0FD72C68-4803-4C5B-3A63-05D7394BFD71> /usr/lib/libtidy.A.dylib 0x92103000 - 0x92117fe7 libbsm.0.dylib ??? (???) <14CB053A-7C47-96DA-E415-0906BA1B78C9> /usr/lib/libbsm.0.dylib 0x92118000 - 0x92218fe7 libxml2.2.dylib 10.3.0 (compatibility 10.0.0) /usr/lib/libxml2.2.dylib 0x92238000 - 0x92259fe7 com.apple.opencl 12.3.6 (12.3.6) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x9225d000 - 0x922a1ff3 com.apple.coreui 2 (114) <2234855E-3BED-717F-0BFA-D1A289ECDBDA> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x922a2000 - 0x922a4ff7 com.apple.securityhi 4.0 (36638) <6118C361-61E7-B34E-93DB-1B88108F8F18> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x922a5000 - 0x92337fe7 com.apple.print.framework.PrintCore 6.3 (312.7) <7410D1B2-655D-68DA-D4B9-2C65747B6817> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x92338000 - 0x927f3ff7 com.apple.VideoToolbox 0.484.60 (484.60) /System/Library/PrivateFrameworks/VideoToolbox.framework/Versions/A/VideoToolbox 0x92827000 - 0x92868ff7 libRIP.A.dylib 545.0.0 (compatibility 64.0.0) <80998F66-0AD7-AD12-B9AF-3E8D2CE6DE05> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x92869000 - 0x92872ff7 com.apple.DiskArbitration 2.3 (2.3) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x93061000 - 0x931a4fef com.apple.QTKit 7.7 (1800) <9DD27495-3020-0928-B3F2-D418C336E163> /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit 0x931a5000 - 0x931b7ff7 com.apple.MultitouchSupport.framework 207.11 (207.11) <6FF4F2D6-B8CD-AE13-56CB-17437EE5B741> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x931b8000 - 0x931b8ff7 com.apple.Accelerate.vecLib 3.6 (vecLib 3.6) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x931b9000 - 0x931c3fe7 com.apple.audio.SoundManager 3.9.3 (3.9.3) <5F494955-7290-2D91-DA94-44B590191771> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound 0x931c4000 - 0x931ffffb libFontRegistry.dylib ??? (???) <19ED5DE0-D3AF-B229-9193-35D58FE377E5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x93200000 - 0x9320eff7 com.apple.opengl 1.6.14 (1.6.14) <82622F67-E032-0BF6-A78D-50B346E8D0FD> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x93517000 - 0x9351bff7 libGFXShared.dylib ??? (???) <09540618-2ED1-72C4-61CB-938B35927568> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x9351c000 - 0x93526ff7 com.apple.HelpData 2.0.5 (34.1.1) /System/Library/PrivateFrameworks/HelpData.framework/Versions/A/HelpData 0x93527000 - 0x93531ffb com.apple.speech.recognition.framework 3.11.1 (3.11.1) <7486003F-8FDB-BD6C-CB34-DE45315BD82C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x93532000 - 0x9375dff3 com.apple.QuartzComposer 4.2 ({156.30}) <2C88F8C3-7181-6B1D-B278-E0EE3F33A2AF> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/QuartzComposer 0x937ac000 - 0x9396ffeb com.apple.ImageIO.framework 3.0.6 (3.0.6) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x93970000 - 0x93b52fff com.apple.imageKit 2.0.3 (1.0) <6E557757-26F7-7941-8AE7-046EC1871F50> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/ImageKit 0x93b53000 - 0x93b7bff7 libxslt.1.dylib 3.24.0 (compatibility 3.0.0) /usr/lib/libxslt.1.dylib 0x93b7c000 - 0x93bfeffb SecurityFoundation ??? (???) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x93cfe000 - 0x94133ff7 libLAPACK.dylib 219.0.0 (compatibility 1.0.0) <5E2D2283-57DE-9A49-1DB0-CD027FEFA6C2> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x94134000 - 0x94181feb com.apple.DirectoryService.PasswordServerFramework 6.1 (6.1) <00A1A83B-0E7D-D0F4-A643-8C5675C2BB21> /System/Library/PrivateFrameworks/PasswordServer.framework/Versions/A/PasswordServer 0x94182000 - 0x9423bfe7 libsqlite3.dylib 9.6.0 (compatibility 9.0.0) <52438E77-55D1-C231-1936-76F1369518E4> /usr/lib/libsqlite3.dylib 0x94284000 - 0x944f5fef com.apple.Foundation 6.6.8 (751.63) <69B3441C-B196-F2AD-07F8-D8DD24E4CD8C> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x946d0000 - 0x946e0ff7 com.apple.DSObjCWrappers.Framework 10.6 (134) <81A0B409-3906-A98F-CA9B-A49E75007495> /System/Library/PrivateFrameworks/DSObjCWrappers.framework/Versions/A/DSObjCWrappers 0x947ae000 - 0x947afff7 com.apple.MonitorPanelFramework 1.3.0 (1.3.0) <0EC4EEFF-477E-908E-6F21-ED2C973846A4> /System/Library/PrivateFrameworks/MonitorPanel.framework/Versions/A/MonitorPanel 0x947b0000 - 0x9488afff com.apple.DesktopServices 1.5.11 (1.5.11) <800F2040-9211-81A7-B438-7712BF51DEE3> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x9488b000 - 0x948e8ff7 com.apple.framework.IOKit 2.0 (???) <3DABAB9C-4949-F441-B077-0498F8E47A35> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x948e9000 - 0x948f0ff3 com.apple.print.framework.Print 6.1 (237.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x94943000 - 0x94ac5fe7 libicucore.A.dylib 40.0.0 (compatibility 1.0.0) <60FF302E-5FAE-749B-BC70-0496DC2FBF2D> /usr/lib/libicucore.A.dylib 0x94af2000 - 0x952e1557 com.apple.CoreGraphics 1.545.0 (???) <1D9DC7A5-228B-42CB-7018-66F42C3A9BB3> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x9534e000 - 0x953a6fe7 com.apple.datadetectorscore 2.0 (80.7) /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore 0x95462000 - 0x95d45ff7 com.apple.AppKit 6.6.8 (1038.36) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x95d46000 - 0x95d76ff7 com.apple.MeshKit 1.1 (49.2) <5A74D1A4-4B97-FE39-4F4D-E0B80F0ADD87> /System/Library/PrivateFrameworks/MeshKit.framework/Versions/A/MeshKit 0x95d77000 - 0x95d77ff7 liblangid.dylib ??? (???) /usr/lib/liblangid.dylib 0x95db1000 - 0x95dd8ff7 com.apple.quartzfilters 1.6.0 (1.6.0) <879A3B93-87A6-88FE-305D-DF1EAED04756> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzFilters.framework/Versions/A/QuartzFilters 0x95dd9000 - 0x95ddffff com.apple.CommonPanels 1.2.4 (91) <2438AF5D-067B-B9FD-1248-2C9987F360BA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels 0x95de0000 - 0x95e4afe7 libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib 0x95e4b000 - 0x95e4bff7 com.apple.quartzframework 1.5 (1.5) /System/Library/Frameworks/Quartz.framework/Versions/A/Quartz 0x95f1e000 - 0x96099fe7 com.apple.CoreFoundation 6.6.6 (550.44) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x96284000 - 0x965efff7 com.apple.QuartzCore 1.6.3 (227.37) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x96726000 - 0x96726ff7 com.apple.Carbon 150 (152) <8F767518-AD3C-5CA0-7613-674CD2B509C4> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x96727000 - 0x96864fe7 com.apple.audio.toolbox.AudioToolbox 1.6.7 (1.6.7) <423BDE4D-5082-B6CA-BB2C-E22A037235A4> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x96865000 - 0x968a2ff7 com.apple.SystemConfiguration 1.10.8 (1.10.2) <50E4D49B-4F61-446F-1C21-1B2BA814713D> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x9694d000 - 0x969f9fe7 com.apple.CFNetwork 454.12.4 (454.12.4) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x9706d000 - 0x9708ffef com.apple.DirectoryService.Framework 3.6 (621.16) <5566E769-6459-78A7-DD2C-1D3068BD3932> /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService 0x970d6000 - 0x973d0fef com.apple.QuickTime 7.6.6 (1800) /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime 0x97573000 - 0x9757bff7 com.apple.DisplayServicesFW 2.3.3 (289) <828084B0-9197-14DD-F66A-D634250A212E> /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServices 0x9758f000 - 0x975dffe7 libTIFF.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x975e0000 - 0x97a31fef com.apple.RawCamera.bundle 3.7.1 (570) /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x97a37000 - 0x97a7cff7 com.apple.ImageCaptureCore 1.1 (1.1) /System/Library/Frameworks/ImageCaptureCore.framework/Versions/A/ImageCaptureCore 0x97a9f000 - 0x97dbfff3 com.apple.CoreServices.CarbonCore 861.39 (861.39) <5C59805C-AF39-9010-B8B5-D673C9C38538> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x97dc0000 - 0x97dc2ff7 libRadiance.dylib ??? (???) <090420B3-CB65-9F7B-5349-D42F2F9693B6> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x97dc3000 - 0x97e07fe7 com.apple.Metadata 10.6.3 (507.15) <74F05E64-2A68-BA10-CCD4-128D164E5A0F> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x97e10000 - 0x97e89ff7 com.apple.PDFKit 2.5.5 (2.5.5) <85AA9E1C-D946-863A-823E-32F2AAF314CB> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/PDFKit.framework/Versions/A/PDFKit 0x97e8a000 - 0x97e90ff7 libCGXCoreImage.A.dylib 545.0.0 (compatibility 64.0.0) <6EE825E7-CBA5-2AD2-0336-244D45A1A834> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXCoreImage.A.dylib 0x97ebd000 - 0x97edcff7 com.apple.CoreVideo 1.6.2 (45.6) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x98c8f000 - 0x98cc9ff7 libcups.2.dylib 2.8.0 (compatibility 2.0.0) /usr/lib/libcups.2.dylib 0x98cca000 - 0x98dd6fe7 libGLProgrammability.dylib ??? (???) <6167CEB0-D8D6-C4D9-DD74-49755ADB540F> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib 0x98dd7000 - 0x98dd8ff7 com.apple.TrustEvaluationAgent 1.1 (1) <2D970A9B-77E8-EDC0-BEC6-7580D78B2843> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent 0x98dd9000 - 0x98e16ff7 com.apple.CoreMedia 0.484.60 (484.60) <8FAB137D-682C-6DEC-5A15-F0029A5B226F> /System/Library/PrivateFrameworks/CoreMedia.framework/Versions/A/CoreMedia 0x98e17000 - 0x98e5effb com.apple.CoreMediaIOServices 140.0 (1496) /System/Library/PrivateFrameworks/CoreMediaIOServices.framework/Versions/A/CoreMediaIOServices 0x98e5f000 - 0x98e6dfe7 libz.1.dylib 1.2.3 (compatibility 1.0.0) <33C1B260-ED05-945D-FC33-EF56EC791E2E> /usr/lib/libz.1.dylib 0x98e6e000 - 0x98e98ff7 com.apple.shortcut 1.1 (1.1) /System/Library/PrivateFrameworks/Shortcut.framework/Versions/A/Shortcut 0x98e99000 - 0x98f9bfe7 libcrypto.0.9.8.dylib 0.9.8 (compatibility 0.9.8) /usr/lib/libcrypto.0.9.8.dylib 0x98fc6000 - 0x99027fe7 com.apple.CoreText 151.13 (???) <23F359DA-D845-5C50-4DF3-19E858CF2B2C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText 0x99071000 - 0x990dfff7 com.apple.QuickLookUIFramework 2.3 (327.7) <7F89C0A1-310F-ACF1-AA6E-4ADFA4DC98DC> /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI 0x990e0000 - 0x990e3fe7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib 0x990e4000 - 0x9917cfe7 edu.mit.Kerberos 6.5.11 (6.5.11) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x991ec000 - 0x99250ffb com.apple.htmlrendering 72 (1.1.4) <4D451A35-FAB6-1288-71F6-F24A4B6E2371> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering 0x992c1000 - 0x9936fff3 com.apple.ink.framework 1.3.3 (107) <233A981E-A2F9-56FB-8BDE-C2DEC3F20784> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x993ca000 - 0x993fdff7 com.apple.AE 496.5 (496.5) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x993fe000 - 0x9940bff7 com.apple.NetFS 3.2.2 (3.2.2) /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS 0x9942a000 - 0x99557ffb com.apple.MediaToolbox 0.484.60 (484.60) /System/Library/PrivateFrameworks/MediaToolbox.framework/Versions/A/MediaToolbox 0x9a5ec000 - 0x9a6ccfe7 com.apple.vImage 4.1 (4.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x9a6cd000 - 0x9a6cdff7 com.apple.ApplicationServices 38 (38) <8012B504-3D83-BFBB-DA65-065E061CFE03> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x9a6ce000 - 0x9a9f2fef com.apple.HIToolbox 1.6.5 (???) <21164164-41CE-61DE-C567-32E89755CB34> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x9a9f3000 - 0x9aa36ff7 com.apple.NavigationServices 3.5.4 (182) <8DC6FD4A-6C74-9C23-A4C3-715B44A8D28C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices 0x9aa37000 - 0x9aa7aff7 libGLU.dylib ??? (???) <6CC3CE6A-7024-C685-EADA-7F9DC27128E2> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x9aa7b000 - 0x9aa8fffb com.apple.speech.synthesis.framework 3.10.35 (3.10.35) <57DD5458-4F24-DA7D-0927-C3321A65D743> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x9aa90000 - 0x9aaeafe7 com.apple.CorePDF 1.4 (1.4) <78A1DDE1-1609-223C-A532-D282DC5E0CD0> /System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF 0x9ac02000 - 0x9ac02ff7 com.apple.Cocoa 6.6 (???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0xffff0000 - 0xffff1fff libSystem.B.dylib ??? (???) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib Model: MacBookPro1,1, BootROM MBP11.0055.B08, 2 processors, Intel Core Duo, 2 GHz, 1 GB, SMC 1.2f10 Graphics: ATI Radeon X1600, ATY,RadeonX1600, PCIe, 256 MB Memory Module: global_name AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x86), Atheros 5424: 2.1.14.6 Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 1 incoming serial ports Network Service: AirPort, AirPort, en1 Network Service: Bluetooth, PPP (PPPSerial), Bluetooth-Modem Serial ATA Device: ST910021AS, 93.16 GB Parallel ATA Device: MATSHITADVD-R UJ-857 USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8501, 0xfd400000 / 2 USB Device: Apple Internal Keyboard / Trackpad, 0x05ac (Apple Inc.), 0x0217, 0x1d200000 / 2 USB Device: IR Receiver, 0x05ac (Apple Inc.), 0x8240, 0x5d200000 / 2 USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.), 0x8205, 0x7d100000 / 2 ---------- components: IDLE messages: 203657 nosy: adamswg priority: normal severity: normal status: open title: OS X 10.6.8 Crash when opening a file type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 18:47:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 17:47:32 +0000 Subject: [issue19684] IDLE on OS X 10.6.8 crashes when opening a file In-Reply-To: <1385055415.68.0.92413833052.issue19684@psf.upfronthosting.co.za> Message-ID: <1385056052.64.0.179062253877.issue19684@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> ronaldoussoren components: +Macintosh nosy: +hynek, kbk, ned.deily, roger.serwy, ronaldoussoren, terry.reedy title: OS X 10.6.8 Crash when opening a file -> IDLE on OS X 10.6.8 crashes when opening a file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 18:58:26 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 21 Nov 2013 17:58:26 +0000 Subject: [issue19684] IDLE on OS X 10.6.8 crashes when opening a file In-Reply-To: <1385055415.68.0.92413833052.issue19684@psf.upfronthosting.co.za> Message-ID: <1385056706.82.0.683846111423.issue19684@psf.upfronthosting.co.za> Ned Deily added the comment: >From the crash reports, it appears that you were trying to use IDLE with the Apple-supplied Tcl and Tk frameworks. OS X 10.6.x was the first release of the newer Aqua Cocoa Tk and it was very problematic. You should have seen a warning message when IDLE 2.7.6 started, warning you about this and advising you to go to http://www.python.org/download/mac/tcltk/ for further information. (The warning is also on the download pages and in the installer Readme.) You will read there: "you should only use IDLE or tkinter with an updated third-party Tcl/Tk 8.5, like ActiveTcl 8.5, installed". Do that and IDLE 2.7.6 should behave properly. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 19:00:00 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 21 Nov 2013 18:00:00 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385056800.78.0.536523866735.issue18874@psf.upfronthosting.co.za> Eric Snow added the comment: FYI, the C OrderedDict implementation in #16991 implements its own doubly-linked list, built around the needs of OrderedDict. I looked into BSD's queue.h [1], but it ended up simpler to roll my own. [1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.56 ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 19:02:59 2013 From: report at bugs.python.org (Will Adams) Date: Thu, 21 Nov 2013 18:02:59 +0000 Subject: [issue19684] IDLE on OS X 10.6.8 crashes when opening a file In-Reply-To: <1385056706.82.0.683846111423.issue19684@psf.upfronthosting.co.za> Message-ID: Will Adams added the comment: For some reason I got the impression that this only applied to some graphics library routines so I ignored the warnings. Thanks for the reply and sorry to take your time. On Nov 21, 2013, at 11:58 AM, Ned Deily wrote: > > Ned Deily added the comment: > >> From the crash reports, it appears that you were trying to use IDLE with the Apple-supplied Tcl and Tk frameworks. OS X 10.6.x was the first release of the newer Aqua Cocoa Tk and it was very problematic. You should have seen a warning message when IDLE 2.7.6 started, warning you about this and advising you to go to http://www.python.org/download/mac/tcltk/ for further information. (The warning is also on the download pages and in the installer Readme.) You will read there: "you should only use IDLE or tkinter with an updated third-party Tcl/Tk 8.5, like ActiveTcl 8.5, installed". Do that and IDLE 2.7.6 should behave properly. > > ---------- > resolution: -> out of date > stage: -> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 19:06:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 18:06:19 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <1385057179.25.0.588271400951.issue19681@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for test_functools. ---------- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file32758/issue19681.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 19:12:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 21 Nov 2013 18:12:38 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <1385057558.05.0.0629646594525.issue19664@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for test_userdict. ---------- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file32759/issue19664.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 19:12:40 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 18:12:40 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385057560.85.0.760650856244.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: The new patch addresses your review. I have altered the new to FLAGS_NONE, FLAGS_CLR_CHECK_LEAF etc. ---------- Added file: http://bugs.python.org/file32760/verify_flags_crl2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 19:22:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Nov 2013 18:22:21 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385058141.46.0.939858560942.issue8813@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That sounds too generic. How about VERIFY_CRL_NONE, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 19:50:59 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 21 Nov 2013 18:50:59 +0000 Subject: [issue19677] IDLE displaying a CoreAnimation warning In-Reply-To: <1385024074.44.0.183399663193.issue19677@psf.upfronthosting.co.za> Message-ID: <1385059859.51.0.467476621623.issue19677@psf.upfronthosting.co.za> Ned Deily added the comment: Since the message is coming from Cocoa layers of OS X, this is undoubtedly a Tk issue, rather than a Python issue. What version of Tcl/Tk are you using: ActiveTcl 8.5.15.1? Suggest you open an issue on the Tk bug tracker and/or the ActiveState bug tracker. https://core.tcl.tk/tk/reportlist http://bugs.activestate.com http://stackoverflow.com/questions/12507193/coreanimation-warning-deleted-thread-with-uncommitted-catransaction ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 19:54:05 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 21 Nov 2013 18:54:05 +0000 Subject: [issue19677] IDLE displaying a CoreAnimation warning In-Reply-To: <1385024074.44.0.183399663193.issue19677@psf.upfronthosting.co.za> Message-ID: <1385060045.16.0.519168341712.issue19677@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 20:10:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 19:10:52 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385061052.12.0.673678920774.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: It *is* generic. The flags are not about CRL alone, http://www.openssl.org/docs/crypto/X509_VERIFY_PARAM_set_flags.html#VERIFICATION_FLAGS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 20:12:01 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 21 Nov 2013 19:12:01 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385061121.74.0.824174697787.issue19674@psf.upfronthosting.co.za> Brett Cannon added the comment: For Nick: "still works" as in the metadata is still available without docstrings or "still works" as in it won't crash? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 20:30:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 19:30:42 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <3dQW8K4gV1zSxl@mail.python.org> Roundup Robot added the comment: New changeset 95eea8624d05 by Guido van Rossum in branch 'default': Better behavior when stepping over yield[from]. Fixes issue 16596. By Xavier de Gaye. http://hg.python.org/cpython/rev/95eea8624d05 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 20:31:35 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 21 Nov 2013 19:31:35 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1385062295.35.0.28112062272.issue16596@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- assignee: -> gvanrossum resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 20:37:40 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 Nov 2013 19:37:40 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1385062660.19.0.0888830204315.issue19572@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file32756/skiptest_not_return_or_pass.v4-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 20:41:49 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 Nov 2013 19:41:49 +0000 Subject: [issue19572] Report more silently skipped tests as skipped In-Reply-To: <1384363138.24.0.069015771908.issue19572@psf.upfronthosting.co.za> Message-ID: <1385062909.09.0.181774257299.issue19572@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file32761/skiptest_not_return_or_pass.v4-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 21:22:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 20:22:17 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1385056800.78.0.536523866735.issue18874@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > FYI, the C OrderedDict implementation in #16991 implements its own doubly-linked list, built around the needs of OrderedDict. I looked into BSD's queue.h [1], but it ended up simpler to roll my own. Oh nice, it's probably possible to factorize code and have more unit tests on the implementation. It may be better to discuss this in a separated issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 21:50:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 20:50:55 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385067055.39.0.681133388974.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not convinced myself that hashtable.c/h can be reused immediatly, so I prefer to move these two files to Modules. The files may be moved later if the containers are reused. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 22:07:04 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 21 Nov 2013 21:07:04 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <1385068024.95.0.797308247529.issue17916@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Thanks, Nick! Attached the new version, I hope that I did it right this time. ---------- Added file: http://bugs.python.org/file32762/dis_tb_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 22:09:29 2013 From: report at bugs.python.org (Larry Hastings) Date: Thu, 21 Nov 2013 21:09:29 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385068169.25.0.670386755787.issue19674@psf.upfronthosting.co.za> Larry Hastings added the comment: I changed it to "(". Patch attached. Still works. ---------- Added file: http://bugs.python.org/file32763/larry.introspection.for.builtins.patch.2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 22:38:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 21:38:50 +0000 Subject: [issue18294] zlib module is not completly 64-bit safe In-Reply-To: <1372107882.97.0.731855490225.issue18294@psf.upfronthosting.co.za> Message-ID: <3dQZ096zF0z7Ljt@mail.python.org> Roundup Robot added the comment: New changeset f947fe289db8 by Victor Stinner in branch 'default': Close #18294: Fix the zlib module to make it 64-bit safe http://hg.python.org/cpython/rev/f947fe289db8 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 22:44:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 21:44:31 +0000 Subject: [issue18294] zlib module is not completly 64-bit safe In-Reply-To: <1372107882.97.0.731855490225.issue18294@psf.upfronthosting.co.za> Message-ID: <1385070271.74.0.455035634247.issue18294@psf.upfronthosting.co.za> STINNER Victor added the comment: > LGTM. I changed the "uint" parser to raise a ValueError instead of an OverflowError, so the unit test doesn't need to be adapted. Thanks again Serhiy for your review :) I doesn't want to backport the fix to Python 2.7 or 3.3, it's more intrusive than what I expected. I opened the issue to fix compiler warnings, it's not like an user complained about a crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 22:57:51 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 21 Nov 2013 21:57:51 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1385067055.39.0.681133388974.issue18874@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > STINNER Victor added the comment: > > I'm not convinced myself that hashtable.c/h can be reused immediatly, so I prefer to move these two files to Modules. The files may be moved later if the containers are reused. Please do so. I'd also like to open an issue for this (to try to make hashtable reusable), to not forget it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 22:58:27 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 21 Nov 2013 21:58:27 +0000 Subject: [issue19677] IDLE displaying a CoreAnimation warning In-Reply-To: <1385024074.44.0.183399663193.issue19677@psf.upfronthosting.co.za> Message-ID: <1385071107.3.0.284923546636.issue19677@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Following the instruction in the log message would also be useful, that is, in a shell window: $ env CA_DEBUG_TRANSACTIONS=1 /Applications/Python\ 2.7/IDLE.app/Contents/MacOS/IDLE With some luck the stack trace will point to the source of the problem. As Ned wrote, that source is probably TkCocoa. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 22:59:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Nov 2013 21:59:00 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1385061052.12.0.673678920774.issue8813@psf.upfronthosting.co.za> Message-ID: <1385071138.2306.0.camel@fsol> Antoine Pitrou added the comment: > It *is* generic. The flags are not about CRL alone, That's why I proposed VERIFY_xxx, e.g. VERIFY_CRL_NONE. Calling some flags "FLAGS" is senseless, it's like calling an integer "INTEGER". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:02:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 22:02:16 +0000 Subject: [issue19685] open() fails to autodetect utf-8 if LANG=C In-Reply-To: <1385068862.86.0.511890547507.issue19685@psf.upfronthosting.co.za> Message-ID: <1385071336.05.0.439190763452.issue19685@psf.upfronthosting.co.za> STINNER Victor added the comment: pip is not part of the Python standard library, you should report it upstream: https://github.com/pypa/pip ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:03:27 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 22:03:27 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385071407.03.0.400758045495.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: s/FLAGS_/VERIFY_/g ? OK, I don't have hard feelings. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:05:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Nov 2013 22:05:32 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1385071407.03.0.400758045495.issue8813@psf.upfronthosting.co.za> Message-ID: <1385071530.2306.1.camel@fsol> Antoine Pitrou added the comment: > s/FLAGS_/VERIFY_/g ? OK, I don't have hard feelings. :) And VERIFY_NONE should be VERIFY_CRL_NONE IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:07:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 22:07:40 +0000 Subject: [issue19685] open() fails to autodetect utf-8 if LANG=C In-Reply-To: <1385068862.86.0.511890547507.issue19685@psf.upfronthosting.co.za> Message-ID: <1385071660.3.0.301785075868.issue19685@psf.upfronthosting.co.za> STINNER Victor added the comment: -exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) +exec(compile(open(__file__,encoding='utf_8').read().replace('\\r\\n', '\\n'), __file__, 'exec')) The fix is not correct, the script may use a different encoding. Replace open() with tokenize.open(), available since Python 3.2. .replace('\\r\\n', '\\n') is probably useless in Python 3 which uses universal newlines by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:12:06 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 22:12:06 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1385052274.24.0.012871903061.issue19619@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I used the private class method to minimise the per-codec impact (1 modified/added line per codec rather than 3). Your other suggestions look good, so I'll apply those before committing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:14:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 22:14:15 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1385061121.74.0.824174697787.issue19674@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: "still works" as in "doesn't crash and the docstrings are still missing to save memory". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:17:22 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 21 Nov 2013 22:17:22 +0000 Subject: [issue19628] maxlevels -1 on compileall for unlimited recursion In-Reply-To: <1384634450.77.0.212426893492.issue19628@psf.upfronthosting.co.za> Message-ID: <1385072242.43.0.369360394218.issue19628@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Here's a patch which adds support for controlling the maxlevels on command line. Currently, compileall uses a binary choice, either we don't process subdirectories or we process at most 10 subdirectories. This seems to be the case since its inception, in " Changeset: 1828 (b464e1d0b2fb) New way of generating .pyc files, thanks to Sjoerd. User: Guido van Rossum Date: 1994-08-29 10:52:58 +0000 (1994-08-29) " The patch adds a new command option, -r, where `-r 0` is equivalent to specifying -l. I guess we can't modify -l to actually control the maxlevels, due to backward compatibility concerns. ---------- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file32764/compileall.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:17:40 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 21 Nov 2013 22:17:40 +0000 Subject: [issue19628] maxlevels -1 on compileall for unlimited recursion In-Reply-To: <1384634450.77.0.212426893492.issue19628@psf.upfronthosting.co.za> Message-ID: <1385072260.87.0.00169700056163.issue19628@psf.upfronthosting.co.za> Changes by Claudiu.Popa : ---------- versions: +Python 3.4 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:33:01 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 21 Nov 2013 22:33:01 +0000 Subject: [issue18967] Find a less conflict prone approach to Misc/NEWS In-Reply-To: <1378605881.29.0.990351353386.issue18967@psf.upfronthosting.co.za> Message-ID: <1385073181.81.0.0203349242745.issue18967@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's my half-baked idea on the topic, based largely on what I could learn of Twisted's method from looking through their source repo online. I liked their use of separate files for each NEWS entry, especially since it should make merge conflicts exceedingly rare. Basically, the plan is to add a couple of scripts to Tools/scripts named news.py and news_release.py. Spec outline for news.py: - four possible usages: - interactive - ask for each necessary datum - issue number(s), section(s), message - single command - command line switches for section and issue number, remaining arguments constitute message - blend - ask about anything not given in the single command, unless told not to with -f/--force (and then use defaults) - invoke editor - mirror hg's handling of `hg commit` without -m or -l, open an editor and use the saved file - output a text file named "issue..news" or "+.news" (default in case of no issue number) containing the message into the appropriate folder(s) (e.g. Misc/NEWS.parts/Build) - print the contents of the written file to stdout - allows `news.py --section build --issue 12345 "Fix building" | hg com -l -` - print the output file's name to stderr - to make it easy to use `hg com -l Misc/NEWS.parts/.news` and not interfere with the above - `hg add` the output file This would necessitate a bit of new structure in the repo, namely a Misc/NEWS.parts/ dir, containing directories for each section (Core & Builtins, Library, etc.), which should also have a 'header.news' file to make each dir non-empty and for use with news_release.py. This second script would be used at release time, and would simply walk the Misc/NEWS.parts dirs, building Misc/NEWS from the individual files and deleting them as it goes. Beyond this basic functionality, there are other possible extensions, such as news.py gathering any information about the current change that is readily available and saving it in either comments at the tail end of the generated .news file, or in a separate .data file with the same base name, which news_release.py could then use for alternate NEWS formats (such as suitable output for Doc/whatsnew/changelog.rst with links to anything relevant). To make the usage more convenient, both scripts could be added to Makefile, a la `make patchcheck`. For Windows committers, there can either be a convenience batch file just for news.py, or I still hope to eventually get configure.bat/make.bat into a committable state. If anyone thinks this half-baked idea looks like it might be edible when it's done, I'd be happy to cobble together news.py and news_release.py in a sandbox repo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:45:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 22:45:03 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <1385073903.4.0.365771646125.issue19664@psf.upfronthosting.co.za> STINNER Victor added the comment: issue19664.patch looks good to me. Funny fact: test_repr() of test_dict only test dictionaries with 1 item :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:45:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 22:45:17 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385073917.2.0.343573277737.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: But it's not about CRL alone. How about VERIFY_DEFAULT = 0 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:47:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Nov 2013 22:47:18 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1385073917.2.0.343573277737.issue8813@psf.upfronthosting.co.za> Message-ID: <1385074035.2306.2.camel@fsol> Antoine Pitrou added the comment: > But it's not about CRL alone. How about VERIFY_DEFAULT = 0 ? Sounds good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:51:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 22:51:46 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <1385074306.08.0.790643706746.issue19681@psf.upfronthosting.co.za> STINNER Victor added the comment: permutation() looks overkill to me for such trivial test. Here is a simpler approach: remove the second keyword :-) test_functools_repr.patch ---------- Added file: http://bugs.python.org/file32765/test_functools_repr.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:52:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 22:52:49 +0000 Subject: [issue19685] pip: open() uses the locale encoding to parse Python script, instead of the encoding cookie In-Reply-To: <1385068862.86.0.511890547507.issue19685@psf.upfronthosting.co.za> Message-ID: <1385074369.56.0.99403870352.issue19685@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: open() fails to autodetect utf-8 if LANG=C -> pip: open() uses the locale encoding to parse Python script, instead of the encoding cookie _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:56:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 22:56:22 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <3dQbjf10Zhz7M7l@mail.python.org> Roundup Robot added the comment: New changeset 83805c9d1f05 by Christian Heimes in branch 'default': Issue #8813: Add SSLContext.verify_flags to change the verification flags http://hg.python.org/cpython/rev/83805c9d1f05 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 23:59:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 22:59:34 +0000 Subject: [issue18967] Find a less conflict prone approach to Misc/NEWS In-Reply-To: <1385073181.81.0.0203349242745.issue18967@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Sounds plausible to me - I'd be interested in seeing an experimental version :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:00:11 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 23:00:11 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <1385074811.39.0.839362517825.issue19681@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm for Victors patch. Let's not get too fancy with tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:00:45 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 23:00:45 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385074845.39.0.255171893457.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: memo to me: add whatsnew entry ---------- assignee: -> christian.heimes resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:02:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 23:02:14 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385074811.39.0.839362517825.issue19681@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I'm pretty sure the second keyword is there to ensure the repr includes the appropriate commas. Can we just make a suitable dict and check the key order? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:10:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 21 Nov 2013 23:10:51 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: Message-ID: Nick Coghlan added the comment: And actually re-reading the existing code to see it already works that way... how can two dicts with the same keys, without any extra keys being added and deleted in either have different iteration orders? If it's just a matter of copying the original dict changing the order, then we should be able to restore consistency by copying it when building the expected repr as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:23:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 23:23:58 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <1385076238.26.0.313390065264.issue19681@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, here is a different patch sorting keywords. So it still checks how the C code joins keyword parameters. ---------- Added file: http://bugs.python.org/file32766/test_functools_repr2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:26:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 21 Nov 2013 23:26:04 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <1385076364.61.0.894268754574.issue19681@psf.upfronthosting.co.za> Christian Heimes added the comment: Both keys happen to have the same LSB bytes. I have added "print(hash('a') & 7, hash('b') & 7)" to the code and run test tests multiple times: $ ./python -m test -m test_repr test_functools [1/1] test_functools 3 6 3 6 1 test OK. $ ./python -m test -m test_repr test_functools [1/1] test_functools 2 2 2 2 test test_functools failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_functools ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:34:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Nov 2013 23:34:56 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385076896.65.0.960256475843.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: > return codecs.CodecInfo._declare_transform() I also prefer the private attribute option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:46:46 2013 From: report at bugs.python.org (=?utf-8?b?TGx1w61z?=) Date: Thu, 21 Nov 2013 23:46:46 +0000 Subject: [issue19686] possible unnecessary memoryview copies? Message-ID: <1385077606.25.0.863226598696.issue19686@psf.upfronthosting.co.za> New submission from Llu?s: The following code works without raising any AssertionError >>> n = "some small integer value" >>> m = "some larger integer value" >>> assert n>> data = bytearray(n) >>> mem = memoryview(data) >>> assert mem==mem[:] >>> assert mem==mem[0:] >>> assert mem==mem[:m] However, the different slices have different IDs, failing on the following asserts: >>> assert id(mem)==id(mem[:]) >>> assert id(mem)==id(mem[0:]) >>> assert id(mem)==id(mem[:m]) Is the interpreter copying unnecessary data in these type of slices? ---------- components: Library (Lib) messages: 203700 nosy: Llu?s priority: normal severity: normal status: open title: possible unnecessary memoryview copies? type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 00:57:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 21 Nov 2013 23:57:49 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <3dQd4X2TLpz7M7g@mail.python.org> Roundup Robot added the comment: New changeset fedc2b8fbb6e by Barry Warsaw in branch 'default': - Issue #19555: Restore sysconfig.get_config_var('SO'), with a http://hg.python.org/cpython/rev/fedc2b8fbb6e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 01:03:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 00:03:31 +0000 Subject: [issue19687] Fixes for elementtree integer overflow Message-ID: <1385078611.06.0.503563950207.issue19687@psf.upfronthosting.co.za> New submission from Christian Heimes: The patch addresses most overflow errors in elementtree except for the problems in element_ass_subscr(). ---------- components: Library (Lib) files: elementtree_overflow.patch keywords: patch messages: 203702 nosy: christian.heimes, haypo priority: normal severity: normal stage: patch review status: open title: Fixes for elementtree integer overflow type: compile error versions: Python 3.4 Added file: http://bugs.python.org/file32767/elementtree_overflow.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 01:18:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 00:18:03 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <3dQdWt4sDBz7M75@mail.python.org> Roundup Robot added the comment: New changeset a0ec33b83ba4 by Christian Heimes in branch 'default': Issue #19664: test_userdict's repr test no longer depends on the order http://hg.python.org/cpython/rev/a0ec33b83ba4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 01:20:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 00:20:06 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <1385079606.53.0.831056619226.issue19664@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks Serhiy! Your patch was simple yet elegant. :) ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 01:22:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 00:22:57 +0000 Subject: [issue19681] test_repr (test.test_functools.TestPartialC) failures In-Reply-To: <1385044476.32.0.977131973544.issue19681@psf.upfronthosting.co.za> Message-ID: <3dQddX3330zSTs@mail.python.org> Roundup Robot added the comment: New changeset 18a44d65d34a by Christian Heimes in branch 'default': Issue #19681: Apply a quick and minimal band-aid. http://hg.python.org/cpython/rev/18a44d65d34a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 01:30:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 00:30:49 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1385076896.65.0.960256475843.issue19619@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Victor pointed out this should now raise LookupError rather than TypeError. However, I'm not going to duplicate the manipulation of the private attribute across seven different codecs when a private alternate constructor solves that problem far more cleanly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 01:42:28 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 00:42:28 +0000 Subject: [issue19640] Drop _source attribute of namedtuple In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1385080948.42.0.696115559626.issue19640@psf.upfronthosting.co.za> Eric Snow added the comment: As an alternative, how about turning _source into a property? ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 01:51:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 00:51:20 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385081480.53.0.0982610679856.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: > There is no "codec registry" - there is only the default codec search function, the encodings import namespace, the normalisation algorithm and the alias dictionary. interp->codec_search_cache can be seen as the "registry". If you store codecs in two different registries depending a property, attribute, whatever; you keep O(1) complexity (bo extra strcmp or getting an attribute at each lookup). The overhead is only when you load a codec for the first time. It should not be so hard to add a second dictionary. You don't need to touch all parts of the codecs machinery, only interp->codec_search_cache. It would not be possible to have the name in the two registries. So codecs.lookup() would still return any kind of codecs, it would just lookup in two dictionaries instead of one. So codecs.encode/decode would be unchanged too (if you want to keep these functions ;-)). Only bytes.decode/str.encode would be modified to only lookup in the "text codecs" only registry. Yet another option: add a new dictionary, but leave interp->codec_search_cache unchanged. Text codecs would also be registered twice: once in interp->codec_search_cache, once in the second dictionary. So bytes.decode/str.encode would only lookup in the text codecs dictionary, instead of interp->codec_search_cache. That's all ;-) > Victor pointed out this should now raise LookupError rather than TypeError. If you accept to raise a LookupError, the "two registries" option may become more obvious, isn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 01:51:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 00:51:40 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <3dQfGg6w31z7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 9adcb61ea741 by Christian Heimes in branch 'default': Issue #17134: Finalize interface to Windows' certificate store. Cert and http://hg.python.org/cpython/rev/9adcb61ea741 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 02:12:14 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 22 Nov 2013 01:12:14 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1385082734.17.0.192211681636.issue19555@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 02:23:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 01:23:49 +0000 Subject: [issue18147] SSL: diagnostic functions to list loaded CA certs In-Reply-To: <1370513969.26.0.776855011912.issue18147@psf.upfronthosting.co.za> Message-ID: <3dQfzk2LCwz7LkR@mail.python.org> Roundup Robot added the comment: New changeset ae0734493f6b by Christian Heimes in branch 'default': Issue #18147: Add missing documentation for SSLContext.get_ca_certs(). http://hg.python.org/cpython/rev/ae0734493f6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 02:35:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 01:35:12 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1385084112.82.0.0600934796793.issue17134@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 02:43:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 01:43:09 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1385084589.96.0.678070360778.issue19292@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch implements a new method SSLContext.load_default_certs(). A new method is a required because set_default_verify_paths() doesn't have a way to specify a purpose. Every cert store allows the user to specify the purpose of a certificate (e.g. suitable for every purpose or just for serverAuth and clientAuth). The feature is supported by NSS certdata.txt, Windows API and Apple's crypto API. The patch is rather simple and uses features implemented in issues #17134 Use Windows' certificate store for CA certs #18138 ctx.load_verify_locations(cadata) #19448 SSL: add OID / NID lookup ---------- keywords: +patch nosy: +giampaolo.rodola, janssen priority: normal -> high stage: needs patch -> patch review Added file: http://bugs.python.org/file32768/load_default_certs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 03:20:00 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 02:20:00 +0000 Subject: [issue19688] pip install now fails with 'HTMLParser' object has no attribute 'unescape' Message-ID: <1385086800.23.0.730007142289.issue19688@psf.upfronthosting.co.za> New submission from Ned Deily: 7b9235852b3b for Issue2927 moved and documents the previously undocumented unescape function. Unfortunately, at least one third-party module, distlib, depends on it. And distlib is now used by pip and needed for the ensurepip feature of 3.4. $ python3.4 get-pip.py Traceback (most recent call last): File "get-pip.py", line 7269, in do_exec(entry, locals()) File "", line 1, in do_exec File "", line 9, in File "/var/folders/fm/9wjgctqx61n796zt88qmmnxc0000gn/T/unpacker-1kz7n2dh-scratchdir/pip/__init__.py", line 10, in File "/var/folders/fm/9wjgctqx61n796zt88qmmnxc0000gn/T/unpacker-1kz7n2dh-scratchdir/pip/util.py", line 17, in File "/var/folders/fm/9wjgctqx61n796zt88qmmnxc0000gn/T/unpacker-1kz7n2dh-scratchdir/pip/vendor/distlib/version.py", line 13, in File "/var/folders/fm/9wjgctqx61n796zt88qmmnxc0000gn/T/unpacker-1kz7n2dh-scratchdir/pip/vendor/distlib/compat.py", line 343, in AttributeError: 'HTMLParser' object has no attribute 'unescape' ---------- assignee: ezio.melotti components: Library (Lib) messages: 203712 nosy: ezio.melotti, larry, ned.deily priority: release blocker severity: normal status: open title: pip install now fails with 'HTMLParser' object has no attribute 'unescape' versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 03:36:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 02:36:57 +0000 Subject: [issue19664] UserDict test assumes ordered dict repr In-Reply-To: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> Message-ID: <3dQhc92Fh4z7M86@mail.python.org> Roundup Robot added the comment: New changeset b62eb82ca5ef by Christian Heimes in branch 'default': Issue #19664: fix another flake test_userdict test http://hg.python.org/cpython/rev/b62eb82ca5ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 03:41:53 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 02:41:53 +0000 Subject: [issue19688] pip install now fails with 'HTMLParser' object has no attribute 'unescape' In-Reply-To: <1385086800.23.0.730007142289.issue19688@psf.upfronthosting.co.za> Message-ID: <1385088113.32.0.123605241983.issue19688@psf.upfronthosting.co.za> Ned Deily added the comment: A distlib issue has also been opened. https://bitbucket.org/pypa/distlib/issue/36/distlib-uses-undocumented-and-deprecated ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 03:44:23 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 22 Nov 2013 02:44:23 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1385084589.96.0.678070360778.issue19292@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Can you also add a patch to asyncio (I suppose to the code where it calls set_default_verify_paths())? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 04:05:14 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 22 Nov 2013 03:05:14 +0000 Subject: [issue19688] pip install now fails with 'HTMLParser' object has no attribute 'unescape' In-Reply-To: <1385086800.23.0.730007142289.issue19688@psf.upfronthosting.co.za> Message-ID: <1385089514.56.0.0644682552606.issue19688@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is a patch that adds HTMLParser.unescape() back with a DeprecationWarning. ---------- keywords: +patch stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file32769/issue19688.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 04:11:16 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 22 Nov 2013 03:11:16 +0000 Subject: [issue19686] possible unnecessary memoryview copies? In-Reply-To: <1385077606.25.0.863226598696.issue19686@psf.upfronthosting.co.za> Message-ID: <1385089876.71.0.747709899377.issue19686@psf.upfronthosting.co.za> R. David Murray added the comment: I believe a new memoryview object is created, but the data is not copied. That's the whole point of memoryview, I think :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 04:22:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 03:22:24 +0000 Subject: [issue19689] ssl.create_default_context() Message-ID: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> New submission from Christian Heimes: A few weeks ago I suggested the addition of ssl.create_default_context() to the stdlib. The patch implements my proposal. It replaces code in several of modules with one central function. The patch also removes ssl.wrap_socket() in favor for a SSLContext object. As soon as #19292 gets accepted I'll add the additional keyword argument "purpose=None" to the arguments of ssl.create_default_context() in order to load the default system certs:: if purpose is not None and verify_mode != CERT_NONE: context.load_default_certs(purpose) ---------- components: Library (Lib) files: ssl_create_default_context.patch keywords: patch messages: 203718 nosy: christian.heimes, giampaolo.rodola, gvanrossum, janssen, pitrou priority: normal severity: normal stage: patch review status: open title: ssl.create_default_context() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32770/ssl_create_default_context.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 04:25:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 03:25:13 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1385090713.4.0.0236965716041.issue19292@psf.upfronthosting.co.za> Christian Heimes added the comment: I have slightly different plans to make it even easier, #19689 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 04:34:51 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 03:34:51 +0000 Subject: [issue19688] pip install now fails with 'HTMLParser' object has no attribute 'unescape' In-Reply-To: <1385086800.23.0.730007142289.issue19688@psf.upfronthosting.co.za> Message-ID: <1385091291.05.0.43789369108.issue19688@psf.upfronthosting.co.za> Ned Deily added the comment: LGTM, thanks! ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 04:49:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 03:49:42 +0000 Subject: [issue19688] pip install now fails with 'HTMLParser' object has no attribute 'unescape' In-Reply-To: <1385086800.23.0.730007142289.issue19688@psf.upfronthosting.co.za> Message-ID: <3dQkD56tXGz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 0534b882f9ce by Ezio Melotti in branch 'default': #19688: add back and deprecate the internal HTMLParser.unescape() method. http://hg.python.org/cpython/rev/0534b882f9ce ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 04:50:20 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 22 Nov 2013 03:50:20 +0000 Subject: [issue19688] pip install now fails with 'HTMLParser' object has no attribute 'unescape' In-Reply-To: <1385086800.23.0.730007142289.issue19688@psf.upfronthosting.co.za> Message-ID: <1385092220.43.0.93507640413.issue19688@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 05:57:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 04:57:23 +0000 Subject: [issue14455] plistlib unable to read json and binary plist files In-Reply-To: <1333144578.81.0.343123708942.issue14455@psf.upfronthosting.co.za> Message-ID: <3dQlkC1BLgz7M7S@mail.python.org> Roundup Robot added the comment: New changeset 602e0a0ec67e by Ned Deily in branch 'default': Issue #14455: Fix maybe_open typo in Plist.fromFile(). http://hg.python.org/cpython/rev/602e0a0ec67e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 08:03:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 07:03:14 +0000 Subject: [issue19649] Clean up OS X framework and universal bin directories In-Reply-To: <1384847080.69.0.0507465882105.issue19649@psf.upfronthosting.co.za> Message-ID: <3dQpWP53X3z7M8D@mail.python.org> Roundup Robot added the comment: New changeset 44d1ac9245cf by Ned Deily in branch 'default': Issue #19649: On OS X, the same set of file names are now installed http://hg.python.org/cpython/rev/44d1ac9245cf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 08:03:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 07:03:15 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <3dQpWQ3J65z7M8D@mail.python.org> Roundup Robot added the comment: New changeset 90d4153728f6 by Ned Deily in branch 'default': Issue #19553: PEP 453 - "make install" and "make altinstall" now install or http://hg.python.org/cpython/rev/90d4153728f6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 08:09:49 2013 From: report at bugs.python.org (Matej Cepl) Date: Fri, 22 Nov 2013 07:09:49 +0000 Subject: [issue19279] UTF-7 to UTF-8 decoding crash In-Reply-To: <1382003736.62.0.288611587107.issue19279@psf.upfronthosting.co.za> Message-ID: <1385104189.09.0.500736110241.issue19279@psf.upfronthosting.co.za> Changes by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 08:14:30 2013 From: report at bugs.python.org (koobs) Date: Fri, 22 Nov 2013 07:14:30 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <1385104470.92.0.0199083273114.issue19599@psf.upfronthosting.co.za> koobs added the comment: @Richard, reporting all green on koobs-freebsd{9,10} 2.7 since 086865ceefe1 Thank you! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 08:31:15 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 07:31:15 +0000 Subject: [issue19690] test_logging test_race failed with PermissionError Message-ID: <1385105475.94.0.253645069216.issue19690@psf.upfronthosting.co.za> New submission from Ned Deily: http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/568/steps/test/logs/stdio ====================================================================== ERROR: test_race (test.test_logging.HandlerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_logging.py", line 613, in test_race h.handle(r) File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/logging/__init__.py", line 835, in handle self.emit(record) File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/logging/handlers.py", line 468, in emit self.stream = self._open() File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/logging/__init__.py", line 1005, in _open return open(self.baseFilename, self.mode, encoding=self.encoding) PermissionError: [Errno 1] Operation not permitted: '/tmp/test_logging-3-i5haxx_n.log' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_logging.py", line 616, in test_race h.close() File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/logging/__init__.py", line 990, in close self.flush() File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/logging/__init__.py", line 937, in flush self.stream.flush() ValueError: I/O operation on closed file. The test passed when rerun by regrtest. This looks similar to the failures in Issue14632. ---------- components: Tests messages: 203727 nosy: ned.deily, vinay.sajip priority: normal severity: normal status: open title: test_logging test_race failed with PermissionError versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 08:34:00 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 22 Nov 2013 07:34:00 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1385105640.06.0.513629424552.issue19660@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think the complexity delta in the grammar is exactly 0. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 08:44:33 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 07:44:33 +0000 Subject: [issue19649] Clean up OS X framework and universal bin directories In-Reply-To: <1384847080.69.0.0507465882105.issue19649@psf.upfronthosting.co.za> Message-ID: <1385106273.14.0.405010954638.issue19649@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 09:02:37 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 08:02:37 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1385107357.05.0.730480659927.issue19553@psf.upfronthosting.co.za> Ned Deily added the comment: The proposed patch with minor changes is now pushed. I believe all of the review points have either been resolved or are covered by separate pip issues with the exception of item 8. For item 6 (permissions not being forced), I decided that there are so many other files that are also not having permissions forced that it is silly to single out ensurepip. Issue15890 should cover a comprehensive solution for all files. In the meantime, the solution remains to set umask appropriately (e.g. 022) before running "make install" or "make altinstall". I'm removing "release blocker" status and propose closing this issue once a decision about and/or home for item 8 is found. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 09:33:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 08:33:12 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1385081480.53.0.0982610679856.issue19619@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Victor, you can propose whatever you like for 3.5, but I'm not adding new interpreter state two days before feature freeze when we don't have to. Looking up the private CodecInfo attribute is still O(1) anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 10:04:14 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 22 Nov 2013 09:04:14 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385111054.89.0.237468815492.issue18864@psf.upfronthosting.co.za> Changes by Claudiu.Popa : ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 11:17:03 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 22 Nov 2013 10:17:03 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1385115423.54.0.222417060738.issue17457@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hello! Attached patch which uses ModuleSpec, tested with http://hg.python.org/features/pep-451/ repo. ---------- Added file: http://bugs.python.org/file32771/unittest_discovery_spec2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 11:20:45 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 10:20:45 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1384165995.98.0.0533035404084.issue19550@psf.upfronthosting.co.za> Message-ID: <1385115645.08.0.660133170562.issue19550@psf.upfronthosting.co.za> Ned Deily added the comment: If it is acceptable for the "Remove" option to be somewhat unpredictable in the case where pip or setuptools was already installed and not by the installer, would "python -m pip uninstall --yes pip setuptools" work? If not, should a new issue be opened to find a solution? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 11:33:41 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 22 Nov 2013 10:33:41 +0000 Subject: [issue19599] Failure of test_async_timeout() of test_multiprocessing_spawn: TimeoutError not raised In-Reply-To: <1384477280.87.0.276347613255.issue19599@psf.upfronthosting.co.za> Message-ID: <1385116421.73.0.947636145669.issue19599@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 11:55:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 10:55:49 +0000 Subject: [issue19550] PEP 453: Windows installer integration In-Reply-To: <1385115645.08.0.660133170562.issue19550@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I think "Off by default" is a reasonable solution for the beta (and even 3.4 final), but a separate issue explaining *why* it's off by default would be good. I can then ping the pip folks to ask for suggestions - if they come up with something workable, we may be able to have it turned on by default in 3.4 final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 11:57:19 2013 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 22 Nov 2013 10:57:19 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1385117839.78.0.165915994807.issue19557@psf.upfronthosting.co.za> anatoly techtonik added the comment: Neither you nor docs answer the question when Assign node gets Tuple as argument, when List and when Subscript. While it is obvious to you, I personally don't know what a Subscript is. This is the kind of stuff that I'd like to see documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 11:58:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 10:58:48 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1385117928.8.0.552654723477.issue19555@psf.upfronthosting.co.za> STINNER Victor added the comment: Test is failing on Windows: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/1758/steps/test/logs/stdio ====================================================================== ERROR: test_SO_in_vars (test.test_sysconfig.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\test_sysconfig.py", line 388, in test_SO_in_vars self.assertIsNotNone(vars['SO']) KeyError: 'SO' ====================================================================== FAIL: test_SO_value (test.test_sysconfig.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\test_sysconfig.py", line 382, in test_SO_value sysconfig.get_config_var('EXT_SUFFIX')) AssertionError: None != '.pyd' ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 11:59:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 10:59:45 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1385117985.86.0.945454784319.issue17134@psf.upfronthosting.co.za> STINNER Victor added the comment: The test is failing: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/1758/steps/test/logs/stdio ====================================================================== FAIL: test_enum_certificates (test.test_ssl.BasicSocketTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\test\test_ssl.py", line 553, in test_enum_certificates self.assertIn(serverAuth, names) AssertionError: '1.3.6.1.5.5.7.3.1' not found in {'1.3.6.1.5.5.7.3.3', '1.3.6.1.4.1.311.10.3.5', '2.16.840.1.113730.4.1', '2.16.840.1.113733.1.8.1'} ---------------------------------------------------------------------- ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 12:22:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 11:22:29 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385119349.45.0.566796420341.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: - switched to LookupError for the dedicated exception - default value moved to a CodecInfo class attribute - new private APIs guarded by PY_LIMITED_API - used repr formatting where appropriate in the tests - cleaned up the tests a bit by using encodings.normalize_encoding - new test to ensure the codec output type checks are still exercised - backwards compatibility tweaks for raw tuples returned from the codec registry lookup (uncovered by the full test suite run) I'll be committing this version after a final local run of "make test" and a refleak check on test_codecs, test_charmapcodec and test_unicode (the latter two are the ones that found the backwards compatibility issue with the attribute lookup). ---------- Added file: http://bugs.python.org/file32772/issue19619_blacklist_transforms_py34_postreview.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 12:24:16 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 22 Nov 2013 11:24:16 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: Message-ID: <528F3ED7.1010008@egenix.com> Marc-Andre Lemburg added the comment: Nick: I've had a look at your second patch. A couple of notes: * I think you should add the flag to the constructor of the CodecInfo tuple subclass and then set this in the resp. codecs. The extra constructor class method looks too much like a hack and is not needed. * The comment in codecs.h should read: """ Checks the encoding against a list of codecs which do not implement a str<->bytes encoding before attempting the operation. Please note that these APIs are internal and should not be used in Python C extensions. """ Regarding Victor's suggestion to use a separate registry dict for this: I'm definitely -1 on this. The black listing is a very special case only used for the .encode()/.decode() methods and otherwise doesn't have anything to do with the codecs sub-system. It doesn't make sense to change the design of the registry just to implement this one special case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 21 22:21:02 2013 From: report at bugs.python.org (Curtis Doty) Date: Thu, 21 Nov 2013 21:21:02 +0000 Subject: [issue19685] open() fails to autodetect utf-8 if LANG=C Message-ID: <1385068862.86.0.511890547507.issue19685@psf.upfronthosting.co.za> New submission from Curtis Doty: I first stumbled across this bug attempting to install use pip's cool editable mode: $ pip install -e git+git://github.com/appliedsec/pygeoip.git#egg=pygeoip Obtaining pygeoip from git+git://github.com/appliedsec/pygeoip.git#egg=pygeoip Cloning git://github.com/appliedsec/pygeoip.git to ./src/pygeoip Running setup.py egg_info for package pygeoip Traceback (most recent call last): File "", line 16, in File "/home/curtis/python/3.3.3/lib/python3.3/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1098: ordinal not in range(128) Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 16, in File "/home/curtis/python/3.3.3/lib/python3.3/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1098: ordinal not in range(128) ---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in /home/curtis/python/2013-11-20/src/pygeoip Storing complete log in /home/curtis/.pip/pip.log It turns out this is related to a local LANG=C environment. If I set LANG=en_US.UTF-8, the problem goes away. But it seems pip/python3 open() should be more intelligently handling this. Worse, the file in this case https://github.com/appliedsec/pygeoip/blob/master/setup.py already has a source code decorator *declaring* it as utf-8. Ugly workaround patch is to force pip to always use 8-bit encoding on setup.py: --- pip.orig/req.py 2013-11-19 15:53:49.000000000 -0800 +++ pip/req.py 2013-11-20 16:37:23.642656132 -0800 @@ -281,7 +281,7 @@ def replacement_run(self): writer(self, ep.name, os.path.join(self.egg_info,ep.name)) self.find_sources() egg_info.egg_info.run = replacement_run -exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) +exec(compile(open(__file__,encoding='utf_8').read().replace('\\r\\n', '\\n'), __file__, 'exec')) """ def egg_info_data(self, filename): @@ -687,7 +687,7 @@ exec(compile(open(__file__).read().repla ## FIXME: should we do --install-headers here too? call_subprocess( [sys.executable, '-c', - "import setuptools; __file__=%r; exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))" % self.setup_py] + "import setuptools; __file__=%r; exec(compile(open(__file__,encoding='utf_8').read().replace('\\r\\n', '\\n'), __file__, 'exec'))" % self.setup_py] + list(global_options) + ['develop', '--no-deps'] + list(install_options), cwd=self.source_dir, filter_stdout=self._filter_install, But that only treats the symptom. Root cause appears to be in python3 as demonstrated by this simple script: wrong-codec.py: #! /bin/env python3 from urllib.request import urlretrieve urlretrieve('https://raw.github.com/appliedsec/pygeoip/master/setup.py', filename='setup.py') # if LANC=C then locale.py:getpreferredencoding()->'ANSI_X3.4-1968' foo= open('setup.py') # bang! ascii_decode() cannot handle the unicode bar= foo.read() This does not occur in python2. Is this bug in pip or python3? ---------- components: Unicode messages: 203673 nosy: GreenKey, ezio.melotti, haypo priority: normal severity: normal status: open title: open() fails to autodetect utf-8 if LANG=C type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 12:28:03 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 22 Nov 2013 11:28:03 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <528F3ED7.1010008@egenix.com> Message-ID: <528F3FBB.50006@egenix.com> Marc-Andre Lemburg added the comment: On 22.11.2013 12:24, Marc-Andre Lemburg wrote: > > Nick: I've had a look at your second patch. A couple of notes: > > * I think you should add the flag to the constructor of the CodecInfo > tuple subclass and then set this in the resp. codecs. The extra > constructor class method looks too much like a hack and is > not needed. Like this: _is_text_encoding = True # Assume codecs are text encodings by default def __new__(cls, encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None, _is_text_encoding=None): self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter)) self.name = name self.encode = encode self.decode = decode self.incrementalencoder = incrementalencoder self.incrementaldecoder = incrementaldecoder self.streamwriter = streamwriter self.streamreader = streamreader if _is_text_encoding is not None: self._is_text_encoding = _is_text_encoding return self ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 12:41:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 11:41:42 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385120502.95.0.993102277324.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: - switched the private flag from being set in a class method to using a keyword only parameter to __init__ - updated the codecs.h comment as MAL suggested ---------- Added file: http://bugs.python.org/file32773/issue19619_blacklist_transforms_py34_keyword_only_param.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 12:43:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 11:43:25 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385120605.25.0.594725951158.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: If _is_text_encoding may change in Python 3.5, you should add a comment to warn users to not use it and explain its purpose, maybe with a reference to this issue. -- We have talking about a very few codecs: * base64: bytes => bytes * bz2: bytes => bytes * hex: bytes => bytes; decode supports also ASCII string (str) => bytes * quopri: bytes => bytes * rot_13: str => str * uu: bytes => bytes * zlib: bytes => bytes I suppose that supporting ASCII string input to the hex decoder is a border effect of its implementation. I don't know if it is expected *for the codec*. If we simplify the hex decoder to reject str types, all these codecs would have simply one type: same input and output type. Anyway, if you want something based on types, the special case for the hex decoder cannot be expressed with a type nor ABC. "ASCII string" is not a type. So instead of _is_text_encoding=False could be transform=bytes or transform=str. (I don't care of the name: transform_type, type, codec_type, data_type, etc.) I know that bytes is not exact: bytearray, memoryview and any bytes-like object is accepted, but it is a probably enough for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:09:27 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 22 Nov 2013 12:09:27 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1385120605.25.0.594725951158.issue19619@psf.upfronthosting.co.za> Message-ID: <528F496F.80503@egenix.com> Marc-Andre Lemburg added the comment: On 22.11.2013 12:43, STINNER Victor wrote: > > STINNER Victor added the comment: > > If _is_text_encoding may change in Python 3.5, you should add a comment to warn users to not use it and explain its purpose, maybe with a reference to this issue. +1 > -- > > We have talking about a very few codecs: > > * base64: bytes => bytes > * bz2: bytes => bytes > * hex: bytes => bytes; decode supports also ASCII string (str) => bytes > * quopri: bytes => bytes > * rot_13: str => str > * uu: bytes => bytes > * zlib: bytes => bytes > > I suppose that supporting ASCII string input to the hex decoder is a border effect of its implementation. I don't know if it is expected *for the codec*. > > If we simplify the hex decoder to reject str types, all these codecs would have simply one type: same input and output type. Anyway, if you want something based on types, the special case for the hex decoder cannot be expressed with a type nor ABC. "ASCII string" is not a type. > > So instead of _is_text_encoding=False could be transform=bytes or transform=str. (I don't care of the name: transform_type, type, codec_type, data_type, etc.) > > I know that bytes is not exact: bytearray, memoryview and any bytes-like object is accepted, but it is a probably enough for now. I think it's better to go with something that's explicitly internal now than to fix a public API in form of a constructor parameter this late in the release process. For 3.5 it may make sense to declare a few codec feature flags which would then make lookups such as the one done for the blacklist easier to implement and faster to check as well. Such flags could provide introspection at a higher level than what would be possible with type mappings (even though I still like the idea of adding those to CodecInfo at some point). One possible use for such flags would be to declare whether a codec is reversible or not - in other words, whether .decode(.encode(x)) works for all possible inputs x. This flag could then be used to quickly check whether a codec would fail on a Unicode str which has non-Latin-1 code points or to create a list of valid encodings for certain applications, e.g. a list which only contains reversible Unicode encodings such as the UTF ones. Anyway: Thanks to Nick for implementing this, to Serhiy for the black list idea and Victor for the attribute idea :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:09:54 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 22 Nov 2013 12:09:54 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1384910825.18.0.00604679093295.issue19660@psf.upfronthosting.co.za> Message-ID: <1385122194.88.0.938061201379.issue19660@psf.upfronthosting.co.za> Eric V. Smith added the comment: While I think that the dotted_name restriction should be relaxed and it should instead be a style guide issue, I have to agree with Benjamin here: the difference in grammar complexity is zero and shouldn't drive the decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:13:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 12:13:01 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <528F496F.80503@egenix.com> Message-ID: STINNER Victor added the comment: 2013/11/22 Marc-Andre Lemburg : > Anyway: Thanks to Nick for implementing this, to Serhiy for the black > list idea and Victor for the attribute idea :-) In fact, the attribute idea comes from you :-) http://bugs.python.org/issue7475#msg96374 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:24:43 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 22 Nov 2013 12:24:43 +0000 Subject: [issue19686] possible unnecessary memoryview copies? In-Reply-To: <1385077606.25.0.863226598696.issue19686@psf.upfronthosting.co.za> Message-ID: <1385123083.77.0.217322521956.issue19686@psf.upfronthosting.co.za> Stefan Krah added the comment: David is correct: No data is copied, but new memoryview objects with different shape and strides are created. That is relatively cheap. ---------- nosy: +skrah resolution: -> invalid stage: -> committed/rejected status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:31:41 2013 From: report at bugs.python.org (Donald Stufft) Date: Fri, 22 Nov 2013 12:31:41 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1385123501.96.0.443171901513.issue19553@psf.upfronthosting.co.za> Donald Stufft added the comment: I'm honestly not sure what to do about #8 on your list. It's sort of a really wierd edge case as far as pip is concerned right now because the support for the versioned commands and differing them is sort of a hack job while we wait for proper support from a PEP. Probably long term wise once there's support for this in a PEP pip will gain some sort of regenerate scripts commands that could handle this case better. I'm struggling to come up with a good solution in the interim though :( ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:34:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 12:34:10 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385123650.49.0.660357657032.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: It turns out the codec cache and the refleak hunting mechanism in regrtest *really* don't like each other if you use closures to implement your test codecs :) Anyway, the attached patch tweaks the tests to handle refleak hunting (and running the refleak hunter indicates there aren't any leaks). I'll be committing this one immediately after posting this. And like MAL, I'm keen to stick with a fully private API at this point, as I believe we need to get the status quo clearly documented before we can start talking about making changes to the public APIs. I think both this issue and issue 7475 show that until we have a common understanding amongst the core development team of what's possible now, it's hard to discuss: - what's currently possible that we would like to deprecate? (opinions differ strongly on this one - MAL and I think the status quo is mostly OK, but could use some better type inference support, Victor would like to see support for anything beyond text encodings, binary transforms and text transforms deprecated) - what's not possible that we would like to make possible? (e.g. removing cached codecs, removing search functions, reordering search functions, type inference through the codec machinery) - what's already possible that we would like to make easier? (e.g. registering new codecs) ---------- Added file: http://bugs.python.org/file32774/issue19619_blacklist_transforms_py34_refleak_hunting.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:35:41 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 12:35:41 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385123741.26.0.370984054528.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: Well, that patch minus the debugging print that was still in there :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:39:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 12:39:50 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <3dQxzn5N0Cz7Ll9@mail.python.org> Roundup Robot added the comment: New changeset d68df99d7a57 by Nick Coghlan in branch 'default': Issue #19619: Blacklist non-text codecs in method API http://hg.python.org/cpython/rev/d68df99d7a57 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:43:18 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 12:43:18 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385124198.68.0.0166828550623.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: 3.4 has been dealt with. A similar functional patch should work in 3.3, but the test changes will be different (since those test cases don't exist yet in 3.3, and the wrapping ones aren't relevant at all). ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 13:44:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 12:44:25 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1385124265.39.0.10230845455.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: The 3.4 portion of issue 19619 has been addressed, so removing it as a dependency again. ---------- dependencies: -Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 14:00:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 13:00:53 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <3dQyS44kM8z7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 1e3b8601b098 by Nick Coghlan in branch 'default': Issue #19619: Update What's New for codec blacklist http://hg.python.org/cpython/rev/1e3b8601b098 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 14:03:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 13:03:30 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <1385125410.22.0.0314882588471.issue17134@psf.upfronthosting.co.za> Christian Heimes added the comment: That's strange. It looks like the Win2k box has no root CA certs for serverAuth installed whatsoever. I'm adding Matthias to this ticket. ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 14:03:53 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 13:03:53 +0000 Subject: [issue19685] pip: open() uses the locale encoding to parse Python script, instead of the encoding cookie In-Reply-To: <1385068862.86.0.511890547507.issue19685@psf.upfronthosting.co.za> Message-ID: <1385125433.54.0.102306412587.issue19685@psf.upfronthosting.co.za> Nick Coghlan added the comment: Upstream: https://github.com/pypa/pip/pull/816 ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 14:09:10 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 13:09:10 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385125750.86.0.0861909462909.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: The initial concern was a denial of service. Nick, can you backport your changeset to Python 3.3? > This issue should avoid the denial of service attack when a compression codec is used, see: > https://mail.python.org/pipermail/python-dev/2013-November/130188.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 14:17:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 13:17:01 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385126221.0.0.588419455099.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: Can we now remove wrap_codec_error()? And maybe more changes which were done to workaround issues with non-Unicode codecs. bytes.decode/str.encode should no more raise a TypeError with codecs of the Python standard library. Related changesets: changeset: 87267:04e1f701aeaa user: Nick Coghlan date: Tue Nov 19 22:33:10 2013 +1000 files: Lib/test/test_codecs.py Objects/exceptions.c description: Also chain codec exceptions that allow weakrefs The zlib and hex codecs throw custom exception types with weakref support if the input type is valid, but the data fails validation. Make sure the exception chaining in the codec infrastructure can wrap those as well. changeset: 87109:4ea622c085ca user: Nick Coghlan date: Fri Nov 15 21:47:37 2013 +1000 files: Lib/test/test_codecs.py Python/codecs.c description: Close 19609: narrow scope of codec exc chaining changeset: 87084:854a2cea31b9 user: Nick Coghlan date: Wed Nov 13 23:49:21 2013 +1000 files: Doc/whatsnew/3.4.rst Include/pyerrors.h Lib/test/test_codecs.py Misc/NEWS Objects/exceptions.c Objects/unicodeobject.c Python/codecs.c description: Close #17828: better handling of codec errors - output type errors now redirect users to the type-neutral convenience functions in the codecs module - stateless errors that occur during encoding and decoding will now be automatically wrapped in exceptions that give the name of the codec involved ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 14:22:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 13:22:13 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385126530.2432.1.camel@fsol> Antoine Pitrou added the comment: > A few weeks ago I suggested the addition of > ssl.create_default_context() to the stdlib. The patch implements my > proposal. It replaces code in several of modules with one central > function. The patch also removes ssl.wrap_socket() in favor for a > SSLContext object. Can you call it create_default_client_context() (a bit long) and/or stress that it's for client use? Or will it be ok for server purposes too, i.e. do you promise that it'll never get CERT_REQUIRED by default? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:12:56 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 14:12:56 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385129576.14.0.508860828251.issue19689@psf.upfronthosting.co.za> Christian Heimes added the comment: Good point! We need a purpose flag anyway in order to load the appropriate root CA certs. The purpose flag can be used for purpose-specific verify mode: SERVER_AUTH = _ASN1Object('1.3.6.1.5.5.7.3.1') CLIENT_AUTH = _ASN1Object('1.3.6.1.5.5.7.3.2') if isinstance(purpose, str): purpose = _ASN1Object.fromname(purpose) if verify_mode is None: if purpose == SERVER_AUTH: # authenticate a TLS web server (for client sockets). The default # setting may change in the future. verify_mode = CERT_NONE elif purpose == CLIENT_AUTH: # authenticate a TLS web client (for server sockets). The default # setting is guaranteed to be stable and will never change. verify_mode = CERT_NONE else: # other (code signing, S/MIME, IPSEC, ...), default may change. verify_mode = CERT_NONE context.verify_mode = verify_mode ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:15:41 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 14:15:41 +0000 Subject: [issue19552] PEP 453: venv module and pyvenv integration In-Reply-To: <1384166762.42.0.483253842263.issue19552@psf.upfronthosting.co.za> Message-ID: <1385129741.87.0.678738789629.issue19552@psf.upfronthosting.co.za> Nick Coghlan added the comment: Since ensurepip needs to manipulate sys.path, I ended up running the "-m ensurepip" using the venv Python in a subprocess. This both avoids side effects on the current process and gets ensurepip the right target directory settings automatically. ---------- keywords: +patch nosy: +dstufft, ned.deily, vinay.sajip Added file: http://bugs.python.org/file32775/issue19552_venv_module_api.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:16:49 2013 From: report at bugs.python.org (Donald Stufft) Date: Fri, 22 Nov 2013 14:16:49 +0000 Subject: [issue19552] PEP 453: venv module and pyvenv integration In-Reply-To: <1384166762.42.0.483253842263.issue19552@psf.upfronthosting.co.za> Message-ID: <1385129809.15.0.895309378242.issue19552@psf.upfronthosting.co.za> Donald Stufft added the comment: That's similar to how virtualenv does it, so it's probably pretty reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:19:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 14:19:56 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385129576.14.0.508860828251.issue19689@psf.upfronthosting.co.za> Message-ID: <1385129994.2432.5.camel@fsol> Antoine Pitrou added the comment: > SERVER_AUTH = _ASN1Object('1.3.6.1.5.5.7.3.1') > CLIENT_AUTH = _ASN1Object('1.3.6.1.5.5.7.3.2') That's a bit ugly. How about an enum? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:21:08 2013 From: report at bugs.python.org (dellair jie) Date: Fri, 22 Nov 2013 14:21:08 +0000 Subject: [issue19661] AIX: Python: RuntimeError "invalid slot offset when importing a module" in _ssl module In-Reply-To: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> Message-ID: <1385130068.23.0.498061226893.issue19661@psf.upfronthosting.co.za> dellair jie added the comment: Folks, Is there a patch to apply on this, I tried to search online, found one similar post but was solved until the poster switched to another version of xlc. Do we need to use another compiler(I will have to build though)? Please don't hesitate to contact me if further information is needed for analysis. Thanks, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:21:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 14:21:48 +0000 Subject: [issue19691] Weird wording in RuntimeError doc Message-ID: <1385130108.97.0.877442110994.issue19691@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The RuntimeError documentation has a strange sentence embedded in it: """This exception is mostly a relic from a previous version of the interpreter; it is not used very much any more""" http://docs.python.org/dev/library/exceptions.html#RuntimeError That's quite wrong. RuntimeError may not be raised inside the interpreter core, but it's raised by a bunch of stdlib modules. ---------- assignee: docs at python components: Documentation messages: 203763 nosy: docs at python, neologix, pitrou priority: normal severity: normal status: open title: Weird wording in RuntimeError doc type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:24:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 14:24:55 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST Message-ID: <1385130295.49.0.846468108755.issue19692@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Py_SAFE_DOWNCAST's name is a bit misleading: it isn't safe except in debug mode. I propose to rename it to Py_DOWNCAST, so that developers are reminded that the burden of the sanity checks is on them. ---------- components: Interpreter Core messages: 203764 nosy: christian.heimes, haypo, pitrou, tim.peters priority: normal severity: normal status: open title: Rename Py_SAFE_DOWNCAST type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:27:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 14:27:54 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385130474.06.0.120130401153.issue19689@psf.upfronthosting.co.za> Christian Heimes added the comment: In my opinion enums are for a closed batch of known entities. There are at least 20-30 purpose flags, maybe more. Everybody is allowed to define their own OIDs, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:28:17 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 14:28:17 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST In-Reply-To: <1385130295.49.0.846468108755.issue19692@psf.upfronthosting.co.za> Message-ID: <1385130497.71.0.406969434009.issue19692@psf.upfronthosting.co.za> Christian Heimes added the comment: +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:31:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 14:31:49 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST In-Reply-To: <1385130295.49.0.846468108755.issue19692@psf.upfronthosting.co.za> Message-ID: <1385130709.38.0.20730469443.issue19692@psf.upfronthosting.co.za> STINNER Victor added the comment: I like Py_DOWNCAST name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:33:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 14:33:34 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385130474.06.0.120130401153.issue19689@psf.upfronthosting.co.za> Message-ID: <1385130812.2432.7.camel@fsol> Antoine Pitrou added the comment: > In my opinion enums are for a closed batch of known entities. There > are at least 20-30 purpose flags, maybe more. Everybody is allowed to > define their own OIDs, too. Well, how many purposes are we going to expose? I don't think users should know what ASN1 objects are, and a nice repr() is really useful. (but there's no reason an enum cannot have 20 or 30 members) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:34:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 14:34:27 +0000 Subject: [issue19552] PEP 453: venv module and pyvenv integration In-Reply-To: <1384166762.42.0.483253842263.issue19552@psf.upfronthosting.co.za> Message-ID: <3dR0X30cmhz7Ll5@mail.python.org> Roundup Robot added the comment: New changeset 57fbab22ab4e by Nick Coghlan in branch 'default': Close #19552: venv and pyvenv ensurepip integration http://hg.python.org/cpython/rev/57fbab22ab4e ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:36:14 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 14:36:14 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385130974.91.0.383362180961.issue19689@psf.upfronthosting.co.za> Christian Heimes added the comment: The objects already have a (more or less) nice representation: >>> ssl._ASN1Object.fromname("1.3.6.1.5.5.7.3.1") _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1') >>> ssl._ASN1Object.fromname("1.3.6.1.5.5.7.3.2") _ASN1Object(nid=130, shortname='clientAuth', longname='TLS Web Client Authentication', oid='1.3.6.1.5.5.7.3.2') >>> ssl._ASN1Object.fromname("1.3.6.1.5.5.7.3.8") _ASN1Object(nid=133, shortname='timeStamping', longname='Time Stamping', oid='1.3.6.1.5.5.7.3.8') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:39:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 14:39:14 +0000 Subject: [issue19693] "make altinstall && make install" behaviour differs from "make install" Message-ID: <1385131154.65.0.84746252058.issue19693@psf.upfronthosting.co.za> New submission from Nick Coghlan: >From issue #19553: 8. "make install" is a superset of "make altinstall" and one would expect the results of (a) "make install" to be the same as (b) "make altinstall && make install". However (b) results in "python -m ensurepip --altinstall --upgrade && python -m ensurepip --upgrade" which results in no unversioned pip files being installed as the second call to pip does nothing: Requirement already up-to-date: setuptools in /py/dev/3x/root/uxd/lib/python3.4/site-packages Requirement already up-to-date: pip in /py/dev/3x/root/uxd/lib/python3.4/site-packages We may need some magic on the pip side when ENSUREPIP_OPTIONS is set to make this behave consistently. ---------- components: Library (Lib) messages: 203771 nosy: dstufft, larry, ncoghlan, ned.deily priority: high severity: normal stage: needs patch status: open title: "make altinstall && make install" behaviour differs from "make install" type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:40:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 14:40:25 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1385131225.03.0.678417369654.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19693 covers an anomaly where "make altinstall && make install" doesn't quite do the same thing as "make install" (the "pip3" script will be missing in the former case) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:41:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 14:41:13 +0000 Subject: [issue19553] PEP 453: "make install" and "make altinstall" integration In-Reply-To: <1384169979.63.0.863929512032.issue19553@psf.upfronthosting.co.za> Message-ID: <1385131273.53.0.736801182817.issue19553@psf.upfronthosting.co.za> Nick Coghlan added the comment: I moved the "make altinstall && make install" problem out to its own issue (issue 19693) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:42:01 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 14:42:01 +0000 Subject: [issue19407] PEP 453: update the "Installing Python Modules" documentation In-Reply-To: <1382791475.83.0.387983167617.issue19407@psf.upfronthosting.co.za> Message-ID: <1385131321.33.0.671376735803.issue19407@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:44:03 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 14:44:03 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <1385131443.9.0.203821658584.issue17916@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:47:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 14:47:30 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385131650.26.0.429867367234.issue19689@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok. Note that as long as they aren't actually passed to OpenSSL, they don't need to be ASN1 objects at all, i.e. if it's only a parameter to create_default_context(), it can perfectly well be a str or enum. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:57:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 14:57:23 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <3dR12V4WK4z7Lm5@mail.python.org> Roundup Robot added the comment: New changeset d71251d9fbbe by Nick Coghlan in branch 'default': Close #17916: dis.Bytecode based replacement for distb http://hg.python.org/cpython/rev/d71251d9fbbe ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 15:58:24 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 14:58:24 +0000 Subject: [issue17916] Provide dis.Bytecode based equivalent of dis.distb In-Reply-To: <1367844864.14.0.49825143621.issue17916@psf.upfronthosting.co.za> Message-ID: <1385132304.78.0.121160964324.issue17916@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thank you for the patch! It's nice to have this included for the initial general availability of the new disassembly API :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:03:34 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 22 Nov 2013 15:03:34 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1385132614.71.0.451422624961.issue19555@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:07:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 15:07:20 +0000 Subject: [issue19669] remove mention of the old LaTeX docs In-Reply-To: <1384978825.66.0.587760682432.issue19669@psf.upfronthosting.co.za> Message-ID: <1385132840.81.0.176686362943.issue19669@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Done in 33f58b469a4d (forgot to mention the issue id there). ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:09:41 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 15:09:41 +0000 Subject: [issue19694] test_venv failing on one of the Ubuntu buildbots Message-ID: <1385132981.26.0.207810200878.issue19694@psf.upfronthosting.co.za> New submission from Nick Coghlan: pip still relies on imp (due to cross-version compatibility requirements), so it may trigger a pending deprecation warning, and potentially return a non-zero return code: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3142/steps/test/logs/stdio ---------- components: Library (Lib) keywords: buildbot messages: 203778 nosy: larry, ncoghlan priority: release blocker severity: normal stage: needs patch status: open title: test_venv failing on one of the Ubuntu buildbots type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:10:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 15:10:27 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1385133027.0.0.496034180182.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19694 is a new issue for one of the buildbots objecting to the new venv tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:11:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 15:11:42 +0000 Subject: [issue19552] PEP 453: venv module and pyvenv integration In-Reply-To: <1384166762.42.0.483253842263.issue19552@psf.upfronthosting.co.za> Message-ID: <1385133102.79.0.608664161591.issue19552@psf.upfronthosting.co.za> Nick Coghlan added the comment: Rather than reopening this (which is part of tracking the feature integration for the beta), I opened issue 19694 to cover the stable buildbot that is objecting to the new venv test (most of the others seem happy with it) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:14:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 15:14:02 +0000 Subject: [issue17134] Use Windows' certificate store for CA certs In-Reply-To: <1360078143.8.0.938168290854.issue17134@psf.upfronthosting.co.za> Message-ID: <3dR1Pk04y9z7Lmf@mail.python.org> Roundup Robot added the comment: New changeset de65df13ed50 by Christian Heimes in branch 'default': Issue #17134: check certs of CA and ROOT system store http://hg.python.org/cpython/rev/de65df13ed50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:15:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 15:15:47 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST In-Reply-To: <1385130295.49.0.846468108755.issue19692@psf.upfronthosting.co.za> Message-ID: <1385133347.76.0.352698731944.issue19692@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, _Py_DOWNCAST may be better (not a public API). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:17:36 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 15:17:36 +0000 Subject: [issue19695] Clarify how to use various import-related locks Message-ID: <1385133456.35.0.294583357802.issue19695@psf.upfronthosting.co.za> New submission from Brett Cannon: While working on the PEP 451 code I realized that the way we are handling the global import lock along with the per-module lock is a little ad-hoc. For instance, what are we wanting to use the global lock for these days? Mutations of anything off of sys? Reading anything from sys as well? Just to create the module-level locks? And the per-module lock expects the global lock to be held already, but then does a release implicitly. That seems like the wrong way to structure the context managers; maybe pass in the lock global lock as proof it's being held? Or if we switch to much finer granularity for dealing with sys.modules (especially if it is only for mutation) then we can lock and unlock the global lock entirely within the per-module lock context manager. At worst I think we should clearly document in the docstrings for the global and per-module context managers what we expect the lock to be used for and then really go through the import code to make sure we are holding it where we want but no more. To start the conversation, I say the global lock is just to get the per-module locks. The per-module locks are held when finding/loading modules to prevent threading issues of requesting an incomplete module or thinking it isn't being imported when it actually is (which implicitly means holding it when accessing/mutating sys.modules for any module, e.g. trying to fetch a parent module). ---------- components: Interpreter Core messages: 203783 nosy: brett.cannon, eric.snow, ncoghlan, pitrou priority: low severity: normal stage: needs patch status: open title: Clarify how to use various import-related locks type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:21:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 15:21:03 +0000 Subject: [issue19448] SSL: add OID / NID lookup In-Reply-To: <1383126908.52.0.345026933499.issue19448@psf.upfronthosting.co.za> Message-ID: <3dR1Yp6hLJz7Lmk@mail.python.org> Roundup Robot added the comment: New changeset 7d914d4b05fe by Christian Heimes in branch 'default': Issue #19448: report name / NID in exception message of ASN1Object http://hg.python.org/cpython/rev/7d914d4b05fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:21:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 15:21:12 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1385126221.0.0.588419455099.issue19619@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: No, we can't remove wrap_codec_error, as it is still needed in order to cover direct use of the codec machinery and to handle non-text codecs registered by third parties (the tests cover both these cases). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:29:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 15:29:12 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385134152.61.0.205882256225.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: > No, we can't remove wrap_codec_error, as it is still needed in order > to cover direct use of the codec machinery and to handle non-text > codecs registered by third parties (the tests cover both these cases) I searched on the WWW for third party codecs, I only found Unicode encodings (str => bytes). I don't think that we need all these tricks to provide more informations on transform codecs and transform codecs are not used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:41:56 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 22 Nov 2013 15:41:56 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST In-Reply-To: <1385130295.49.0.846468108755.issue19692@psf.upfronthosting.co.za> Message-ID: <1385134916.47.0.204047349306.issue19692@psf.upfronthosting.co.za> Martin v. L?wis added the comment: -1. The macro name doesn't claim the cast to be safe, i.e. it's not "Py_SAFELY_DOWNCAST", but "safe downcast", i.e. it's an assertion that the cast actually has been verified as being safe. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:43:36 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 15:43:36 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1385134152.61.0.205882256225.issue19619@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Victor, the general purpose codec infrastructure is more than a decade old, and supported in both Python 2 and Python 3, so you're not going to get it deprecated in the last few days before the 3.4 feature freeze. You've already succeeded in inconveniencing affected users migrating from Python 2 for another release by blocking the restoration of the transform codec aliases, but I'm definitely not going to revert any of the other already implemented codec handling improvements without a direct request from Larry as release manager or Guido as BDFL. If you propose a new codec architecture as a PEP for Python 3.5 and get it accepted, then *that* would be the appropriate time to remove these improvements to the existing architecture. Until such a PEP is put forward and accepted, I will continue to work on documenting the status quo as clearly as I can (especially since the only thing I see wrong with it is the challenges it poses for type inference, and that's a pretty minor gripe in a language as resistant to static analysis as Python). I've tried to persuade you that lowering the barriers to adoption for Python 3 is a more significant concern than a mythical nirvana of conceptual purity that *runs directly counter to the stated intent of the creator of the current codec architecture*, but if you wish to exercise your core developer veto and deliberately inconvenience users, even though the original problems cited in issue 7475 have all been addressed, that's your choice. Just don't expect me to try to defend that decision to any users that complain, because I think it's completely the wrong thing to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:45:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 15:45:04 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST In-Reply-To: <1385134916.47.0.204047349306.issue19692@psf.upfronthosting.co.za> Message-ID: <1385135102.2432.8.camel@fsol> Antoine Pitrou added the comment: > -1. The macro name doesn't claim the cast to be safe, i.e. it's not > "Py_SAFELY_DOWNCAST", but "safe downcast", i.e. it's an assertion that > the cast actually has been verified as being safe. It's not an assertion, it's a cast. Otherwise it should be named Py_ASSERT_SAFE_DOWNCAST (and it should only do the assertion, not the cast). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:51:18 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 22 Nov 2013 15:51:18 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST In-Reply-To: <1385130295.49.0.846468108755.issue19692@psf.upfronthosting.co.za> Message-ID: <1385135478.14.0.619151508561.issue19692@psf.upfronthosting.co.za> Tim Peters added the comment: Goodness. Name it _Py_DOWNCAST_AND_IN_DEBUG_MODE_ASSERT_UPCASTING_THE_RESULT_COMPARES_EQUAL_TO_THE_ORIGINAL_ARGUMENT ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:57:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 15:57:15 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385135835.43.0.255250058645.issue19673@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch addressing review comments. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 16:57:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 15:57:41 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385135861.07.0.247529849987.issue19673@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file32776/pathlib3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:04:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:04:45 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib Message-ID: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> New submission from Brett Cannon: E.g. test_namespace_pkgs should be under test_importlib and so should test_namespace_pkgs. test_import can conceivably stay out if it's updated to only contain syntactic tests for the import statement. This is so that it's easier to run import-related tests when making changes to importlib (otherwise one has to run the whole test suite or memorize the name of every test suite related to import/importlib). ---------- components: Tests keywords: easy messages: 203792 nosy: brett.cannon priority: low severity: normal stage: needs patch status: open title: Merge all (non-syntactic) import-related tests into test_importlib type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:08:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 16:08:38 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <3dR2cj57xjz7Lkp@mail.python.org> Roundup Robot added the comment: New changeset 331b7a8bb830 by Barry Warsaw in branch 'default': A fix for issue 19555 on Windows. http://hg.python.org/cpython/rev/331b7a8bb830 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:09:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 16:09:09 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385136549.47.0.651018090174.issue19673@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file32776/pathlib3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:09:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 16:09:20 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385136560.55.0.717077359369.issue19673@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file32777/pathlib3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:09:39 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 22 Nov 2013 16:09:39 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <1385136579.56.0.19716930995.issue19555@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:10:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 16:10:23 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385136623.64.0.0177942411112.issue19673@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I plan to commit soon, if there are no further comments. Remember the pathlib API is provisional, so API changes can still be made later if deemed necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:12:30 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 22 Nov 2013 16:12:30 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1385090713.4.0.0236965716041.issue19292@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: So do you need anything on *this* issue? (And are you asking me to review/approve the other issue? I haven't kept track carefully enough for that, and the beta is looming.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:25:46 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:25:46 +0000 Subject: [issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__) Message-ID: <1385137546.91.0.531425476426.issue19697@psf.upfronthosting.co.za> New submission from Brett Cannon: So that e.g. __main__.__spec__.name is the actual name of the module being executed. ---------- components: Interpreter Core messages: 203796 nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: refactor pythonrun.c to make use of specs (__main__.__spec__) type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:26:00 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:26:00 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385137560.09.0.415673079191.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +refactor pythonrun.c to make use of specs (__main__.__spec__) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:27:36 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 16:27:36 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385137656.42.0.229103894325.issue19674@psf.upfronthosting.co.za> Larry Hastings added the comment: Anybody have a better name for __textsig__ ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:27:55 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:27:55 +0000 Subject: [issue19698] Implement _imp.exec_builtin and exec_dynamic Message-ID: <1385137675.64.0.235823443194.issue19698@psf.upfronthosting.co.za> New submission from Brett Cannon: Since _imp.init_builtin and _imp.load_dynamic don't take in a module to load, need to create new functions which do. Afterwards can deprecate init_builtin, load_dynamic, and init_frozen (the latter having been worked around thanks to get_frozen_object). ---------- components: Interpreter Core messages: 203798 nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: Implement _imp.exec_builtin and exec_dynamic versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:28:05 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:28:05 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385137685.26.0.126640233018.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Implement _imp.exec_builtin and exec_dynamic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:29:22 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:29:22 +0000 Subject: [issue19699] Update zipimport for PEP 451 Message-ID: <1385137762.02.0.629134883022.issue19699@psf.upfronthosting.co.za> New submission from Brett Cannon: Need to add find_spec and exec_module (or move over to a pure Python zipfile importer). ---------- components: Library (Lib) messages: 203799 nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: Update zipimport for PEP 451 type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:30:04 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:30:04 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385137804.59.0.824686844668.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: No longer blocking b1, now just blocking rc1. ---------- dependencies: +Update zipimport for PEP 451 priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:31:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 16:31:07 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385137867.41.0.762651131357.issue18864@psf.upfronthosting.co.za> STINNER Victor added the comment: Your commit doesn't compile on Windows. Category None Changed by Eric Snow Changed at Fri 22 Nov 2013 16:17:09 Branch default Revision 07229c6104b16d0ab7cc63f3306157d3d2819fed Comments Implement PEP 451 (ModuleSpec). http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/3348/steps/compile/logs/stdio ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:31:23 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:31:23 +0000 Subject: [issue19700] Update runpy for PEP 451 Message-ID: <1385137883.59.0.0975117328441.issue19700@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Library (Lib) nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: Update runpy for PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:32:13 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:32:13 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385137933.58.0.525505445209.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Update runpy for PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:34:03 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:34:03 +0000 Subject: [issue19701] Update multiprocessing for PEP 451 Message-ID: <1385138043.59.0.905087765846.issue19701@psf.upfronthosting.co.za> New submission from Brett Cannon: Specifically Lib/multiprocessing/spawn.py:import_main_path() ---------- components: Library (Lib) messages: 203802 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Update multiprocessing for PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:34:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:34:16 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138056.0.0.659445965754.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Update multiprocessing for PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:35:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:35:18 +0000 Subject: [issue19702] Update pickle to PEP 451 Message-ID: <1385138118.75.0.812720443886.issue19702@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Library (Lib) nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: Update pickle to PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:37:12 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:37:12 +0000 Subject: [issue19703] Upate pydoc to PEP 451 Message-ID: <1385138232.11.0.0698925291353.issue19703@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Library (Lib) nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal status: open title: Upate pydoc to PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:37:23 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:37:23 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138243.45.0.263351371799.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Upate pydoc to PEP 451, Update pickle to PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:38:26 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:38:26 +0000 Subject: [issue19704] Update test.test_threaded_import to PEP 451 Message-ID: <1385138306.82.0.45846437054.issue19704@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Tests nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Update test.test_threaded_import to PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:38:37 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:38:37 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138317.1.0.759928719945.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Update test.test_threaded_import to PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:38:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 16:38:50 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <3dR3HY6dZYz7LpG@mail.python.org> Roundup Robot added the comment: New changeset 43377dcfb801 by Antoine Pitrou in branch 'default': Issue #19673: Add pathlib to the stdlib as a provisional module (PEP 428). http://hg.python.org/cpython/rev/43377dcfb801 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:39:19 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:39:19 +0000 Subject: [issue19705] Update test.test_namespace_pkgs to PEP 451 Message-ID: <1385138359.01.0.8135242067.issue19705@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Tests nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Update test.test_namespace_pkgs to PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:39:30 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:39:30 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138370.82.0.801154120984.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Update test.test_namespace_pkgs to PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:40:02 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:40:02 +0000 Subject: [issue19706] Check if inspect needs updating for PEP 451 Message-ID: <1385138402.37.0.531890220708.issue19706@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal status: open title: Check if inspect needs updating for PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:40:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:40:16 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138416.48.0.0083687753546.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Check if inspect needs updating for PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:41:00 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:41:00 +0000 Subject: [issue19707] Check if unittest.mock needs updating for PEP 451 Message-ID: <1385138460.31.0.778271177242.issue19707@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Library (Lib) nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal status: open title: Check if unittest.mock needs updating for PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:41:39 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:41:39 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138499.14.0.697460821413.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Check if unittest.mock needs updating for PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:42:47 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:42:47 +0000 Subject: [issue19708] Check pkgutil for anything missing for PEP 451 Message-ID: <1385138567.45.0.499849261032.issue19708@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Library (Lib) nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal status: open title: Check pkgutil for anything missing for PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:43:05 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:43:05 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138585.33.0.694530991535.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Check pkgutil for anything missing for PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:43:38 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:43:38 +0000 Subject: [issue19709] Check pythonrun.c is fully using PEP 451 Message-ID: <1385138618.7.0.0888740649809.issue19709@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Interpreter Core nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal status: open title: Check pythonrun.c is fully using PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:43:47 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:43:47 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138627.64.0.64758127197.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Check pythonrun.c is fully using PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:45:05 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:45:05 +0000 Subject: [issue19710] Make sure documentation for PEP 451 is finished Message-ID: <1385138705.49.0.0614847614933.issue19710@psf.upfronthosting.co.za> New submission from Brett Cannon: This includes both importlib.rst and docstrings for various methods. ---------- assignee: docs at python components: Documentation messages: 203804 nosy: brett.cannon, docs at python, eric.snow, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Make sure documentation for PEP 451 is finished versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:45:50 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:45:50 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138750.98.0.902427391717.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Make sure documentation for PEP 451 is finished _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:47:07 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:47:07 +0000 Subject: [issue19711] add test for changed portions after reloading a namespace package Message-ID: <1385138827.34.0.898717139288.issue19711@psf.upfronthosting.co.za> New submission from Brett Cannon: http://bugs.python.org/msg202660 ---------- components: Tests messages: 203805 nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: add test for changed portions after reloading a namespace package versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:47:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:47:16 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138836.14.0.10385659264.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +add test for changed portions after reloading a namespace package _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:48:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 16:48:03 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385138883.35.0.741976310449.issue19673@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm closing this issue. Please make any further comments in new issues! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:48:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:48:18 +0000 Subject: [issue19712] Make sure there are exec_module tests for _LoaderBasics subclasses Message-ID: <1385138898.72.0.923604245324.issue19712@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: Tests nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Make sure there are exec_module tests for _LoaderBasics subclasses versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:48:31 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:48:31 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385138911.67.0.934849845487.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Make sure there are exec_module tests for _LoaderBasics subclasses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:50:07 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:50:07 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 Message-ID: <1385139007.0.0.922066136531.issue19713@psf.upfronthosting.co.za> New submission from Brett Cannon: http://bugs.python.org/msg202659 ---------- messages: 203807 nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: Deprecate various things in importlib thanks to PEP 451 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:50:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:50:16 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385139016.74.0.273040493505.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Deprecate various things in importlib thanks to PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 17:50:53 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 16:50:53 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 In-Reply-To: <1385139007.0.0.922066136531.issue19713@psf.upfronthosting.co.za> Message-ID: <1385139053.24.0.861792333551.issue19713@psf.upfronthosting.co.za> Brett Cannon added the comment: Also msg202663 and msg202664 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:02:11 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 17:02:11 +0000 Subject: [issue19714] Add tests for importlib.machinery.WindowsRegistryFinder Message-ID: <1385139731.13.0.379714643713.issue19714@psf.upfronthosting.co.za> New submission from Brett Cannon: At least mocking out things if manipulating the Windows registry during testing is considered bad or difficult to make sure that stuff basically works. ---------- components: Library (Lib) messages: 203809 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Add tests for importlib.machinery.WindowsRegistryFinder versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:02:19 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 17:02:19 +0000 Subject: [issue19714] Add tests for importlib.machinery.WindowsRegistryFinder In-Reply-To: <1385139731.13.0.379714643713.issue19714@psf.upfronthosting.co.za> Message-ID: <1385139739.54.0.00473534906521.issue19714@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:03:01 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 17:03:01 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385139781.76.0.587908463976.issue18864@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Add tests for importlib.machinery.WindowsRegistryFinder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:04:35 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 22 Nov 2013 17:04:35 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385139875.98.0.947845210106.issue18864@psf.upfronthosting.co.za> Berker Peksag added the comment: There is a commented-out line in Lib/importlib/_bootstrap.py: +# if hasattr(loader, 'get_data'): + if hasattr(loader, 'get_filename'): http://hg.python.org/cpython/rev/07229c6104b1#l6.369 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:08:07 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 17:08:07 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385140087.55.0.797068541832.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: Removed the commented-out line in c8a84eed9155 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:18:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 17:18:25 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385140705.11.0.110070816916.issue19689@psf.upfronthosting.co.za> Christian Heimes added the comment: New patch with enum and more cleanups. I'd like to explain the rationals for the purpose argument in create_default_context and the ASN1Object thing. There are multiple things involved here. First of all a certificate may have key usage and extended key usage OIDs in its X509v3 extensions. OpenSSL already checks them according to its mode. The purpose is also required to load the correct set of certs from a certificate provider (e.g. Windows cert store, Mozilla NSS certdata, Apple's keystore). The system or user can impose additional restrictions for certificates, e.g. disable a cert for TLS web server auth although the X.509 struct specifies 1.3.6.1.5.5.7.3.1 in its X509v3 extensions. NSS certdata also contains invalid certificates or certificates that are not suitable for server auth although the cert claims it. In order to load only trusted certs for a purpose the API needs a purpose flag (usually an OID or a NID). Most Linux users have never seen this differentiation because /etc/ssl/certs/ either contains only server auth certs or their distributions screw up, See https://bugs.launchpad.net/ubuntu/+source/ca-certificates/+bug/1207004 or http://www.egenix.com/company/news/eGenix-pyOpenSSL-Distribution-0.13.2.1.0.1.5.html ---------- Added file: http://bugs.python.org/file32778/ssl_create_default_context2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:22:09 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 17:22:09 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385140929.32.0.375164186817.issue19689@psf.upfronthosting.co.za> Christian Heimes added the comment: More links: https://www.imperialviolet.org/2012/01/30/mozillaroots.html https://github.com/bagder/curl/commit/51f0b798fa https://github.com/kennethreitz/requests/issues/1659 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:25:25 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 17:25:25 +0000 Subject: [issue19700] Update runpy for PEP 451 Message-ID: <1385141125.22.0.359014382795.issue19700@psf.upfronthosting.co.za> New submission from Eric Snow: This is closely related to issue #19697. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:25:55 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 22 Nov 2013 17:25:55 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385141155.78.0.437861588928.issue18874@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Victor, is the attached patch up-to-date? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:29:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 17:29:54 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385141394.53.0.308340707133.issue19689@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, so I still have a couple of issues with the proposed API: - if its purpose is to create a *default* context, create_default_context() shouldn't have that many arguments. The nice thing with contexts is that you can change their parameters later... So basically the function signature should be: create_default_context(purpose, *, cafile, cadata, capath) Also, the default for "purpose" should probably be serverAuth. - "PurposeEKU" is cryptic, please simply "Purpose" or "CertPurpose". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:42:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 17:42:48 +0000 Subject: [issue19715] test_touch_common failure under Windows Message-ID: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Path.touch() doesn't seem to change the mtime under Windows, which leads to the following failure: ====================================================================== FAIL: test_touch_common (test.test_pathlib.PathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pathlib.py", line 1391, in test_touch_common self.assertGreaterEqual(p.stat().st_mtime, old_mtime) AssertionError: 1385140662.458926 not greater than or equal to 1385140662.4589267 ====================================================================== FAIL: test_touch_common (test.test_pathlib.WindowsPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pathlib.py", line 1391, in test_touch_common self.assertGreaterEqual(p.stat().st_mtime, old_mtime) AssertionError: 1385140663.098527 not greater than or equal to 1385140663.098528 Can anyone enlighten me about the semantics of st_mtime on Windows? ---------- components: Library (Lib), Tests messages: 203817 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: test_touch_common failure under Windows type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:43:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 17:43:31 +0000 Subject: [issue19716] test that touch doesn't change file contents Message-ID: <1385142211.7.0.550068935701.issue19716@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Path.touch() shouldn't change a file's contents, but this is currently not tested for by test_pathlib. ---------- components: Tests keywords: easy messages: 203818 nosy: pitrou priority: normal severity: normal status: open title: test that touch doesn't change file contents type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:45:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 17:45:53 +0000 Subject: [issue19717] resolve() fails when the path doesn't exist Message-ID: <1385142353.37.0.842056066182.issue19717@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Currently Path.resolve() raises FileNotFoundError when the path does not exist. Guido pointed out that it may more useful to resolve the path components until one doesn't exist, and then return the rest unchanged. e.g. if /home/ points to /var/home/, Path("/home/antoine/toto") should resolve to Path("/var/home/antoine/toto") even if toto doesn't actually exist. However, this makes the function less safe. Perhaps with a "strict" flag? ---------- components: Library (Lib) messages: 203819 nosy: gvanrossum, neologix, pitrou priority: normal severity: normal status: open title: resolve() fails when the path doesn't exist type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:49:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 17:49:42 +0000 Subject: [issue19718] Path.glob() on case-insensitive Posix filesystems Message-ID: <1385142582.76.0.752016715187.issue19718@psf.upfronthosting.co.za> New submission from Antoine Pitrou: test_glob fails under OS X: ====================================================================== FAIL: test_glob (test.test_pathlib.PosixPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_pathlib.py", line 1615, in test_glob self.assertEqual(set(p.glob("FILEa")), set()) AssertionError: Items in the first set but not the second: PosixPath('/Users/buildbot/buildarea/3.x.murray-snowleopard/build/build/test_python_39872/@test_39872_tmp/FILEa') In that test, "FILEa" doesn't exist but "fileA" does. glob() uses a shortcut when there's no wildcard: it calls .exists() instead of checking the name is inside listdir(). Unfortunately here, the filesystem is insensitive and Path("FILEa").exists() will return True. However, p.glob("FILEa*") will really return nothing (at least I think so, I don't have a Mac to test), so this is a bit inconsistent. If we decide the inconsistency is ok, I must then change the test to not exercise it :) ---------- components: Library (Lib), Tests messages: 203820 nosy: hynek, ned.deily, pitrou, ronaldoussoren priority: low severity: normal status: open title: Path.glob() on case-insensitive Posix filesystems type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:49:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 22 Nov 2013 17:49:54 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1385142594.92.0.839383506296.issue14373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a revised patch. It is synchronized with tip. Got rid of capsules (sped up about 10%). lru_list_elem is now true Python object. Got rid of the lock, the new code must be thread-safe with GIL only. I very much hope that this code will be included in 3.4. We can fix bugs later if there are any. I am also planning to optimize the make_key() functions. ---------- priority: low -> high Added file: http://bugs.python.org/file32779/clru_cache.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:49:59 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 22 Nov 2013 17:49:59 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: Message-ID: <528F993F.3070804@egenix.com> Marc-Andre Lemburg added the comment: Victor, please accept the fact that the codec sub-system in Python doesn't only have the Unicode implementation as target. It's true that most codecs were added for the Unicode implementation, but I deliberately designed the system to be open for other purposes such as encoding/decoding between different representations of data as well. The hex/base64 and compression codecs are example of such representations, but there are many other uses as well, e.g. escaping of data in various ways, serialization of objects, direct conversions between encoded data (? la recode), etc. Python's history is full of cases where we've opened up its functionality to new concepts and designs. If you want to propose to remove the openness in the codec system for some perceived idea of purity, then you will need to come up with very good arguments - not only to convince me, but also to convince the Python users at large :-) I would much rather like to see the openness of the system used more in the stdlib and have it developed further to make it easier to use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:50:57 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 17:50:57 +0000 Subject: [issue19709] Check pythonrun.c is fully using PEP 451 Message-ID: <1385142657.02.0.188290456726.issue19709@psf.upfronthosting.co.za> New submission from Eric Snow: Isn't this basically the same thing as issue #19697? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 18:53:37 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 17:53:37 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 In-Reply-To: <1385139007.0.0.922066136531.issue19713@psf.upfronthosting.co.za> Message-ID: <1385142817.39.0.677934490728.issue19713@psf.upfronthosting.co.za> Eric Snow added the comment: See http://www.python.org/dev/peps/pep-0451/#deprecations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:13:25 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 18:13:25 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385144005.62.0.105254083422.issue18864@psf.upfronthosting.co.za> Eric Snow added the comment: Failing buildbot: http://buildbot.python.org/all/builders/x86%20XP-4%203.x/builds/9630/steps/test/logs/stdio test.test_module.ModuleTests.test_module_repr_source test.test_pkgutil.ExtendPathTests.test_iter_importers (passed when retried) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:15:15 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 18:15:15 +0000 Subject: [issue19719] add importlib.abc.SpecLoader and SpecFinder Message-ID: <1385144115.2.0.854403656611.issue19719@psf.upfronthosting.co.za> New submission from Brett Cannon: That way the ABCs can require find_spec/load_spec, inherit from the older ABCs, and provide stubs that do what's necessary to support the old, deprecated find_module/find_loader/load_module API (and automatically include the deprecation warning). ---------- assignee: brett.cannon components: Library (Lib) messages: 203826 nosy: brett.cannon, eric.snow, ncoghlan priority: normal severity: normal stage: test needed status: open title: add importlib.abc.SpecLoader and SpecFinder type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:16:47 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 18:16:47 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385144207.05.0.813568123863.issue19674@psf.upfronthosting.co.za> Brett Cannon added the comment: __signature_text__? __textsignature__? No need to abbreviate that much since there is no built-in function equivalent and people are not expected to work with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:17:19 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 22 Nov 2013 18:17:19 +0000 Subject: [issue18967] Find a less conflict prone approach to Misc/NEWS In-Reply-To: <1378605881.29.0.990351353386.issue18967@psf.upfronthosting.co.za> Message-ID: <1385144239.27.0.155023596297.issue18967@psf.upfronthosting.co.za> Zachary Ware added the comment: There's a bare-bones experimental version in hg.python.org/sandbox/new_news that you can play around with in the 'playground' branch. It's not pretty, but it (mostly) works :). So far, there's just news.py, no news_release.py; but news_release.py should be pretty simple and only really matter to RMs anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:32:27 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 18:32:27 +0000 Subject: [issue19709] Check pythonrun.c is fully using PEP 451 In-Reply-To: <1385142657.02.0.188290456726.issue19709@psf.upfronthosting.co.za> Message-ID: <1385145147.73.0.976399538059.issue19709@psf.upfronthosting.co.za> Brett Cannon added the comment: You tell me; you listed them separately in the TODO. =) If this is a dupe then close it as such. ---------- assignee: -> eric.snow status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:36:50 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 18:36:50 +0000 Subject: [issue19720] suppress context for some exceptions in importlib? Message-ID: <1385145410.42.0.284273410583.issue19720@psf.upfronthosting.co.za> New submission from Eric Snow: Some exceptions in importlib are raised from within except blocks, resulting in chained tracebacks. [1] For at least some of these we should consider suppressing the exception context. For example (for [1]): try: path = parent_module.__path__ except AttributeError: msg = (_ERR_MSG + '; {} is not a package').format(name, parent) raise ImportError(msg, name=name) from None [1] http://hg.python.org/cpython/file/default/Lib/importlib/_bootstrap.py#l2088 ---------- messages: 203830 nosy: brett.cannon, eric.snow priority: low severity: normal stage: needs patch status: open title: suppress context for some exceptions in importlib? type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:42:04 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 18:42:04 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385145724.46.0.585218684733.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: Same failures on http://buildbot.python.org/all/builders/x86%20Gentoo%203.x/builds/5444/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:43:13 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 18:43:13 +0000 Subject: [issue19709] Check pythonrun.c is fully using PEP 451 In-Reply-To: <1385142657.02.0.188290456726.issue19709@psf.upfronthosting.co.za> Message-ID: <1385145793.23.0.452450380766.issue19709@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- resolution: -> duplicate status: pending -> closed superseder: -> refactor pythonrun.c to make use of specs (__main__.__spec__) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:43:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 18:43:20 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385145800.5.0.114184992316.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now that I think, I didn't encounter the failure when testing in my own Windows VM... uh. ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:47:24 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 18:47:24 +0000 Subject: [issue19701] Update multiprocessing for PEP 451 In-Reply-To: <1385138043.59.0.905087765846.issue19701@psf.upfronthosting.co.za> Message-ID: <1385146044.74.0.280280204521.issue19701@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:52:50 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 18:52:50 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1385146370.3.0.816070339324.issue19696@psf.upfronthosting.co.za> Eric Snow added the comment: +1 ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 19:56:12 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 22 Nov 2013 18:56:12 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1385146572.69.0.969991087485.issue19291@psf.upfronthosting.co.za> Guido van Rossum added the comment: I need help! There is one urgent issue: should the chapter on asyncio go into section 17 (Concurrent Execution) or section 18 (Interprocess Communication and Networking)??? It would seem that event loops and coroutines fit better in section 17, while transports and protocols fit better in section 18. :-( HELP!! After that, I need help writing the docs. Most of it can probably be copy-pasted from PEP 3156, but I haven't written Python docs for a long time and I could use some help with how to structure it. Ideally we'd find some volunteers who enjoy writing documentation to take over this project. In the mean time, I have a patch that adds a stub with a reference to the PEP, so people can at least navigate to the docs without already knowing the PEP number. It adds it to section 17 for now. ---------- keywords: +patch Added file: http://bugs.python.org/file32780/asynciodoc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:01:23 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 19:01:23 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385146883.2.0.936939696562.issue18864@psf.upfronthosting.co.za> Brett Cannon added the comment: The test_module failure can be triggered by running test_importlib test_module. For some reason unittest's __spec__ gets set to one for the BuiltinImporter (and nothing else). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:01:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 22 Nov 2013 19:01:38 +0000 Subject: [issue13633] Automatically convert character references in HTMLParser In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1385146898.91.0.222213261831.issue13633@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have added a couple of nitpicks on Rietveld. You can ignore most of them. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:01:59 2013 From: report at bugs.python.org (Kushal Das) Date: Fri, 22 Nov 2013 19:01:59 +0000 Subject: [issue19716] test that touch doesn't change file contents In-Reply-To: <1385142211.7.0.550068935701.issue19716@psf.upfronthosting.co.za> Message-ID: <1385146919.24.0.698391667337.issue19716@psf.upfronthosting.co.za> Kushal Das added the comment: i will submit a patch tomorrow. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:08:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 19:08:26 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1385147306.47.0.599687005492.issue19291@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > There is one urgent issue: should the chapter on asyncio go into > section 17 (Concurrent Execution) or section 18 (Interprocess > Communication and Networking)??? I'd put it in 18. Also, I'd move select and selectors from 17 to 18, so that only purely "execution" modules remain in 17, and anything network-related is in the same chapter. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:09:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 22 Nov 2013 19:09:37 +0000 Subject: [issue18059] Add multibyte encoding support to pyexpat In-Reply-To: <1369507288.26.0.471852341095.issue18059@psf.upfronthosting.co.za> Message-ID: <1385147377.94.0.579496732126.issue18059@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If anybody is interested in support of multibyte encodings in XML parser, it is time to make a review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:10:39 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 22 Nov 2013 19:10:39 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385147439.8.0.705252915364.issue19689@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: -giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:10:57 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Nov 2013 19:10:57 +0000 Subject: [issue19721] Move all test_importlib utility code into test_importlib.util Message-ID: <1385147457.8.0.6225076975.issue19721@psf.upfronthosting.co.za> New submission from Brett Cannon: test_importlib has a ton of utility code, typically segregated into separate util modules in each directory. But it makes importing a pain as you typically end up with the global test_importlib.util plus the directory-specific util module. Would be better to ditch the per-directory ones and just move everything up to test_importlib.util. ---------- assignee: brett.cannon components: Tests keywords: easy messages: 203840 nosy: brett.cannon priority: low severity: normal stage: needs patch status: open title: Move all test_importlib utility code into test_importlib.util _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:24:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 22 Nov 2013 19:24:39 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <528F3ED7.1010008@egenix.com> Message-ID: <1976788.6iTZbMbQgu@raxxla> Serhiy Storchaka added the comment: > * I think you should add the flag to the constructor of the CodecInfo > tuple subclass and then set this in the resp. codecs. The extra > constructor class method looks too much like a hack and is > not needed. I think that adding new keyword argument to public function is much worse than adding new private class method or private module level function. Arguments are always visible, while private methods and functions are usually hidden. New argument will confuse users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:24:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 19:24:50 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385148290.12.0.826847423651.issue19689@psf.upfronthosting.co.za> Christian Heimes added the comment: Antoine and I have agreed upon a slightly different API. I'm going to split it up into one public API that creates a best practice context and one internal stdlib API to unify all places that deals with SSL sockets. AP: how about we use more strict and modern settings for the public API? TLSv1, no insecure stuff like RC4, MD5, DSS etc. https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:38:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 19:38:16 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <3dR7GY3WjGz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 98bab4a03120 by Brett Cannon in branch 'default': Issue #18864: Don't try and use unittest as a testing module for http://hg.python.org/cpython/rev/98bab4a03120 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:40:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 19:40:57 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385148290.12.0.826847423651.issue19689@psf.upfronthosting.co.za> Message-ID: <1385149254.2432.13.camel@fsol> Antoine Pitrou added the comment: > how about we use more strict and modern settings for the public API? > TLSv1, no insecure stuff like RC4, MD5, DSS etc. > https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ Fine, but I'd like to see something more open-ended for the ciphers string. e.g. 'HIGH:!ADH:!AECDH:!MD5:!DSS:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2' ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:42:03 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 19:42:03 +0000 Subject: [issue19722] Expose stack effect calculator to Python Message-ID: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> New submission from Larry Hastings: Attached is a patch exposing the old opcode_stack_effect() function to Python. The patch does the following: * renames opcode_stack_effect() to PyCompile_OpcodeStackEffect() * removes the "static" modifier from PyCompile_OpcodeStackEffect() * changes PyCompile_OpcodeStackEffect()'s behavior so it returns a magic value on failure * preserves existing behavior when compiling code and encountering an opcode/oparg pair that results in failure * creates a new _opcode module * exposes PyCompile_OpcodeStackEffect() as _opcode.stack_effect() * tests _opcode module with new test__opcode.py * imports _opcode.stack_effect() into opcode, exposing it publically * documents the function in dis (there is no documentation for opcode, and dis imports and exposes everything in opcode) Whew! I think it's ready to go in. ---------- assignee: larry components: Library (Lib) files: larry.expose.stack.effect.patch.1.diff keywords: patch messages: 203845 nosy: larry, ncoghlan priority: normal severity: normal stage: patch review status: open title: Expose stack effect calculator to Python type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32781/larry.expose.stack.effect.patch.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:42:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 19:42:59 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1385149379.39.0.842183257349.issue14373@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Got rid of the lock, the new code must be thread-safe with GIL only. I'm not convinced by this (see the review I posted). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:43:21 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 19:43:21 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <1385149401.72.0.428951305636.issue19722@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:43:32 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 19:43:32 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <1385149412.35.0.260638660519.issue19722@psf.upfronthosting.co.za> Larry Hastings added the comment: (Sponging around for a reviewer ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:47:29 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 19:47:29 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1385149649.34.0.213841336014.issue19291@psf.upfronthosting.co.za> Eric Snow added the comment: I was thinking the same thing as Antoine. 18 fits in more closely to what I understand is the purpose of asyncio (the focus on IO). ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:47:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 19:47:49 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385149669.98.0.554363559583.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And indeed, the test seems to pass on another Windows buildbot: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x (note: my VM is under Windows 7) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:48:24 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 19:48:24 +0000 Subject: [issue19721] Move all test_importlib utility code into test_importlib.util In-Reply-To: <1385147457.8.0.6225076975.issue19721@psf.upfronthosting.co.za> Message-ID: <1385149704.62.0.473192007059.issue19721@psf.upfronthosting.co.za> Eric Snow added the comment: +1 ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 20:55:33 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 22 Nov 2013 19:55:33 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1385149649.34.0.213841336014.issue19291@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: OK. I accidentally committed the patch. Will move the three modules to the ipc section now. On Fri, Nov 22, 2013 at 11:47 AM, Eric Snow wrote: > > Eric Snow added the comment: > > I was thinking the same thing as Antoine. 18 fits in more closely to what > I understand is the purpose of asyncio (the focus on IO). > > ---------- > nosy: +eric.snow > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:04:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 20:04:05 +0000 Subject: [issue19723] Argument Clinic should add markers for humans Message-ID: <1385150644.99.0.984146693257.issue19723@psf.upfronthosting.co.za> New submission from Antoine Pitrou: I was reviewing a patch by Larry and I started commenting on some rather tasteless code, until I realized it was generated by Argument Clinic. It would be nice if Argument Clinic added some markers, such as: /* Start of code generated by Argument Clinic */ /* End of code generated by Argument Clinic */ ---------- assignee: larry components: Build, Demos and Tools messages: 203852 nosy: larry, ncoghlan, pitrou priority: normal severity: normal stage: needs patch status: open title: Argument Clinic should add markers for humans type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:04:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 20:04:34 +0000 Subject: [issue18326] Mention 'keyword only' for list.sort, improve glossary. In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <3dR7rx4nKrz7LkK@mail.python.org> Roundup Robot added the comment: New changeset 9192c0798a90 by Zachary Ware in branch '3.3': Issue #18326: Clarify that list.sort's arguments are keyword-only. http://hg.python.org/cpython/rev/9192c0798a90 New changeset 3f1c332c5e2e by Zachary Ware in branch 'default': Issue #18326: merge with 3.3 http://hg.python.org/cpython/rev/3f1c332c5e2e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:04:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 20:04:53 +0000 Subject: [issue19659] Document Argument Clinic In-Reply-To: <1384907080.98.0.430269997716.issue19659@psf.upfronthosting.co.za> Message-ID: <1385150693.85.0.668561783813.issue19659@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think this is really necessary at some point. How to start writing a function with Argument Clinic, etc. ---------- components: +Build, Demos and Tools nosy: +ncoghlan, pitrou priority: normal -> critical title: Document Argument Clinic? -> Document Argument Clinic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:06:42 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 22 Nov 2013 20:06:42 +0000 Subject: [issue18326] Mention 'keyword only' for list.sort, improve glossary. In-Reply-To: <1372511136.61.0.278425078947.issue18326@psf.upfronthosting.co.za> Message-ID: <1385150802.3.0.471655084031.issue18326@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- assignee: docs at python -> zach.ware resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:13:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 20:13:21 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST In-Reply-To: <1385130295.49.0.846468108755.issue19692@psf.upfronthosting.co.za> Message-ID: <1385151201.67.0.850631030684.issue19692@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, I obviously won't fight very hard for this one. But I would like to point out that APIs with "safe" (not "safely" :-)) in their name usually imply that the API is safe, not that the input has been sanitized beforehand. For example in the stdlib: pprint.saferepr, string.safe_substitute, xmlrpc.client.SafeTransport. In the C API: Py_TRASHCAN_SAFE_BEGIN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:15:56 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 20:15:56 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <1385151356.31.0.770330291792.issue19722@psf.upfronthosting.co.za> Eric Snow added the comment: FWIW, I agree with Antoine about making those PyCompile_ functions private (leading "_"). ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:24:42 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 20:24:42 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <1385151882.63.0.108166382409.issue19722@psf.upfronthosting.co.za> Larry Hastings added the comment: New patch, incorporating Antoine's comments. Thanks, Antoine! ---------- Added file: http://bugs.python.org/file32782/larry.expose.stack.effect.patch.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:27:26 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 20:27:26 +0000 Subject: [issue19723] Argument Clinic should add markers for humans In-Reply-To: <1385150644.99.0.984146693257.issue19723@psf.upfronthosting.co.za> Message-ID: <1385152046.13.0.627312675073.issue19723@psf.upfronthosting.co.za> Larry Hastings added the comment: You find the big /*[clinic checksum: b6ded2204fd0aab263564feb5aae6bac840b5b94]*/ marker insufficient? Perhaps this is simply something we will quickly get used to. How about we let this sit for a while and see what other people think. p.s. I accept your critique of Clinic's autogenerated code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:28:26 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 20:28:26 +0000 Subject: [issue19659] Document Argument Clinic In-Reply-To: <1384907080.98.0.430269997716.issue19659@psf.upfronthosting.co.za> Message-ID: <1385152106.04.0.959844989985.issue19659@psf.upfronthosting.co.za> Larry Hastings added the comment: I quite agree. My plan is to write a quick HOWTO for now to get people up and running for now, then flesh it out into a full document. But I'm working like crazy right now to get a couple things done before beta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:28:26 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 22 Nov 2013 20:28:26 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385152106.21.0.865352150753.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't quite understand the test: why is it dating back the file by 10s, but then not using the dated-back time stamp for anything? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:30:17 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 20:30:17 +0000 Subject: [issue19724] test_pkgutil buildbot failure (related to PEP 451) Message-ID: <1385152217.94.0.908121512777.issue19724@psf.upfronthosting.co.za> New submission from Eric Snow: http://buildbot.python.org/all/builders/x86%20Gentoo%203.x/builds/5448/steps/test/logs/stdio ====================================================================== ERROR: test_iter_importers (test.test_pkgutil.ExtendPathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 2128, in _find_and_load_unlocked AttributeError: 'module' object has no attribute '__path__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_pkgutil.py", line 206, in test_iter_importers importlib.import_module(fullname) File "/var/lib/buildslave/3.x.murray-gentoo/build/Lib/importlib/__init__.py", line 129, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 2164, in _gcd_import File "", line 2147, in _find_and_load File "", line 2131, in _find_and_load_unlocked ImportError: No module named 'spam.eggs'; spam is not a package ---------- components: Library (Lib), Tests messages: 203861 nosy: brett.cannon, eric.snow priority: high severity: normal stage: needs patch status: open title: test_pkgutil buildbot failure (related to PEP 451) type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:30:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 20:30:46 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1385141155.78.0.437861588928.issue18874@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > > Yes, it is up to date. The only difference in the mercurial repository are > the new location of the two hashtable files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:31:15 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 20:31:15 +0000 Subject: [issue19724] test_pkgutil buildbot failure (related to PEP 451) In-Reply-To: <1385152217.94.0.908121512777.issue19724@psf.upfronthosting.co.za> Message-ID: <1385152275.35.0.626063407034.issue19724@psf.upfronthosting.co.za> Eric Snow added the comment: This appears to be order-related, like the last failure was. To reproduce: $ ./python -m test test_importlib test_pkgutil ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:31:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 20:31:22 +0000 Subject: [issue19723] Argument Clinic should add markers for humans In-Reply-To: <1385152046.13.0.627312675073.issue19723@psf.upfronthosting.co.za> Message-ID: <1385152280.2432.15.camel@fsol> Antoine Pitrou added the comment: > You find the big > /*[clinic checksum: b6ded2204fd0aab263564feb5aae6bac840b5b94]*/ > marker insufficient? Well, it doesn't say anything except "checksum", and it doesn't seem geared at humans (except perhaps those with a hex calculator in their head :-)). Clinic-generated code looks at first sight like code that would be written by a human, so it's easy to get miffed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:31:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 20:31:56 +0000 Subject: [issue19555] "SO" config var not getting set In-Reply-To: <1384190997.66.0.0919139722211.issue19555@psf.upfronthosting.co.za> Message-ID: <3dR8SW71zvz7LkL@mail.python.org> Roundup Robot added the comment: New changeset 8a130fd92255 by Barry Warsaw in branch 'default': Issue 19555 for distutils, plus a little clean up (pyflakes, line lengths). http://hg.python.org/cpython/rev/8a130fd92255 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:32:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 20:32:46 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385152106.21.0.865352150753.issue19715@psf.upfronthosting.co.za> Message-ID: <1385152364.2432.16.camel@fsol> Antoine Pitrou added the comment: > I don't quite understand the test: why is it dating back the file by > 10s, but then not using the dated-back time stamp for anything? Well, it does, unless I'm misunderstanding your question: self.assertGreaterEqual(p.stat().st_mtime, old_mtime) This checks that the mtime has indeed by changed to something newer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:49:33 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:49:33 +0000 Subject: [issue19680] Help missing for exec and print In-Reply-To: <1385036985.98.0.128644104733.issue19680@psf.upfronthosting.co.za> Message-ID: <1385153373.6.0.209812004448.issue19680@psf.upfronthosting.co.za> ?ric Araujo added the comment: The changeset you refer to may be a backport of a Python 3 changeset, where print and exec are not keywords but functions (adding Sandro to nosy so that he may confirm). Would you like to make a patch to fix this in 2.7? http://docs.python.org/devguide contains more info about that. ---------- nosy: +eric.araujo, sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:50:56 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:50:56 +0000 Subject: [issue19671] Option to select the optimization level on compileall In-Reply-To: <1384982980.31.0.989044075216.issue19671@psf.upfronthosting.co.za> Message-ID: <1385153456.58.0.829537167754.issue19671@psf.upfronthosting.co.za> ?ric Araujo added the comment: If I understand correctly, compileall is intended as a command-line tool, but there is py_compile if you want programmatic access. Does py_compile provide functions that let you control the optimization level? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:51:58 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:51:58 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1385153518.8.0.980611572397.issue19645@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:52:03 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:52:03 +0000 Subject: [issue18054] Add more exception related assertions to unittest In-Reply-To: <1369464959.25.0.285327189549.issue18054@psf.upfronthosting.co.za> Message-ID: <1385153523.83.0.6278051323.issue18054@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:52:21 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 22 Nov 2013 20:52:21 +0000 Subject: [issue19723] Argument Clinic should add markers for humans In-Reply-To: <1385150644.99.0.984146693257.issue19723@psf.upfronthosting.co.za> Message-ID: <1385153541.52.0.334246329027.issue19723@psf.upfronthosting.co.za> Stefan Krah added the comment: I think it's possible to get used to the markers. However, to bikeshed a little, I would prefer "preprocessor" instead of "clinic", since jokes tend to wear off if one sees then too often. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:52:39 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:52:39 +0000 Subject: [issue19642] shutil to support equivalent of: rm -f /dir/* In-Reply-To: <1384775126.27.0.181995142425.issue19642@psf.upfronthosting.co.za> Message-ID: <1385153559.97.0.768049890608.issue19642@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:52:51 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:52:51 +0000 Subject: [issue19640] Drop _source attribute of namedtuple In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1385153571.68.0.684070826843.issue19640@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:55:34 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:55:34 +0000 Subject: [issue19640] Drop _source attribute of namedtuple In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1385153734.09.0.0910011871256.issue19640@psf.upfronthosting.co.za> ?ric Araujo added the comment: In a first version namedtuple had an argument (named echo or verbose) that would cause the source code to be printed out, for use at the interactive prompt. Raymond later changed it to a _source attribute, more easy to work with than printed output. About the other question you asked on the ML (why isn?t there a base NamedTuple class to inherit): this has been discussed on python-ideas IIRC, and people have written ActiveState recipes for that idea. It should be easy to find the ML archive links from the ActiveState posts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:56:00 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 22 Nov 2013 20:56:00 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385153760.03.0.527310741663.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: IIUC, the sequence of events is this: 1. touch 2. read old_mtime 3. date back 10s 4. touch 5. read mtime So the time stamp that is set in step 3 is never read, correct? So there is no test that it is newer than the 10s-old-stamp, but only newer then the recent-stamp (step 2)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:56:24 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:56:24 +0000 Subject: [issue19639] Improve re match objects display In-Reply-To: <1384767316.36.0.259346591403.issue19639@psf.upfronthosting.co.za> Message-ID: <1385153784.31.0.379003438304.issue19639@psf.upfronthosting.co.za> ?ric Araujo added the comment: Good catch, thanks! ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 21:58:48 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 20:58:48 +0000 Subject: [issue19627] python open built-in function - "updating" is not defined In-Reply-To: <1384627981.21.0.789966534785.issue19627@psf.upfronthosting.co.za> Message-ID: <1385153928.33.0.0476287630947.issue19627@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would you like to propose a patch to the documentation? It?s possible that ?updating? is explained in one place but not everywhere (doc for open, doc for io, doc about file objects). ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:00:30 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 21:00:30 +0000 Subject: [issue19620] tokenize documentation contains typos (argment instead of argument) In-Reply-To: <1384569112.62.0.796047767365.issue19620@psf.upfronthosting.co.za> Message-ID: <1385154030.65.0.0766190311472.issue19620@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for catching this, would you like to make a patch? http://docs.python.org/devguide gives help to do that. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:01:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 21:01:11 +0000 Subject: [issue19724] test_pkgutil buildbot failure (related to PEP 451) In-Reply-To: <1385152217.94.0.908121512777.issue19724@psf.upfronthosting.co.za> Message-ID: <3dR96G1N0yz7LlL@mail.python.org> Roundup Robot added the comment: New changeset 59f3e50061bd by Eric Snow in branch 'default': Issue #19724: clear out colliding temp module. http://hg.python.org/cpython/rev/59f3e50061bd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:01:37 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 21:01:37 +0000 Subject: [issue19716] test that touch doesn't change file contents In-Reply-To: <1385142211.7.0.550068935701.issue19716@psf.upfronthosting.co.za> Message-ID: <1385154097.71.0.314356464405.issue19716@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:01:56 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 21:01:56 +0000 Subject: [issue19724] test_pkgutil buildbot failure (related to PEP 451) In-Reply-To: <1385152217.94.0.908121512777.issue19724@psf.upfronthosting.co.za> Message-ID: <1385154116.76.0.731772733109.issue19724@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:03:35 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 21:03:35 +0000 Subject: [issue11357] Add support for PEP 381 Mirror Authenticity In-Reply-To: <1298948795.56.0.864012658533.issue11357@psf.upfronthosting.co.za> Message-ID: <1385154215.7.0.374976309038.issue11357@psf.upfronthosting.co.za> ?ric Araujo added the comment: Mirroring protocol is deprecated. ---------- assignee: tarek -> resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:03:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 21:03:55 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385153760.03.0.527310741663.issue19715@psf.upfronthosting.co.za> Message-ID: <1385154233.2432.19.camel@fsol> Antoine Pitrou added the comment: > IIUC, the sequence of events is this: > 1. touch > 2. read old_mtime > 3. date back 10s > 4. touch > 5. read mtime > > So the time stamp that is set in step 3 is never read, correct? So > there is no test that it is newer than the 10s-old-stamp, but only > newer then the recent-stamp (step 2)? Indeed, the test is that step 4 overrides the timestamp set in step 3 with something that represents "now"; and the heuristic for that is that the mtime in step 5 is at least as fresh as the mtime in step 2 (the old_mtime). So step 3 serves to make sure that the test isn't being fooled by a coarse timestamp granularity. Another way of doing the same thing (but more costly) would be to call time.sleep(several seconds). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:06:08 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 22 Nov 2013 21:06:08 +0000 Subject: [issue19640] Drop _source attribute of namedtuple In-Reply-To: <1384767730.42.0.112147293599.issue19640@psf.upfronthosting.co.za> Message-ID: <1385154368.28.0.996483840845.issue19640@psf.upfronthosting.co.za> Eric Snow added the comment: A while back, because of those python-ideas discussions, Raymond added a link at the bottom of the namedtuple section of the docs at http://docs.python.org/3.4/library/collections.html#namedtuple-factory-function-for-tuples-with-named-fields. The link points to a nice recipe by Jan Kaliszewski. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:08:59 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Nov 2013 21:08:59 +0000 Subject: [issue12226] use HTTPS by default for uploading packages to pypi In-Reply-To: <1306860665.45.0.32361907398.issue12226@psf.upfronthosting.co.za> Message-ID: <1385154539.15.0.514771239769.issue12226@psf.upfronthosting.co.za> ?ric Araujo added the comment: Donald assesses that porting the changeset to 2.7 would ?make things a little nicer?, as it protects from passive attacks only. The change is small. What do people think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:10:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 21:10:23 +0000 Subject: [issue12226] use HTTPS by default for uploading packages to pypi In-Reply-To: <1306860665.45.0.32361907398.issue12226@psf.upfronthosting.co.za> Message-ID: <1385154623.35.0.823063484564.issue12226@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, passive attacks are the easiest to mount by a casual attacker, so I think this is important to get in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:14:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 21:14:24 +0000 Subject: [issue19718] Path.glob() on case-insensitive Posix filesystems In-Reply-To: <1385142582.76.0.752016715187.issue19718@psf.upfronthosting.co.za> Message-ID: <3dR9PW25k6z7LjW@mail.python.org> Roundup Robot added the comment: New changeset cd09766bb18f by Brett Cannon in branch 'default': Issue #19718: Add a case-insensitive FS check to test.support to use http://hg.python.org/cpython/rev/cd09766bb18f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:17:18 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 22 Nov 2013 21:17:18 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385155038.06.0.97489900615.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think I found the problem. In one run, the current time (as reported by time.time()) was 1385154213.291315 On the first touch call (in step 1), the file is not there, and gets its current time internally from the system (not sure which part exactly assigns the time stamp). The resulting nanosecond/dwLowDateTime was 291315800 1303049222 Then, the utime call in step 4 asked to set this to 291315078 1303049214 When reading the timestamp back, I get 291315000 1303049214 So in analysis/interpretation A) the time.time() is apparently 712ns earlier than the system time (plus NTFS needs to round to the next multiple of 100ns) B) when setting the time, the requested nanoseconds isn't exactly representable, so it rounds down 78ns. C) as a consequence, the newer timestamp is 800ns before the old one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:18:15 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 21:18:15 +0000 Subject: [issue19718] Path.glob() on case-insensitive Posix filesystems In-Reply-To: <1385142582.76.0.752016715187.issue19718@psf.upfronthosting.co.za> Message-ID: <1385155095.04.0.417775982172.issue19718@psf.upfronthosting.co.za> Ned Deily added the comment: FWIW, it looks like Path.glob() is behaving the same as the default shell (bash 3.2 on OS X 10.6.8): Python 3.4.0a4+ (default:cce14bc9b675, Nov 22 2013, 13:01:47) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pathlib >>> p = pathlib.Path(".") >>> list(p.glob("fileA")) [PosixPath('fileA')] >>> list(p.glob("file*")) [PosixPath('fileA')] >>> list(p.glob("fileA*")) [PosixPath('fileA')] >>> list(p.glob("FILE*")) [] >>> list(p.glob("FILEa*")) [] >>> list(p.glob("FILEa")) [PosixPath('FILEa')] >>> list(p.glob("FILEA")) [PosixPath('FILEA')] $ ls . fileA $ ls fileA fileA $ ls file* fileA $ ls fileA* fileA $ ls FILE* ls: FILE*: No such file or directory $ ls FILEa* ls: FILEa*: No such file or directory $ ls FILEa FILEa $ ls FILEA FILEA ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:25:22 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 21:25:22 +0000 Subject: [issue12226] use HTTPS by default for uploading packages to pypi In-Reply-To: <1385154623.35.0.823063484564.issue12226@psf.upfronthosting.co.za> Message-ID: <57810381-2cdb-4b04-b1c1-9cf6ec8cadcc@email.android.com> Christian Heimes added the comment: How about: - load ca cert from default verify locations - try connect with CERT_REQUIRED - print warning when cert validation fails and try again with CERT_NONE - match hostname otherwise At least this warns the user about the issue. Is there way to distinguish between CA missing and other failures? Antoine Pitrou schrieb: > >Antoine Pitrou added the comment: > >Well, passive attacks are the easiest to mount by a casual attacker, so >I think this is important to get in. > >---------- > >_______________________________________ >Python tracker > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:26:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 21:26:11 +0000 Subject: [issue19718] Path.glob() on case-insensitive Posix filesystems In-Reply-To: <1385142582.76.0.752016715187.issue19718@psf.upfronthosting.co.za> Message-ID: <3dR9g650w9zQyZ@mail.python.org> Roundup Robot added the comment: New changeset 4734f6e2fd2f by Antoine Pitrou in branch 'default': Issue #19718: add one more globbing test under POSIX http://hg.python.org/cpython/rev/4734f6e2fd2f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:26:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 21:26:51 +0000 Subject: [issue19718] Path.glob() on case-insensitive Posix filesystems In-Reply-To: <1385142582.76.0.752016715187.issue19718@psf.upfronthosting.co.za> Message-ID: <1385155611.29.0.178649286701.issue19718@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > FWIW, it looks like Path.glob() is behaving the same as the default > shell (bash 3.2 on OS X 10.6.8) Thanks, we're in good company then (or at least we're not alone :-)). Do you think I should fix this issue as fixed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:33:58 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 21:33:58 +0000 Subject: [issue19718] Path.glob() on case-insensitive Posix filesystems In-Reply-To: <1385142582.76.0.752016715187.issue19718@psf.upfronthosting.co.za> Message-ID: <1385156038.63.0.735168922035.issue19718@psf.upfronthosting.co.za> Ned Deily added the comment: test_pathlib now passes. I'd say it's fixed until someone claims otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:34:24 2013 From: report at bugs.python.org (Sworddragon) Date: Fri, 22 Nov 2013 21:34:24 +0000 Subject: [issue19671] Option to select the optimization level on compileall In-Reply-To: <1384982980.31.0.989044075216.issue19671@psf.upfronthosting.co.za> Message-ID: <1385156064.96.0.0497734879886.issue19671@psf.upfronthosting.co.za> Sworddragon added the comment: After checking it: Yes it does, thanks for the hint. In this case I'm closing this ticket now. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:34:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 21:34:31 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385155038.06.0.97489900615.issue19715@psf.upfronthosting.co.za> Message-ID: <1385156069.2432.25.camel@fsol> Antoine Pitrou added the comment: > I think I found the problem. In one run, the current time (as reported > by time.time()) was > > 1385154213.291315 > > On the first touch call (in step 1), the file is not there, and gets > its current time internally from the system (not sure which part > exactly assigns the time stamp). The resulting > nanosecond/dwLowDateTime was > > 291315800 1303049222 > > Then, the utime call in step 4 asked to set this to You mean step 3, right? ("date back 10s") > 291315078 1303049214 > > When reading the timestamp back, I get > > 291315000 1303049214 Ok, but... the problem is that touch() in step 5 should bump back the timestamp to 1303049222 plus some nanoseconds. Not leave it at 1303049214. The test is written so that the nanoseconds should be irrelevant. (note also how far 1385154213 is from 1303049222, but the test is careful to avoid that) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:34:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 21:34:56 +0000 Subject: [issue19718] Path.glob() on case-insensitive Posix filesystems In-Reply-To: <1385142582.76.0.752016715187.issue19718@psf.upfronthosting.co.za> Message-ID: <1385156096.54.0.437043911537.issue19718@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, thanks (and thanks Brett for writing and testing the patch)! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:38:32 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Fri, 22 Nov 2013 21:38:32 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1385156312.78.0.789775921374.issue17457@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Added patch which addresses Eric's comments. It contains a situation which I'm not so happy, mostly due to not knowing in depth (or at least at a comfortable level) the import mechanics: in the AttributeError except handler, if the spec can't be determined and the module is not built-in, a TypeError is raised to notice the user that discovery can't be done for that particular package. Probably this situation (no __file__, no __spec__ and no built-in) is common, but I can't think right now at another way of solving it. ---------- Added file: http://bugs.python.org/file32783/unittest_discover.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:41:48 2013 From: report at bugs.python.org (Philip Jenvey) Date: Fri, 22 Nov 2013 21:41:48 +0000 Subject: [issue19725] Richer stat object Message-ID: <1385156508.32.0.63377992281.issue19725@psf.upfronthosting.co.za> New submission from Philip Jenvey: With discussion of the new Pathlib API there's been suggestion (and maybe even already consensus) that some of the convenience APIs provided by it should exist on stat result objects. It's maybe too late for 3.4, but let's track exactly what additions are wanted ---------- components: Library (Lib) messages: 203892 nosy: ncoghlan, pitrou, pjenvey priority: normal severity: normal status: open title: Richer stat object type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:44:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 21:44:18 +0000 Subject: [issue19659] Document Argument Clinic In-Reply-To: <1384907080.98.0.430269997716.issue19659@psf.upfronthosting.co.za> Message-ID: <1385156658.01.0.24935278328.issue19659@psf.upfronthosting.co.za> STINNER Victor added the comment: > I quite agree. My plan is to write a quick HOWTO for now to get > people up and running for now, then flesh it out into a full document. Oh yes, I prefer a practical doc based on examples rather a full reference of the API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:48:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 22 Nov 2013 21:48:52 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1385156932.52.0.82736138211.issue14373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch fixes bugs found by Antoine. Thank you Antoine. ---------- Added file: http://bugs.python.org/file32784/clru_cache2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:49:09 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 21:49:09 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385156949.39.0.0346516737909.issue8813@psf.upfronthosting.co.za> Ned Deily added the comment: This change seems to have broken the OS X 10.4 Tiger buildbot: _ssl.c:2240: error: 'struct x509_store_st' has no member named 'param' _ssl.c:2253: error: 'struct x509_store_st' has no member named 'param' _ssl.c:2257: error: 'struct x509_store_st' has no member named 'param' _ssl.c:2263: error: 'struct x509_store_st' has no member named 'param' http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/7370 ---------- nosy: +ned.deily resolution: fixed -> status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:51:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 21:51:51 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385157111.56.0.319578274305.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, please accept the fact that the codec sub-system in Python > doesn't only have the Unicode implementation as target. It's > true that most codecs were added for the Unicode implementation, > but I deliberately designed the system to be open for other > purposes such as encoding/decoding between different representations > of data as well. I was rejecting completly transform codecs, but I changed my mind. I'm trying to accept that codecs.encode/decode functions were present from the beginning and that they should be functions :-) My request to remove extra code on the exceptions handling was specific to pure Unicode encodings (like UTF-8. The code can be kept for codecs.encode/decode. The impact of my request should only impact misused third party transform codecs. You would just get as much info that you are getting with Python 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 22:57:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 21:57:41 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385157461.31.0.387486239809.issue19619@psf.upfronthosting.co.za> STINNER Victor added the comment: With blacklisted transform codecs, I'm fine with the idea of restoring codecs aliases for transform codecs in Python 3.4. Go ahead Nick. -- For Python 3.5, a better solution should be found to declare transform codecs. And I had like to also add transform()/untransform() methods on bytes and str types. So you would have 4 API: * Unicode text codecs: str.encode/str.decode, str=>bytes * bytes transform codecs: bytes.transform/untransform, bytes-like object=>bytes * Unicode transform codecs: str.transform/untransform, str=>str * all codecs: codecs.encode/codecs.decode, something=>something else But only few developers (only me?) are interested by transform/untransform, so codecs.encode/codecs.decode might be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:03:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 22:03:53 +0000 Subject: [issue18059] Add multibyte encoding support to pyexpat In-Reply-To: <1369507288.26.0.471852341095.issue18059@psf.upfronthosting.co.za> Message-ID: <1385157833.64.0.51518840102.issue18059@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that multibyte encodings other than UTF-8 are used in the world. I'm not convinced that we should support them. If the changes are small, it's maybe not a bad thing. Do you know which applications use such codecs? pyexpat_encoding_create() looks like an heuristic. How many multibyte codecs can be used with your patch? A whitelist of multibyte codecs may be less reliable. What do you think? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:05:44 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 22:05:44 +0000 Subject: [issue19723] Argument Clinic should add markers for humans In-Reply-To: <1385150644.99.0.984146693257.issue19723@psf.upfronthosting.co.za> Message-ID: <1385157944.24.0.00614614108161.issue19723@psf.upfronthosting.co.za> Larry Hastings added the comment: > However, to bikeshed a little, I would prefer > "preprocessor" instead of "clinic", since jokes > tend to wear off if one sees then too often. "Argument Clinic" is the name of the tool. The marker /*[clinic]*/ was chosen deliberately: * If someone says "what the hell is this" a quick online search should turn up the answer quickly. * It differentiates it from /*[python]*/, which allows one to embed raw Python code inside files. ("print" is redirected to the output section.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:06:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 22:06:45 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385158005.36.0.340929221313.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: To recap a bit, here is a very simplified view of the test: A. path is opened for writing (and then closed) B. its st_mtime is recorded in old_mtime C. path is opened again for writing (and closed) D. assert `path's current mtime` >= old_mtime Whatever the details of Windows filesystem timestamps, it should be a no-brainer that the assertion passes :-) But it fails by some nanoseconds on some Windows buildbots (not all): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pathlib.py", line 1391, in test_touch_common self.assertGreaterEqual(p.stat().st_mtime, old_mtime) AssertionError: 1385156382.902938 not greater than or equal to 1385156382.9029381 File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_pathlib.py", line 1391, in test_touch_common self.assertGreaterEqual(p.stat().st_mtime, old_mtime) AssertionError: 1385150397.383464 not greater than or equal to 1385150397.3834648 File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_pathlib.py", line 1391, in test_touch_common self.assertGreaterEqual(p.stat().st_mtime, old_mtime) AssertionError: 1385157186.106778 not greater than or equal to 1385157186.1067784 ---------- nosy: +jkloth, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:09:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 22:09:48 +0000 Subject: [issue19467] asyncore documentation: redirect users to the new asyncio module In-Reply-To: <1383269804.3.0.264747393931.issue19467@psf.upfronthosting.co.za> Message-ID: <1385158188.07.0.239959797084.issue19467@psf.upfronthosting.co.za> STINNER Victor added the comment: Guido: I see that you added a note in asyncore and asynchat doc. Can you close the issue? http://hg.python.org/cpython/rev/db6ae01a5f7f changeset: 87364:db6ae01a5f7f user: Guido van Rossum date: Fri Nov 22 11:57:35 2013 -0800 summary: Add note to asyncore/asynchat recommending asyncio for new code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:11:21 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 22 Nov 2013 22:11:21 +0000 Subject: [issue19467] asyncore documentation: redirect users to the new asyncio module In-Reply-To: <1383269804.3.0.264747393931.issue19467@psf.upfronthosting.co.za> Message-ID: <1385158281.46.0.884506828131.issue19467@psf.upfronthosting.co.za> Guido van Rossum added the comment: Heh, I'd forgotten about this issue. Done. :-) ---------- assignee: -> gvanrossum resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:20:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 22:20:15 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <3dRBsW027Cz7Lp5@mail.python.org> Roundup Robot added the comment: New changeset 4101bfaa76fe by Antoine Pitrou in branch 'default': Try to debug issue #19715 http://hg.python.org/cpython/rev/4101bfaa76fe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:21:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Fri, 22 Nov 2013 22:21:54 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1385156949.39.0.0346516737909.issue8813@psf.upfronthosting.co.za> Message-ID: Christian Heimes added the comment: :( I seriously need access to a Darwin or OSX box. This is the second time I broke the build on OSX. Ned Deily schrieb: > >Ned Deily added the comment: > >This change seems to have broken the OS X 10.4 Tiger buildbot: > >_ssl.c:2240: error: 'struct x509_store_st' has no member named 'param' >_ssl.c:2253: error: 'struct x509_store_st' has no member named 'param' >_ssl.c:2257: error: 'struct x509_store_st' has no member named 'param' >_ssl.c:2263: error: 'struct x509_store_st' has no member named 'param' > >http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/7370 > >---------- >nosy: +ned.deily >resolution: fixed -> >status: pending -> open > >_______________________________________ >Python tracker > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:30:39 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 22 Nov 2013 22:30:39 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385159439.81.0.554863571695.issue8813@psf.upfronthosting.co.za> Ned Deily added the comment: 10.4 is *very* old: $ /usr/bin/openssl version OpenSSL 0.9.7l 28 Sep 2006 If you kept around that version of the headers and libs, you'd probably catch most of the problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:53:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 22 Nov 2013 22:53:40 +0000 Subject: [issue18059] Add multibyte encoding support to pyexpat In-Reply-To: <1369507288.26.0.471852341095.issue18059@psf.upfronthosting.co.za> Message-ID: <1385160820.77.0.636045011248.issue18059@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I'm not sure that multibyte encodings other than UTF-8 are used in the world. I don't use any of them but I heard some of them are still widely used. This issue was provoked by issue13612. See also related issue15877. > pyexpat_encoding_create() looks like an heuristic. How many multibyte codecs can be used with your patch? All codecs which can be supported by expat. """ 1. Every ASCII character that can appear in a well-formed XML document, other than the characters $@\^`{}~ must be represented by a single byte, and that byte must be the same byte that represents that character in ASCII. 2. No character may require more than 4 bytes to encode. 3. All characters encoded must have Unicode scalar values <= 0xFFFF, (i.e., characters that would be encoded by surrogates in UTF-16 are not allowed). Note that this restriction doesn't apply to the built-in support for UTF-8 and UTF-16. 4. No Unicode character may be encoded by more than one distinct sequence of bytes. """ 14 Python encodings satisfy these criteria: big5, big5hkscs, cp932, cp949, cp950, euc-jp, euc-jis-2004, euc-jisx0213, gb2312, gbk, johab, shift-jis, shift-jis-2004, shift-jisx0213. > A whitelist of multibyte codecs may be less reliable. What do you think? pyexpat_multibyte_encodings_4.patch implements this way. It hardcodes a list of supported encodings with minimal required tables. pyexpat_multibyte_encodings_5.patch supports any encoding which satisfy expat criteria and builds all needed data at first access (tens kilobytes). After heavy start it works much faster than previous patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:56:42 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 22 Nov 2013 22:56:42 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385161002.38.0.2924578536.issue19715@psf.upfronthosting.co.za> Tim Peters added the comment: FYI, the test fails on my box (32-bit Windows Vista) about 1 time in 3. Here's the latest failure: AssertionError: 1385160333.612968 not greater than or equal to 1385160333.6129684 And here's another: AssertionError: 1385160530.348423 not greater than or equal to 1385160530.3484235 I can't dig into it more now. Possibilities: 1. The clock isn't always monotonic. 2. MS uses an insane (non-monotonic) rounding algorithm (to move to a 100ns boundary). 3. Python uses an insane (non-monotonic) scheme to convert the time to a float. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 22 23:57:47 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 22:57:47 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385161067.2.0.527698912374.issue19674@psf.upfronthosting.co.za> Larry Hastings added the comment: I went with __text_signature__. I also did some more polishing, and added / fixed the unit tests, and even added a Misc/NEWS. Is it good enough to go in before the beta? ---------- Added file: http://bugs.python.org/file32785/larry.introspection.for.builtins.patch.3.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:01:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 23:01:01 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385161261.34.0.603340444469.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > 3. Python uses an insane (non-monotonic) scheme to convert the time > to a float. Yes, I was at least hoping to clear that out. The code is there: http://hg.python.org/cpython/file/4101bfaa76fe/Modules/posixmodule.c#l1459 Other than that, I suppose I can hack the test if the discrepancy is never more than 1 ?s :-/... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:03:00 2013 From: report at bugs.python.org (Steve Dower) Date: Fri, 22 Nov 2013 23:03:00 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385161380.04.0.173384544069.issue19715@psf.upfronthosting.co.za> Steve Dower added the comment: I don't have any extra insight into this. The documented resolution for mtime on NTFS is 100ns (2s on FAT32), so without delaying by at least that long you're not going to see an official change. The noise is probably from floating-point conversions (in _PyTime_ObjectToDenominator, at a guess). Maybe you want to test to be a bit more generous with the bounds: 1. touch 2. get original_mtime 3. utime(10s ago) 4. verify p.stat().st_mtime < original_mtime 5. store old_mtime 6. touch 7. verify p.stat().st_mtime > old_mtime OR 7. verify original_mtime - 0.001 < p.stat().st_mtime < original_mtime + 0.001 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:04:33 2013 From: report at bugs.python.org (Steve Dower) Date: Fri, 22 Nov 2013 23:04:33 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385161473.18.0.413671319922.issue19715@psf.upfronthosting.co.za> Steve Dower added the comment: > 7. verify original_mtime - 0.001 < p.stat().st_mtime < original_mtime + 0.001 Actually, don't check the upper-bound here... that's a bad idea :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:10:05 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 23:10:05 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1385161805.49.0.825094043929.issue19358@psf.upfronthosting.co.za> Larry Hastings added the comment: Attached is a patch to at least add a "make clinic" target for the UNIX-like platforms. This doesn't add anything for the Windows build. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file32786/larry.make.clinic.patch.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:11:28 2013 From: report at bugs.python.org (Tim Peters) Date: Fri, 22 Nov 2013 23:11:28 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385161473.18.0.413671319922.issue19715@psf.upfronthosting.co.za> Message-ID: Tim Peters added the comment: Here's a failure with the patch: self.assertGreaterEqual(st.st_mtime_ns, old_mtime_ns) AssertionError: 1385161652120374900 not greater than or equal to 1385161652120375500 And another: AssertionError: 1385161754170484000 not greater than or equal to 1385161754170484500 And one more: AssertionError: 1385161795681499000 not greater than or equal to 1385161795681499500 I'll stare at the code later - have to leave now. Please fix it before I get back ;-) On Fri, Nov 22, 2013 at 5:04 PM, Steve Dower wrote: > > Steve Dower added the comment: > >> 7. verify original_mtime - 0.001 < p.stat().st_mtime < original_mtime + 0.001 > > Actually, don't check the upper-bound here... that's a bad idea :) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:18:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 23:18:13 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <3dRD8N74K1z7Ll0@mail.python.org> Roundup Robot added the comment: New changeset 716e41100553 by Victor Stinner in branch 'default': Issue #19715: Ensure that consecutive calls to monotonic() are monotonic http://hg.python.org/cpython/rev/716e41100553 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:24:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Nov 2013 23:24:19 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1385162659.07.0.870723934302.issue19358@psf.upfronthosting.co.za> STINNER Victor added the comment: + $(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py */*.c There are deeper directories containing .c files: Mac/Tools, Modules/cjkcodecs, Modules/_ctypes, Modules/_decimal, Modules/expat, ./PC/bdist_wininst, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:29:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 23:29:40 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1385162980.92.0.075960534513.issue19291@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Following patch stubs a couple of things, this is very crude though. ---------- Added file: http://bugs.python.org/file32787/asyncio_stub.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:33:47 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 22 Nov 2013 23:33:47 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1385163227.88.0.974132436581.issue19291@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks -- please just commit, we can iterate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:34:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 22 Nov 2013 23:34:32 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <3dRDWC6g3Tz7LkC@mail.python.org> Roundup Robot added the comment: New changeset e4b7377a690a by Antoine Pitrou in branch 'default': Issue #19291: add crude stubs to the asyncio docs http://hg.python.org/cpython/rev/e4b7377a690a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:35:57 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 22 Nov 2013 23:35:57 +0000 Subject: [issue18059] Add multibyte encoding support to pyexpat In-Reply-To: <1385157833.64.0.51518840102.issue18059@psf.upfronthosting.co.za> Message-ID: <528FEA55.4070500@egenix.com> Marc-Andre Lemburg added the comment: On 22.11.2013 23:03, STINNER Victor wrote: > > I'm not sure that multibyte encodings other than UTF-8 are used in the world. I'm not convinced that we should support them. If the changes are small, it's maybe not a bad thing. Do you know which applications use such codecs? I'm not sure what you mean with multibyte encodings. There's UTF-16 which is a popular 2-byte encoding and then there are a whole lot of variable length encodings such as UTF-8 and many of the Asian codecs in the stdlib. While you see those used a lot for text, I'm not sure whether the same is true for XML documents, where UTF-8 is the standard, but other encodings can be specified if needed. Serhiy: Apart from this being a nice-to-have feature, where do you see the practical use ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:37:43 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 23:37:43 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 In-Reply-To: <1385142817.39.0.677934490728.issue19713@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Keep in mind we figured out post-PEP acceptance that there are still a couple of obscure use cases that need the old loader API, so we may want to keep that around as a "power user" mode rather than deprecating it (either forever or until a replacement is defined in 3.5) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:38:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Nov 2013 23:38:19 +0000 Subject: [issue19726] BaseProtocol is not an ABC Message-ID: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> New submission from Antoine Pitrou: BaseProtocol docstring describes it as an "ABC for base protocol class", but it is not actually an ABC in the technical sense. ---------- assignee: gvanrossum components: Library (Lib) messages: 203921 nosy: gvanrossum, pitrou priority: normal severity: normal status: open title: BaseProtocol is not an ABC type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:42:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 23:42:13 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385151882.63.0.108166382409.issue19722@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: +1 from me. A stack_effect attribute on dis.Instruction would be a nice bonus, but doesn't need to be part of this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:44:25 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 23:44:25 +0000 Subject: [issue19659] Document Argument Clinic In-Reply-To: <1385156658.01.0.24935278328.issue19659@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: While it's still a private tool, something in the dev guide would be appropriate, then it can be promoted to the regular docs if it becomes a public capability in 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:45:53 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 23:45:53 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1385163952.99.0.788100518646.issue19358@psf.upfronthosting.co.za> Larry Hastings added the comment: Okay, there's more than one way to skin this cat. This version uses os.walk(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:46:14 2013 From: report at bugs.python.org (Larry Hastings) Date: Fri, 22 Nov 2013 23:46:14 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1385163974.73.0.616514319373.issue19358@psf.upfronthosting.co.za> Larry Hastings added the comment: (Whoops, forgot to attach the new diff.) ---------- Added file: http://bugs.python.org/file32788/larry.make.clinic.patch.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:47:50 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 22 Nov 2013 23:47:50 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> Message-ID: <1385164070.09.0.194312892924.issue19726@psf.upfronthosting.co.za> Guido van Rossum added the comment: Good question. I don't mind making these ABCs, but I don't think it's necessary to do it before beta1 (since it won't matter for most people). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 00:48:00 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 22 Nov 2013 23:48:00 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1385157461.31.0.387486239809.issue19619@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Yay, thanks Victor! Regarding UTF-8 et al, the existing shortcuts in unicodeobject.c already bypass the full codec machinery, and that includes the exception wrapping on failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:03:07 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 00:03:07 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385164987.05.0.31023571981.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: >> Then, the utime call in step 4 asked to set this to > You mean step 3, right? ("date back 10s") No, I really meant step 4 (touch). The second touch call *really* steps backwards. I don't find that very surprising, since it is actually the first call that passes an actual time. I can readily believe that Windows uses different rounding algorithm when creating a fresh file than Python uses when converting a float to a FILETIME. > (note also how far 1385154213 is from 1303049222, but the test is > careful to avoid that) These are really entirely different values. 1385154213 is the number of seconds since 1970. 1303049222 is the dwLowDateTime of that timestamp, i.e. the lower 32-bit in units of 100 ns since 1601. This test *does* fail because of a few nanoseconds - I don't understand why you claim that it cannot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:27:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 00:27:55 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385166475.55.0.596084550007.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > No, I really meant step 4 (touch). The second touch call *really* > steps backwards. I don't find that very surprising, since it is > actually the first call that passes an actual time. Ok, now I see what you mean. Indeed, we are calling utime() on the file when it already exists, which may explain the discrepancy. I guess we can go for a simple fix, then... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:33:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 00:33:04 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <3dRFpl3Rs6z7Ll4@mail.python.org> Roundup Robot added the comment: New changeset 602062d2a008 by Antoine Pitrou in branch 'default': Try to fix issue #19715 (timestamp rounding inconsistencies under Windows?) http://hg.python.org/cpython/rev/602062d2a008 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:37:59 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 00:37:59 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <1385167079.05.0.119871513116.issue19722@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, looking at dis.py, I'm -1 on exposing this as a public opcode module API at this point, although I'm still a fan of exposing it as opcode._stack_effect to allow advanced users access (ala sys._get_frames). I initially thought the required addition to dis.Instruction would just be: @property def stack_effect(self): return opcode.stack_effect(self.opcode, self.arg) However, that doesn't necessarily work, since self.arg may be None. That means stack_effect has to be at least: def stack_effect(opcode, oparg=None): if oparg is None: if opcode >= HAVE_ARGUMENT: raise ValueError("This opcode needs an argument") oparg = 0 return _opcode.stack_effect(opcode, oparg) However, even that's not quite accurate, since if the previous opcode was EXTENDED_ARG, you should be adding *that* arg times 65536 to oparg in order to figure out the stack effect. It's that need to take the previous opcode into account to correctly determine the value for "oparg" that makes this a bit tricky. Although, I guess the latter concern would only apply to integration into the dis module - for the opcode module, it just needs to be documented that the calculation of the passed in oparg value should take EXTENDED_ARG into account. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:42:20 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 00:42:20 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385167340.97.0.179366247244.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Looking at the ReactOS sources, it appears that Windows doesn't do any rounding, so it's all Python's fault. Windows keeps its system time (in KI_USER_SHARED_DATA) in essentially a FILETIME represenation (i.e. units of 100ns since 1601), and never needs to convert it. So CreateFile just uses the current system time as-is when filling the LastWriteTime. I don't think it's enough for Python to convert these monotonically. The error would already occur if Python cannot convert bijectively, i.e. if getting the system time into float and back won't get the same FILETIME. It might just be that a 64-bit float value (with 53 bit mantissa) is too imprecise for that operation. A FILETIME currently has 56 significant bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:42:50 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 23 Nov 2013 00:42:50 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 In-Reply-To: <1385139007.0.0.922066136531.issue19713@psf.upfronthosting.co.za> Message-ID: <1385167370.78.0.694853186086.issue19713@psf.upfronthosting.co.za> Eric Snow added the comment: It's definitely worth it to be more explicit. (Brett had referenced msg202663.) When I get some time I'll update this ticket with a list of the specific deprecation items. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:44:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 00:44:50 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385167490.88.0.90245889763.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looking at one of the failure instances: >>> math.frexp(1385150397.383464)[0] * 2**53 5809741852347053.0 >>> math.frexp(1385150397.3834648)[0] * 2**53 5809741852347056.0 It doesn't seem that lack of FP precision would be sufficient to explain the problem, although it's true that it is quite close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:45:56 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 00:45:56 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385167556.18.0.145099446091.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: OTOH, a time.time() in units of 100ns needs 53.6 bits, so it should "almost" fit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:46:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 00:46:51 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1385167611.18.0.563223148535.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: With issue 19619 resolved for Python 3.4 (the issue itself remains open awaiting a backport to 3.3), Victor has softened his stance on this topic and given the go ahead to restore the codec aliases: http://bugs.python.org/issue19619#msg203897 I'll be committing this shortly, after adjusting the patch to account for the issue 19619 changes to the tests and What's New. ---------- assignee: -> ncoghlan versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:51:47 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 00:51:47 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <1385167907.5.0.586772441426.issue19722@psf.upfronthosting.co.za> Larry Hastings added the comment: stack_effect will never know about EXTENDED_ARG. Instead, you simply pass the already-extended arg as the second argument. Making the second argument support a default of None will be slightly inconvenient, but I'll do it if you think it's a big improvement. Considering how troublesome it was to recreate this information when I wrote my assembler, I definitely think this information should be exported out of the murky heart of Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 01:55:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 00:55:02 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <3dRGJ61H9Sz7LkB@mail.python.org> Roundup Robot added the comment: New changeset d647a4a8505e by Antoine Pitrou in branch 'default': Trying other strategy for #19715: use utime(..., None) http://hg.python.org/cpython/rev/d647a4a8505e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:03:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 01:03:19 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: Message-ID: STINNER Victor added the comment: > Regarding UTF-8 et al, the existing shortcuts in unicodeobject.c already > bypass the full codec machinery, and that includes the exception wrapping > on failures. There are still platforms using locale encodings different than ascii, latin1 or utf8. For example, Windows never uses these encodings for ANSI or OEM code page. ANSI code page is used as the Python filesystem encoding which is used in a lot of places. OEM code page is used for the stdio streams (stdin, stdout, stderr). There are some users using locales with the latin9 encoding. I proposed to remove the new code for exception handling to simplify the code (because the error should not occur anymore). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:08:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 01:08:52 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385168932.29.0.689576530495.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I thought that using utime(..., None) would be better, but it's actually much worse: it calls GetSystemTime, which only has millisecond precision, while time.time() calls GetSystemTimeAsFileTime which has better precision. (this is probably a bug in utime()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:11:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 01:11:09 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <3dRGfh4Hlxz7Lp6@mail.python.org> Roundup Robot added the comment: New changeset a273f99159e0 by Antoine Pitrou in branch 'default': Revert utime(..., None) strategy (it has too poor resolution under Windows) and restore the previous test workaround http://hg.python.org/cpython/rev/a273f99159e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:14:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 01:14:37 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <3dRGkg44Tgz7LkB@mail.python.org> Roundup Robot added the comment: New changeset 5e960d2c2156 by Nick Coghlan in branch 'default': Close #7475: Restore binary & text transform codecs http://hg.python.org/cpython/rev/5e960d2c2156 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:15:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 01:15:52 +0000 Subject: [issue19727] os.utime(..., None) has poor resolution on Windows Message-ID: <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za> New submission from Antoine Pitrou: os.utime() uses the following code when times is None under Windows: SYSTEMTIME now; GetSystemTime(&now); if (!SystemTimeToFileTime(&now, &mtime) || !SystemTimeToFileTime(&now, &atime)) { PyErr_SetFromWindowsErr(0); goto exit; } The problem is GetSystemTime has poor resolution (milliseconds). Instead, it could call GetSystemTimeAsFileTime which writes directly into a FILETIME structure, and potentially (?) has better resolution. (according to a comment on MSDN, "Resolution on Windows 7 seems to be sub-millisecond": http://msdn.microsoft.com/en-us/library/windows/desktop/ms724397%28v=vs.85%29.aspx ) ---------- components: Library (Lib), Windows messages: 203943 nosy: brian.curtin, larry, loewis, pitrou, steve.dower, tim.golden, tim.peters priority: normal severity: normal status: open title: os.utime(..., None) has poor resolution on Windows type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:16:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 01:16:23 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1385169383.18.0.469051932802.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that I still plan to do a documentation-only PEP for 3.4, proposing some adjustments to the way the codecs module is documented, making binary and test transform defined terms in the glossary, etc. I'll probably aim for beta 2 for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:23:00 2013 From: report at bugs.python.org (Eric Snow) Date: Sat, 23 Nov 2013 01:23:00 +0000 Subject: [issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__) In-Reply-To: <1385137546.91.0.531425476426.issue19697@psf.upfronthosting.co.za> Message-ID: <1385169780.78.0.221803207623.issue19697@psf.upfronthosting.co.za> Eric Snow added the comment: I've already started on this somewhat. However, I'm going to close out more of the other PEP 451 issues before going any further. Nick: when do you think things will settle down that you could field a question or two and some reviews relative to the __main__ changes. I keep wondering if I'll have inadvertently implemented good chunks of PEP 395 by the time I'm done here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:33:39 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 01:33:39 +0000 Subject: [issue19694] test_venv failing on one of the Ubuntu buildbots In-Reply-To: <1385132981.26.0.207810200878.issue19694@psf.upfronthosting.co.za> Message-ID: <1385170419.23.0.358767355948.issue19694@psf.upfronthosting.co.za> Nick Coghlan added the comment: Reviewing the current buildbot failures, this is still the only one reporting the error: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3165/steps/test/logs/stdio I can reproduce the failure locally by running: $ PYTHONWARNINGS=d ./python -m test test_venv [1/1] test_venv /home/ncoghlan/devel/py3k/Lib/imp.py:32: PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses PendingDeprecationWarning) /tmp/tmpwmsqtb9y/pip-1.5.rc1-py2.py3-none-any.whl/pip/wheel.py:127: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. test test_venv failed -- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_venv.py", line 289, in test_with_pip self.assertEqual(err, b"") AssertionError: b"/home/ncoghlan/devel/py3k/Lib/imp.py:32:[160 chars]g)\n" != b'' 1 test failed: test_venv I'm updating the test to make sure that venv runs the subprocess in isolated mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:37:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 01:37:31 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385170651.36.0.169012028243.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, Jim Jewett found a bug: if set_traceback_limit() is called while tracemalloc is tracing, two tracebacks are seen different because their length is different, whereas the full traceback would be the same. To avoid this issue, I propose to add an optional nframe parameter to the set_traceback_limit() function. With this API, it may be possible to remove the arbitrary limitation of 100 frames by allocating a buffer in start(). ---------- Added file: http://bugs.python.org/file32789/start_nframe.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:38:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 01:38:25 +0000 Subject: [issue19694] test_venv failing on one of the Ubuntu buildbots In-Reply-To: <1385132981.26.0.207810200878.issue19694@psf.upfronthosting.co.za> Message-ID: <3dRHG81hz5zPK0@mail.python.org> Roundup Robot added the comment: New changeset 0ce8d68181a2 by Nick Coghlan in branch 'default': Close #19694: venv now runs ensurepip in isolated mode http://hg.python.org/cpython/rev/0ce8d68181a2 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:47:24 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 01:47:24 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers Message-ID: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> New submission from Nick Coghlan: While implementing the Windows installer for PEP 453 in issue 19550, MvL pointed out that, *by default*, the installers should be able to uninstall everything they install. At the moment, if they install pip by default, that's not accurate, as we don't currently have the appropriate command defined to do the uninstall. For beta 1, Martin just went with the option of leaving the option off by default, but it would be good to resolve the uninstallation problem and allow it to be enabled by default. My suggestion for a design requirement is: If a user installs CPython use the binary installer, makes no changes to the installation options, makes no use of the installed pip and then uninstalls CPython, then there should be no CPython related files left on their system. If they *do* use the installed pip (whether to upgrade pip itself or to install other packages), then files may potentially be left behind, since they're seen as user data files by CPython. I also think it's OK if uninstalling CPython removes setuptools and pip from that installation's site-packages, even if they had been upgraded following the original installation. ---------- messages: 203949 nosy: dstufft, loewis, ncoghlan, ned.deily priority: high severity: normal stage: needs patch status: open title: PEP 453: enable pip by default in the binary installers type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:48:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 01:48:32 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1385171312.88.0.919571077316.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: Created issue 19728 to track what is needed before the installation of pip can be made the default in the installers (at least for Windows, but I assume MvL's concerns would apply equally to the Mac OS X installer) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:49:32 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 23 Nov 2013 01:49:32 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385171372.78.0.81296864938.issue19728@psf.upfronthosting.co.za> Donald Stufft added the comment: I don't know much about installers, can they execute code as part of their uninstall process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 02:51:35 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 23 Nov 2013 01:51:35 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385171495.78.0.435653804162.issue19728@psf.upfronthosting.co.za> Donald Stufft added the comment: Also does the PEP need updated? It specifically called out this problem and said that it will leave pip behind? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:07:42 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 23 Nov 2013 02:07:42 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385172462.64.0.124308865007.issue19728@psf.upfronthosting.co.za> Ned Deily added the comment: FTR, on OS X, there is no standard mechanism provided by the Apple-supplied installer program to uninstall binary packages. Thus, most third-party binary distributions for OS X that use the OS X installer can only be uninstalled manually unless they provide some custom uninstall script or package. The python.org OS X installers have not provided such up to now, although it has been suggested in the past. So this discussion does not currently apply to them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:16:42 2013 From: report at bugs.python.org (HCT) Date: Sat, 23 Nov 2013 02:16:42 +0000 Subject: [issue19729] str.format sublevel format parsing broken in Python 3.3.3 Message-ID: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> New submission from HCT: can't find a way around it... maybe a new regression test on this. Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> "0x{:0{:d}X}".format(0x0,16) Traceback (most recent call last): File "", line 1, in ValueError: unmatched '{' in format >>> "0x{:0{{:d}}X}".format(0x0,16) Traceback (most recent call last): File "", line 1, in ValueError: Invalid format specifier >>> "0x{:0{:d}X}".format(0x0,16) Traceback (most recent call last): File "", line 1, in ValueError: unmatched '{' in format >>> "0x{:{:d}X}".format(0x0,16) Traceback (most recent call last): File "", line 1, in ValueError: unmatched '{' in format >>> "0x{:0{:d}X}".format(0x0,16) Traceback (most recent call last): File "", line 1, in ValueError: unmatched '{' in format >>> "0x{:0{:d}x}".format(0x0,16) Traceback (most recent call last): File "", line 1, in ValueError: unmatched '{' in format >>> >>> "{:0{}x}".format(0,16) '0000000000000000' "0x{:0{:d}X}".format(0x0,16) and "{:0{}x}".format(0,16) work with Python 3.1, 3.2 and up to 3.3.2 ---------- components: Interpreter Core messages: 203954 nosy: hct priority: normal severity: normal status: open title: str.format sublevel format parsing broken in Python 3.3.3 versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:16:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 02:16:46 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385173006.27.0.868394662228.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just noting the exact list of codecs that currently bypass the full codec machinery and go direct to the C implementation by normalising the codec name (which includes forcing to lowercase) and then using strcmp to check against a specific set of known encodings. In PyUnicode_Decode (and hence bytes.decode and bytearray.decode): utf-8 utf8 latin-1 latin1 iso-8859-1 iso8859-1 mbcs (Windows only) ascii utf-16 utf-32 In PyUnicode_AsEncodedString (and hence str.encode), the list is mostly the same, but utf-16 and utf-32 are not accelerated (i.e. they're currently still looked up through the codec machinery). It may be worth opening a separate issue to restore the consistency between the lists by adding utf-16 and utf-32 to the fast path for encoding as well. As far as the wrapping mechanism from issue #17828 itself goes: - it only triggers if PyEval_CallObject on the encoder or decoder returns NULL - stateful exceptions (which includes UnicodeEncodeError and UnicodeDecodeError) and those with custom __init__ or __new__ implementations don't get wrapped - the actual wrapping process is just the C equivalent of "raise type(exc)(new_msg) from exc", plus the initial checks to determine if the current exception can be wrapped safely - it applies to the *general purpose* codec machinery, not just to the text model related convenience methods ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:18:13 2013 From: report at bugs.python.org (HCT) Date: Sat, 23 Nov 2013 02:18:13 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385173093.44.0.504382280648.issue19729@psf.upfronthosting.co.za> Changes by HCT : ---------- title: str.format sublevel format parsing broken in Python 3.3.3 -> [regression] str.format sublevel format parsing broken in Python 3.3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:18:27 2013 From: report at bugs.python.org (HCT) Date: Sat, 23 Nov 2013 02:18:27 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385173107.53.0.208647586608.issue19729@psf.upfronthosting.co.za> Changes by HCT : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:20:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 02:20:14 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <1385173214.47.0.135960158308.issue19619@psf.upfronthosting.co.za> Nick Coghlan added the comment: The examples from the 3.4 What's New may make it clearer why the exception wrapping in the codec machinery is much broader in scope that just detecting output type errors (even though handling that case was the original motivation for the idea): >>> import codecs >>> codecs.decode(b"abcdefgh", "hex") binascii.Error: Non-hexadecimal digit found The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in binascii.Error: decoding with 'hex' codec failed (Error: Non-hexadecimal digit found) >>> codecs.encode("hello", "bz2") TypeError: 'str' does not support the buffer interface The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in TypeError: encoding with 'bz2' codec failed (TypeError: 'str' does not support the buffer interface) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:24:11 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 23 Nov 2013 02:24:11 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1385173451.02.0.869464149124.issue19085@psf.upfronthosting.co.za> Ned Deily added the comment: test_widgets.ButtonTest is still causing a Cocoa Tk 8.5/8.6 crash which also crashes Python while running the test suite. The test should be fixed or disabled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:28:13 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 02:28:13 +0000 Subject: [issue19730] Clinic fixes: add converters with length, version directive Message-ID: <1385173692.32.0.599871676954.issue19730@psf.upfronthosting.co.za> New submission from Larry Hastings: Two minor changes for Argument Clinic. * Added a "version" directive, so a programmer can require a specific version (or better) of Clinic. * Finished off support for all the 'legacy' converters. The ones today were those that give off a "length" parameter. This was complicated by finally dealing properly with the Py_buffer conversion stuff. To properly handle length parameters, I had to support PY_SSIZE_T_CLEAN being turned off (when are we gonna throw that away?). So I added a new type to pyports.h, Py_ssize_clean_t, which is either an int or a Py_ssize_t depending on PY_SSIZE_T_CLEAN. I've run out of gas and am going to bed. I know I have two TODO items in the diff so far; I'll deal with those tomorrow. But can I get a quick review of the rest, so I can get this in tomorrow? ---------- assignee: larry components: Build files: larry.misc.clinic.fixes.diff.1.patch keywords: patch messages: 203958 nosy: brett.cannon, larry, ncoghlan, pitrou priority: normal severity: normal stage: patch review status: open title: Clinic fixes: add converters with length, version directive type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32790/larry.misc.clinic.fixes.diff.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:29:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 02:29:28 +0000 Subject: [issue19731] Fix copyright footer Message-ID: <1385173768.12.0.946242825352.issue19731@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Marc-Andr? pointed out that the copyright footer has the wrong date. See attached patch. ---------- assignee: docs at python components: Documentation files: copyright.patch keywords: patch messages: 203959 nosy: docs at python, lemburg, pitrou priority: low severity: normal status: open title: Fix copyright footer versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32791/copyright.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:31:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 02:31:00 +0000 Subject: [issue19731] Fix copyright footer In-Reply-To: <1385173768.12.0.946242825352.issue19731@psf.upfronthosting.co.za> Message-ID: <1385173860.28.0.0571778809771.issue19731@psf.upfronthosting.co.za> STINNER Victor added the comment: > Marc-Andr? pointed out that the copyright footer has the wrong date. In an email? Could you please give the reference to the mail? (I never understood these copyright dates, so it may help me to understand :-)) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:31:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 02:31:58 +0000 Subject: [issue19731] Fix copyright footer In-Reply-To: <1385173768.12.0.946242825352.issue19731@psf.upfronthosting.co.za> Message-ID: <1385173918.96.0.564951915064.issue19731@psf.upfronthosting.co.za> Antoine Pitrou added the comment: See https://mail.python.org/pipermail/python-legal-sig/2013-November/000059.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:34:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 02:34:43 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385174083.76.0.264519732358.issue19729@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:40:27 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 23 Nov 2013 02:40:27 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385174427.59.0.0253963649574.issue19729@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Amusingly, it also works in 3.4. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 03:56:02 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 02:56:02 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385175362.46.0.720778339909.issue19729@psf.upfronthosting.co.za> STINNER Victor added the comment: According to hg bisect, the regression comes from: changeset: 83817:6786e681ed58 branch: 3.3 parent: 83812:cd2457463eeb user: Benjamin Peterson date: Fri May 17 17:34:30 2013 -0500 files: Lib/test/test_unicode.py Misc/NEWS Objects/stringlib/unicode_format.h description: only recursively expand in the format spec (closes #17644) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 04:52:20 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 03:52:20 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385178740.89.0.200432197515.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: One "obvious" conversion error is this code from http://hg.python.org/cpython/file/4101bfaa76fe/Python/pytime.c#l35 microseconds = large.QuadPart / 10 - 11644473600000000; This discard the 100ns part of the current time, rounding it down to the previous microsecond. As a result, the second time stamp can be up to a microsecond earlier than the previous one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 05:34:18 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 04:34:18 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385181258.47.0.205789539807.issue19715@psf.upfronthosting.co.za> Tim Peters added the comment: [MvL] > One "obvious" conversion error is this code from > > http://hg.python.org/cpython/file/4101bfaa76fe/Python/pytime.c#l35 > > microseconds = large.QuadPart / 10 - 11644473600000000; > > This discard the 100ns part of the current time, rounding it > down to the previous microsecond. As a result, the second > time stamp can be up to a microsecond earlier than the previous > one. I don't think so, on two counts. First, if *both* timestamps went through this code, it's monotonically non-decreasing. That is, if ts1 and ts2 are two full-precision (100ns resolution) timestamps, and ts1 < ts2, then calling the transformation above `T` we'll always have T(ts1) <= T(ts2). T(ts1) can be equal to T(ts2) even if ts1 < ts2, but T(ts1) > T(ts2) can't happen (because C's unsigned integer division truncates). Second, the version of the test code that compared .st_mtime_ns members showed timestamps with 100-ns resolution. Like: self.assertGreaterEqual(c_mtime_ns, old_mtime_ns) AssertionError: 1385179768290263800 not greater than or equal to 1385179768290264500 Note the trailing "800" and "500" in those. So it's not possible that those timestamps came from a _PyTime_timeval (which the code you showed is constructing) - that struct records no info about nanoseconds. There's another clue I don't know what to make of: I've seen dozens of these failures now, and I believe that in every case the original timestamp (the one that should be older) _always_ ended with "500" (in st_mtime_ns format). That's true in the example I posted just above, and also true of the 3 examples I posted in msg203913. LOL! So much for that clue - while I was typing I got this failure: AssertionError: 1385181174851605800 not greater than or equal to 1385181174851606000 So the older timestamp in failing cases always ends with "500" or "000" ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 06:03:19 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 23 Nov 2013 05:03:19 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385182999.83.0.622748253956.issue8813@psf.upfronthosting.co.za> Ned Deily added the comment: This problem also breaks the 32-bit OS X installer build. ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 06:09:49 2013 From: report at bugs.python.org (Steve Dower) Date: Sat, 23 Nov 2013 05:09:49 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385183389.41.0.865000803983.issue19715@psf.upfronthosting.co.za> Steve Dower added the comment: The "000" or "500" still smells of floating point rounding to me. Windows appears to round-trip the values provided perfectly: import ctypes def do_test(t): h = ctypes.windll.kernel32.CreateFileW("test.txt", 0xC0000000, 7, None, 2, 0, 0) assert h != -1 try: mt1 = ctypes.c_uint64(t) assert ctypes.windll.kernel32.SetFileTime(h, None, None, ctypes.byref(mt1)) != 0 mt2 = ctypes.c_uint64() assert ctypes.windll.kernel32.GetFileTime(h, None, None, ctypes.byref(mt2)) != 0 assert mt1.value == mt2.value print(mt2.value) finally: assert ctypes.windll.kernel32.CloseHandle(h) != 0 >>> do_test(123) 123 >>> do_test(999999999999999999) 999999999999999999 Now, I'm not going to make any claims about GetSystemTime's accuracy, and there could well be floating point conversions within there that cause the rounding issue, but I'm more inclined to think that one of Python's conversions is at fault. Of course, an easy way around this would be to sleep for >100ns before touching the file again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 07:16:04 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 06:16:04 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385187364.63.0.716892504929.issue19715@psf.upfronthosting.co.za> Tim Peters added the comment: Steve, I'm afraid sleeping 100ns wouldn't be enough. The more data I collect, the more bizarre this gets :-( Across 300 runs I recorded the difference, in nanoseconds, between the "old" and "new" timestamps. A negative difference is a test failure. I was very surprised (for one thing) to see how few *distinct* values there were: -600: 5 -500: 9 -200: 1 -100: 8 0: 13 100: 1 975800: 7 975900: 58 976000: 69 976100: 7 976300: 9 976400: 48 976500: 52 976600: 6 1952400: 1 1952500: 1 1952800: 1 1952900: 3 1953000: 1 --- 300 So the vast bulk of the differences were close to a millisecond (1e6 nanoseconds), and a handful at the tail close to 2 milliseconds. Anyone know the precision of NTFS file creation time? I know the time structure is _capable_ of 100ns resolution, but the numbers above strongly suggest the precision is a lot closer to a millisecond. Anyway, on the failure end, the biggest difference seen was 600 nanoseconds. A 100ns sleep wouldn't cover that ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 07:26:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 06:26:32 +0000 Subject: [issue19551] PEP 453: Mac OS X installer integration In-Reply-To: <1384166095.93.0.842869053252.issue19551@psf.upfronthosting.co.za> Message-ID: <3dRPfb2x28z7Ll0@mail.python.org> Roundup Robot added the comment: New changeset 4e12f145f18f by Ned Deily in branch 'default': Issue #19551: PEP 453 - OS X installer now installs or upgrades pip by default. http://hg.python.org/cpython/rev/4e12f145f18f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 07:39:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 06:39:55 +0000 Subject: [issue19551] PEP 453: Mac OS X installer integration In-Reply-To: <1384166095.93.0.842869053252.issue19551@psf.upfronthosting.co.za> Message-ID: <3dRPy32DFTz7LlL@mail.python.org> Roundup Robot added the comment: New changeset 257fda20a6cf by Ned Deily in branch 'default': Issue #19551: Update whatsnew. http://hg.python.org/cpython/rev/257fda20a6cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 07:41:20 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 23 Nov 2013 06:41:20 +0000 Subject: [issue19551] PEP 453: Mac OS X installer integration In-Reply-To: <1384166095.93.0.842869053252.issue19551@psf.upfronthosting.co.za> Message-ID: <1385188880.88.0.443542358174.issue19551@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: release blocker -> resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 07:45:32 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 23 Nov 2013 06:45:32 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385189132.78.0.860296651406.issue19728@psf.upfronthosting.co.za> Ned Deily added the comment: Also, FTR, the "install or upgrade pip" option is currently enabled by default for the OS X installers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 07:51:40 2013 From: report at bugs.python.org (Kushal Das) Date: Sat, 23 Nov 2013 06:51:40 +0000 Subject: [issue19716] test that touch doesn't change file contents In-Reply-To: <1385142211.7.0.550068935701.issue19716@psf.upfronthosting.co.za> Message-ID: <1385189500.94.0.536759961194.issue19716@psf.upfronthosting.co.za> Kushal Das added the comment: Patch to check no change in file content after pathlib.touch(). ---------- keywords: +patch Added file: http://bugs.python.org/file32792/issue19716_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 08:06:56 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 07:06:56 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385190416.57.0.643427358432.issue19715@psf.upfronthosting.co.za> Tim Peters added the comment: I have a different theory about this. As explained all over the place, on FAT file creation times are good to 10 milliseconds but modification times only good to 2 seconds. But I can't find one credible word about what the various precisions are for NTFS. For example, http://msdn.microsoft.com/en-us/library/windows/desktop/ms724290(v=vs.85).aspx only gives details about FAT. Anyway, suppose internal system time is 4.5123 seconds. On FAT we create a file, and it's recorded as 4.51 seconds. We immediately modify it, and that's recorded as 4 seconds. Oops! The file was modified before it was created :-) If NTFS similarly records creation times with greater resolution than modification times, then obviously something similar could happen. Could that explain the test failures? Possibly. The file doesn't exist at first, so it's plausible that the initial "modification time" retrieved is really the file creation time. And that the later modification time really is a modification time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 08:19:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 07:19:54 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1385191194.35.0.89449339772.issue19085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Crashes? It should be separate issue, no one Tkinter operation shouldn't crash Python. Fill free to disable this tests on MacOSX (or better on more specific environment) if they prevent the test suite from running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 08:22:13 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 23 Nov 2013 07:22:13 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1385191333.41.0.0548658935633.issue19085@psf.upfronthosting.co.za> Ned Deily added the comment: See msg202006 above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 08:39:50 2013 From: report at bugs.python.org (Steve Dower) Date: Sat, 23 Nov 2013 07:39:50 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385192390.29.0.109930216659.issue19715@psf.upfronthosting.co.za> Steve Dower added the comment: Or as Martin suggested earlier, time.time() could be returning different values to what the system uses when it creates the file (which I assume is GetSystemTimeAsFileTime/SetFileTime or the kernel-mode equivalent). I only looked briefly at the touch() implementation, but I believe if the file doesn't exist it just creates it and doesn't try to set the time? So in the first touch(), the system will set the time. For the second touch(), the file exists and so Python calls utime(... time.time()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 09:24:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 08:24:53 +0000 Subject: [issue19551] PEP 453: Mac OS X installer integration In-Reply-To: <1384166095.93.0.842869053252.issue19551@psf.upfronthosting.co.za> Message-ID: <3dRSH90dXLz7Ll0@mail.python.org> Roundup Robot added the comment: New changeset 7c4d1daa0bc1 by Ned Deily in branch 'default': Issue #19551: Update installer Welcome file. http://hg.python.org/cpython/rev/7c4d1daa0bc1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 09:25:11 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 23 Nov 2013 08:25:11 +0000 Subject: [issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec) In-Reply-To: <1377672978.26.0.119702109188.issue18864@psf.upfronthosting.co.za> Message-ID: <1385195111.05.0.231123302588.issue18864@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 09:33:00 2013 From: report at bugs.python.org (Matthias Klose) Date: Sat, 23 Nov 2013 08:33:00 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec Message-ID: <1385195580.05.0.00984042109495.issue19732@psf.upfronthosting.co.za> New submission from Matthias Klose: using the only mpdecimal release (2.3): building '_decimal' extension creating build/temp.linux-x86_64-3.3/scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal x86_64-linux-gnu-gcc -pthread -fPIC -D_FORTIFY_SOURCE=2 -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fprofile-generate -g -flto -fuse-linker-plugin -DCONFIG_64=1 -DASM=1 -I../Include -I. -IInclude -I/usr/include/x86_64-linux-gnu -I/scratch/packages/python/3.3/python3.3-3.3.3/Include -I/scratch/packages/python/3.3/python3.3-3.3.3/build-static -c /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c -o build/temp.linux-x86_64-3.3/scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.o -Wextra -Wno-missing-field-initializers /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c: In function 'dectuple_as_str': /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c:2522:47: error: expected ')' before 'PRI_mpd_ssize_t' n = snprintf(cp, MPD_EXPDIGITS+2, "%" PRI_mpd_ssize_t, exp); ^ /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c:2522:47: warning: spurious trailing '%' in format [-Wformat=] /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c:2522:47: warning: spurious trailing '%' in format [-Wformat=] /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c: In function 'dec_str': /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c:3075:5: warning: implicit declaration of function 'mpd_to_sci_size' [-Wimplicit-function-declaration] size = mpd_to_sci_size(&cp, MPD(dec), CtxCaps(context)); ^ /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c: In function 'dec_format': /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c:3243:9: warning: implicit declaration of function 'mpd_validate_lconv' [-Wimplicit-function-declaration] if (mpd_validate_lconv(&spec) < 0) { ^ /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c: In function 'dec_as_long': /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c:3340:5: warning: passing argument 1 of 'mpd_qexport_u32' from incompatible pointer type [enabled by default] n = mpd_qexport_u32(&ob_digit, 0, PyLong_BASE, x, &status); ^ In file included from /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c:34:0: /usr/include/x86_64-linux-gnu/mpdecimal.h:474:8: note: expected 'uint32_t *' but argument is of type 'digit **' size_t mpd_qexport_u32(uint32_t *rdata, size_t rlen, uint32_t base, ^ /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c: In function 'dec_mpd_to_eng': /scratch/packages/python/3.3/python3.3-3.3.3/Modules/_decimal/_decimal.c:4136:5: warning: implicit declaration of function 'mpd_to_eng_size' [-Wimplicit-function-declaration] size = mpd_to_eng_size(&s, MPD(self), CtxCaps(context)); ^ ---------- components: Build messages: 203978 nosy: doko priority: normal severity: normal status: open title: python fails to build when configured with --with-system-libmpdec versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 09:34:03 2013 From: report at bugs.python.org (Matthias Klose) Date: Sat, 23 Nov 2013 08:34:03 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <1385195580.05.0.00984042109495.issue19732@psf.upfronthosting.co.za> Message-ID: <1385195643.58.0.563559639514.issue19732@psf.upfronthosting.co.za> Matthias Klose added the comment: also, there is no VCS repository and no ML archive for mpdecimal publically available. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 10:11:43 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 09:11:43 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385197903.66.0.915633347342.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Tim, > First, if *both* timestamps went through this code, it's monotonically > non-decreasing. ts1 < ts2 [...] but T(ts1) > T(ts2) can't happen It's as Steve says (and I tried to say before): What *can* happen is that ts1 > T(ts2). ts1 is used by Windows itself as the file stamp when the file is created, as the first .touch() call doesn't set the timestamp (it doesn't call os.utime()). Only ts2 goes through the pygettimeofday. For my original example, we have ts1 = ts2 = 1385154213.291315800, T(ts2) = 1385154213.291315076. Converting this back to a FILETIME gives 1385154213.291315000. > Anyone know the precision of NTFS file creation time? See for example http://doxygen.reactos.org/d8/d55/drivers_2filesystems_2ext2_2src_2write_8c_source.html#l00525 It's only ReactOS, and only the ext2 driver, but I believe the code should be similar for NTFS. The driver does KeQuerySystemTime, and then uses that to set the LastWriteTime. For ext2, there might be truncation, but for NTFS, the value is likely written as-is. So the question is really in which granularity the system time advances. I believe this is still a global variable, updated by the timer interrupt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 10:53:44 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 09:53:44 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385200424.17.0.101731806075.issue19715@psf.upfronthosting.co.za> Tim Peters added the comment: Martin, I don't see how: > What *can* happen is that ts1 > T(ts2) _in this test_. As shown in many failure examples *both* nanosecond timestamps had non-zero nanoseconds. Like: AssertionError: 1385161652120374900 not greater than or equal to 1385161652120375500 Anything coming from T() would have "000" at the end, not "900" or "500". T() only retains microseconds. Or do you disagree with that? In any case, we're comparing apples to oranges here somehow ;-) If I add: p.touch() right before: st = p.stat() old_mtime = st.st_mtime old_mtime_ns = st.st_mtime_ns then we're certainly comparing a modification (as opposed to creation) time to a modification time, and I get no more errors. The nanosecond-difference distribution across 300 runs changed to the obviously bi-modal: 0: 193 975800: 12 975900: 7 976000: 5 976100: 29 976800: 10 977000: 35 977100: 9 --- 300 I suggest too that's a better way to fix the test than the current delta = 1e-6 if os.name == 'nt' else 0 dance. There's no justification for 1e-6 beyond "well, it seemed to work", and I have shown failure cases with a delta as large as 0.6e-6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 11:13:13 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 10:13:13 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385201593.69.0.553581378691.issue19728@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This "clean uninstall" is a convention at least on Windows and Linux (except that on Linux, you have the option of leaving manually-edited configuration files behind if you wish). An MSI can indeed invoke commands on uninstall (preferably of course before removing the actual Python interpreter, if the command needs Python). This is currently commented out in msi.py. I agree that the current implementation correctly implements the PEP. The PEP says that it will leave files behind on uninstall, and it does. The PEP is silent on whether the option to install pip should be enabled by default, so it is off by default. If people really really want it, I could enable it by default, making it leave files behind. I would do so protestingly, and predict that users would complain. The PEP also states that uninstallation is beyond its scope - so if uninstallation was added, no PEP change would be needed. MSI also supports "authored" removal of files, i.e. I could explicitly hard-code a list of files to be removed on uninstall, see http://msdn.microsoft.com/en-us/library/aa371201(v=vs.85).aspx This supports wildcard file names, so I would only need to hardcode the list of directories to be removed. Removal would only happen when the user originally selected to install pip. If it is done through a command, the command could opt to not remove pip if pip had been updated; the "authored" removal would remove the files regardless whether the had been updated (entirely new directories created in an update would be untouched). One issue could be upgrades: currently, an upgrade (say to 3.4.1) is done by removing all files from the previous version, then installing all files of the new version. A command to remove should then not remove if the installed version is newer than the bundled one, or else the upgrade might downgrade pip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 11:24:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 10:24:41 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <3dRVxN6Xczz7Lkw@mail.python.org> Roundup Robot added the comment: New changeset 40d4be2b7258 by Christian Heimes in branch 'default': Issue #8813: X509_VERIFY_PARAM is only available on OpenSSL 0.9.8+ http://hg.python.org/cpython/rev/40d4be2b7258 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 11:40:55 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 10:40:55 +0000 Subject: [issue8813] SSLContext doesn't support loading a CRL In-Reply-To: <1274735830.03.0.714974872377.issue8813@psf.upfronthosting.co.za> Message-ID: <1385203255.81.0.651283664493.issue8813@psf.upfronthosting.co.za> Christian Heimes added the comment: The _ssl module compiles again with OpenSSL 0.9.7. ---------- priority: release blocker -> normal resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 11:43:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 10:43:40 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385200424.17.0.101731806075.issue19715@psf.upfronthosting.co.za> Message-ID: <1385203417.2318.1.camel@fsol> Antoine Pitrou added the comment: On sam., 2013-11-23 at 09:53 +0000, Tim Peters wrote: > I suggest too that's a better way to fix the test than the current > > delta = 1e-6 if os.name == 'nt' else 0 > > dance. Except that it would test something else (i.e. it wouldn't test the st_mtime value when the file is created). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 12:06:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 11:06:56 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1385204816.32.0.0648007903167.issue16596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This commit created a reference leak: ./python -m test -R 3:2 test_trace [1/1] test_trace beginning 5 repetitions 12345 ..... test_trace leaked [128, 128] references, sum=256 ---------- nosy: +pitrou status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 12:29:51 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 23 Nov 2013 11:29:51 +0000 Subject: [issue13907] test_pprint relies on set/dictionary repr() ordering In-Reply-To: <1327877127.5.0.775790034164.issue13907@psf.upfronthosting.co.za> Message-ID: <1385206191.69.0.516192657495.issue13907@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 12:33:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 11:33:36 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <3dRXSv6K0WzSYt@mail.python.org> Roundup Robot added the comment: New changeset d666e8ee687d by Ned Deily in branch 'default': Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.4.0b1. http://hg.python.org/cpython/rev/d666e8ee687d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 12:35:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 11:35:43 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <3dRXWL4Tv4zSYt@mail.python.org> Roundup Robot added the comment: New changeset 6e2089dbc5ad by Victor Stinner in branch 'default': Issue #18874: Implement the PEP 454 (tracemalloc) http://hg.python.org/cpython/rev/6e2089dbc5ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 12:42:30 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 11:42:30 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385206950.31.0.674898590795.issue19715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: > AssertionError: 1385161652120374900 not greater than or equal to > 1385161652120375500 > Anything coming from T() would have "000" at the end, not "900" or "500". But "900" *is* "000" :-) A. t1=t2=1385161652120375500 B. pygettimeofday truncates this to 1385161652.120375 C. time.time() converts this to float, yielding 0x1.4a3f8ed07b439p+30 i.e. (0.6450161580556887, 31) 1385161652.120375 (really .1203749566283776) D. _PyTime_ObjectToDenominator converts this to 1385161652.120374917 E. time_t_to_FILE_TIME convert this to 1385161652.120374900 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 12:50:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 11:50:22 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <3dRXrF4rBnz7Lq9@mail.python.org> Roundup Robot added the comment: New changeset 66db0c66a6ee by Victor Stinner in branch 'default': Issue #18874: Remove tracemalloc.set_traceback_limit() http://hg.python.org/cpython/rev/66db0c66a6ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 13:20:48 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 12:20:48 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <1385209248.23.0.48860096371.issue19292@psf.upfronthosting.co.za> Christian Heimes added the comment: New patch with enum (for Antoine), tests and documentation. ---------- assignee: -> pitrou Added file: http://bugs.python.org/file32793/load_default_certs2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 13:28:13 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 23 Nov 2013 12:28:13 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1385209693.64.0.914898211265.issue16596@psf.upfronthosting.co.za> Phil Connell added the comment: It looks like call_exc_trace is leaking refs to Py_None. I believe the attached patch fixes the issue (it certainly fixes Antoine's failing invokation :) ---------- Added file: http://bugs.python.org/file32794/issue16596_leak.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 13:54:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 12:54:40 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1385211280.05.0.990534482302.issue13477@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think Berker has misunderstood me. Here is a patch based on issue13477_v5.diff with some cherry-picked changes from issue13477_v6.diff and several other changes: * --create, --extract, --list, and --test options are now mutual exclusive. * --test now test a tarfile for integrity (as in the zipfile module). * File names in output are printed now with repr(). * Now tarfile CLI now is silent by default. Added option -v (--verbose) to print more verbose output as in issue13477_v5.diff. * Added helps for arguments. * Fixed and enhanced tests, I'm going to commit this patch at short time. Known bugs: * Help for --extract shows "--extract [ ...]" instead of "--extract []". --extract accepts only 1 to 2 arguments. * --list fails with a tarfile containing unencodable file names. In particular it fails with test tarfiles in the test suite. * Possible problems with unusual locales and file system encodings. * Corrupted tarfiles produces tracebacks. * Tests for --create should check that created tarfile contains correct files. * Tests for --create should check that correct files are extracted. * Needed tests for non-ASCII file names. Besides all this I think the patch can be committed. ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file32795/tarfile_cli.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 13:57:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 12:57:07 +0000 Subject: [issue19292] Make SSLContext.set_default_verify_paths() work on Windows In-Reply-To: <1382138334.23.0.419355699391.issue19292@psf.upfronthosting.co.za> Message-ID: <3dRZKH1Ykmz7Lnl@mail.python.org> Roundup Robot added the comment: New changeset dfd33140a2b5 by Christian Heimes in branch 'default': Issue #19292: Add SSLContext.load_default_certs() to load default root CA http://hg.python.org/cpython/rev/dfd33140a2b5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:00:01 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 23 Nov 2013 13:00:01 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1385211601.26.0.214225498261.issue16596@psf.upfronthosting.co.za> Phil Connell added the comment: Full run of the test suite was clean, so the fix is ready to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:03:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:03:36 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1385211816.45.0.340331501366.issue16596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, actually, 4f730c045f5f is the culprit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:07:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:07:20 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1385212040.31.0.447277782637.issue19291@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've done a bit of it now, I'll let other people continue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:09:41 2013 From: report at bugs.python.org (Michael Foord) Date: Sat, 23 Nov 2013 13:09:41 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1385212181.36.0.0438589887285.issue17457@psf.upfronthosting.co.za> Michael Foord added the comment: I'm going to commit this so we get it in before the feature freeze. It sounds like the remaining issue is minor and we can resolve it in the betas. Note that if we attempt discovery from a namespace package and fail we should create a ModuleImportError test case to report the problem and *not* bomb out of test collection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:09:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 13:09:46 +0000 Subject: [issue19733] Setting image parameter of a button crashes with Cocoa Tk Message-ID: <1385212186.78.0.599244063108.issue19733@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: >From msg202006: With Cocoa Tk 8.5.15 or Cocoa Tk 8.6.1 on OS X 10.8.5, test_widgets.ButtonTest crashes Tk: test_image (tkinter.test.test_tkinter.test_widgets.ButtonTest) ... 2013-11-03 01:52:53.498 pytest_10.8[82465:f07] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /SourceCache/AppKit/AppKit-1187.40/AppKit.subproj/NSBitmapImageRep.m:1242 2013-11-03 01:52:53.499 pytest_10.8[82465:f07] An uncaught exception was raised 2013-11-03 01:52:53.499 pytest_10.8[82465:f07] Invalid parameter not satisfying: cgImage != NULL 2013-11-03 01:52:53.502 pytest_10.8[82465:f07] ( 0 CoreFoundation 0x965eae8b __raiseError + 219 1 libobjc.A.dylib 0x956d152e objc_exception_throw + 230 2 CoreFoundation 0x9654a698 +[NSException raise:format:arguments:] + 136 3 Foundation 0x966a5364 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116 4 AppKit 0x98a34525 -[NSBitmapImageRep initWithCGImage:] + 145 5 Tk 0x00725a48 CreateNSImageWithPixmap + 151 6 Tk 0x00725b1c TkMacOSXGetNSImageWithTkImage + 149 7 Tk 0x0071eb2f TkpComputeButtonGeometry + 2550 8 Tk 0x0069849d TkButtonWorldChanged + 470 9 Tk 0x00698e99 ConfigureButton + 1981 10 Tk 0x0069980f ButtonWidgetObjCmd + 440 11 Tcl 0x00579c2f TclEvalObjvInternal + 770 12 Tcl 0x0057ac1a Tcl_EvalObjv + 72 13 _tkinter.so 0x0055db81 Tkapp_Call + 673 [...] ---------- assignee: ronaldoussoren components: Macintosh, Tkinter messages: 203999 nosy: ned.deily, ronaldoussoren, serhiy.storchaka priority: normal severity: normal status: open title: Setting image parameter of a button crashes with Cocoa Tk type: crash versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:13:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 13:13:08 +0000 Subject: [issue18408] Fixes crashes found by pyfailmalloc In-Reply-To: <1373314243.02.0.649080681154.issue18408@psf.upfronthosting.co.za> Message-ID: <3dRZgl6vg9z7Ll0@mail.python.org> Roundup Robot added the comment: New changeset 8f556ee0f6ba by Antoine Pitrou in branch 'default': Fix refleak introduced by 4f730c045f5f (issue #18408) and unveiled by 95eea8624d05 (issue #16596). http://hg.python.org/cpython/rev/8f556ee0f6ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:13:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 13:13:09 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <3dRZgm53d1z7Ll0@mail.python.org> Roundup Robot added the comment: New changeset 8f556ee0f6ba by Antoine Pitrou in branch 'default': Fix refleak introduced by 4f730c045f5f (issue #18408) and unveiled by 95eea8624d05 (issue #16596). http://hg.python.org/cpython/rev/8f556ee0f6ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:13:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:13:35 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1385212415.81.0.797844780345.issue16596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I committed a simpler fix. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:15:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:15:45 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385212545.73.0.792063877038.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that issue #19727 would possibly allow for an easy fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:24:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 13:24:40 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1385173451.02.0.869464149124.issue19085@psf.upfronthosting.co.za> Message-ID: <25658328.G4d62v5yLy@raxxla> Serhiy Storchaka added the comment: > test_widgets.ButtonTest is still causing a Cocoa Tk 8.5/8.6 crash which also > crashes Python while running the test suite. The test should be fixed or > disabled. Opened issue19733 for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:25:47 2013 From: report at bugs.python.org (Michael Foord) Date: Sat, 23 Nov 2013 13:25:47 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1385213147.6.0.5715807364.issue17457@psf.upfronthosting.co.za> Michael Foord added the comment: Need doc updates ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:30:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 13:30:19 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <3dRb3Z55dfz7Lnl@mail.python.org> Roundup Robot added the comment: New changeset d2e5b74e2d18 by Michael Foord in branch 'default': Issue 17457: extend test discovery to support namespace packages http://hg.python.org/cpython/rev/d2e5b74e2d18 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:33:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:33:54 +0000 Subject: [issue19727] os.utime(..., None) has poor resolution on Windows In-Reply-To: <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za> Message-ID: <1385213634.48.0.22571754102.issue19727@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file32796/utime_win.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:34:54 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 13:34:54 +0000 Subject: [issue19733] Setting image parameter of a button crashes with Cocoa Tk In-Reply-To: <1385212186.78.0.599244063108.issue19733@psf.upfronthosting.co.za> Message-ID: <3dRb8s2jm4zQBj@mail.python.org> Roundup Robot added the comment: New changeset 9d0a76349eda by Serhiy Storchaka in branch '3.3': Issue #19733: Temporary disable test_image on MacOSX. http://hg.python.org/cpython/rev/9d0a76349eda New changeset 71e091ed2588 by Serhiy Storchaka in branch 'default': Issue #19733: Temporary disable test_image on MacOSX. http://hg.python.org/cpython/rev/71e091ed2588 New changeset 3912934e99ba by Serhiy Storchaka in branch '2.7': Issue #19733: Temporary disable test_image on MacOSX. http://hg.python.org/cpython/rev/3912934e99ba ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:37:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:37:23 +0000 Subject: [issue19727] os.utime(..., None) has poor resolution on Windows In-Reply-To: <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za> Message-ID: <1385213843.91.0.403829013193.issue19727@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Redoing (indentation issue). ---------- Added file: http://bugs.python.org/file32797/utime_win.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:38:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 13:38:38 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <1385213918.88.0.829815643742.issue19668@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: So what is a decision? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:41:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:41:54 +0000 Subject: [issue19727] os.utime(..., None) has poor resolution on Windows In-Reply-To: <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za> Message-ID: <1385214114.29.0.262418102937.issue19727@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file32796/utime_win.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:46:44 2013 From: report at bugs.python.org (Donald Stufft) Date: Sat, 23 Nov 2013 13:46:44 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385214404.83.0.657697023579.issue19728@psf.upfronthosting.co.za> Donald Stufft added the comment: Well the PEP does state that the option will be checked by default, but I'm not arguing that we shouldn't implement uninstall if Windows users expect it, I was just trying to figure out if we needed to update the PEP. So unilaterally removing on uninstall sounds easy enough since you said you can use wildcards and such. The other option is to implement the uninstallation inside of ensurepip and just execute ``python -m pip uninstall setuptools pip`` in that case we can check version numbers and only uninstall if the version number is equal to the bundled one. Unfortunately I'm not sure I'm going to have time to get an uninstall command implemented before the 24th. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:48:23 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 23 Nov 2013 13:48:23 +0000 Subject: [issue18036] "How do I create a .pyc file?" FAQ entry is out of date In-Reply-To: <1369244271.04.0.495588356743.issue18036@psf.upfronthosting.co.za> Message-ID: <1385214503.34.0.84631054578.issue18036@psf.upfronthosting.co.za> Phil Connell added the comment: I've had a stab at creating a patch for this. As well as mentioning __pycache__, I've tweaked some wording to reflect the fact that .pyc files are regenerated if the source file's length changes (as per issue13645). ---------- Added file: http://bugs.python.org/file32798/issue18036.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:51:42 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 13:51:42 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot Message-ID: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3178/steps/test/logs/stdio Re-running failed tests in verbose mode Re-running test 'test_venv' in verbose mode test_defaults (test.test_venv.BasicTest) ... ok test_executable (test.test_venv.BasicTest) ... ok test_executable_symlinks (test.test_venv.BasicTest) ... ok test_isolation (test.test_venv.BasicTest) ... ok test_overwrite_existing (test.test_venv.BasicTest) ... ok test_prefixes (test.test_venv.BasicTest) ... ok test_symlinking (test.test_venv.BasicTest) ... ok test_unoverwritable_fails (test.test_venv.BasicTest) ... ok test_upgrade (test.test_venv.BasicTest) ... ok test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok test_with_pip (test.test_venv.EnsurePipTest) ... test test_venv failed ERROR ====================================================================== ERROR: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_venv.py", line 288, in test_with_pip self.run_with_capture(venv.create, self.env_dir, with_pip=True) File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_venv.py", line 48, in run_with_capture func(*args, **kwargs) File "/opt/python/3.x.langa-ubuntu/build/Lib/venv/__init__.py", line 359, in create builder.create(env_dir) File "/opt/python/3.x.langa-ubuntu/build/Lib/venv/__init__.py", line 86, in create self._setup_pip(context) File "/opt/python/3.x.langa-ubuntu/build/Lib/venv/__init__.py", line 242, in _setup_pip subprocess.check_output(cmd) File "/opt/python/3.x.langa-ubuntu/build/Lib/subprocess.py", line 618, in check_output raise CalledProcessError(retcode, process.args, output=output) subprocess.CalledProcessError: Command '['/tmp/tmp4_ukigy9/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 3 ---------- components: Tests keywords: buildbot messages: 204013 nosy: haypo, loewis, nick priority: normal severity: normal status: open title: test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:53:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 13:53:11 +0000 Subject: [issue19716] test that touch doesn't change file contents In-Reply-To: <1385142211.7.0.550068935701.issue19716@psf.upfronthosting.co.za> Message-ID: <3dRbYy6Fx8z7Lln@mail.python.org> Roundup Robot added the comment: New changeset 11a200202d7a by Antoine Pitrou in branch 'default': Issue #19716: add a test that Path.touch() doesn't change a file's contents. http://hg.python.org/cpython/rev/11a200202d7a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:53:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:53:44 +0000 Subject: [issue19716] test that touch doesn't change file contents In-Reply-To: <1385142211.7.0.550068935701.issue19716@psf.upfronthosting.co.za> Message-ID: <1385214824.66.0.32177988234.issue19716@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you! I've committed after a tiny simplification. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:53:53 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 23 Nov 2013 13:53:53 +0000 Subject: [issue13344] closed sockets don't raise EBADF anymore In-Reply-To: <1320441286.92.0.465148592312.issue13344@psf.upfronthosting.co.za> Message-ID: <1385214833.93.0.670199078732.issue13344@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:55:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:55:01 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385214901.19.0.603224946415.issue19734@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:55:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 13:55:58 +0000 Subject: [issue19730] Clinic fixes: add converters with length, version directive In-Reply-To: <1385173692.32.0.599871676954.issue19730@psf.upfronthosting.co.za> Message-ID: <1385214958.39.0.130965788245.issue19730@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Argument Clinic is an internal tool, so I don't think it's bound by the feature freeze. (and, besides, you are the RM :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:56:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 13:56:24 +0000 Subject: [issue17201] Use allowZip64=True by default In-Reply-To: <1360775072.39.0.12779828627.issue17201@psf.upfronthosting.co.za> Message-ID: <3dRbdg33wDzSZ1@mail.python.org> Roundup Robot added the comment: New changeset 271cc3660445 by Serhiy Storchaka in branch 'default': Issue #17201: ZIP64 extensions now are enabled by default. http://hg.python.org/cpython/rev/271cc3660445 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:57:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 13:57:08 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385215028.15.0.198400858511.issue19734@psf.upfronthosting.co.za> STINNER Victor added the comment: A different error on Solaris: http://buildbot.python.org/all/builders/AMD64%20Solaris%2011%20%5BSB%5D%203.x/builds/2202/steps/test/logs/stdio Re-running test 'test_venv' in verbose mode test_defaults (test.test_venv.BasicTest) ... ok test_executable (test.test_venv.BasicTest) ... ok test_executable_symlinks (test.test_venv.BasicTest) ... ok test_isolation (test.test_venv.BasicTest) ... ok test_overwrite_existing (test.test_venv.BasicTest) ... ok test_prefixes (test.test_venv.BasicTest) ... ok test_symlinking (test.test_venv.BasicTest) ... ok test_unoverwritable_fails (test.test_venv.BasicTest) ... ok test_upgrade (test.test_venv.BasicTest) ... ok test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok test_with_pip (test.test_venv.EnsurePipTest) ... /home/cpython/buildslave/cc-32/3.x.snakebite-solaris11-amd64/build/Lib/ctypes/util.py:179: ResourceWarning: unclosed file <_io.TextIOWrapper name=5 encoding='646'> for line in os.popen(cmd).readlines(): test test_venv failed FAIL ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/3.x.snakebite-solaris11-amd64/build/Lib/test/test_venv.py", line 294, in test_with_pip self.assertEqual(err, b"") AssertionError: b"/home/cpython/buildslave/cc-32/3.x.snake[163 chars]):\n" != b'' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:57:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 13:57:50 +0000 Subject: [issue17201] Use allowZip64=True by default In-Reply-To: <1360775072.39.0.12779828627.issue17201@psf.upfronthosting.co.za> Message-ID: <1385215070.96.0.721105053301.issue17201@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you William for your contribution. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:58:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 13:58:50 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1385215130.74.0.900897053846.issue19634@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, the test is failing with the same error on Solaris: ====================================================================== FAIL: test_y_before_1900 (test.test_strftime.Y1900Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/3.x.snakebite-solaris11-amd64/build/Lib/test/test_strftime.py", line 191, in test_y_before_1900 self.assertEqual(time.strftime("%y", t), "99") AssertionError: '0/' != '99' - 0/ + 99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 14:59:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 13:59:47 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX and Solaris In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1385215187.75.0.66786784026.issue19634@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: fixed -> status: closed -> open title: test_strftime.test_y_before_1900_nonwin() fails on AIX -> test_strftime.test_y_before_1900_nonwin() fails on AIX and Solaris _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:00:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 14:00:16 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX and Solaris In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <3dRbk7575cz7Lln@mail.python.org> Roundup Robot added the comment: New changeset b7fd5d8e9968 by Victor Stinner in branch 'default': Issue #19634: time.strftime("%y") now raises a ValueError on Solaris when given http://hg.python.org/cpython/rev/b7fd5d8e9968 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:02:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 14:02:11 +0000 Subject: [issue19727] os.utime(..., None) has poor resolution on Windows In-Reply-To: <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za> Message-ID: <1385215331.18.0.488260492076.issue19727@psf.upfronthosting.co.za> STINNER Victor added the comment: utime_win.patch looks good to me. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:02:42 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 14:02:42 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX and Solaris In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1385215362.29.0.60139208693.issue19634@psf.upfronthosting.co.za> STINNER Victor added the comment: I leave the issue open until I see the test passing on Solaris. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:06:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 14:06:01 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385215561.43.0.644336811927.issue19734@psf.upfronthosting.co.za> STINNER Victor added the comment: Error similar to Solaris on OpenIndiana: http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6946/steps/test/logs/stdio ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_venv.py", line 294, in test_with_pip self.assertEqual(err, b"") AssertionError: b'/tmp/tmpnv3o61s9/bin/python: No module named pip\n' != b'' ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:13:19 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 23 Nov 2013 14:13:19 +0000 Subject: [issue19291] Add docs for asyncio package (Tulip, PEP 3156) In-Reply-To: <1382137119.85.0.0934203099722.issue19291@psf.upfronthosting.co.za> Message-ID: <1385215999.54.0.77392028941.issue19291@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:14:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 14:14:54 +0000 Subject: [issue19723] Argument Clinic should add markers for humans In-Reply-To: <1385157944.24.0.00614614108161.issue19723@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On 23 Nov 2013 08:05, "Larry Hastings" wrote: > > > Larry Hastings added the comment: > > > However, to bikeshed a little, I would prefer > > "preprocessor" instead of "clinic", since jokes > > tend to wear off if one sees then too often. > > "Argument Clinic" is the name of the tool. The marker /*[clinic]*/ > was chosen deliberately: > > * If someone says "what the hell is this" a quick online search > should turn up the answer quickly. > > * It differentiates it from /*[python]*/, which allows one to embed > raw Python code inside files. ("print" is redirected to the output > section.) It also differentiates it clearly from the C preprocessor. If Guido can name the language after a comedy troupe, Larry can certainly name the custom code generator after one of their sketches :) FWIW, I tend to start editing the generated code as well, so I agree this is something for us to keep an eye on. If the habit doesn't go away, we may want some more prominent markers. Cheers, Nick. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:19:17 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 14:19:17 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1385161067.2.0.527698912374.issue19674@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: +1 from me (I see this as the key benefit of argument clinic). For 3.5, we can look at ducktyping on the attribute, but for now I think it's worth keeping that text format internal to CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:23:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 14:23:33 +0000 Subject: [issue19727] os.utime(..., None) has poor resolution on Windows In-Reply-To: <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za> Message-ID: <3dRcF0751vz7Lln@mail.python.org> Roundup Robot added the comment: New changeset 6a9e262c5423 by Antoine Pitrou in branch 'default': Issue #19727: os.utime(..., None) is now potentially more precise under Windows. http://hg.python.org/cpython/rev/6a9e262c5423 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:23:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 14:23:45 +0000 Subject: [issue19727] os.utime(..., None) has poor resolution on Windows In-Reply-To: <1385169352.32.0.642692439706.issue19727@psf.upfronthosting.co.za> Message-ID: <1385216625.2.0.0386429761339.issue19727@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:23:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 14:23:55 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385167907.5.0.586772441426.issue19722@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Yeah, I argued myself into realising EXTENDED_ARG just needed to be mentioned in the function docs, but didn't go back and fix my opening paragraph. The fact dis uses an arg of None (rather than zero) to indicate "no argument" means I think the extra layer of wrapping in the pure Python module is needed prior to 3.4 rc1, but we can live without it for beta 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:26:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 14:26:05 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <3dRcHx162qz7Lr8@mail.python.org> Roundup Robot added the comment: New changeset b5e9d61f6987 by Antoine Pitrou in branch 'default': Issue #19715: try the utime(..., None) approach again, now that it should be more precise under Windows http://hg.python.org/cpython/rev/b5e9d61f6987 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:27:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 14:27:21 +0000 Subject: [issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__) In-Reply-To: <1385169780.78.0.221803207623.issue19697@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Yes, PEP 451 addresses a few of the PEP 395 issues. Between this and PEP 420, I actually plan to withdraw that PEP as out of date. All my pre-beta commits are done, so ask away :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:28:58 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 14:28:58 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385216938.35.0.0803049994185.issue19689@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch implements HIGH:!aNULL:!RC4:!DSS HIGH already covers !MD5:!EXPORT:!NULL:!SSLv2 and more ---------- Added file: http://bugs.python.org/file32799/ssl_create_default_context3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:33:16 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 14:33:16 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: <1385214404.83.0.657697023579.issue19728@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: This one isn't a feature freeze issue - what MvL has done already is fine for now, and we can still add internal helper APIs during the beta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:36:02 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 23 Nov 2013 14:36:02 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385217362.03.0.991871262627.issue19063@psf.upfronthosting.co.za> Vajrasky Kok added the comment: R. David Murray, your patch fails with this situation: from email.mime.nonmultipart import * from email.charset import * from email.message import Message from io import BytesIO from email.generator import BytesGenerator msg = Message() cs = Charset('utf-8') cs.body_encoding = None msg.set_payload('???', cs) msg.as_string() fp = BytesIO() g = BytesGenerator(fp) g.flatten(msg) print(fp.getvalue()) ===> b'MIME-Version: 1.0\nContent-Type: text/plain; charset="utf-8"\nContent-Transfer-Encoding: base64\n\n0JDQkdCS\n' Apparently, there is a funky bug. If you never call msg.as_string(), the fp.get_value() will output correctly: b'MIME-Version: 1.0\nContent-Type: text/plain; charset="utf-8"\nContent-Transfer-Encoding: 8bit\n\n\xd0\x90\xd0\x91\xd0\x92' It turns out that msg.as_string() calls set_payload with different kind of charset! Attached the patch to solve this problem. Not sure whether this is important or not to fix in 3.3. How many people call bytes generator after calling string generator? ---------- Added file: http://bugs.python.org/file32800/support_8bit_charset_cte_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:38:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 14:38:48 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: Message-ID: Nick Coghlan added the comment: As far as updating the PEP goes, it's a rare PEP indeed that is implemented exactly according to spec - the integration process almost always uncovers details that don't quite work out the way we thought they would. For minor issues, we usually handle such changes without updating the PEP - the issue tracker and the reference docs become the authoritative source. Larger issues get discussed again on python-dev, and may lead to PEP updates or even an additional PEP. That's pretty rare, though, as it requires the original PEP discussion to miss something big. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:40:20 2013 From: report at bugs.python.org (Eduardo Seabra) Date: Sat, 23 Nov 2013 14:40:20 +0000 Subject: [issue18728] Increased test coverage for filecmp.py In-Reply-To: <1376411694.99.0.620922615046.issue18728@psf.upfronthosting.co.za> Message-ID: <1385217620.54.0.550868886219.issue18728@psf.upfronthosting.co.za> Eduardo Seabra added the comment: I've also increased the test coverage of filecmp.py. Don't know if I should merge my patch with Alex.Volkov's patch. I'm uploading it as a separate patch. ---------- nosy: +Eduardo.Seabra Added file: http://bugs.python.org/file32801/test_filecmp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:41:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 14:41:23 +0000 Subject: [issue19730] Clinic fixes: add converters with length, version directive In-Reply-To: <1385214958.39.0.130965788245.issue19730@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: +1 to what Antoine said - keeping the initial iteration internal only actually buys us some time :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:46:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 14:46:13 +0000 Subject: [issue19676] Add the "namereplace" error handler In-Reply-To: <1385019706.69.0.579937406555.issue19676@psf.upfronthosting.co.za> Message-ID: <1385217973.39.0.858845484539.issue19676@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ethan.furman, lemburg, ncoghlan, stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:51:23 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 23 Nov 2013 14:51:23 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385218283.16.0.322047807038.issue19063@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Simpler patch. ---------- Added file: http://bugs.python.org/file32802/support_8bit_charset_cte_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:53:06 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 23 Nov 2013 14:53:06 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385215561.43.0.644336811927.issue19734@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Interesting, looks like the warnings from issue 19694 *weren't* the cause of the bad return code - something else is failing. I should have some time to investigate tomorrow afternoon, but it will consist of trying to improve the diagnostic output from the tests. If we can get the buildbot owners involved, that could help a lot (1 am here, I'm about to go to sleep). On 24 Nov 2013 00:06, "STINNER Victor" wrote: > > STINNER Victor added the comment: > > Error similar to Solaris on OpenIndiana: > > > http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6946/steps/test/logs/stdio > > ====================================================================== > FAIL: test_with_pip (test.test_venv.EnsurePipTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_venv.py", > line 294, in test_with_pip > self.assertEqual(err, b"") > AssertionError: b'/tmp/tmpnv3o61s9/bin/python: No module named pip\n' != > b'' > > ---------------------------------------------------------------------- > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 15:59:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 14:59:16 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <3dRd2C5tQtz7Llr@mail.python.org> Roundup Robot added the comment: New changeset 63df21e74c65 by Christian Heimes in branch 'default': Issue #19689: Add ssl.create_default_context() factory function. It creates http://hg.python.org/cpython/rev/63df21e74c65 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 16:10:43 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 15:10:43 +0000 Subject: [issue19728] PEP 453: enable pip by default in the binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385219443.25.0.558946937211.issue19728@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree with Nick; this is really a minor issue and we can resolve it here in the tracker. I missed the place in the PEP where it said that the option should be checked, since it mentions changes to the installers twice, and in "implementation strategy", it doesn't mention a default. I'd prefer if uninstall was "symmetric" to install, i.e. if I need to run a command on install (rather than deploying files directly), then I also should run a reverse command on uninstall. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 16:43:10 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 15:43:10 +0000 Subject: [issue19689] ssl.create_default_context() In-Reply-To: <1385090544.45.0.828501319408.issue19689@psf.upfronthosting.co.za> Message-ID: <1385221390.89.0.262772911315.issue19689@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes resolution: -> fixed stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 16:44:25 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 23 Nov 2013 15:44:25 +0000 Subject: [issue13633] Automatically convert character references in HTMLParser In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1385221465.41.0.952504051339.issue13633@psf.upfronthosting.co.za> Ezio Melotti added the comment: New patch attached. ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file32803/issue13633-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 16:46:03 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 15:46:03 +0000 Subject: [issue19735] ssl._create_stdlib_context Message-ID: <1385221563.59.0.016103325517.issue19735@psf.upfronthosting.co.za> New submission from Christian Heimes: The second part of #19689. This patch implements _create_stdlib_context() that wrap lots of common code in one function that is private to Python's stdlib. ---------- components: Library (Lib) files: ssl_create_stdlib_context.patch keywords: patch messages: 204042 nosy: christian.heimes, pitrou priority: normal severity: normal stage: patch review status: open title: ssl._create_stdlib_context type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32804/ssl_create_stdlib_context.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 16:55:25 2013 From: report at bugs.python.org (Matthias Klose) Date: Sat, 23 Nov 2013 15:55:25 +0000 Subject: [issue19736] posixmodule.c: Add flags for statvfs.f_flag to constant list Message-ID: <1385222125.46.0.688361383331.issue19736@psf.upfronthosting.co.za> New submission from Matthias Klose: the posix module has the statvfs call, but doesn't define any constants used as parameters. add them. ---------- components: Extension Modules files: statvfs-f_flag-constants.diff keywords: patch messages: 204043 nosy: doko priority: normal severity: normal status: open title: posixmodule.c: Add flags for statvfs.f_flag to constant list versions: Python 3.4 Added file: http://bugs.python.org/file32805/statvfs-f_flag-constants.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 16:55:58 2013 From: report at bugs.python.org (Matthias Klose) Date: Sat, 23 Nov 2013 15:55:58 +0000 Subject: [issue19736] posixmodule.c: Add flags for statvfs.f_flag to constant list In-Reply-To: <1385222125.46.0.688361383331.issue19736@psf.upfronthosting.co.za> Message-ID: <1385222158.69.0.00565177394398.issue19736@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 16:59:08 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 23 Nov 2013 15:59:08 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 In-Reply-To: <1385139007.0.0.922066136531.issue19713@psf.upfronthosting.co.za> Message-ID: <1385222348.06.0.416110381918.issue19713@psf.upfronthosting.co.za> Brett Cannon added the comment: I do not think we should keep the old APIs around forever, so either we don't care about the obscure use cases or figure out a way to support them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:16:11 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Nov 2013 16:16:11 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385223371.45.0.28638108684.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, I discovered this in testing, but I forgot to file a bug report for it. It should be dealt with in a separate issue. And yes, it should be fixed, since except for the documented on-demand filling out of missing pieces such as MIME borders, the model should not be changed by serializing it. There are also some other issues that I discovered while running the more complete 3.4 tests, but I haven't had time to fix those yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:17:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 16:17:36 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX and Solaris In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1385223456.15.0.561311628302.issue19634@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This broke OpenIndiana: ====================================================================== ERROR: test_y_before_1900 (test.test_strftime.Y1900Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_strftime.py", line 191, in test_y_before_1900 self.assertEqual(time.strftime("%y", t), "99") ValueError: format %y requires year >= 1900 on AIX ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:32:26 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 16:32:26 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <1385224346.11.0.131863106146.issue19668@psf.upfronthosting.co.za> Martin v. L?wis added the comment: +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:34:49 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 16:34:49 +0000 Subject: [issue19694] test_venv failing on one of the Ubuntu buildbots In-Reply-To: <1385132981.26.0.207810200878.issue19694@psf.upfronthosting.co.za> Message-ID: <1385224489.45.0.804395732959.issue19694@psf.upfronthosting.co.za> Larry Hastings added the comment: Are you sure the problem is fixed? I still see the same error on the same buildbot. http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3168/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:39:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 16:39:27 +0000 Subject: [issue13592] repr(regex) doesn't include actual regex In-Reply-To: <1323772944.14.0.269599775604.issue13592@psf.upfronthosting.co.za> Message-ID: <1385224767.06.0.0216785428841.issue13592@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is fixed and simplified patch. ---------- Added file: http://bugs.python.org/file32806/issue13592_add_repr_to_regex_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:40:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 16:40:45 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <3dRgHJ5V36z7LpG@mail.python.org> Roundup Robot added the comment: New changeset 9f2a0043396b by Antoine Pitrou in branch 'default': Issue #19308: fix the gdb plugin on gdbs linked with Python 3 http://hg.python.org/cpython/rev/9f2a0043396b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:44:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 16:44:14 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <3dRgMK3YBzz7Llf@mail.python.org> Roundup Robot added the comment: New changeset 752db82b7933 by Antoine Pitrou in branch '3.3': Issue #19308: fix the gdb plugin on gdbs linked with Python 3 http://hg.python.org/cpython/rev/752db82b7933 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:51:01 2013 From: report at bugs.python.org (Zahari Dim) Date: Sat, 23 Nov 2013 16:51:01 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved Message-ID: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> New submission from Zahari Dim: The globals() notification states: Return a dictionary representing the current global symbol table.[...] This doc and the fact that globals() is called as a function made me think that globals() returns a copy of the global namespace dict, rather than an object that could be used to actually modify the namespace. I don't find obvious the meaning of "representing" in this context. This of course led to a very nasty and sneaky bug in my code. The docs of locals() don't seem clear to me either, thought at least it seems to imply that it is actually modifying the namespace. ---------- assignee: docs at python components: Documentation messages: 204052 nosy: Zahari.Dim, docs at python priority: normal severity: normal status: open title: Documentation of globals() and locals() should be improved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 17:59:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 16:59:00 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX and Solaris In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <3dRghM3Wf7z7LjR@mail.python.org> Roundup Robot added the comment: New changeset e73683514b4d by Victor Stinner in branch 'default': Isue #19634: test_y_before_1900() is expected to fail on Solaris http://hg.python.org/cpython/rev/e73683514b4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:00:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 17:00:08 +0000 Subject: [issue19579] test_asyncio: test__run_once timings should be relaxed In-Reply-To: <1384390800.99.0.143827109941.issue19579@psf.upfronthosting.co.za> Message-ID: <1385226008.35.0.863419106499.issue19579@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, the problem is now in the opposite direction... Windows clocks don't look to be reliable or the buildbot is very busy :-/ http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7586/steps/test/logs/stdio ====================================================================== FAIL: test__run_once (test.test_asyncio.test_base_events.BaseEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_base_events.py", line 184, in test__run_once self.assertTrue(9.9 < t < 10.1, t) AssertionError: False is not true : 9.71900000050664 ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:06:39 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Nov 2013 17:06:39 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1385226399.55.0.593185094982.issue19737@psf.upfronthosting.co.za> R. David Murray added the comment: We've tried improving the locals docs several times. Modifying it is not "safe", in the sense that what happens when you do is not defined by the language. Which locals docs were you looking at? I agree that 'representing' is not as clear as would be optimal in the globals description. Again, which bit of the docs are you looking at? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:09:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 17:09:33 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <3dRgwX4cNrz7LjR@mail.python.org> Roundup Robot added the comment: New changeset d0fd68ef1aa9 by Serhiy Storchaka in branch 'default': Issue #19668: Added support for the cp1125 encoding. http://hg.python.org/cpython/rev/d0fd68ef1aa9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:19:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 17:19:43 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <3dRh8G1kp6z7LjR@mail.python.org> Roundup Robot added the comment: New changeset ef4636faf8bd by Antoine Pitrou in branch '2.7': Issue #19308: fix the gdb plugin on gdbs linked with Python 3 http://hg.python.org/cpython/rev/ef4636faf8bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:20:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 17:20:23 +0000 Subject: [issue19579] test_asyncio: test__run_once timings should be relaxed In-Reply-To: <1384390800.99.0.143827109941.issue19579@psf.upfronthosting.co.za> Message-ID: <3dRh921820z7LjR@mail.python.org> Roundup Robot added the comment: New changeset 085091cb6e4c by Guido van Rossum in branch 'default': Relax timing even more, hopefully again fixes issue 19579. http://hg.python.org/cpython/rev/085091cb6e4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:21:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 17:21:45 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <1385227305.41.0.383188250378.issue19668@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks all. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:22:29 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 17:22:29 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385227349.97.0.905675365861.issue19715@psf.upfronthosting.co.za> Tim Peters added the comment: Antoine, FYI, with the current code test_pathlib passed 500 times in a row on my box. Success :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:23:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 17:23:50 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1385227430.04.0.643682009953.issue19308@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed updated patches to all 3 branches (+ some later fixups). Gonna wait for the buildbots' outcome. ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:24:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 17:24:53 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385227493.87.0.52659499262.issue19715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Antoine, FYI, with the current code test_pathlib passed 500 times in a > row on my box. Success :-) This has been a tedious one :-) I'm gonna open a separate issue for the precision loss in pytime.c, then. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:27:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 17:27:12 +0000 Subject: [issue19738] pytime.c loses precision under Windows Message-ID: <1385227632.17.0.4146549909.issue19738@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Under Windows, GetSystemTimeAsFileTime has a 100 ns resolution, but pygettimeofday stores it in a timeval which only has microsecond resolution. As a consequence, some precision is lost under Windows (which shows e.g. in time.time() results). ---------- components: Interpreter Core messages: 204063 nosy: haypo, loewis, pitrou, tim.peters priority: normal severity: normal status: open title: pytime.c loses precision under Windows type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:51:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 17:51:15 +0000 Subject: [issue19668] Add support of the cp1125 encoding In-Reply-To: <1384976102.43.0.570343368296.issue19668@psf.upfronthosting.co.za> Message-ID: <3dRhrf5rx3z7Lkq@mail.python.org> Roundup Robot added the comment: New changeset 355d8950f574 by Serhiy Storchaka in branch 'default': Fixed incorrectly applying a patch for issue19668. http://hg.python.org/cpython/rev/355d8950f574 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 18:52:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 17:52:19 +0000 Subject: [issue13633] Automatically convert character references in HTMLParser In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <3dRhsv090pz7Lkq@mail.python.org> Roundup Robot added the comment: New changeset 1575f2dd08c4 by Ezio Melotti in branch 'default': #13633: Added a new convert_charrefs keyword arg to HTMLParser that, when True, automatically converts all character references. http://hg.python.org/cpython/rev/1575f2dd08c4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:01:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 18:01:45 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <3dRj4m2wfsz7LrL@mail.python.org> Roundup Robot added the comment: New changeset 992ef855b3ed by Antoine Pitrou in branch 'default': Issue #17810: Implement PEP 3154, pickle protocol 4. http://hg.python.org/cpython/rev/992ef855b3ed ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:02:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 18:02:34 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385229754.42.0.573893327066.issue17810@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've now committed Alexandre's latest work (including the FRAME and MEMOIZE opcodes). ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:17:30 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 23 Nov 2013 18:17:30 +0000 Subject: [issue13633] Automatically convert character references in HTMLParser In-Reply-To: <1324277757.56.0.0733657691883.issue13633@psf.upfronthosting.co.za> Message-ID: <1385230650.01.0.886712306747.issue13633@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the reviews! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:20:47 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 23 Nov 2013 18:20:47 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385230847.1.0.617840022357.issue19655@psf.upfronthosting.co.za> anatoly techtonik added the comment: +1 for initiative, points that are nice to be addressed are below. 1. "Python 3.4 with modern idioms" - too Python-specific code raises the barrier. I'd prefer simplicity and portability over modernism. Like how hard is it to port the parser into JS with PythonJS, for example? 2. ASDL specification is mostly offline. One PDF survived, but IR browser and source for did not, which is a pity, because visual tools are one of the most attractive. In any case, it may worth to contact university - they might have backups and resurrect browser in Python (GCI, GSoC). 3. File organization. This is bad: Grammar/Grammar Parser/ Python/ This is good: Core/README.md Core/Grammar Core/Parser/ Core/Processor/ (builds AST) Core/Interpreter/ Core/Tests/ I wonder what is PyPy layout? It may worth to steal it for consistency. 4. Specific problem with ASDL parsing - currently, by ASDL syntax all `expr` are allowed on the left side of assign node. This is not true for real app. It makes sense to clarify in README.md these borders (who checks what) and modify ASDL to reflect the restriction. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:27:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 18:27:43 +0000 Subject: [issue19639] Improve re match objects display In-Reply-To: <1384767316.36.0.259346591403.issue19639@psf.upfronthosting.co.za> Message-ID: <3dRjfk0mCMz7LjR@mail.python.org> Roundup Robot added the comment: New changeset bbfc559f7190 by Ezio Melotti in branch 'default': #19639: update the repr of the match objects in the docs. Patch by Claudiu Popa. http://hg.python.org/cpython/rev/bbfc559f7190 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:28:31 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 23 Nov 2013 18:28:31 +0000 Subject: [issue19639] Improve re match objects display In-Reply-To: <1384767316.36.0.259346591403.issue19639@psf.upfronthosting.co.za> Message-ID: <1385231311.44.0.000641556324659.issue19639@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:31:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 18:31:14 +0000 Subject: [issue13592] repr(regex) doesn't include actual regex In-Reply-To: <1323772944.14.0.269599775604.issue13592@psf.upfronthosting.co.za> Message-ID: <1385231474.49.0.846892626509.issue13592@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: * re.UNICODE omitted for string patterns. * Long patterns are truncated. ---------- Added file: http://bugs.python.org/file32807/issue13592_add_repr_to_regex_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:32:26 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 23 Nov 2013 18:32:26 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1385231546.0.0.763481789677.issue19557@psf.upfronthosting.co.za> anatoly techtonik added the comment: http://stackoverflow.com/questions/8370132/what-syntax-is-represented-by-an-extslice-node-in-pythons-ast ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 19:50:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 23 Nov 2013 18:50:29 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1385232629.27.0.452853415642.issue10712@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is an updated patch that is the same as my first patch but also includes the documentation provided by Berker (thanks!). ---------- Added file: http://bugs.python.org/file32808/issue10712-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:09:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 19:09:02 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1385233742.98.0.484807455238.issue10712@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:09:05 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 19:09:05 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385233745.0.0.945605783297.issue19638@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: mark.dickinson -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:15:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 19:15:00 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <3dRkjH3zKGz7Lkq@mail.python.org> Roundup Robot added the comment: New changeset cc0fc4e9b494 by Ezio Melotti in branch 'default': #10712: 2to3 has a new "asserts" fixer that replaces deprecated names of unittest methods. http://hg.python.org/cpython/rev/cc0fc4e9b494 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:16:51 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 23 Nov 2013 19:16:51 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1385234211.49.0.986023751922.issue10712@psf.upfronthosting.co.za> Ezio Melotti added the comment: Committed in 3.4, I'll backport it to 2.7/3.3 later. Thanks for the review! ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:17:54 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sat, 23 Nov 2013 19:17:54 +0000 Subject: [issue19545] time.strptime exception context In-Reply-To: <1384103025.17.0.0483523701082.issue19545@psf.upfronthosting.co.za> Message-ID: <1385234274.23.0.536145923327.issue19545@psf.upfronthosting.co.za> Changes by Claudiu.Popa : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:20:48 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 19:20:48 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385234448.91.0.325431841005.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: So I think the right approach here is to signal an error if the input string is longer than INT_MAX. The the safe downcast really *is* a safe downcast. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:31:36 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 23 Nov 2013 19:31:36 +0000 Subject: [issue13788] os.closerange optimization In-Reply-To: <1326601765.34.0.310008166629.issue13788@psf.upfronthosting.co.za> Message-ID: <1385235096.3.0.575313786983.issue13788@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: gregory.p.smith -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:40:54 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 23 Nov 2013 19:40:54 +0000 Subject: [issue16134] Add support for RTMP schemes to urlparse In-Reply-To: <1349375961.84.0.319840553089.issue16134@psf.upfronthosting.co.za> Message-ID: <1385235654.55.0.161392272392.issue16134@psf.upfronthosting.co.za> Gregory P. Smith added the comment: i'd like to see a proposed change against the 3.4 standard library for this with tests. ---------- assignee: gregory.p.smith -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:42:38 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 23 Nov 2013 19:42:38 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1385235758.06.0.375826972016.issue1195571@psf.upfronthosting.co.za> Gregory P. Smith added the comment: i obviously didn't add this to 3.3, unassigning to reflect the attention it (isn't) currently getting. sorry! ---------- assignee: gregory.p.smith -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:47:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 19:47:20 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1385236040.11.0.896221700088.issue15204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Ezio's comments. ---------- Added file: http://bugs.python.org/file32809/deprecate-U-mode_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:49:03 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 19:49:03 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385236143.92.0.449487769432.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm thinking of something like the attached patch, which limits nd to 2 billion, comfortably within the range of int on machines that Python's likely to meet. (If anyone's worried about machines with ints smaller than 32 bits, we could add a configure check for that.) I don't think we can take the limit all the way to 2**31 - 1, since nd may be combined with the exponent (which is limited to less than 20000 in the current code), but a limit of 2 billion should be safe. With this limit in place, it should then be safe to silence the warnings. ---------- Added file: http://bugs.python.org/file32810/limit_dtoa_string.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:50:11 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:50:11 +0000 Subject: [issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__) In-Reply-To: <1385137546.91.0.531425476426.issue19697@psf.upfronthosting.co.za> Message-ID: <1385236211.48.0.535609252925.issue19697@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:50:26 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:50:26 +0000 Subject: [issue19698] Implement _imp.exec_builtin and exec_dynamic In-Reply-To: <1385137675.64.0.235823443194.issue19698@psf.upfronthosting.co.za> Message-ID: <1385236226.94.0.557460603644.issue19698@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:50:38 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 23 Nov 2013 19:50:38 +0000 Subject: [issue11406] There is no os.listdir() equivalent returning generator instead of list In-Reply-To: <1299320278.86.0.403600489598.issue11406@psf.upfronthosting.co.za> Message-ID: <1385236238.86.0.968842956412.issue11406@psf.upfronthosting.co.za> Gregory P. Smith added the comment: For reference the current state of things for this is the proposal in: https://mail.python.org/pipermail/python-dev/2013-May/126196.html With a prototype using a ctypes based implementation as proof of concept in https://github.com/benhoyt/scandir. A combination of that interface plus my existing scandir patch (-gps02) could be created for the final implementation. As 3.4beta1 happens tonight, this isn't going to make 3.4 so i'm bumping this to 3.5. I really like the proposed design outlined above. ---------- stage: patch review -> needs patch versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:50:46 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:50:46 +0000 Subject: [issue19699] Update zipimport for PEP 451 In-Reply-To: <1385137762.02.0.629134883022.issue19699@psf.upfronthosting.co.za> Message-ID: <1385236246.19.0.666082640812.issue19699@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:50:59 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:50:59 +0000 Subject: [issue19700] Update runpy for PEP 451 In-Reply-To: <1385141125.22.0.359014382795.issue19700@psf.upfronthosting.co.za> Message-ID: <1385236259.91.0.983128629006.issue19700@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:51:04 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 19:51:04 +0000 Subject: [issue19739] Legit compiler warnings in new pickle code on 32-bit Windows Message-ID: <1385236264.72.0.60711493858.issue19739@psf.upfronthosting.co.za> New submission from Tim Peters: 1>..\Modules\_pickle.c(710): warning C4293: '>>' : shift count negative or too big, undefined behavior 1>..\Modules\_pickle.c(711): warning C4293: '>>' : shift count negative or too big, undefined behavior 1>..\Modules\_pickle.c(712): warning C4293: '>>' : shift count negative or too big, undefined behavior 1>..\Modules\_pickle.c(713): warning C4293: '>>' : shift count negative or too big, undefined behavior 1>..\Modules\_pickle.c(1158): warning C4018: '<' : signed/unsigned mismatch The first 4 should be easy to fix by using a SIZEOF_SIZE_T >= 8 #ifdef test. The last is on: if (frame_len < n) { ... raise an exception ... where `frame_len` is size_t and `n` is Py_ssize_t. ---------- assignee: alexandre.vassalotti messages: 204084 nosy: alexandre.vassalotti, pitrou, tim.peters priority: normal severity: normal status: open title: Legit compiler warnings in new pickle code on 32-bit Windows versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:51:13 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:51:13 +0000 Subject: [issue19701] Update multiprocessing for PEP 451 In-Reply-To: <1385138043.59.0.905087765846.issue19701@psf.upfronthosting.co.za> Message-ID: <1385236273.76.0.745722122647.issue19701@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:51:22 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 19:51:22 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385236282.09.0.0784440542532.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: > So size_t should be used instead ("s - s1" is unsigned, s >= s1). That was one of my original thoughts, but the size_t would then creep into all the exponent calculations, requiring fairly substantial changes throughout the code. That's not something I'd want to consider on the maintenance branches, at least. I think just limiting the size of the input string is a simpler option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:51:28 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:51:28 +0000 Subject: [issue19702] Update pickle to PEP 451 Message-ID: <1385236288.51.0.466783987234.issue19702@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:51:36 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:51:36 +0000 Subject: [issue19703] Upate pydoc to PEP 451 Message-ID: <1385236296.81.0.940475961471.issue19703@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:51:45 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:51:45 +0000 Subject: [issue19704] Update test.test_threaded_import to PEP 451 Message-ID: <1385236305.22.0.25871017397.issue19704@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:51:52 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:51:52 +0000 Subject: [issue19705] Update test.test_namespace_pkgs to PEP 451 Message-ID: <1385236312.66.0.788381765866.issue19705@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:52:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 19:52:00 +0000 Subject: [issue19739] Legit compiler warnings in new pickle code on 32-bit Windows In-Reply-To: <1385236264.72.0.60711493858.issue19739@psf.upfronthosting.co.za> Message-ID: <1385236320.05.0.796368124295.issue19739@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, there is actually a bug which shows up as errors in the tests. I'm currently testing a patch for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:52:04 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:52:04 +0000 Subject: [issue19706] Check if inspect needs updating for PEP 451 Message-ID: <1385236324.36.0.743671771321.issue19706@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:52:14 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:52:14 +0000 Subject: [issue19707] Check if unittest.mock needs updating for PEP 451 Message-ID: <1385236334.76.0.217942931653.issue19707@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:52:24 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:52:24 +0000 Subject: [issue19708] Check pkgutil for anything missing for PEP 451 Message-ID: <1385236344.42.0.965729931076.issue19708@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:53:07 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:53:07 +0000 Subject: [issue19710] Make sure documentation for PEP 451 is finished In-Reply-To: <1385138705.49.0.0614847614933.issue19710@psf.upfronthosting.co.za> Message-ID: <1385236387.49.0.786426931937.issue19710@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:53:41 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:53:41 +0000 Subject: [issue19711] add test for changed portions after reloading a namespace package In-Reply-To: <1385138827.34.0.898717139288.issue19711@psf.upfronthosting.co.za> Message-ID: <1385236421.57.0.883114420222.issue19711@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:53:50 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:53:50 +0000 Subject: [issue19712] Make sure there are exec_module tests for _LoaderBasics subclasses Message-ID: <1385236430.09.0.829544486972.issue19712@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:54:11 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:54:11 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 In-Reply-To: <1385139007.0.0.922066136531.issue19713@psf.upfronthosting.co.za> Message-ID: <1385236451.17.0.425711430156.issue19713@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:54:23 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 23 Nov 2013 19:54:23 +0000 Subject: [issue19714] Add tests for importlib.machinery.WindowsRegistryFinder In-Reply-To: <1385139731.13.0.379714643713.issue19714@psf.upfronthosting.co.za> Message-ID: <1385236463.0.0.510216606008.issue19714@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:59:35 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 19:59:35 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385236775.39.0.139662698865.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Whoops; half-baked patch. This one's better (but still not as tested as I'd like). ---------- Added file: http://bugs.python.org/file32811/limit_dtoa_string.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 20:59:52 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 19:59:52 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385236792.46.0.963098381071.issue19638@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file32810/limit_dtoa_string.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:01:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 20:01:49 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <3dRllK0MZKz7LjR@mail.python.org> Roundup Robot added the comment: New changeset d719975f4d25 by Christian Heimes in branch 'default': Issue #17810: Add NULL check to save_frozenset http://hg.python.org/cpython/rev/d719975f4d25 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:05:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 20:05:52 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <3dRlr01ztHzN4m@mail.python.org> Roundup Robot added the comment: New changeset c54becd69805 by Christian Heimes in branch 'default': Issue #17810: return -1 on error http://hg.python.org/cpython/rev/c54becd69805 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:08:24 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 20:08:24 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385237304.01.0.383466952555.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Christian: I don't think this code is safe: - nd0 = nd = s - s1; + tmp = s - s1; + nd0 = nd = Py_SAFE_DOWNCAST(tmp, Py_SSIZE_T, int); The result of the Py_SAFE_DOWNCAST could be almost anything, and in particular could be negative. It would take a careful examination of the code to guarantee that a negative nd or nd0 won't lead to difficulties further down the algorithm. I think we need to raise an error if tmp is too large, *before* the downcast. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:10:25 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 20:10:25 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385237424.99.0.319209748135.issue19638@psf.upfronthosting.co.za> Christian Heimes added the comment: Mark, I was talking about the attached "fix" (or more a workaround). You are right, my initial patch wasn't a good idea. ---------- Added file: http://bugs.python.org/file32812/float_overflow.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:13:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 20:13:13 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <3dRm0T0MT1z7LjR@mail.python.org> Roundup Robot added the comment: New changeset 70bd6f7e013b by Serhiy Storchaka in branch 'default': Issue #15204: Deprecated the 'U' mode in file-like objects. http://hg.python.org/cpython/rev/70bd6f7e013b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:14:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 20:14:12 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <3dRm1b4bwSzRgr@mail.python.org> Roundup Robot added the comment: New changeset a02adfb3260a by Christian Heimes in branch 'default': Issue #17810: Add two missing error checks to save_global http://hg.python.org/cpython/rev/a02adfb3260a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:14:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 20:14:27 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1385237667.53.0.129800442387.issue15204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Victor and Ezio for the reviews. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:14:58 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 20:14:58 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385237698.65.0.455937089893.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah, sorry; I misunderstood. Yep, that looks like a fine solution to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:16:10 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 20:16:10 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385237770.07.0.467237827506.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: And if you limit the length to a little less than INT_MAX, I don't think you need to modify dtoa.c at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:19:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 20:19:52 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <3dRm872kgNz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 3e16c8c34e69 by Christian Heimes in branch 'default': Issue #17810: Fixed NULL check in _PyObject_GetItemsIter() http://hg.python.org/cpython/rev/3e16c8c34e69 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:23:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 20:23:31 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385238211.2.0.878281953479.issue19638@psf.upfronthosting.co.za> Christian Heimes added the comment: PyOS_string_to_double() is a public function. The check is needed in case 3rd party code uses it without extra checks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:25:39 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Nov 2013 20:25:39 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385238339.33.0.684266414286.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: > PyOS_string_to_double() is a public function. The check is needed in case > 3rd party code uses it without extra checks. In that case, I'd suggest something more like my modifications to dtoa.c. By the time that you end up with a negative 'e', all sorts of other things have already gone wrong, possibly including undefined behaviour from signed integer overflow. IF we need to modify dtoa.c, the check should be earlier IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:27:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 20:27:40 +0000 Subject: [issue19641] Add audioop.byteswap() In-Reply-To: <1384770307.37.0.611849831444.issue19641@psf.upfronthosting.co.za> Message-ID: <3dRmK73Q62z7LrH@mail.python.org> Roundup Robot added the comment: New changeset fbebc90abcd1 by Serhiy Storchaka in branch 'default': Issue #19641: Added the audioop.byteswap() function to convert big-endian http://hg.python.org/cpython/rev/fbebc90abcd1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:29:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 20:29:14 +0000 Subject: [issue19641] Add audioop.byteswap() In-Reply-To: <1384770307.37.0.611849831444.issue19641@psf.upfronthosting.co.za> Message-ID: <1385238554.15.0.939413450637.issue19641@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have committed simplified patch, without optimization for 1-byte samples. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:40:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 20:40:00 +0000 Subject: [issue19739] Legit compiler warnings in new pickle code on 32-bit Windows In-Reply-To: <1385236264.72.0.60711493858.issue19739@psf.upfronthosting.co.za> Message-ID: <1385239200.43.0.50807976631.issue19739@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've fixed the first 4 in 458340ed0606 and the signed/unsigned warning in c3fd79b17983. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:45:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 20:45:26 +0000 Subject: [issue13592] repr(regex) doesn't include actual regex In-Reply-To: <1323772944.14.0.269599775604.issue13592@psf.upfronthosting.co.za> Message-ID: <3dRmjd3trjz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 8c00677da6c0 by Serhiy Storchaka in branch 'default': Issue #13592: Improved the repr for regular expression pattern objects. http://hg.python.org/cpython/rev/8c00677da6c0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:48:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 20:48:46 +0000 Subject: [issue19308] Tools/gdb/libpython.py does not support GDB linked against Python 3 In-Reply-To: <1382261054.14.0.65764193658.issue19308@psf.upfronthosting.co.za> Message-ID: <1385239726.13.0.355343621406.issue19308@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The buildbots look ok now. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:49:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 20:49:50 +0000 Subject: [issue13592] repr(regex) doesn't include actual regex In-Reply-To: <1323772944.14.0.269599775604.issue13592@psf.upfronthosting.co.za> Message-ID: <1385239790.23.0.869594229537.issue13592@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Hugo for your contribution. Thank you Thomas and Ezio for your reviews and suggestions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 21:50:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 20:50:09 +0000 Subject: [issue13592] repr(regex) doesn't include actual regex In-Reply-To: <1323772944.14.0.269599775604.issue13592@psf.upfronthosting.co.za> Message-ID: <1385239809.34.0.142894326648.issue13592@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 22:03:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 21:03:16 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1385240596.65.0.202777424631.issue16203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 22:20:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 21:20:53 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <3dRnVY0rP1z7LjR@mail.python.org> Roundup Robot added the comment: New changeset 89dfa2671c83 by Serhiy Storchaka in branch 'default': Issue #16203: Add re.fullmatch() function and regex.fullmatch() method, http://hg.python.org/cpython/rev/89dfa2671c83 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 22:23:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 21:23:21 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1385241801.1.0.360615286056.issue16203@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Committed with additional test (re.fullmatch('a+', 'ab')) which proves that change for SRE_OP_REPEAT_ONE are needed. Thank you Matthew for your contribution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 22:23:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 21:23:53 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1385241833.04.0.440046315864.issue16203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 22:26:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 21:26:43 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> Message-ID: <1385242003.49.0.923672850342.issue19465@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think this is more of a documentation issue. People who don't want a new fd can hardcode PollSelector (poll has been POSIX for a long time). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 22:28:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 21:28:34 +0000 Subject: [issue19736] posixmodule.c: Add flags for statvfs.f_flag to constant list In-Reply-To: <1385222125.46.0.688361383331.issue19736@psf.upfronthosting.co.za> Message-ID: <1385242114.89.0.456742105415.issue19736@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 22:44:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 21:44:01 +0000 Subject: [issue19735] ssl._create_stdlib_context In-Reply-To: <1385221563.59.0.016103325517.issue19735@psf.upfronthosting.co.za> Message-ID: <3dRp1D46mMz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 03cc1b55faae by Christian Heimes in branch 'default': Issue #19735: Implement private function ssl._create_stdlib_context() to http://hg.python.org/cpython/rev/03cc1b55faae ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 22:53:16 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 21:53:16 +0000 Subject: [issue19735] ssl._create_stdlib_context In-Reply-To: <1385221563.59.0.016103325517.issue19735@psf.upfronthosting.co.za> Message-ID: <1385243596.3.0.90286154423.issue19735@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks Antoine! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:01:41 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 22:01:41 +0000 Subject: [issue19736] posixmodule.c: Add flags for statvfs.f_flag to constant list In-Reply-To: <1385222125.46.0.688361383331.issue19736@psf.upfronthosting.co.za> Message-ID: <1385244101.32.0.271047418732.issue19736@psf.upfronthosting.co.za> Christian Heimes added the comment: LGTM The patch has no doc updates, though. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:02:43 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 22:02:43 +0000 Subject: [issue19738] pytime.c loses precision under Windows In-Reply-To: <1385227632.17.0.4146549909.issue19738@psf.upfronthosting.co.za> Message-ID: <1385244163.87.0.346452583585.issue19738@psf.upfronthosting.co.za> Tim Peters added the comment: Just noting for the record that a C double (time.time() result) isn't quite enough to hold a full-precision Windows time regardless: >>> from datetime import date >>> d = date.today() - date(1970, 1, 1) >>> s = int(d.total_seconds()) # seconds into "the epoch" >>> s *= 10**7 # number of 100ns into the epoch >>> s.bit_length() 54 >>> 54 > 53 # QED ;-) True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:06:38 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 22:06:38 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <1385244398.07.0.118346775779.issue19722@psf.upfronthosting.co.za> Larry Hastings added the comment: Attached is revision 3 of the patch. I'm gonna check it in pretty soon, so as to make beta (and feature freeze). I changed the API so the oparg is optional, and it raises if it gets one it shouldn't have or didn't get one when it should. ---------- Added file: http://bugs.python.org/file32813/larry.expose.stack.effect.patch.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:09:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 22:09:06 +0000 Subject: [issue19738] pytime.c loses precision under Windows In-Reply-To: <1385227632.17.0.4146549909.issue19738@psf.upfronthosting.co.za> Message-ID: <1385244546.69.0.891519596155.issue19738@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps we need a time_ns() method? (returning an integer timestamp in nanoseconds) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:10:17 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 22:10:17 +0000 Subject: [issue19730] Clinic fixes: add converters with length, version directive, "self converter" In-Reply-To: <1385173692.32.0.599871676954.issue19730@psf.upfronthosting.co.za> Message-ID: <1385244617.74.0.861364376519.issue19730@psf.upfronthosting.co.za> Larry Hastings added the comment: Attached is a fresh patch. I added a third new feature: the "self converter", which allows you to change the type of (or rename) self. For an example of its use, check out dbm.dbm.get in Modules/_dbmmodule.c. ---------- title: Clinic fixes: add converters with length, version directive -> Clinic fixes: add converters with length, version directive, "self converter" Added file: http://bugs.python.org/file32814/larry.misc.clinic.fixes.diff.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:13:28 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 22:13:28 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows Message-ID: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> New submission from Tim Peters: With current default branch, test_asyncio always fails on my 32-bit Windows Vista box, in test_wait_for_handle: test test_asyncio failed -- Traceback (most recent call last): File "C:\Code\Python\lib\test\test_asyncio\test_windows_events.py", line 122, in test_wait_for_handle self.assertTrue(f.result()) AssertionError: False is not true If I comment out that line, the rest of the test passes. There's also a pile of annoying warnings: C:\Code\Python\lib\test\test_asyncio\test_events.py:195: ResourceWarning: unclosed gc.collect() C:\Code\Python\lib\test\test_asyncio\test_events.py:195: ResourceWarning: unclosed gc.collect() C:\Code\Python\lib\test\test_asyncio\test_events.py:195: ResourceWarning: unclosed gc.collect() C:\Code\Python\lib\test\test_asyncio\test_events.py:195: ResourceWarning: unclosed gc.collect() C:\Code\Python\lib\test\test_asyncio\test_events.py:195: ResourceWarning: unclosed gc.collect() C:\Code\Python\lib\test\test_asyncio\test_events.py:195: ResourceWarning: unclosed gc.collect() C:\Code\Python\lib\test\test_asyncio\test_events.py:195: ResourceWarning: unclosed gc.collect() C:\Code\Python\lib\unittest\case.py:571: ResourceWarning: unclosed testMethod() ---------- assignee: gvanrossum messages: 204116 nosy: gvanrossum, tim.peters priority: normal severity: normal status: open title: test_asyncio problems on 32-bit Windows versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:15:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 22:15:44 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385244944.38.0.881805179299.issue19740@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:17:38 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Nov 2013 22:17:38 +0000 Subject: [issue19738] pytime.c loses precision under Windows In-Reply-To: <1385227632.17.0.4146549909.issue19738@psf.upfronthosting.co.za> Message-ID: <1385245058.37.0.148374794721.issue19738@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think this issue can be resolved by reducing the loss to the maximum available precision; it's about time.time(), after all. I don't think pygettimeofday can change; gettimeofday traditionally has only ?s. So the issue really is that it is used in implementing time.time(). As for whether an integer-returning current-time function in Python is needed: -1 (but then, I voiced the same concern when the ns-filestamp APIs where added). Adding an API will "force" people to rewrite their code, with no real improvement for practical improvement. The "force" comes from the mere availability of the API, and any emerging claims that using the time_ns() function is "more correct". I really wish Python would have a 128-bit floating point type that could be used to represent a time stamp. Until such a type is available (perhaps in 2025), I propose that we live with limitations of 64-bit floating point. Anybody *really* needing the Windows system time can use ctypes (or pywin32) already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:26:57 2013 From: report at bugs.python.org (Tim Peters) Date: Sat, 23 Nov 2013 22:26:57 +0000 Subject: [issue19738] pytime.c loses precision under Windows In-Reply-To: <1385227632.17.0.4146549909.issue19738@psf.upfronthosting.co.za> Message-ID: <1385245616.99.0.192881521978.issue19738@psf.upfronthosting.co.za> Tim Peters added the comment: I agree overall with Martin, although time.time() could be made a little better on Windows by getting the Windows time directly (instead of "needlessly" losing info by going thru pygettimeofday). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:36:14 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 23 Nov 2013 22:36:14 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1385242003.49.0.923672850342.issue19465@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Antoine Pitrou added the comment: > > I think this is more of a documentation issue. People who don't want a new fd can hardcode PollSelector (poll has been POSIX for a long time). That's also what I now think. I don't think that the use case is common enough to warrant a "factory", a default selector is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:36:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 22:36:57 +0000 Subject: [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> Message-ID: <1385246217.41.0.319368080374.issue19465@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:39:59 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 22:39:59 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385246399.02.0.77168576621.issue19674@psf.upfronthosting.co.za> Larry Hastings added the comment: Fresh patch attached. pydoc now uses inspect.signature instead of inspect.getfullargspec to generate the arguments for the function, and supports builtins. That's everything :D Planning on checking this in pretty soon, to get it in for beta (which hopefully still gets tagged today). ---------- Added file: http://bugs.python.org/file32815/larry.introspection.for.builtins.patch.4.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:43:52 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 22:43:52 +0000 Subject: [issue19738] pytime.c loses precision under Windows In-Reply-To: <1385227632.17.0.4146549909.issue19738@psf.upfronthosting.co.za> Message-ID: <1385246632.18.0.474791465154.issue19738@psf.upfronthosting.co.za> Larry Hastings added the comment: Martin: I think the best choice would be a decimal object--which, now that we have decimal in C, is probably sufficiently performant for serious consideration. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:46:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 23 Nov 2013 22:46:48 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1385246808.29.0.183980758061.issue16203@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:50:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 22:50:01 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <3dRqTK3c67z7Lpd@mail.python.org> Roundup Robot added the comment: New changeset 5fe72b9ed48e by Larry Hastings in branch 'default': Issue #19722: Added opcode.stack_effect(), which accurately http://hg.python.org/cpython/rev/5fe72b9ed48e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:50:27 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 22:50:27 +0000 Subject: [issue19722] Expose stack effect calculator to Python In-Reply-To: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> Message-ID: <1385247027.79.0.167862462497.issue19722@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:51:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Nov 2013 22:51:30 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> Message-ID: <1385247090.41.0.927095162113.issue19726@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think it's necessary either. They don't *need* to be ABCs, but if they aren't the docstring should be fixed :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:54:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 22:54:36 +0000 Subject: [issue19730] Clinic fixes: add converters with length, version directive, "self converter" In-Reply-To: <1385173692.32.0.599871676954.issue19730@psf.upfronthosting.co.za> Message-ID: <3dRqZg1VfQzSG3@mail.python.org> Roundup Robot added the comment: New changeset 760ccd78e874 by Larry Hastings in branch 'default': Issue #19730: Argument Clinic now supports all the existing PyArg http://hg.python.org/cpython/rev/760ccd78e874 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:54:56 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 22:54:56 +0000 Subject: [issue19730] Clinic fixes: add converters with length, version directive, "self converter" In-Reply-To: <1385173692.32.0.599871676954.issue19730@psf.upfronthosting.co.za> Message-ID: <1385247296.55.0.287636172263.issue19730@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:55:30 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 23 Nov 2013 22:55:30 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> Message-ID: <1385247330.45.0.334416572233.issue19726@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm not sure that "ABC" implies "an instance of abc.ABC". It's still an abstract base class (in the usual definition of that concept) even if it doesn't enforce anything. I propose to close this as wontfix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 23 23:59:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 22:59:17 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <3dRqh42HBBz7Lrj@mail.python.org> Roundup Robot added the comment: New changeset 29370c25e0f1 by Larry Hastings in branch 'default': Issue #19358: "make clinic" now runs the Argument Clinic preprocessor http://hg.python.org/cpython/rev/29370c25e0f1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:26:52 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 23:26:52 +0000 Subject: [issue19358] Integrate "Argument Clinic" into CPython build In-Reply-To: <1382508751.78.0.556655688797.issue19358@psf.upfronthosting.co.za> Message-ID: <1385249212.63.0.00660120416255.issue19358@psf.upfronthosting.co.za> Larry Hastings added the comment: Fixed. By the way, this checkin also added a tiny new feature to Argument Clinic: if the file hasn't changed, it doesn't bother to rewrite it (or touch it in any way). ---------- assignee: -> larry resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:37:04 2013 From: report at bugs.python.org (Zahari Dim) Date: Sat, 23 Nov 2013 23:37:04 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1385249824.3.0.620368773578.issue19737@psf.upfronthosting.co.za> Zahari Dim added the comment: I am looking at the docs of the built-in functions: http://docs.python.org/2/library/functions.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:38:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 23:38:33 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <3dRrYN5LKfz7Lkh@mail.python.org> Roundup Robot added the comment: New changeset 78ec18f5cb45 by Larry Hastings in branch 'default': Issue #19674: inspect.signature() now produces a correct signature http://hg.python.org/cpython/rev/78ec18f5cb45 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:39:10 2013 From: report at bugs.python.org (Larry Hastings) Date: Sat, 23 Nov 2013 23:39:10 +0000 Subject: [issue19674] Add introspection information for builtins In-Reply-To: <1384991546.24.0.134873558554.issue19674@psf.upfronthosting.co.za> Message-ID: <1385249950.9.0.010009577828.issue19674@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:39:33 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 23 Nov 2013 23:39:33 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385249973.69.0.117443258879.issue19740@psf.upfronthosting.co.za> Richard Oudkerk added the comment: It would be nice to try this on another Vista machine - the WinXP, Win7, Windows Server 2003 and Windows Server 2008 buildbots don't seem to show this failure. It looks as though the TimerOrWaitFired argument passed to the callback registered with RegisterWaitForSingleObject() is wrong. This might be fixable by doing an additional zero-timeout wait with WaitForSingleObject() to test whether the handle is signalled. (But this will prevent us from using wait_for_handle() with things like locks and semaphores where a succesful wait changes the state of the object represented by the handle.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:47:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 23:47:04 +0000 Subject: [issue19741] tracemalloc: tracemalloc_log_alloc() doesn't check _Py_HASHTABLE_SET() return value Message-ID: <1385250424.67.0.149405281139.issue19741@psf.upfronthosting.co.za> New submission from STINNER Victor: Christian posted me this warning on IRC: ** CID 1131947: Unchecked return value (CHECKED_RETURN) /Modules/_tracemalloc.c: 462 in tracemalloc_log_alloc() ---------- messages: 204131 nosy: christian.heimes, haypo priority: normal severity: normal status: open title: tracemalloc: tracemalloc_log_alloc() doesn't check _Py_HASHTABLE_SET() return value versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:49:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Nov 2013 23:49:08 +0000 Subject: [issue19738] pytime.c loses precision under Windows In-Reply-To: <1385246632.18.0.474791465154.issue19738@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > I think the best choice would be a decimal object--which, now that we have decimal in C, is probably sufficiently performant for serious consideration. This idea was rejected: see the PEP 410 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:51:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 23 Nov 2013 23:51:36 +0000 Subject: [issue19741] tracemalloc: tracemalloc_log_alloc() doesn't check _Py_HASHTABLE_SET() return value In-Reply-To: <1385250424.67.0.149405281139.issue19741@psf.upfronthosting.co.za> Message-ID: <1385250696.79.0.627699270495.issue19741@psf.upfronthosting.co.za> Christian Heimes added the comment: The functions can't signal an error because it has void as return type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 00:54:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 23 Nov 2013 23:54:31 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <3dRrvp3VBFz7Lkh@mail.python.org> Roundup Robot added the comment: New changeset a5b6c8cbc473 by Serhiy Storchaka in branch 'default': Issue #13477: Added command line interface to the tarfile module. http://hg.python.org/cpython/rev/a5b6c8cbc473 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:01:25 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 24 Nov 2013 00:01:25 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1385251285.43.0.990774525141.issue19737@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:12:45 2013 From: report at bugs.python.org (David Jones) Date: Sun, 24 Nov 2013 00:12:45 +0000 Subject: [issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine In-Reply-To: <1378731781.77.0.0136191125302.issue18987@psf.upfronthosting.co.za> Message-ID: <1385251965.97.0.20782588336.issue18987@psf.upfronthosting.co.za> David Jones added the comment: Has there been any progress made on fixing this? I ran into this trying to install numpy via pip, 32-bit python installation on 64-bit Centos 6.4. It get's the compile flags right, but not the linker: C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -m32 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/opt/python/ia32/include/python2.7 -c' gcc: _configtest.c gcc -pthread _configtest.o -o _configtest _configtest.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status Someone worked around this by changing ccompiler.py, line 693 to: runtime_library_dirs=None, debug=0, extra_preargs=['-m32'], See: http://stackoverflow.com/questions/11265057/how-do-i-install-a-32-bit-version-of-numpy I tried using the setarch command, which alters the output of uname, but it didn't change anything: setarch i686 pip install numpy This changes the output of uname from Linux centos63-vm 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux to Linux centos63-vm 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16 18:37:12 UTC 2013 i686 i686 i386 GNU/Linux So if get_platform really depends on uname, then why doesn't this work? ---------- nosy: +djones _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:14:14 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 24 Nov 2013 00:14:14 +0000 Subject: [issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine In-Reply-To: <1378731781.77.0.0136191125302.issue18987@psf.upfronthosting.co.za> Message-ID: <1385252054.76.0.70971863147.issue18987@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- title: distutils.utils.get_platform() for 32-bit Python on a 64-bit machine -> distutils.utils.get_platform() for 32-bit Python on a 64-bit machine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:32:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 00:32:47 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <3dRsly2cJ4z7Lqj@mail.python.org> Roundup Robot added the comment: New changeset 70b9d22b900a by Serhiy Storchaka in branch 'default': Build a list of supported test tarfiles dynamically for CLI "test" command http://hg.python.org/cpython/rev/70b9d22b900a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:37:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 00:37:24 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> Message-ID: <1385253444.82.0.768741998621.issue19726@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, IMHO it's better spelt "base class" if it isn't technically an ABC. At least I was personally a bit surprised at first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:38:50 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 24 Nov 2013 00:38:50 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385253444.82.0.768741998621.issue19726@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Well, it *is* abstract because it has no implementations and all the methods raise NotImplementedError. We can do better in the .rst docs though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:39:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 00:39:44 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: Message-ID: <1385253581.2318.9.camel@fsol> Antoine Pitrou added the comment: > Well, it *is* abstract because it has no implementations and all the > methods raise NotImplementedError. We can do better in the .rst docs though. I didn't know what to do with it, so I didn't mention it at all in the .rst docs :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:44:12 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 00:44:12 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385253852.93.0.382249999445.issue19740@psf.upfronthosting.co.za> Tim Peters added the comment: @sbt, this is reproducible every time for me, so if there's anything you'd like me to try, let me know. I don't know anything about this code, and gave up after half an hour of trying to find out _where_ `False` was coming from - too convoluted for this old brain ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:45:29 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 24 Nov 2013 00:45:29 +0000 Subject: [issue19742] pathlib group unittests can fail Message-ID: <1385253929.39.0.153589073777.issue19742@psf.upfronthosting.co.za> New submission from Guido van Rossum: When running test_pathlib on my OSX (10.8) laptop I get these errors: ====================================================================== ERROR: test_group (test.test_pathlib.PathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/guido/cpython/Lib/test/test_pathlib.py", line 1332, in test_group name = grp.getgrgid(gid).gr_name KeyError: 'getgrgid(): gid not found: 849048494' ====================================================================== ERROR: test_group (test.test_pathlib.PosixPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/guido/cpython/Lib/test/test_pathlib.py", line 1332, in test_group name = grp.getgrgid(gid).gr_name KeyError: 'getgrgid(): gid not found: 849048494' ---------------------------------------------------------------------- This is probably some kind of OSX quirk where st_gid is set to a group that's not in /etc/groups, because (except briefly during the reboot process) on OS X the /etc configuration files for users/groups do not provide the whole truth. Sadly I don't know what API to use to get the group name. "ls -l" doesn't seem to know either. My home dir has that gid too, so it's not an isolated anomaly. It may well be some kind of corporate thing (it's not really "my" laptop. :-) ---------- assignee: pitrou messages: 204141 nosy: gvanrossum, pitrou priority: normal severity: normal status: open title: pathlib group unittests can fail versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:46:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 00:46:45 +0000 Subject: [issue19742] pathlib group unittests can fail In-Reply-To: <1385253929.39.0.153589073777.issue19742@psf.upfronthosting.co.za> Message-ID: <1385254005.37.0.215044928159.issue19742@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the KeyError is legitimate then (it's even in the docs :-)). The test will probably have to be skipped in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 01:53:57 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 24 Nov 2013 00:53:57 +0000 Subject: [issue19691] Weird wording in RuntimeError doc In-Reply-To: <1385130108.97.0.877442110994.issue19691@psf.upfronthosting.co.za> Message-ID: <1385254437.76.0.573170874144.issue19691@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:10:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 01:10:08 +0000 Subject: [issue19545] time.strptime exception context In-Reply-To: <1384103025.17.0.0483523701082.issue19545@psf.upfronthosting.co.za> Message-ID: <1385255408.68.0.620499496482.issue19545@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:10:48 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 01:10:48 +0000 Subject: [issue19743] test_gdb failures Message-ID: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> New submission from Larry Hastings: test_gdb started failing on me within the past few days. (I would have reported it sooner but I figured the omniscient CPython core dev community already knew about it.) The machine it's failing on is Ubuntu 13.10, 64-bit. ---------- components: Tests files: gdb_test_failure messages: 204143 nosy: larry, pitrou priority: normal severity: normal stage: needs patch status: open title: test_gdb failures type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32816/gdb_test_failure _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:11:24 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 01:11:24 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385255484.87.0.554759396936.issue19743@psf.upfronthosting.co.za> Larry Hastings added the comment: Please see the attached output from the test run. But here's a sample: ====================================================================== FAIL: test_lists (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of lists ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/larry/src/python/nodocstrings/Lib/test/test_gdb.py", line 258, in test_lists self.assertGdbRepr(list(range(5))) File "/home/larry/src/python/nodocstrings/Lib/test/test_gdb.py", line 228, in assertGdbRepr cmds_after_breakpoint) File "/home/larry/src/python/nodocstrings/Lib/test/test_gdb.py", line 196, in get_gdb_repr import_site=import_site) File "/home/larry/src/python/nodocstrings/Lib/test/test_gdb.py", line 179, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xfc in position 1: invalid start byte: + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xfc in position 1: invalid start byte: ', - "Python Exception 'utf-8' codec can't decode " - 'byte 0xfc in position 1: invalid start byte: '] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:11:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 01:11:37 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385255497.87.0.231253141733.issue19743@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > test_gdb started failing on me within the past few days Can you please bisect to find the offending changeset? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:20:53 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 01:20:53 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385256053.34.0.187722687279.issue19734@psf.upfronthosting.co.za> Nick Coghlan added the comment: Bumping priority and adding Larry to the nosy list Checking the latest results from the systems listed above: Ubuntu LTS still failing due to this: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3213/steps/test/logs/stdio (added ?ukasz to nosy list) x86 OpenIndiana still failing due to this: http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/7123/steps/test/logs/stdio (added Jes?s to the nosy list) AMD64 OpenIndiana machine is still failing, but not due to this (test_tarfile failure): http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/6972/steps/test/logs/stdio Windows 7 failure is in test_tarfile: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/3410/steps/test/logs/stdio Windows XP failure was a build issue for the new _opcode module: http://buildbot.python.org/all/builders/x86%20XP-4%203.x/builds/9651/steps/test/logs/stdio Solaris (not a stable buildbot) had slightly different symptoms and a few other errors: http://buildbot.python.org/all/builders/AMD64%20Solaris%2011%20%5BSB%5D%203.x/builds/2216/steps/test/logs/stdio AIX has lots of issues, include some where features pip is relying on don't work: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/1127/steps/test/logs/stdio System Z just isn't happy with test_gdb: http://buildbot.python.org/all/builders/System%20Z%20Linux%203.x/builds/795/steps/test/logs/stdio ---------- nosy: +jcea, larry, lukasz.langa -nick priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:23:55 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 01:23:55 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385256235.27.0.214395058647.issue19734@psf.upfronthosting.co.za> Larry Hastings added the comment: Nick: I get that gdb failure, bisecting now. See #19743. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:33:30 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 01:33:30 +0000 Subject: [issue19715] test_touch_common failure under Windows In-Reply-To: <1385142168.58.0.0468844706285.issue19715@psf.upfronthosting.co.za> Message-ID: <1385256810.55.0.787105270399.issue19715@psf.upfronthosting.co.za> Tim Peters added the comment: [MvL] > A. t1=t2=1385161652120375500 > B. pygettimeofday truncates this to 1385161652.120375 > C. time.time() converts this to float, yielding > 0x1.4a3f8ed07b439p+30 i.e. > (0.6450161580556887, 31) > 1385161652.120375 (really .1203749566283776) > D. _PyTime_ObjectToDenominator converts this to > 1385161652.120374917 > E. time_t_to_FILE_TIME convert this to > 1385161652.120374900 Got it. It's not surprising we can't round-trip, but it's annoying we can't always round-trip even if there are no nanoseconds to lose at the start :-( The only part here that rounds is step C - everything else truncates. For example, start with 1385161652120374000. B is exact then, returning seconds 1385161652 and usecs 120374. C doesn't do _much_ damage, returning 1385161652.120374 == 0x1.4a3f8ed07b435p+30 D. breaks that into 1385161652.0 and 0.12037396430969238 yielding seconds 1385161652 and numerator 120373964. The last part is a little truncated, but the major loss comes in E, which chops off the final "64" - we end up changing 1385161652120374000 into 1385161652120373900 There's a reason C's time_t is almost always implemented as an integer type ;-) I expect we'd be better off if we represented times internally as 64-bit ints, used double for the output of time.time(), and refused to accept doubles for any purpose - LOL ;-) ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:38:46 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 01:38:46 +0000 Subject: [issue19744] test_venv failing on 32-bit Windows Vista Message-ID: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> New submission from Tim Peters: With the current default branch, test_venv fails every time for me: [1/1] test_venv Traceback (most recent call last): File "C:\Code\Python\lib\runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Code\Python\lib\runpy.py", line 73, in _run_code exec(code, run_globals) File "C:\Code\Python\lib\ensurepip\__main__.py", line 66, in main() File "C:\Code\Python\lib\ensurepip\__main__.py", line 61, in main default_pip=args.default_pip, File "C:\Code\Python\lib\ensurepip\__init__.py", line 92, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "C:\Code\Python\lib\ensurepip\__init__.py", line 28, in _run_pip import pip File "C:\Users\Tim\AppData\Local\Temp\tmpjltqdgi8\pip-1.5.rc1-py2.py3-none-any.whl\pip\__init__.py", line 10 , in File "C:\Users\Tim\AppData\Local\Temp\tmpjltqdgi8\pip-1.5.rc1-py2.py3-none-any.whl\pip\util.py", line 17, in File "C:\Users\Tim\AppData\Local\Temp\tmpjltqdgi8\pip-1.5.rc1-py2.py3-none-any.whl\pip\_vendor\distlib\versi on.py", line 14, in File "C:\Users\Tim\AppData\Local\Temp\tmpjltqdgi8\pip-1.5.rc1-py2.py3-none-any.whl\pip\_vendor\distlib\compat.py", line 66, in ImportError: cannot import name 'HTTPSHandler' test test_venv failed -- Traceback (most recent call last): File "C:\Code\Python\lib\test\test_venv.py", line 288, in test_with_pip self.run_with_capture(venv.create, self.env_dir, with_pip=True) File "C:\Code\Python\lib\test\test_venv.py", line 48, in run_with_capture func(*args, **kwargs) File "C:\Code\Python\lib\venv\__init__.py", line 359, in create builder.create(env_dir) File "C:\Code\Python\lib\venv\__init__.py", line 86, in create self._setup_pip(context) File "C:\Code\Python\lib\venv\__init__.py", line 242, in _setup_pip subprocess.check_output(cmd) File "C:\Code\Python\lib\subprocess.py", line 618, in check_output raise CalledProcessError(retcode, process.args, output=output) subprocess.CalledProcessError: Command '['C:\\Users\\Tim\\AppData\\Local\\Temp\\tmpt0ca1aqn\\Scripts\\python_d .exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 1 test failed: test_venv All virtual Greek to me. ---------- messages: 204149 nosy: tim.peters priority: normal severity: normal status: open title: test_venv failing on 32-bit Windows Vista versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:47:38 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 01:47:38 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385257658.04.0.361395375659.issue19743@psf.upfronthosting.co.za> Larry Hastings added the comment: The first bad revision is: changeset: 87426:9f2a0043396b user: Antoine Pitrou date: Sat Nov 23 17:40:36 2013 +0100 files: Lib/test/test_gdb.py Tools/gdb/libpython.py description: Issue #19308: fix the gdb plugin on gdbs linked with Python 3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:47:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 01:47:50 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <3dRvQY5qTLz7Lkh@mail.python.org> Roundup Robot added the comment: New changeset cb598129837c by Nick Coghlan in branch 'default': Issue 19734: better diagnostics for test_venv failures http://hg.python.org/cpython/rev/cb598129837c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:49:08 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 24 Nov 2013 01:49:08 +0000 Subject: [issue9374] urlparse should parse query and fragment for arbitrary schemes In-Reply-To: <1280012321.31.0.791086727515.issue9374@psf.upfronthosting.co.za> Message-ID: <1385257748.36.0.902856044497.issue9374@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:51:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 01:51:40 +0000 Subject: [issue19744] test_venv failing on 32-bit Windows Vista In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385257900.14.0.518814970804.issue19744@psf.upfronthosting.co.za> Nick Coghlan added the comment: Interesting - this isn't *quite* a duplicate of the buildbot failures in issue 19734 (at least, I don't think it is - the extra diagnostics I just checked in should tell us for sure). Since pip isn't useful without HTTPS, we may want to add a check for ssl support to either venv or ensurepip itself. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:52:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 01:52:36 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385257956.24.0.111831901996.issue19743@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If you go back one revision, test_gdb isn't run at all, right? (it should be skipped) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:52:59 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 01:52:59 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385257979.37.0.541090608913.issue19743@psf.upfronthosting.co.za> Larry Hastings added the comment: That's correct, it is skipped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:53:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 01:53:16 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <3dRvXq3Dw3z7Lpx@mail.python.org> Roundup Robot added the comment: New changeset 989de1a267b1 by Nick Coghlan in branch 'default': Issue #19734: venv still needs isolated mode http://hg.python.org/cpython/rev/989de1a267b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:57:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 01:57:53 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385258273.82.0.0791660803661.issue19743@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, it seems the failures are due to a non-pydebug build. I'll investigate tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:59:15 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 01:59:15 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385258355.52.0.121402969867.issue19743@psf.upfronthosting.co.za> Larry Hastings added the comment: The test passes if I turn on "--with-pydebug". And Antoine told me in IRC that he sees the failure if he turns off "--with-pydebug". So we're in business. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 02:59:32 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 01:59:32 +0000 Subject: [issue19744] test_venv failing on 32-bit Windows Vista In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385258372.41.0.0104838206818.issue19744@psf.upfronthosting.co.za> Tim Peters added the comment: Ah, I didn't even notice the "S" in "HTTPS"! I'm not building the SSL cruft on my box, so it's not surprising that anything requiring it would fail. It is surprising that this is the only test that _does_ fail without it ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:05:27 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 24 Nov 2013 02:05:27 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385258727.63.0.575535660376.issue19734@psf.upfronthosting.co.za> Christian Heimes added the comment: Could a deprecation warning cause the failing test? Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 73, in _run_code exec(code, run_globals) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\ensurepip\__main__.py", line 66, in main() File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\ensurepip\__main__.py", line 61, in main default_pip=args.default_pip, File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\ensurepip\__init__.py", line 92, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\ensurepip\__init__.py", line 28, in _run_pip import pip File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "C:\Users\Buildbot\AppData\Local\Temp\tmpi0kq8p59\pip-1.5.rc1-py2.py3-none-any.whl\pip\__init__.py", line 9, in File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "C:\Users\Buildbot\AppData\Local\Temp\tmpi0kq8p59\pip-1.5.rc1-py2.py3-none-any.whl\pip\log.py", line 8, in File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "C:\Users\Buildbot\AppData\Local\Temp\tmpi0kq8p59\setuptools-1.3.2-py2.py3-none-any.whl\pkg_resources.py", line 20, in File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\imp.py", line 32, in PendingDeprecationWarning) PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:08:27 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 24 Nov 2013 02:08:27 +0000 Subject: [issue13244] WebSocket schemes in urllib.parse In-Reply-To: <1319281663.43.0.214740119457.issue13244@psf.upfronthosting.co.za> Message-ID: <1385258907.44.0.130734681862.issue13244@psf.upfronthosting.co.za> Martin Panter added the comment: Suspect this is now fixed in a generic way by Issue 9374. The fix seems to be in 2.7, 3.2 and 3.3. $ python3.3 Python 3.3.2 (default, May 16 2013, 23:40:52) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from urllib.parse import urlparse >>> urlparse("ws://example.com/somewhere?foo=bar#dgdg") ParseResult(scheme='ws', netloc='example.com', path='/somewhere', params='', query='foo=bar', fragment='dgdg') ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:16:18 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 02:16:18 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385259378.61.0.879412225628.issue19734@psf.upfronthosting.co.za> Nick Coghlan added the comment: Christian, that was my original theory in issue 19694 (since that box runs with PYTHONWARNINGS=d set), but it doesn't look like it is the problem, since running in isolated mode didn't fix the issue (although it did suppress the warnings). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:17:44 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 02:17:44 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385259464.77.0.515592519414.issue19734@psf.upfronthosting.co.za> Nick Coghlan added the comment: That specific stack trace is from the commit where I inadvertently reverted the isolated mode fix - the pip installation test is always run with PYTHONWARNINGS=e now to make sure it will fail in non-isolated mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:27:26 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 02:27:26 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 In-Reply-To: <1385222348.06.0.416110381918.issue19713@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I think we should definitely support them, I just haven't thought of a way to do that yet which is cleaner than the status quo (it's only the loader part of the API that isn't fully covered - the rest of the legacy APIs can be deprecated happily). I may come up with an idea once we start work on migrating extension module loading in 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:27:41 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 02:27:41 +0000 Subject: [issue19744] test_venv failing on 32-bit Windows Vista In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385260061.26.0.546173376788.issue19744@psf.upfronthosting.co.za> Tim Peters added the comment: FYI, here's the new output: [1/1] test_venv test test_venv failed -- Traceback (most recent call last): File "C:\Code\Python\lib\test\test_venv.py", line 289, in test_with_pip self.run_with_capture(venv.create, self.env_dir, with_pip=True) subprocess.CalledProcessError: Command '['C:\\Users\\Tim\\AppData\\Local\\Temp\\tmptw2_vda6\\Scripts\\python_d .exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Code\Python\lib\test\test_venv.py", line 295, in test_with_pip self.fail(msg) AssertionError: Command '['C:\\Users\\Tim\\AppData\\Local\\Temp\\tmptw2_vda6\\Scripts\\python_d.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 **Subprocess Output** Traceback (most recent call last): File "C:\Code\Python\lib\runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Code\Python\lib\runpy.py", line 73, in _run_code exec(code, run_globals) File "C:\Code\Python\lib\ensurepip\__main__.py", line 66, in main() File "C:\Code\Python\lib\ensurepip\__main__.py", line 61, in main default_pip=args.default_pip, File "C:\Code\Python\lib\ensurepip\__init__.py", line 92, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "C:\Code\Python\lib\ensurepip\__init__.py", line 28, in _run_pip import pip File "C:\Users\Tim\AppData\Local\Temp\tmpdkfwi7it\pip-1.5.rc1-py2.py3-none-any.whl\pip\__init__.py", line 10 , in File "C:\Users\Tim\AppData\Local\Temp\tmpdkfwi7it\pip-1.5.rc1-py2.py3-none-any.whl\pip\util.py", line 17, in File "C:\Users\Tim\AppData\Local\Temp\tmpdkfwi7it\pip-1.5.rc1-py2.py3-none-any.whl\pip\_vendor\distlib\version.py", line 14, in File "C:\Users\Tim\AppData\Local\Temp\tmpdkfwi7it\pip-1.5.rc1-py2.py3-none-any.whl\pip\_vendor\distlib\compat.py", line 66, in ImportError: cannot import name 'HTTPSHandler' 1 test failed: test_venv ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:40:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 02:40:42 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385260842.83.0.414758139128.issue19734@psf.upfronthosting.co.za> Nick Coghlan added the comment: OpenIndiana failure looks like a resource management issue in ctypes: ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_venv.py", line 304, in test_with_pip self.assertEqual(err, "") AssertionError: "/export/home/buildbot/32bits/3.x.cea-ind[346 chars]):\n" != '' - /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/ctypes/util.py:179: ResourceWarning: unclosed file <_io.TextIOWrapper name=5 encoding='646'> - for line in os.popen(cmd).readlines(): - /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/ctypes/util.py:179: ResourceWarning: unclosed file <_io.TextIOWrapper name=5 encoding='646'> - for line in os.popen(cmd).readlines(): Ubuntu LTS failure still puzzles me: ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_venv.py", line 289, in test_with_pip self.run_with_capture(venv.create, self.env_dir, with_pip=True) subprocess.CalledProcessError: Command '['/tmp/tmpwsahapjn/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 3 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_venv.py", line 295, in test_with_pip self.fail(msg) AssertionError: Command '['/tmp/tmpwsahapjn/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 3 **Subprocess Output** Could not find an activated virtualenv (required). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:40:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 24 Nov 2013 02:40:50 +0000 Subject: [issue19745] TEST_DATA_DIR for out-of-tree builds Message-ID: <1385260850.2.0.647023626646.issue19745@psf.upfronthosting.co.za> New submission from Christian Heimes: test.support declares a TEST_DATA_DIR directory inside the source tree of Python: TEST_SUPPORT_DIR = os.path.dirname(os.path.abspath(__file__)) TEST_HOME_DIR = os.path.dirname(TEST_SUPPORT_DIR) TEST_DATA_DIR = os.path.join(TEST_HOME_DIR, "data") make distclean cleans up the very same directory, see r87481. This feature doesn't cope will with out-of-tree builds with a read-only source directory. It looks like this feature isn't used by any test module. Can I remove it? ---------- components: Tests messages: 204166 nosy: christian.heimes priority: low severity: normal stage: needs patch status: open title: TEST_DATA_DIR for out-of-tree builds type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:41:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 02:41:15 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385260875.12.0.148049732701.issue19734@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +dstufft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:45:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 02:45:38 +0000 Subject: [issue19744] test_venv failing on 32-bit Windows Vista In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <3dRwjF2t63z7Ll8@mail.python.org> Roundup Robot added the comment: New changeset 9891ba920f3c by Nick Coghlan in branch 'default': Issue #19744 (temp workaround): without ssl, skip pip test http://hg.python.org/cpython/rev/9891ba920f3c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:49:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 02:49:32 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385261372.13.0.515701276594.issue19744@psf.upfronthosting.co.za> Nick Coghlan added the comment: Temporarily skipped the test to appease the build bots for the beta release, but this should be changed so that ensurepip refuses to bootstrap pip if SSL/TLS support is not available. test_venv would then be updated to check for the appropriate behaviour (e.g. by inserting a dummy ssl.py that just raises import error into the venv) ---------- priority: normal -> high title: test_venv failing on 32-bit Windows Vista -> ensurepip should refuse to install pip if SSL/TLS is not available _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:50:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 02:50:13 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1385261413.64.0.501002865923.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19744 covers better handling of the case where SSL/TLS support is not available in the current Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:51:13 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 24 Nov 2013 02:51:13 +0000 Subject: [issue16134] Add support for RTMP schemes to urlparse In-Reply-To: <1349375961.84.0.319840553089.issue16134@psf.upfronthosting.co.za> Message-ID: <1385261473.7.0.790920286432.issue16134@psf.upfronthosting.co.za> Martin Panter added the comment: Looks like Issue 9374 already covers most of this, with fixes in 2.7, 3.2 and 3.3. $ python3.3 Python 3.3.2 (default, May 16 2013, 23:40:52) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from urllib.parse import urlparse >>> urlparse("protocol://servername:port/") ParseResult(scheme='protocol', netloc='servername:port', path='/', params='', query='', fragment='') >>> urlparse("rtmp://a.rtmp.youtube.com/videolive?ns=yt-live&id=123456&itag=35&signature=blahblahblah/yt-live.123456.35") ParseResult(scheme='rtmp', netloc='a.rtmp.youtube.com', path='/videolive', params='', query='ns=yt-live&id=123456&itag=35&signature=blahblahblah/yt-live.123456.35', fragment='') Now there are only the three unresolved aspects listed below, as I see it. Personally I think the first, for urljoin(), should be fixed (hopefully in a generic way without whitelists). I mentioned this in Issue 18828. I wonder if last two really matter? * uses_relative: would allow urljoin() to work. Compare urljoin("rtmp://host/", "path") and urljoin("rtsp://host/", "path"). * uses_netloc: would affect urlunsplit(("rtmp", "", "/path", "", "")) * uses_params: would affect urlparse("rtmp://host/;a=b") ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:51:29 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 24 Nov 2013 02:51:29 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385261489.59.0.340480569407.issue19744@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 03:54:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 02:54:04 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <3dRwv00bfyz7Ll8@mail.python.org> Roundup Robot added the comment: New changeset 7c080ee796a6 by Nick Coghlan in branch 'default': Issue #19734: ctypes resource management fixes http://hg.python.org/cpython/rev/7c080ee796a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 04:16:03 2013 From: report at bugs.python.org (Robert Collins) Date: Sun, 24 Nov 2013 03:16:03 +0000 Subject: [issue19746] No introspective way to detect ModuleImportFailure Message-ID: <1385262963.63.0.210713286499.issue19746@psf.upfronthosting.co.za> New submission from Robert Collins: https://bugs.launchpad.net/testtools/+bug/1245672 was filed on testtools recently. It would be easier to fix that if there was some way that something loading a test suite could check to see if there were import errors. The current code nicely works in the case where folk run the tests - so we should keep that behaviour, but also accumulate a list somewhere. One possibility would be on the returned top level suite; another place would be on the loader itself. Or a new return type where we return a tuple of (suite, failures), but thats a more intrusive API change. Any preference about how to solve this? I will work up a patch given some minor direction. ---------- components: Library (Lib) messages: 204172 nosy: michael.foord, rbcollins priority: normal severity: normal status: open title: No introspective way to detect ModuleImportFailure type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 04:28:14 2013 From: report at bugs.python.org (Martin Panter) Date: Sun, 24 Nov 2013 03:28:14 +0000 Subject: [issue15009] urlsplit can't round-trip relative-host urls. In-Reply-To: <1338935307.83.0.455725477737.issue15009@psf.upfronthosting.co.za> Message-ID: <1385263694.34.0.514334568721.issue15009@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 04:37:42 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 24 Nov 2013 03:37:42 +0000 Subject: [issue19742] pathlib group unittests can fail In-Reply-To: <1385253929.39.0.153589073777.issue19742@psf.upfronthosting.co.za> Message-ID: <1385264262.55.0.180637711298.issue19742@psf.upfronthosting.co.za> Ned Deily added the comment: You should be able to find the group and group name using the "Directory Utility" app. The easiest way to launch it is from a shell with: open "/System/Library/CoreServices/Directory Utility.app" There is a command line utility, dscl, but it is much more painful. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 04:52:35 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 24 Nov 2013 03:52:35 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1385265155.67.0.306836846053.issue3158@psf.upfronthosting.co.za> Zachary Ware added the comment: In the absence of input, I'm going to go ahead and commit this just in case in needs to be in before feature freeze, but I'll leave the issue open at "commit review" stage for a few days in case anyone does have something to say about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 05:36:50 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 24 Nov 2013 04:36:50 +0000 Subject: [issue15397] Unbinding of methods In-Reply-To: <1342718946.15.0.133705372041.issue15397@psf.upfronthosting.co.za> Message-ID: <1385267810.97.0.902175703345.issue15397@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- resolution: -> duplicate status: open -> closed superseder: -> Implement PEP 3154 (pickle protocol 4) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 05:39:41 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 24 Nov 2013 04:39:41 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385267981.56.0.127337364368.issue17810@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I've finalized the framing implementation in de9bda43d552. There will be more improvements to come until 3.4 final. However, feature-wise we are done. Thank you everyone for the help! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 05:42:18 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 04:42:18 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1385267981.56.0.127337364368.issue17810@psf.upfronthosting.co.za> Message-ID: Tim Peters added the comment: [Alexandre Vassalotti] > I've finalized the framing implementation in de9bda43d552. > > There will be more improvements to come until 3.4 final. However, feature-wise > we are done. Thank you everyone for the help! Woo hoo! Thank YOU for the hard work - I know how much fun this is ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From tim.peters at gmail.com Sun Nov 24 05:42:01 2013 From: tim.peters at gmail.com (Tim Peters) Date: Sat, 23 Nov 2013 22:42:01 -0600 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1385267981.56.0.127337364368.issue17810@psf.upfronthosting.co.za> References: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> <1385267981.56.0.127337364368.issue17810@psf.upfronthosting.co.za> Message-ID: [Alexandre Vassalotti] > I've finalized the framing implementation in de9bda43d552. > > There will be more improvements to come until 3.4 final. However, feature-wise > we are done. Thank you everyone for the help! Woo hoo! Thank YOU for the hard work - I know how much fun this is ;-) From report at bugs.python.org Sun Nov 24 05:53:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 04:53:23 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385268803.14.0.0591040762052.issue19734@psf.upfronthosting.co.za> Nick Coghlan added the comment: test_venv is now passing on 3.x OpenIndiana: http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/7129/steps/test/logs/stdio Ubuntu LTS buildbot is still unhappy: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3221/steps/test/logs/stdio And looking at the environment armed with the improved error details, this is likely the culprit: PIP_REQUIRE_VIRTUALENV=true I'll hack the test to delete it from the subprocess invocation for now, but I think there's a pip bug here: -E (and, equivalently, -I) should likely cause pip to ignore *its* environment variables as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 05:55:04 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 04:55:04 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385268904.72.0.812160853202.issue19734@psf.upfronthosting.co.za> Nick Coghlan added the comment: Confirmed: $ PIP_REQUIRE_VIRTUALENV=true ./python -m test test_venv [1/1] test_venv test test_venv failed -- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_venv.py", line 298, in test_with_pip self.run_with_capture(venv.create, self.env_dir, with_pip=True) subprocess.CalledProcessError: Command '['/tmp/tmpo1fj4gy6/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 3 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_venv.py", line 304, in test_with_pip self.fail(msg) AssertionError: Command '['/tmp/tmpo1fj4gy6/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 3 **Subprocess Output** Could not find an activated virtualenv (required). 1 test failed: test_venv ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 05:59:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 04:59:34 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <3dRzgn56Vvz7Ll8@mail.python.org> Roundup Robot added the comment: New changeset 9186fdae7e1f by Nick Coghlan in branch 'default': Issue #19734: Ensure test_venv ignores PIP_REQUIRE_VIRTUALENV http://hg.python.org/cpython/rev/9186fdae7e1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 06:09:28 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 05:09:28 +0000 Subject: [issue19747] New failures in test_pickletools on 32-bit Windows Vista Message-ID: <1385269768.24.0.0786219443726.issue19747@psf.upfronthosting.co.za> New submission from Tim Peters: Alexandre, this started after your latest checkin (to finish the framing work): ====================================================================== FAIL: test_framing_large_objects (test.test_pickletools.OptimizedPickleTests) (proto=4) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Code\Python\lib\test\pickletester.py", line 1354, in test_framing_large_objects self.assertGreaterEqual(n_frames, len(obj)) AssertionError: 1 not greater than or equal to 3 ====================================================================== FAIL: test_framing_many_objects (test.test_pickletools.OptimizedPickleTests) (proto=4) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Code\Python\lib\test\pickletester.py", line 1342, in test_framing_many_objects self.FRAME_SIZE_TARGET * 1) AssertionError: 368886.0 not less than or equal to 65536 ====================================================================== FAIL: test_optional_frames (test.test_pickletools.OptimizedPickleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Code\Python\lib\test\pickletester.py", line 1392, in test_optional_frames count_opcode(pickle.FRAME, pickled)) AssertionError: 1 not less than 1 ---------------------------------------------------------------------- Ran 82 tests in 4.034s FAILED (failures=3) test test_pickletools failed 1 test failed: test_pickletools ---------- assignee: alexandre.vassalotti messages: 204180 nosy: alexandre.vassalotti, tim.peters priority: normal severity: normal status: open title: New failures in test_pickletools on 32-bit Windows Vista versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 06:13:02 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 05:13:02 +0000 Subject: [issue19747] New failures in test_pickletools on 32-bit Windows Vista In-Reply-To: <1385269768.24.0.0786219443726.issue19747@psf.upfronthosting.co.za> Message-ID: <1385269982.6.0.397562984594.issue19747@psf.upfronthosting.co.za> Tim Peters added the comment: OK! This went away after a68c303eb8dc was checked in. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 07:49:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 06:49:32 +0000 Subject: [issue19734] test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <3dS26g43Ckz7Ll8@mail.python.org> Roundup Robot added the comment: New changeset 124e51c19e4f by Nick Coghlan in branch 'default': Issue #19734: Also run pip version check in isolated mode http://hg.python.org/cpython/rev/124e51c19e4f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 07:51:16 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 06:51:16 +0000 Subject: [issue19694] test_venv failing on one of the Ubuntu buildbots In-Reply-To: <1385132981.26.0.207810200878.issue19694@psf.upfronthosting.co.za> Message-ID: <1385275876.02.0.175159213502.issue19694@psf.upfronthosting.co.za> Nick Coghlan added the comment: Using isolated mode addressed the warning noise, issue 19734 covers additional environment dependent problems in the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 07:54:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 06:54:23 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385276063.64.0.24535097546.issue19744@psf.upfronthosting.co.za> Nick Coghlan added the comment: Also noting that the reason for the dummy ssl in the venv would be to provoke the "SSL/TLS not available" behaviour when running the tests in a Python that actually has those pieces (since the buildbots will have them available unless something goes wrong with the build) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 08:01:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 07:01:14 +0000 Subject: [issue19545] time.strptime exception context In-Reply-To: <1384103025.17.0.0483523701082.issue19545@psf.upfronthosting.co.za> Message-ID: <1385276474.86.0.484267562656.issue19545@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 08:20:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 07:20:30 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <3dS2pQ09Jmz7LlL@mail.python.org> Roundup Robot added the comment: New changeset 95dc3054959b by Zachary Ware in branch 'default': Issue #3158: doctest can now find doctests in functions and methods http://hg.python.org/cpython/rev/95dc3054959b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 08:26:28 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 24 Nov 2013 07:26:28 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1385277988.05.0.0178141987317.issue3158@psf.upfronthosting.co.za> Zachary Ware added the comment: One-year-olds don't like productivity. Committed, 3 hours after I said I would :). I'll leave this open for a couple days just in case. ---------- assignee: -> zach.ware resolution: -> fixed stage: -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 08:33:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 07:33:52 +0000 Subject: [issue19700] Update runpy for PEP 451 In-Reply-To: <1385141125.22.0.359014382795.issue19700@psf.upfronthosting.co.za> Message-ID: <1385278432.18.0.891733999666.issue19700@psf.upfronthosting.co.za> Nick Coghlan added the comment: D'oh, I forgot there was a runpy API change I planned to offer as part of the PEP 451 integration: exposing a "target" parameter in both run_path and run_module. http://www.python.org/dev/peps/pep-0451/#the-target-parameter-of-find-spec I guess that slips to 3.5 now, since there's no way it will be in for feature freeze :( ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 08:48:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 07:48:51 +0000 Subject: [issue19734] venv and ensurepip are affected by pip environment variable settings In-Reply-To: <1385214702.5.0.171407877009.issue19734@psf.upfronthosting.co.za> Message-ID: <1385279331.22.0.506208600718.issue19734@psf.upfronthosting.co.za> Nick Coghlan added the comment: test_venv appears to be green on all the stable buildbots now. However, blocking PIP_REQUIRE_VIRTUALENV in the test probably isn't the right place for workaround - resolution in venv or ensurepip would be more appropriate. ---------- priority: release blocker -> deferred blocker title: test_venv.test_with_pip() fails on "AMD64 Ubuntu LTS 3.x" buildbot -> venv and ensurepip are affected by pip environment variable settings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 08:56:27 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 24 Nov 2013 07:56:27 +0000 Subject: [issue19733] Setting image parameter of a button crashes with Cocoa Tk In-Reply-To: <1385212186.78.0.599244063108.issue19733@psf.upfronthosting.co.za> Message-ID: <1385279787.33.0.360947321754.issue19733@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: > New changeset 3912934e99ba by Serhiy Storchaka in branch '2.7': > Issue #19733: Temporary disable test_image on MacOSX. > http://hg.python.org/cpython/rev/3912934e99ba This commit introduced SyntaxError in Lib/lib-tk/test/test_tkinter/test_widgets.py ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 09:22:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 08:22:23 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <3dS49q155Fz7Lpy@mail.python.org> Roundup Robot added the comment: New changeset 30b95368d253 by Zachary Ware in branch 'default': Issue #3158: Relax new doctests a bit. http://hg.python.org/cpython/rev/30b95368d253 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 10:07:21 2013 From: report at bugs.python.org (Tobias Oberstein) Date: Sun, 24 Nov 2013 09:07:21 +0000 Subject: [issue13244] WebSocket schemes in urllib.parse In-Reply-To: <1319281663.43.0.214740119457.issue13244@psf.upfronthosting.co.za> Message-ID: <1385284041.79.0.974649240399.issue13244@psf.upfronthosting.co.za> Tobias Oberstein added the comment: FWIW, WebSocket URL parsing is still wrong on Python 2.7.6 - in fact, it's broken in multiple ways: >>> from urlparse import urlparse >>> urlparse("ws://example.com/somewhere?foo=bar#dgdg") ParseResult(scheme='ws', netloc='example.com', path='/somewhere', params='', query='foo=bar', fragment='dgdg') >>> urlparse("ws://example.com/somewhere?foo=bar%23dgdg") ParseResult(scheme='ws', netloc='example.com', path='/somewhere', params='', query='foo=bar%23dgdg', fragment='') >>> urlparse("ws://example.com/somewhere?foo#=bar") ParseResult(scheme='ws', netloc='example.com', path='/somewhere', params='', query='foo', fragment='=bar') >>> urlparse("ws://example.com/somewhere?foo%23=bar") ParseResult(scheme='ws', netloc='example.com', path='/somewhere', params='', query='foo%23=bar', fragment='') >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 11:18:21 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 10:18:21 +0000 Subject: [issue19634] test_strftime.test_y_before_1900_nonwin() fails on AIX and Solaris In-Reply-To: <1384727609.57.0.295695955819.issue19634@psf.upfronthosting.co.za> Message-ID: <1385288301.49.0.398190463305.issue19634@psf.upfronthosting.co.za> STINNER Victor added the comment: test_strftime now pass again on buildbots: OpenIndiana, Solaris, AIX. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 11:27:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 10:27:52 +0000 Subject: [issue19741] tracemalloc: tracemalloc_log_alloc() doesn't check _Py_HASHTABLE_SET() return value In-Reply-To: <1385250424.67.0.149405281139.issue19741@psf.upfronthosting.co.za> Message-ID: <1385288872.86.0.295256439568.issue19741@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 11:29:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 10:29:10 +0000 Subject: [issue19741] tracemalloc: tracemalloc_log_alloc() doesn't check _Py_HASHTABLE_SET() return value In-Reply-To: <1385250424.67.0.149405281139.issue19741@psf.upfronthosting.co.za> Message-ID: <3dS7055WWSz7LlL@mail.python.org> Roundup Robot added the comment: New changeset c189ea6b586b by Victor Stinner in branch 'default': Issue #19741: fix tracemalloc_log_alloc(), handle _Py_HASHTABLE_SET() failure http://hg.python.org/cpython/rev/c189ea6b586b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 12:02:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 11:02:48 +0000 Subject: [issue19741] tracemalloc: tracemalloc_log_alloc() doesn't check _Py_HASHTABLE_SET() return value In-Reply-To: <1385250424.67.0.149405281139.issue19741@psf.upfronthosting.co.za> Message-ID: <3dS7kw0Y5Fz7LtS@mail.python.org> Roundup Robot added the comment: New changeset d8de3f4c7662 by Victor Stinner in branch 'default': Issue #19741: tracemalloc: report tracemalloc_log_alloc() failure to the caller http://hg.python.org/cpython/rev/d8de3f4c7662 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 12:08:01 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 Nov 2013 11:08:01 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385291281.01.0.00607544283705.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Picking this up again; a better patch is on the way. ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 12:28:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 11:28:31 +0000 Subject: [issue19741] tracemalloc: tracemalloc_log_alloc() doesn't check _Py_HASHTABLE_SET() return value In-Reply-To: <1385250424.67.0.149405281139.issue19741@psf.upfronthosting.co.za> Message-ID: <3dS8JZ2W8SzS9B@mail.python.org> Roundup Robot added the comment: New changeset dadb5ed301c7 by Victor Stinner in branch 'default': Issue #19741: cleanup tracemalloc_realloc() http://hg.python.org/cpython/rev/dadb5ed301c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 12:30:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 11:30:16 +0000 Subject: [issue19741] tracemalloc: tracemalloc_log_alloc() doesn't check _Py_HASHTABLE_SET() return value In-Reply-To: <1385250424.67.0.149405281139.issue19741@psf.upfronthosting.co.za> Message-ID: <1385292616.31.0.989765577247.issue19741@psf.upfronthosting.co.za> STINNER Victor added the comment: tracemalloc_log_alloc() failures are now handled for new allocations, but not on resize. A failure on resize is very unlikely before tracemalloc_log_free() was just called and so released exactly the requested size. I leave the issue open just in case I find a way to handle the last case :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 12:44:46 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 Nov 2013 11:44:46 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385293486.48.0.357587596722.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch. I've also taken the opportunity to increase MAX_ABS_EXP, which fixes the following long-standing bug (not that anyone has noticed it in the last 4 years, apparently): >>> s = '0.' + '0'*19999 + '1e+20000' >>> float(s) # should be 1.0 0.1 (The new limit on the number of digits means that the clipping of the exponent can no longer result in incorrect results from strtod.) Unlike the previous patch, I'm reasonably confident in this one. :-) I'll plan to apply it soon, though it probably won't make 3.4 beta 1. ---------- Added file: http://bugs.python.org/file32817/limit_dtoa_string_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 12:51:28 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 Nov 2013 11:51:28 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385293887.98.0.676845348842.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Tweak: make MAX_DIGITS unsigned to avoid compiler complaints about comparing signed with unsigned. ---------- Added file: http://bugs.python.org/file32818/limit_dtoa_string_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:27:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:27:56 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1385293887.98.0.676845348842.issue19638@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Could you add a test with more than more MAX_DIGITS (and maybe another one with more than MAX_ABS_EXP) using @bigmemtest()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:32:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:32:54 +0000 Subject: [issue19612] test_subprocess: sporadic failure of test_communicate_epipe() on Windows 8 In-Reply-To: <1384532999.66.0.279652262495.issue19612@psf.upfronthosting.co.za> Message-ID: <1385296374.12.0.0537885249352.issue19612@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_subprocess: sporadic failure of test_communicate_epipe() -> test_subprocess: sporadic failure of test_communicate_epipe() on Windows 8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:33:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:33:24 +0000 Subject: [issue19612] test_subprocess: sporadic failure of test_communicate_epipe() on Windows 8 In-Reply-To: <1384532999.66.0.279652262495.issue19612@psf.upfronthosting.co.za> Message-ID: <1385296404.1.0.494049958742.issue19612@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +gvanrossum, neologix, pitrou, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:36:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:36:24 +0000 Subject: [issue19748] test_time failures on AIX Message-ID: <1385296584.36.0.0978202241603.issue19748@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/1138/steps/test/logs/stdio ====================================================================== ERROR: test_mktime (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_time.py", line 348, in test_mktime self.assertEqual(time.mktime(tt), t) OverflowError: mktime argument out of range ====================================================================== FAIL: test_ctime (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_time.py", line 233, in test_ctime self.assertEqual(time.ctime(testval)[20:], str(year)) AssertionError: '1941' != '-100' - 1941 + -100 ---------- messages: 204201 nosy: David.Edelsohn, haypo priority: normal severity: normal status: open title: test_time failures on AIX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:40:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:40:30 +0000 Subject: [issue19749] test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' Message-ID: <1385296830.18.0.279935527114.issue19749@psf.upfronthosting.co.za> New submission from STINNER Victor: os.open(path, os.O_RDONLY | os.O_NOFOLLOW) fails on AIX: https://github.com/pypa/pip/blob/develop/pip/locations.py#L70 http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/1138/steps/test/logs/stdio [120/387/3] test_venv test_defaults (test.test_venv.BasicTest) ... ok test_executable (test.test_venv.BasicTest) ... ok test_executable_symlinks (test.test_venv.BasicTest) ... ok test_isolation (test.test_venv.BasicTest) ... ok test_overwrite_existing (test.test_venv.BasicTest) ... ok test_prefixes (test.test_venv.BasicTest) ... ok test_symlinking (test.test_venv.BasicTest) ... ok test_unoverwritable_fails (test.test_venv.BasicTest) ... ok test_upgrade (test.test_venv.BasicTest) ... ok test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok test_with_pip (test.test_venv.EnsurePipTest) ... FAIL ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py", line 299, in test_with_pip self.run_with_capture(venv.create, self.env_dir, with_pip=True) subprocess.CalledProcessError: Command '['/tmp/tmpu7qsi1xa/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_venv.py", line 305, in test_with_pip self.fail(msg) AssertionError: Command '['/tmp/tmpu7qsi1xa/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 **Subprocess Output** Traceback (most recent call last): File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/locations.py", line 65, in _get_build_prefix FileExistsError: [Errno 17] File exists: '/tmp/pip_build_shager' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ensurepip/__main__.py", line 66, in main() File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ensurepip/__main__.py", line 61, in main default_pip=args.default_pip, File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ensurepip/__init__.py", line 92, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/ensurepip/__init__.py", line 28, in _run_pip import pip File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/__init__.py", line 10, in File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/util.py", line 15, in File "", line 2147, in _find_and_load File "", line 2136, in _find_and_load_unlocked File "", line 1178, in _load_unlocked File "", line 1140, in _load_backward_compatible File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/locations.py", line 91, in File "/tmp/tmpch6gt1sg/pip-1.5.rc1-py2.py3-none-any.whl/pip/locations.py", line 70, in _get_build_prefix AttributeError: 'module' object has no attribute 'O_NOFOLLOW' ---------- messages: 204202 nosy: David.Edelsohn, haypo, ncoghlan priority: normal severity: normal status: open title: test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:42:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:42:31 +0000 Subject: [issue19750] test_asyncio.test_unix_events constructor failures on AIX Message-ID: <1385296950.99.0.982628682855.issue19750@psf.upfronthosting.co.za> New submission from STINNER Victor: buildbot.python.org/all/builders/PPC64 AIX 3.x/builds/1138/steps/test/logs/stdio ====================================================================== FAIL: test_ctor (test.test_asyncio.test_unix_events.UnixWritePipeTransportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/test_unix_events.py", line 389, in test_ctor self.loop.assert_reader(5, tr._read_ready) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/test_utils.py", line 217, in assert_reader assert fd in self.readers, 'fd {} is not registered'.format(fd) AssertionError: fd 5 is not registered ====================================================================== FAIL: test_ctor_with_waiter (test.test_asyncio.test_unix_events.UnixWritePipeTransportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_asyncio/test_unix_events.py", line 397, in test_ctor_with_waiter self.loop.assert_reader(5, tr._read_ready) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/asyncio/test_utils.py", line 217, in assert_reader assert fd in self.readers, 'fd {} is not registered'.format(fd) AssertionError: fd 5 is not registered ---------- messages: 204203 nosy: David.Edelsohn, gvanrossum, haypo priority: normal severity: normal status: open title: test_asyncio.test_unix_events constructor failures on AIX versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:45:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:45:07 +0000 Subject: [issue19748] test_time failures on AIX In-Reply-To: <1385296584.36.0.0978202241603.issue19748@psf.upfronthosting.co.za> Message-ID: <1385297107.43.0.0185408718121.issue19748@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I missed also this one: ====================================================================== FAIL: test_mktime_error (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_time.py", line 365, in test_mktime_error self.assertEqual(time.strftime('%Z', tt), tzname) AssertionError: 'LMT' != 'PST' - LMT + PST ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:46:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:46:27 +0000 Subject: [issue19751] test_sys: sys.hash_info.algorithm failure on SPARC Solaris buildbot Message-ID: <1385297187.74.0.693847111414.issue19751@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/SPARC%20Solaris%2010%20%28cc%2C%2032b%29%20%5BSB%5D%203.x/builds/1574/steps/test/logs/stdio ====================================================================== FAIL: test_attributes (test.test_sys.SysModuleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/3.x.snakebite-sol10-sparc-cc-32/build/Lib/test/test_sys.py", line 462, in test_attributes self.assertEqual(sys.hash_info.algorithm, "fnv") AssertionError: 'siphash24' != 'fnv' - siphash24 + fnv ---------- messages: 204205 nosy: christian.heimes, haypo priority: normal severity: normal status: open title: test_sys: sys.hash_info.algorithm failure on SPARC Solaris buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:46:46 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 Nov 2013 12:46:46 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385297206.92.0.832340396528.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Done. I've tested this locally by reducing the limits and the sizes; can someone with access to a beefy machine can verify that the new test passes on that machine? ---------- Added file: http://bugs.python.org/file32819/limit_dtoa_string_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:48:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:48:55 +0000 Subject: [issue19752] test_os failure on Solaris 10 Message-ID: <1385297335.29.0.992027389374.issue19752@psf.upfronthosting.co.za> New submission from STINNER Victor: It looks like a regression was introduced in Python 3.4 (the test pass on Python 3.3). It may be related to the PEP 446 (non inheritable file descriptors). http://buildbot.python.org/all/builders/SPARC Solaris 10 (cc%2C 32b) [SB] 3.x/builds/1574/steps/test/logs/stdio ====================================================================== ERROR: test (test.test_openpty.OpenptyTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/3.x.snakebite-sol10-sparc-cc-32/build/Lib/test/test_openpty.py", line 12, in test master, slave = os.openpty() PermissionError: [Errno 13] Permission denied ---------- messages: 204207 nosy: haypo priority: normal severity: normal status: open title: test_os failure on Solaris 10 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:49:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:49:46 +0000 Subject: [issue19752] os.openpty() failure on Solaris 10: PermissionError: [Errno 13] Permission denied In-Reply-To: <1385297335.29.0.992027389374.issue19752@psf.upfronthosting.co.za> Message-ID: <1385297386.44.0.65898113412.issue19752@psf.upfronthosting.co.za> STINNER Victor added the comment: And also: ====================================================================== ERROR: test_openpty (test.test_os.FDInheritanceTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/cc-32/3.x.snakebite-sol10-sparc-cc-32/build/Lib/test/test_os.py", line 2455, in test_openpty master_fd, slave_fd = os.openpty() PermissionError: [Errno 13] Permission denied ---------- title: test_os failure on Solaris 10 -> os.openpty() failure on Solaris 10: PermissionError: [Errno 13] Permission denied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:51:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 12:51:38 +0000 Subject: [issue19753] test_gdb failure on SystemZ buildbot Message-ID: <1385297498.35.0.580960849051.issue19753@psf.upfronthosting.co.za> New submission from STINNER Victor: test_gdb should ignore the following gdb warning. http://buildbot.python.org/all/builders/System%20Z%20Linux%203.x/builds/806/steps/test/logs/stdio ====================================================================== FAIL: test_NULL_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with NULL ob_type is handled gracefully ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/dje/cpython-buildarea/3.x.edelsohn-zlinux-z/build/Lib/test/test_gdb.py", line 440, in test_NULL_ob_type 'set v->ob_type=0') File "/home/dje/cpython-buildarea/3.x.edelsohn-zlinux-z/build/Lib/test/test_gdb.py", line 411, in assertSane cmds_after_breakpoint=cmds_after_breakpoint) File "/home/dje/cpython-buildarea/3.x.edelsohn-zlinux-z/build/Lib/test/test_gdb.py", line 196, in get_gdb_repr import_site=import_site) File "/home/dje/cpython-buildarea/3.x.edelsohn-zlinux-z/build/Lib/test/test_gdb.py", line 179, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ['Missing separate debuginfo for /lib/ld64[801 chars]a1"'] != [] First list contains 12 additional elements. First extra element 0: Missing separate debuginfo for /lib/ld64.so.1 Diff is 925 characters long. Set self.maxDiff to None to see it. ---------- messages: 204209 nosy: dmalcolm, haypo priority: normal severity: normal status: open title: test_gdb failure on SystemZ buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:53:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 12:53:05 +0000 Subject: [issue19753] test_gdb failure on SystemZ buildbot In-Reply-To: <1385297498.35.0.580960849051.issue19753@psf.upfronthosting.co.za> Message-ID: <1385297585.13.0.828703565293.issue19753@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:53:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 12:53:41 +0000 Subject: [issue19749] test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' In-Reply-To: <1385296830.18.0.279935527114.issue19749@psf.upfronthosting.co.za> Message-ID: <1385297621.52.0.860750633921.issue19749@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks like a bug in PIP more than in Python. ---------- nosy: +dstufft, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 13:59:04 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 24 Nov 2013 12:59:04 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385297944.61.0.446203090825.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: And now with the @bigmemtest fixed to take a second parameter (thanks, Larry!). ---------- Added file: http://bugs.python.org/file32820/limit_dtoa_string_v5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 14:23:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 13:23:46 +0000 Subject: [issue19749] test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' In-Reply-To: <1385297621.52.0.860750633921.issue19749@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Yeah, I suspect this is an AIX platform compatibility issue in pip - I believe our buildbots cover a broader range of platforms than pip's own automated testing. Since it's a nominally unstable buildbot and likely an upstream pip issue, I planned to investigate further after the beta release. I've also been considering writing up a procedural PEP (separate from PEP 453) to cover the ongoing maintenance process for the bundled pip, and one change I'm considering suggesting is that we may want to always upgrade to the pip release candidates so the full buildbot fleet gets a shot at them *before* the final upstream release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 14:29:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 13:29:04 +0000 Subject: [issue19754] pickletools.optimize doesn't reframe correctly Message-ID: <1385299744.51.0.958781846562.issue19754@psf.upfronthosting.co.za> New submission from Antoine Pitrou: pickletools.optimize() can output arbitrarily large frames (much larger than then 64 KB heuristic). This may be annoying for memory use when pickling -- on the other hand if you keep the whole pickle in memory for optimize() perhaps it's not a problem keeping it in memory for load() :-) $ ./python -c "import pickle, pickletools; d = pickle.dumps(list(range(100000)), 4); pickletools.dis(d)" | head 0: \x80 PROTO 4 2: \x95 FRAME 65537 11: ] EMPTY_LIST 12: \x94 MEMOIZE 13: ( MARK 14: K BININT1 0 16: K BININT1 1 18: K BININT1 2 20: K BININT1 3 22: K BININT1 4 $ ./python -c "import pickle, pickletools; d = pickle.dumps(list(range(100000)), 4); pickletools.dis(pickletools.optimize(d))" | head 0: \x80 PROTO 4 2: \x95 FRAME 368875 11: ] EMPTY_LIST 12: \x94 MEMOIZE 13: ( MARK 14: K BININT1 0 16: K BININT1 1 18: K BININT1 2 20: K BININT1 3 22: K BININT1 4 ---------- messages: 204213 nosy: alexandre.vassalotti, pitrou, tim.peters priority: low severity: normal status: open title: pickletools.optimize doesn't reframe correctly type: resource usage versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 14:40:32 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 24 Nov 2013 13:40:32 +0000 Subject: [issue19749] test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' In-Reply-To: <1385296830.18.0.279935527114.issue19749@psf.upfronthosting.co.za> Message-ID: <1385300432.92.0.296606688414.issue19749@psf.upfronthosting.co.za> Christian Heimes added the comment: https://github.com/pypa/pip/issues/849 https://github.com/pypa/pip/pull/935 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 14:48:58 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Nov 2013 13:48:58 +0000 Subject: [issue19749] test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' In-Reply-To: <1385296830.18.0.279935527114.issue19749@psf.upfronthosting.co.za> Message-ID: <1385300938.41.0.627729759768.issue19749@psf.upfronthosting.co.za> Nick Coghlan added the comment: Bumping for Larry's attention - I don't think this is major enough to block beta 1, but that's his call as RM. ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 14:49:26 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 24 Nov 2013 13:49:26 +0000 Subject: [issue19736] posixmodule.c: Add flags for statvfs.f_flag to constant list In-Reply-To: <1385222125.46.0.688361383331.issue19736@psf.upfronthosting.co.za> Message-ID: <1385300966.73.0.935682781418.issue19736@psf.upfronthosting.co.za> Matthias Klose added the comment: updated patch inlcluding the docs ---------- Added file: http://bugs.python.org/file32821/statvfs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 14:56:07 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 24 Nov 2013 13:56:07 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385301367.58.0.168742008452.issue19740@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Could you try this patch? ---------- keywords: +patch Added file: http://bugs.python.org/file32822/wait-for-handle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 14:58:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 13:58:24 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <3dSCdX0297z7Lkq@mail.python.org> Roundup Robot added the comment: New changeset 7a14cde3c4df by Antoine Pitrou in branch 'default': Issue #19743: fix test_gdb on some optimized Python builds http://hg.python.org/cpython/rev/7a14cde3c4df ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 14:59:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 13:59:56 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385301596.45.0.375914113979.issue19743@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 15:01:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 14:01:48 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <3dSCjS0s51z7Lkq@mail.python.org> Roundup Robot added the comment: New changeset e42b449f73fd by Antoine Pitrou in branch '3.3': Issue #19743: fix test_gdb on some optimized Python builds http://hg.python.org/cpython/rev/e42b449f73fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 15:03:54 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 14:03:54 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385301834.81.0.68865442956.issue19743@psf.upfronthosting.co.za> Larry Hastings added the comment: Here's what I've figured out. If I build trunk then run: % gdb --batch -iex "add-auto-load-safe-path /home/larry/src/python/buildtrunk/python-gdb.py" --eval-command="set breakpoint pending yes" --eval-command="break builtin_id" --eval-command=run --eval-command=backtrace --args /home/larry/src/python/buildtrunk/python -S -c "id([0, 1, 2, 3, 4])" I see UnicodeDecodeErrors spat out in the middle of the traceback: #0 builtin_id (self=, v=[0, 1, 2, 3, 4]) at Python/bltinmodule .c:991 #1 0x00000000004d8695 in call_function (oparg=, pp_stack=0x7fffffffdc00) at Pyth on/ceval.c:4212 #2 PyEval_EvalFrameEx (f=f at entry=Frame 0x7ffff7f3e788, for file , line 1, in ( ), throwflag=throwflag at entry=0) at Python/ceval.c:2826 Python Exception 'utf-8' codec can't decode byte 0x80 in position 0 : invalid start byte: Python Exception 'utf-8' codec can't decode byte 0x80 in position $: invalid start byte: #3 0x00000000004d9809 in PyEval_EvalCodeEx (closure=0x0, [...] If I run the same sequence of commands manually (remove the --batch and the batched commands from the gdb command-line, then type them in myself) I still see the decode error. If I then set a breakpoint on PyUnicodeDecodeError_Create() and run backtrace again, it still prints the decode errors, but it doesn't stop on the breakpoint. (I guess this would be like getting to the assault on the ski chalet in Inception?) Most worrisome of all: if I change the Makefile from -O3 to -O0, the decode errors go away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 15:05:08 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 14:05:08 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385301908.1.0.593078304986.issue19743@psf.upfronthosting.co.za> Larry Hastings added the comment: Sorry, both exceptions in the output of the traceback are: Python Exception 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 15:08:59 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 14:08:59 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385302139.67.0.744225721465.issue19743@psf.upfronthosting.co.za> Larry Hastings added the comment: Antoine: your checked-in workaround makes the test pass. But I'm leaving this open because I'm still hoping David will take a look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 15:09:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 14:09:17 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385302157.26.0.496934978838.issue19743@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 15:24:58 2013 From: report at bugs.python.org (David Edelsohn) Date: Sun, 24 Nov 2013 14:24:58 +0000 Subject: [issue19753] test_gdb failure on SystemZ buildbot In-Reply-To: <1385297498.35.0.580960849051.issue19753@psf.upfronthosting.co.za> Message-ID: <1385303098.54.0.0872818744627.issue19753@psf.upfronthosting.co.za> David Edelsohn added the comment: I have installed debuginfo on the system, but it is not being recognized. I have been inquiring with SuSE zLinux to understand how to resolve this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 16:19:18 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 24 Nov 2013 15:19:18 +0000 Subject: [issue15759] "make suspicious" doesn't display instructions in case of failure In-Reply-To: <1345613663.78.0.519613331574.issue15759@psf.upfronthosting.co.za> Message-ID: <1385306358.86.0.672086684449.issue15759@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy stage: commit review -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 16:36:29 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 24 Nov 2013 15:36:29 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1385307389.85.0.104962305287.issue19557@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 16:39:47 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 24 Nov 2013 15:39:47 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385307587.31.0.182434630964.issue19655@psf.upfronthosting.co.za> Brett Cannon added the comment: All code going into Python should be idiomatic unless it's meant to be released externally and there are backwards-compatibility concerns. It's Eli's call as to whether he wants to maintain a PyPI project for this after integration. Points 2-4 are off-topic for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:02:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 16:02:14 +0000 Subject: [issue19545] time.strptime exception context In-Reply-To: <1384103025.17.0.0483523701082.issue19545@psf.upfronthosting.co.za> Message-ID: <1385308934.38.0.496885936589.issue19545@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- stage: -> commit review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:16:31 2013 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 24 Nov 2013 16:16:31 +0000 Subject: [issue19755] PEP 397 listed as accepted instead of finished. Message-ID: <1385309791.24.0.404517317536.issue19755@psf.upfronthosting.co.za> New submission from Mark Lawrence: On the PEP index 397 is listed under the section "Accepted PEPs (accepted; may not be implemented yet)". I believe it should be moved to Finished PEPs (done, implemented in code repository). ---------- messages: 204227 nosy: BreamoreBoy priority: normal severity: normal status: open title: PEP 397 listed as accepted instead of finished. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:17:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 16:17:44 +0000 Subject: [issue19545] time.strptime exception context In-Reply-To: <1384103025.17.0.0483523701082.issue19545@psf.upfronthosting.co.za> Message-ID: <3dSGkH4z83z7Lln@mail.python.org> Roundup Robot added the comment: New changeset ce1578f4d105 by Serhiy Storchaka in branch '3.3': Issue #19545: Avoid chained exceptions while passing stray % to http://hg.python.org/cpython/rev/ce1578f4d105 New changeset 2bf4741515a7 by Serhiy Storchaka in branch 'default': Issue #19545: Avoid chained exceptions while passing stray % to http://hg.python.org/cpython/rev/2bf4741515a7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:19:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 16:19:48 +0000 Subject: [issue19545] time.strptime exception context In-Reply-To: <1384103025.17.0.0483523701082.issue19545@psf.upfronthosting.co.za> Message-ID: <1385309988.13.0.424810361099.issue19545@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:27:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 16:27:03 +0000 Subject: [issue19733] Setting image parameter of a button crashes with Cocoa Tk In-Reply-To: <1385212186.78.0.599244063108.issue19733@psf.upfronthosting.co.za> Message-ID: <1385310423.42.0.475990897571.issue19733@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh-oh. Thank you Arfrever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:27:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 16:27:33 +0000 Subject: [issue19733] Setting image parameter of a button crashes with Cocoa Tk In-Reply-To: <1385212186.78.0.599244063108.issue19733@psf.upfronthosting.co.za> Message-ID: <3dSGxc3NN9z7LtM@mail.python.org> Roundup Robot added the comment: New changeset 77e3e395f446 by Serhiy Storchaka in branch '2.7': Fixed merging error in changeset 3912934e99ba (issue #19733). http://hg.python.org/cpython/rev/77e3e395f446 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:32:03 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 16:32:03 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385310723.94.0.0469608645148.issue19740@psf.upfronthosting.co.za> Tim Peters added the comment: @sbt, success! With the patch, test_asyncio passed 10 times in a row on my box. Ship it :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:32:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 16:32:12 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1385310732.64.0.60539662305.issue13477@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > changeset: 87476:a539c85aec51 > user: Antoine Pitrou > date: Sun Nov 24 01:55:05 2013 +0100 > summary: > Try to fix test_tarfile under Windows Thank you Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:34:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 16:34:28 +0000 Subject: [issue19755] PEP 397 listed as accepted instead of finished. In-Reply-To: <1385309791.24.0.404517317536.issue19755@psf.upfronthosting.co.za> Message-ID: <3dSH5c0QSvz7Lln@mail.python.org> Roundup Robot added the comment: New changeset fa10b8c5bb00 by Barry Warsaw in branch 'default': PEP 397 is marked Final. (Closes issue19755). http://hg.python.org/peps/rev/fa10b8c5bb00 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 17:39:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 16:39:15 +0000 Subject: [issue19754] pickletools.optimize doesn't reframe correctly In-Reply-To: <1385299744.51.0.958781846562.issue19754@psf.upfronthosting.co.za> Message-ID: <1385311155.78.0.527094524117.issue19754@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > on the other hand if you keep the whole pickle in memory for optimize() perhaps it's not a problem keeping it in memory for load() :-) This is not always true. You run optimize() on one computer or environment and load() on other. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:05:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 17:05:47 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> Message-ID: <1385312747.94.0.429164978263.issue19629@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that using shutil.rmtree() means there are sporadic test_pathlib failures under Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/3436/steps/test/logs/stdio ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:21:37 2013 From: report at bugs.python.org (Tim Peters) Date: Sun, 24 Nov 2013 17:21:37 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385313697.28.0.579956153829.issue19740@psf.upfronthosting.co.za> Tim Peters added the comment: Possibly related: the successful test runs occurred running test_asyncio in isolation on a quiet machine. Then I fired off a full run of the test suite and used the machine for other things too. Then it failed: [ 23/387] test_asyncio ... various unclosed socket warnings ... test test_asyncio failed -- Traceback (most recent call last): File "C:\Code\Python\lib\test\test_asyncio\test_events.py", line 323, in test_reader_callback self.assertEqual(b''.join(bytes_read), b'abcdef') AssertionError: b'' != b'abcdef' ... 343 tests OK. 1 test failed: test_asyncio Unfortunately, this time it's hard to provoke :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:35:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 17:35:14 +0000 Subject: [issue19748] test_time failures on AIX In-Reply-To: <1385296584.36.0.0978202241603.issue19748@psf.upfronthosting.co.za> Message-ID: <1385314514.72.0.208657341333.issue19748@psf.upfronthosting.co.za> STINNER Victor added the comment: @David: Can you try to check what the minimum accepted timestamp for the time module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:37:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 17:37:27 +0000 Subject: [issue19749] test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' In-Reply-To: <1385296830.18.0.279935527114.issue19749@psf.upfronthosting.co.za> Message-ID: <1385314647.22.0.214567257094.issue19749@psf.upfronthosting.co.za> STINNER Victor added the comment: > Looks like a bug in PIP more than in Python. Correct, but it does impact Python buildbots. I would like to have one issue per buildbot failure. Can someone report the bug upstream please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:38:39 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 24 Nov 2013 17:38:39 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385314719.19.0.325473408274.issue19655@psf.upfronthosting.co.za> Eli Bendersky added the comment: Does anyone have comments on the code or can I prepare a patch for default? Would it make sense to wait with this until the 3.4 branch is created or can I just commit to default? Note that this change is not a new feature and is essentially a no-op as far as the resulting CPython executable - it's just tweaking the build process to generate the same data in a different way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:41:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 17:41:59 +0000 Subject: [issue19750] test_asyncio.test_unix_events constructor failures on AIX In-Reply-To: <1385296950.99.0.982628682855.issue19750@psf.upfronthosting.co.za> Message-ID: <1385314919.08.0.918719713255.issue19750@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, this failure is probably related to this comment in unix_events.py: # On AIX, the reader trick only works for sockets. # On other platforms it works for pipes and sockets. # (Exception: OS X 10.4? Issue #19294.) if is_socket or not sys.platform.startswith("aix"): self._loop.add_reader(self._fileno, self._read_ready) UnixWritePipeTransportTests should use a real socket, or the 2 tests should be skipped on AIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:42:26 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 24 Nov 2013 17:42:26 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <1385195580.05.0.00984042109495.issue19732@psf.upfronthosting.co.za> Message-ID: <1385314946.57.0.111546870385.issue19732@psf.upfronthosting.co.za> Stefan Krah added the comment: Development of libmpdec has effectively happened on hg.python.org since I included _decimal. That's also one of the reasons why there isn't any public VCS. The mailing list isn't archived because I'm using ezmlm and ezmlm's retrieval system caused excessive backscatter of mail (IIRC). There is also no bug-tracker for the simple reason that no libmpdec bugs have been reported either here or on bytereef.org. _decimal should only be built against the upcoming mpdecimal-2.4. I'm going to name the shared library libmpdec.so.2, which will only receive bugfixes, since the spec isn't going to change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:44:25 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 24 Nov 2013 17:44:25 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <1385314946.57.0.111546870385.issue19732@psf.upfronthosting.co.za> Message-ID: <52923AF4.6040104@debian.org> Matthias Klose added the comment: Am 24.11.2013 18:42, schrieb Stefan Krah: > _decimal should only be built against the upcoming mpdecimal-2.4. is there a schedule for this version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:51:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 17:51:55 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <3dSJpy14qfz7LkN@mail.python.org> Roundup Robot added the comment: New changeset d71db7fe4872 by Richard Oudkerk in branch 'default': Issue #19740: Use WaitForSingleObject() instead of trusting TimerOrWaitFired. http://hg.python.org/cpython/rev/d71db7fe4872 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:52:34 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 17:52:34 +0000 Subject: [issue19751] test_sys: sys.hash_info.algorithm failure on SPARC Solaris buildbot In-Reply-To: <1385297187.74.0.693847111414.issue19751@psf.upfronthosting.co.za> Message-ID: <1385315554.11.0.395832571469.issue19751@psf.upfronthosting.co.za> STINNER Victor added the comment: Extract of configure output on SPARC buildbot: > checking aligned memory access is required... no Here is a patch for test_sys. Checking the processor type is not reliable, the test should not be so strict. ---------- keywords: +patch Added file: http://bugs.python.org/file32823/test_sys_hashinfo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:56:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 17:56:55 +0000 Subject: [issue19753] test_gdb failure on SystemZ buildbot In-Reply-To: <1385297498.35.0.580960849051.issue19753@psf.upfronthosting.co.za> Message-ID: <3dSJwj3Rmgz7LkN@mail.python.org> Roundup Robot added the comment: New changeset 6e5eab3add6c by Victor Stinner in branch 'default': Issue #19753: Try to fix test_gdb on SystemZ buildbot http://hg.python.org/cpython/rev/6e5eab3add6c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 18:56:55 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 24 Nov 2013 17:56:55 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385315815.13.0.20473275401.issue19740@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Possibly related: ... That looks unrelated since it does not involve wait_for_handle(). Unfortunately test_utils.run_briefly() offers few guarantees when using the IOCP event loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:07:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 18:07:31 +0000 Subject: [issue19756] test_nntplib: sporadic failures, network isses? server down? Message-ID: <1385316451.32.0.948186129781.issue19756@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/692/steps/test/logs/stdio ====================================================================== ERROR: test_capabilities (test.test_nntplib.NetworkedNNTP_SSLTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_nntplib.py", line 251, in wrapped meth(self) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_nntplib.py", line 201, in test_capabilities resp, caps = self.server.capabilities() File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/nntplib.py", line 558, in capabilities resp, lines = self._longcmdstring("CAPABILITIES") File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/nntplib.py", line 525, in _longcmdstring resp, list = self._getlongresp(file) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/nntplib.py", line 476, in _getlongresp resp = self._getresp() File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/nntplib.py", line 449, in _getresp resp = self._getline() File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/nntplib.py", line 432, in _getline line = self.file.readline(_MAXLINE +1) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/socket.py", line 368, in readinto raise OSError("cannot read from timed out object") OSError: cannot read from timed out object http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/7147/steps/test/logs/stdio ====================================================================== ERROR: setUpClass (test.test_nntplib.NetworkedNNTP_SSLTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_nntplib.py", line 298, in setUpClass cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT, usenetrc=False) File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/nntplib.py", line 1071, in __init__ readermode=readermode, timeout=timeout) File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/nntplib.py", line 334, in __init__ self.getcapabilities() File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/nntplib.py", line 390, in getcapabilities resp, caps = self.capabilities() File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/nntplib.py", line 558, in capabilities resp, lines = self._longcmdstring("CAPABILITIES") File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/nntplib.py", line 525, in _longcmdstring resp, list = self._getlongresp(file) File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/nntplib.py", line 476, in _getlongresp resp = self._getresp() File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/nntplib.py", line 449, in _getresp resp = self._getline() File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/nntplib.py", line 437, in _getline if not line: raise EOFError EOFError ---------- components: Tests keywords: buildbot messages: 204248 nosy: haypo priority: normal severity: normal status: open title: test_nntplib: sporadic failures, network isses? server down? versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:13:16 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 24 Nov 2013 18:13:16 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385316796.49.0.50977197275.issue19673@psf.upfronthosting.co.za> Eli Bendersky added the comment: Antoine, am I missing something - I don't see documentation for the construction of Path/PurePath? ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:19:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 18:19:40 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1385316796.49.0.50977197275.issue19673@psf.upfronthosting.co.za> Message-ID: <1385317177.2303.0.camel@fsol> Antoine Pitrou added the comment: > Antoine, am I missing something - I don't see documentation for the construction of Path/PurePath? It's there: http://docs.python.org/dev/library/pathlib.html#pathlib.PurePath ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:21:36 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 24 Nov 2013 18:21:36 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385317296.79.0.231509968511.issue19673@psf.upfronthosting.co.za> Eli Bendersky added the comment: Yes, I've seen that. What I mean is that there's no clear signature defined with each argument explained, as the other stdlib documentation usually does. Section 11.1.2.1 uses a more descriptive approach, while I was also expecting a formal specification. I can propose a patch to improve this, if you don't object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:23:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 18:23:28 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385317408.87.0.548367314876.issue19673@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, it depends how much "formal" :-) The text does say: """Path constructors accept an arbitrary number of positional arguments. When called without any argument, a path object points to the current directory [etc.]""" I'm not against a more formal description, but besides saying "*args", I'm not sure what it would bring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:23:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 18:23:52 +0000 Subject: [issue19636] Fix usage of MAX_PATH in posixmodule.c In-Reply-To: <1384731950.1.0.229673291292.issue19636@psf.upfronthosting.co.za> Message-ID: <3dSKWq0mCMz7LjM@mail.python.org> Roundup Robot added the comment: New changeset b3eb42a657a3 by Victor Stinner in branch 'default': Issue #19636: Fix posix__getvolumepathname(), raise an OverflowError if http://hg.python.org/cpython/rev/b3eb42a657a3 New changeset 46aecfc5e374 by Victor Stinner in branch 'default': Issue #19636: Fix usage of MAX_PATH in posixmodule.c http://hg.python.org/cpython/rev/46aecfc5e374 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:26:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Nov 2013 18:26:57 +0000 Subject: [issue19757] _tracemalloc.c: compiler warning with gil_state Message-ID: <1385317617.76.0.570657043672.issue19757@psf.upfronthosting.co.za> New submission from STINNER Victor: Clang complains that gil_state might be used uninitialized in _tracemalloc.c:488 and 533. ---------- messages: 204254 nosy: christian.heimes, haypo priority: normal severity: normal status: open title: _tracemalloc.c: compiler warning with gil_state versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:28:54 2013 From: report at bugs.python.org (koobs) Date: Sun, 24 Nov 2013 18:28:54 +0000 Subject: [issue19757] _tracemalloc.c: compiler warning with gil_state In-Reply-To: <1385317617.76.0.570657043672.issue19757@psf.upfronthosting.co.za> Message-ID: <1385317734.51.0.719944799516.issue19757@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:39:42 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 24 Nov 2013 18:39:42 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385318382.17.0.335860847496.issue19673@psf.upfronthosting.co.za> Eli Bendersky added the comment: It's just a matter of looking for a familiar pattern while going over an unfamiliar doc page, I guess. I'll give it a try and see if it helps. Another question: What is the real purpose of pure paths? One thing I see is using them to, say, manipulate Windows paths on a Posix machine for some reason. Any others? Could this also be achieved with just having Paths? [sorry for coming long after the party ended; my motivation here is mainly curiosity - maybe by looking at it from a newbie point of view I can improve the documentation in a way that will be friendlier for people unfamiliar with the new library] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 19:55:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 18:55:57 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1385318382.17.0.335860847496.issue19673@psf.upfronthosting.co.za> Message-ID: <1385319355.2303.3.camel@fsol> Antoine Pitrou added the comment: > Another question: What is the real purpose of pure paths? One thing I > see is using them to, say, manipulate Windows paths on a Posix machine > for some reason. Yes. Also, if some reason you want to be sure you're only doing path computations, not I/O. > Any others? Could this also be achieved with just having Paths? I don't see how having just Paths would achieve this, unless you think it's sane to pretend to walk a Windows directory under Unix :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 20:01:35 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 24 Nov 2013 19:01:35 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385319695.32.0.383638755829.issue19740@psf.upfronthosting.co.za> Guido van Rossum added the comment: Agreed that that is probably unrelated. I suspect that all tests doing real I/O (stuff that goes through the OS kernel) and wait for it using run_briefly() are theoretically broken like that. It may just be harder to provoke for some tests than for others. The proper fix is to use test_utils.run_until(loop, , timeout) where is a lambda that computes whether the desired condition is reached. E.g. in this case we could use something like test_utils.run_until(self.loop, lambda: b''.join(bytes_read) == b'abcdef', 10) instead of the last five lines of the test (starting with the second run_briefly). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 20:02:35 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 24 Nov 2013 19:02:35 +0000 Subject: [issue19740] test_asyncio problems on 32-bit Windows In-Reply-To: <1385244808.7.0.933656796277.issue19740@psf.upfronthosting.co.za> Message-ID: <1385319755.19.0.432839089283.issue19740@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- components: +Tests resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 20:05:05 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 24 Nov 2013 19:05:05 +0000 Subject: [issue19751] test_sys: sys.hash_info.algorithm failure on SPARC Solaris buildbot In-Reply-To: <1385297187.74.0.693847111414.issue19751@psf.upfronthosting.co.za> Message-ID: <1385319905.12.0.391258611172.issue19751@psf.upfronthosting.co.za> Christian Heimes added the comment: I'll look into it. ---------- assignee: -> christian.heimes priority: normal -> high stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 20:18:57 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 24 Nov 2013 19:18:57 +0000 Subject: [issue19612] test_subprocess: sporadic failure of test_communicate_epipe() on Windows 8 In-Reply-To: <1384532999.66.0.279652262495.issue19612@psf.upfronthosting.co.za> Message-ID: <1385320737.24.0.209589010463.issue19612@psf.upfronthosting.co.za> Guido van Rossum added the comment: I don't know much about subprocess.py and I don't have access to Windows 8. But it looks like the kind of thing that might happen if the other end of the "pipe" is closed, which might happen if the subprocess exits early, either because it's just fast or because it's encountered some other bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 20:23:40 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 24 Nov 2013 19:23:40 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <52923AF4.6040104@debian.org> Message-ID: <20131124192339.GA28216@sleipnir.bytereef.org> Stefan Krah added the comment: I have prepared Python-3.3+ for use with libmpdec.so.2: cbd78679080b 9d07b3eb34e3 Here is a prerelease for mpdecimal: http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.4-rc1.tar.gz sha256sum: 528a61b3de5c1e553a012d083c4d909391510cc733c1a990131d312bbdf1a717 I think I've addressed all your comments you sent privately earlier. The "uname -s" in configure.ac is only used for suncc and Darwin. It should not affect cross building. I still have to update the docs and a couple of READMEs for the final release. The code in libmpdec is now the same as on hg.python.org and is highly unlikely to change. If you have time and have some final requests for the configury (config.guess, install-sh?), let me know. I prefer to run the final tests on the exact tarball that is ultimately shipped. The deal for Python-3.3 and Python-3.4 is: For compatibility with decimal.py only link against libmpdec.so.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 20:39:39 2013 From: report at bugs.python.org (James Cook) Date: Sun, 24 Nov 2013 19:39:39 +0000 Subject: [issue11571] Turtle window pops under the terminal on OSX In-Reply-To: <1300287451.35.0.164099198094.issue11571@psf.upfronthosting.co.za> Message-ID: <1385321979.94.0.405114639565.issue11571@psf.upfronthosting.co.za> James Cook added the comment: This problem still exists with the version of turtle bundled with python 3.3.3 and ActiveState ActiveTcl8.5.15.1. While it may be an issue with the underlying platform, it's unfortunate for young beginners just learning python who don't understand the underlying issue. If other parents are searching for a solution, this works: turtle.getscreen()._root.attributes('-topmost', 1) turtle.getscreen()._root.attributes('-topmost', 0) Any chance the workaround patch could be applied so I don't have to tell my kid to add this magic to his scripts? ---------- nosy: +James.Cook _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 20:54:03 2013 From: report at bugs.python.org (Stefan Krah) Date: Sun, 24 Nov 2013 19:54:03 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <1385195580.05.0.00984042109495.issue19732@psf.upfronthosting.co.za> Message-ID: <1385322843.1.0.105790057429.issue19732@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 21:01:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 20:01:10 +0000 Subject: [issue19756] test_nntplib: sporadic failures, network isses? server down? In-Reply-To: <1385316451.32.0.948186129781.issue19756@psf.upfronthosting.co.za> Message-ID: <1385323270.35.0.302580856535.issue19756@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The third-party server isn't extremely reliable indeed. Ideally, we would run our own NNTP server, but that's a lot more work. ---------- nosy: +pitrou versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 21:27:08 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 24 Nov 2013 20:27:08 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <1385195580.05.0.00984042109495.issue19732@psf.upfronthosting.co.za> Message-ID: <1385324828.57.0.175042877818.issue19732@psf.upfronthosting.co.za> Matthias Klose added the comment: 2.4~rc1: - configure.ac should call AC_CANONICAL_HOST, config,guess and config.sub should be included. - there are still symbols which exists only for 32/64 bit archs. intended? (arch=@64@)mpd_qsset_i64 at Base 2.3 (arch=@64@)mpd_qsset_u64 at Base 2.3 (arch=@64@)mpd_sset_i64 at Base 2.3 (arch=@64@)mpd_sset_u64 at Base 2.3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 21:29:02 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 24 Nov 2013 20:29:02 +0000 Subject: [issue19750] test_asyncio.test_unix_events constructor failures on AIX In-Reply-To: <1385296950.99.0.982628682855.issue19750@psf.upfronthosting.co.za> Message-ID: <1385324942.69.0.955703921004.issue19750@psf.upfronthosting.co.za> Guido van Rossum added the comment: Can you try this patch? diff -r 14cbf01b1929 tests/test_unix_events.py --- a/tests/test_unix_events.py Sun Nov 24 11:04:44 2013 -0800 +++ b/tests/test_unix_events.py Sun Nov 24 12:28:42 2013 -0800 @@ -379,7 +379,7 @@ fstat_patcher = unittest.mock.patch('os.fstat') m_fstat = fstat_patcher.start() st = unittest.mock.Mock() - st.st_mode = stat.S_IFIFO + st.st_mode = stat.S_IFSOCK m_fstat.return_value = st self.addCleanup(fstat_patcher.stop) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 21:33:58 2013 From: report at bugs.python.org (Michael Foord) Date: Sun, 24 Nov 2013 20:33:58 +0000 Subject: [issue19746] No introspective way to detect ModuleImportFailure In-Reply-To: <1385262963.63.0.210713286499.issue19746@psf.upfronthosting.co.za> Message-ID: <1385325238.9.0.685133140388.issue19746@psf.upfronthosting.co.za> Michael Foord added the comment: Seems like a perfectly reasonable request. I've no particular preference on an api for this though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 21:51:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 24 Nov 2013 20:51:16 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385326276.38.0.587837339847.issue19655@psf.upfronthosting.co.za> Brett Cannon added the comment: It's Larry's call in the end but I personally don't care either way, especially since this isn't user-facing code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 21:55:40 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 20:55:40 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385326540.67.0.671239005192.issue19655@psf.upfronthosting.co.za> Larry Hastings added the comment: Are the generated files *byte for byte* the same as produced by the existing parser generation process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 21:59:07 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 24 Nov 2013 20:59:07 +0000 Subject: [issue17787] Optimize pickling function dispatch in hot loops. In-Reply-To: <1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> Message-ID: <1385326747.55.0.892434663694.issue17787@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: The patch is too complicated for too little. ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 22:00:05 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 24 Nov 2013 21:00:05 +0000 Subject: [issue17747] Deprecate pickle fast mode In-Reply-To: <1366104007.06.0.988369979601.issue17747@psf.upfronthosting.co.za> Message-ID: <1385326805.19.0.427159982916.issue17747@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- resolution: -> wont fix stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 22:13:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 21:13:49 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <3dSPHw3wD8z7Ljn@mail.python.org> Roundup Robot added the comment: New changeset 694e2708b4a8 by Serhiy Storchaka in branch 'default': Issue #15204: Silence and check the 'U' mode deprecation warnings in tests. http://hg.python.org/cpython/rev/694e2708b4a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 22:14:17 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 21:14:17 +0000 Subject: [issue19758] Warnings in tests Message-ID: <1385327657.07.0.59921543232.issue19758@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following warnings emitted by test suite when run it with -Wall. [101/387] test_distutils /home/serhiy/py/cpython/Lib/distutils/sysconfig.py:578: DeprecationWarning: SO is deprecated, use EXT_SUFFIX warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning) unknown, 0: Warning: using regular magic file `/etc/magic' unknown, 0: Warning: using regular magic file `/etc/magic' [154/387] test_hmac /home/serhiy/py/cpython/Lib/test/test_hmac.py:271: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:296: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(bytearray(b"key"), bytearray(b"hash this!")) /home/serhiy/py/cpython/Lib/test/test_hmac.py:303: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"key", memoryview(b"hash this!")) /home/serhiy/py/cpython/Lib/test/test_hmac.py:290: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"key", b"hash this!") /home/serhiy/py/cpython/Lib/test/test_hmac.py:320: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:327: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"my secret key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:339: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h1 = hmac.HMAC(b"key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:361: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h1 = hmac.HMAC(b"key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:350: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h1 = hmac.HMAC(b"key") [165/387] test_importlib /home/serhiy/py/cpython/Lib/test/test_importlib/test_spec.py:58: PendingDeprecationWarning: The import system now takes care of this automatically. @frozen_util.module_for_loader [245/387] test_poplib /home/serhiy/py/cpython/Lib/test/support/__init__.py:1331: ResourceWarning: unclosed gc.collect() [319/387] test_sysconfig /home/serhiy/py/cpython/Lib/sysconfig.py:588: DeprecationWarning: SO is deprecated, use EXT_SUFFIX warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning) ---------- components: Tests messages: 204270 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Warnings in tests versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 22:15:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 21:15:30 +0000 Subject: [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1385327730.69.0.66722589286.issue15204@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 22:33:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 21:33:34 +0000 Subject: [issue19758] Warnings in tests In-Reply-To: <1385327657.07.0.59921543232.issue19758@psf.upfronthosting.co.za> Message-ID: <1385328814.66.0.883732004315.issue19758@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon, christian.heimes, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:04:51 2013 From: report at bugs.python.org (dellair jie) Date: Sun, 24 Nov 2013 22:04:51 +0000 Subject: [issue19661] AIX: Python: RuntimeError "invalid slot offset when importing a module" in _ssl module In-Reply-To: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> Message-ID: <1385330691.86.0.0520142268649.issue19661@psf.upfronthosting.co.za> dellair jie added the comment: It would be appreciated if someone could shed some lights on how to rebuild a single module (ssl) from source code package and import it to python. Thanks in advance! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:11:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 22:11:43 +0000 Subject: [issue19759] Deprecation warnings in test_hmac Message-ID: <1385331103.9.0.931908547844.issue19759@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following warnings are emitted when test_hmac ran with -Wall: $ ./python -Wall -m test.regrtest test_hmac [1/1] test_hmac /home/serhiy/py/cpython/Lib/test/test_hmac.py:271: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:296: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(bytearray(b"key"), bytearray(b"hash this!")) /home/serhiy/py/cpython/Lib/test/test_hmac.py:303: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"key", memoryview(b"hash this!")) /home/serhiy/py/cpython/Lib/test/test_hmac.py:290: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"key", b"hash this!") /home/serhiy/py/cpython/Lib/test/test_hmac.py:320: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:327: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h = hmac.HMAC(b"my secret key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:339: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h1 = hmac.HMAC(b"key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:361: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h1 = hmac.HMAC(b"key") /home/serhiy/py/cpython/Lib/test/test_hmac.py:350: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated. h1 = hmac.HMAC(b"key") 1 test OK. The proposed patch silences these warnings. ---------- components: Tests files: test_hmac_warnings.patch keywords: patch messages: 204272 nosy: christian.heimes, gregory.p.smith, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Deprecation warnings in test_hmac type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32824/test_hmac_warnings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:13:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 22:13:38 +0000 Subject: [issue19760] Deprecation warnings in ttest_sysconfig and test_distutils Message-ID: <1385331218.39.0.240436697883.issue19760@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following warnings are emitted when ttest_sysconfig and test_distutils ran with -Wall: $ ./python -Wall -m test.regrtest test_sysconfig test_distutils [1/2] test_sysconfig /home/serhiy/py/cpython/Lib/sysconfig.py:588: DeprecationWarning: SO is deprecated, use EXT_SUFFIX warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning) [2/2] test_distutils /home/serhiy/py/cpython/Lib/distutils/sysconfig.py:578: DeprecationWarning: SO is deprecated, use EXT_SUFFIX warnings.warn('SO is deprecated, use EXT_SUFFIX', DeprecationWarning) unknown, 0: Warning: using regular magic file `/etc/magic' unknown, 0: Warning: using regular magic file `/etc/magic' All 2 tests OK. The proposed patch silences deprecation warnings. It also changes warning stacklevel for the 'SO' key in sysconfig to 2 so a warning now reports about place where stdlib function is called instead a place in the stdlib. ---------- components: Library (Lib), Tests files: test_sysconfig_warnings.patch keywords: patch messages: 204273 nosy: barry, serhiy.storchaka, tarek priority: normal severity: normal stage: patch review status: open title: Deprecation warnings in ttest_sysconfig and test_distutils type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32825/test_sysconfig_warnings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:14:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 24 Nov 2013 22:14:25 +0000 Subject: [issue19758] Warnings in tests In-Reply-To: <1385327657.07.0.59921543232.issue19758@psf.upfronthosting.co.za> Message-ID: <3dSQdr4lbPz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 53ba43ed7f27 by Christian Heimes in branch 'default': Issue #19758: silence PendingDeprecationWarnings in test_hmac http://hg.python.org/cpython/rev/53ba43ed7f27 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:18:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 22:18:32 +0000 Subject: [issue19759] Deprecation warnings in test_hmac In-Reply-To: <1385331103.9.0.931908547844.issue19759@psf.upfronthosting.co.za> Message-ID: <1385331512.25.0.924396303861.issue19759@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Crys just fixed this issue in issue19758. ---------- resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:19:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 22:19:51 +0000 Subject: [issue19758] Warnings in tests In-Reply-To: <1385327657.07.0.59921543232.issue19758@psf.upfronthosting.co.za> Message-ID: <1385331591.2.0.354904471817.issue19758@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Deprecation warnings in ttest_sysconfig and test_distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:21:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 22:21:39 +0000 Subject: [issue19758] Warnings in tests In-Reply-To: <1385327657.07.0.59921543232.issue19758@psf.upfronthosting.co.za> Message-ID: <1385331699.98.0.397426954338.issue19758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fix for test_sysconfig and test_distutils are proposed in issue19760. I have no yet fixes for test_importlib and test_poplib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:38:13 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 24 Nov 2013 22:38:13 +0000 Subject: [issue19760] Deprecation warnings in ttest_sysconfig and test_distutils In-Reply-To: <1385331218.39.0.240436697883.issue19760@psf.upfronthosting.co.za> Message-ID: <1385332693.44.0.472526786585.issue19760@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: LGTM. Now that 3.4b1 is spun, I say go for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:43:49 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 24 Nov 2013 22:43:49 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1385319355.2303.3.camel@fsol> Message-ID: Eli Bendersky added the comment: > > > Antoine Pitrou added the comment: > > > Another question: What is the real purpose of pure paths? One thing I > > see is using them to, say, manipulate Windows paths on a Posix machine > > for some reason. > > Yes. Also, if some reason you want to be sure you're only doing path > computations, not I/O. > "Sure" in what sense, like accidentally? IIUC path manipulation/computation operations don't really call into the OS - only some methods do. > > Any others? Could this also be achieved with just having Paths? > > I don't see how having just Paths would achieve this, unless you think > it's sane to pretend to walk a Windows directory under Unix :-) > I mean, having Path, WindowsPath and PosixPath without the pure counterparts. You usually use Path, but say you want to manipulate Windows paths on a Linux box. So you instantiate a WindowsPath explicitly and do your thing on it. You can't (NotImplementedError) call any methods that would call into the OS, and that's it. I'm just trying to look at the module from the POV of someone who sees it for the first time, wondering "why do I have two kinds of things here, and when would I want to use each? could I just use Path 99.9% of the time and forget about the other options?". If that's true, we may want to reflect it in the documentation explicitly - I believe this will make the module easier to understand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:53:03 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 24 Nov 2013 22:53:03 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1385326540.67.0.671239005192.issue19655@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: Larry Hastings added the comment: > > Are the generated files *byte for byte* the same as produced by the > existing parser generation process? > Correct. The generator runs during the build (in the Makefile), but only if the files were out-of-date. It takes Python.asdl and produces Python-ast.h and Python-ast.c; the latter two are compiled into the CPython executable. The .h/.c files produced by my alternative generator are exactly identical to the ones in there now. I don't feel strongly about this, but I may need a refresher in the release process rules. From today and until Feb 23rd, 2014 - are we not supposed to be adding new features/PEPs or are we also not supposed to do any code refactorings and/or any changes at all unless those are directly related to fixing a specific bug/issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:54:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Nov 2013 22:54:13 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: Message-ID: <1385333650.2422.4.camel@fsol> Antoine Pitrou added the comment: > > > Another question: What is the real purpose of pure paths? One thing I > > > see is using them to, say, manipulate Windows paths on a Posix machine > > > for some reason. > > > > Yes. Also, if some reason you want to be sure you're only doing path > > computations, not I/O. > > > > "Sure" in what sense, like accidentally? IIUC path > manipulation/computation operations don't really call into the OS - > only some methods do. Yes, I was including the methods inside "computations". > I mean, having Path, WindowsPath and PosixPath without the pure > counterparts. You usually use Path, but say you want to manipulate Windows > paths on a Linux box. So you instantiate a WindowsPath explicitly and do > your thing on it. You can't (NotImplementedError) call any methods that > would call into the OS, and that's it. That would have been a possibility, but I find having distinct classes much cleaner than raising NotImplementedError in many places. It's also self-documenting about which operations are "pure" and which operations are not. > I'm just trying to look at the module from the POV of someone who sees it > for the first time, wondering "why do I have two kinds of things here, and > when would I want to use each? could I just use Path 99.9% of the time and > forget about the other options?". If that's true, we may want to reflect it > in the documentation explicitly - I believe this will make the module > easier to understand. Well, at the beginning of the doc there's: """The main point of entry is the Path class, which will instantiate a concrete path for the current platform.""", and the "basic use" section only uses the Path class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:56:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 24 Nov 2013 22:56:52 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385333812.21.0.860540318822.issue19655@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 24 23:58:50 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 24 Nov 2013 22:58:50 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385333930.59.0.566763532841.issue19655@psf.upfronthosting.co.za> Larry Hastings added the comment: The rule is, no new features. Bug and security fixes from now on. It isn't always clear whether or not something is a new "feature". In the case of such ambiguity, the decision is up to the sole discretion of the release manager. If you seriously want to check in this thing (*sigh*), I'll take a look at it. But you'll have to point me at either a patch that applies cleanly to trunk, or a repository somewhere online with the patch already applied to trunk. Something like a code refactor is probably okay during betas, but during RCs I would really prefer we keep checkins strictly to a minimum. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 00:03:22 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 24 Nov 2013 23:03:22 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1385333930.59.0.566763532841.issue19655@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Sun, Nov 24, 2013 at 2:58 PM, Larry Hastings wrote: > > Larry Hastings added the comment: > > The rule is, no new features. Bug and security fixes from now on. > > It isn't always clear whether or not something is a new "feature". In the > case of such ambiguity, the decision is up to the sole discretion of the > release manager. > > If you seriously want to check in this thing (*sigh*), I'll take a look at > it. But you'll have to point me at either a patch that applies cleanly to > trunk, or a repository somewhere online with the patch already applied to > trunk. > There really is no urgency here. I don't won't to add needless work onto your place, and am fine with just leaving it be until the 3.4 branch is cut and landing it on the default branch aimed for 3.5 after that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 00:24:45 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 24 Nov 2013 23:24:45 +0000 Subject: [issue19673] PEP 428 implementation In-Reply-To: <1384986045.13.0.536884886996.issue19673@psf.upfronthosting.co.za> Message-ID: <1385335485.04.0.840144890958.issue19673@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the clarifications, Antoine. I'll see if I can come up with a doc patch that will try to emphasize these points. I'll probably just open a new, doc-issue to stop overloading this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 01:04:00 2013 From: report at bugs.python.org (Marcus Smith) Date: Mon, 25 Nov 2013 00:04:00 +0000 Subject: [issue19749] test_venv failure on AIX: 'module' object has no attribute 'O_NOFOLLOW' In-Reply-To: <1385296830.18.0.279935527114.issue19749@psf.upfronthosting.co.za> Message-ID: <1385337840.89.0.538873740366.issue19749@psf.upfronthosting.co.za> Marcus Smith added the comment: There's a new PR to fix this in the pip 1.5.X branch: https://github.com/pypa/pip/pull/1344 ---------- nosy: +Marcus.Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 01:05:35 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 25 Nov 2013 00:05:35 +0000 Subject: [issue19761] test_tk fails on OS X with multiple test case failures with both Tk 8.5 and 8.4 Message-ID: <1385337935.63.0.262182292505.issue19761@psf.upfronthosting.co.za> New submission from Ned Deily: As of 3.4.0b1, the following test failures are observed with Tk 8.5 on OS X (python.org 64-/32- installer with ActiveTcl 8.5.15.1 on OS X 10.9): ====================================================================== FAIL: test_bitmap (tkinter.test.test_tkinter.test_widgets.ButtonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 240, in test_bitmap errmsg='bitmap "spam" not defined') File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 75, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ====================================================================== FAIL: test_bitmap (tkinter.test.test_tkinter.test_widgets.CheckbuttonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 240, in test_bitmap errmsg='bitmap "spam" not defined') File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 75, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ====================================================================== FAIL: test_insertborderwidth (tkinter.test.test_tkinter.test_widgets.EntryTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py", line 333, in test_insertborderwidth self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, -2) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 169, in checkPixelsParam conv=conv1, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 59, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 43, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 0 != 1 ====================================================================== FAIL: test_bitmap (tkinter.test.test_tkinter.test_widgets.LabelTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 240, in test_bitmap errmsg='bitmap "spam" not defined') File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 75, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ====================================================================== FAIL: test_bitmap (tkinter.test.test_tkinter.test_widgets.MenubuttonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 240, in test_bitmap errmsg='bitmap "spam" not defined') File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 75, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ====================================================================== FAIL: test_bitmap (tkinter.test.test_tkinter.test_widgets.OptionMenuTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 240, in test_bitmap errmsg='bitmap "spam" not defined') File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 75, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ====================================================================== FAIL: test_bitmap (tkinter.test.test_tkinter.test_widgets.RadiobuttonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 240, in test_bitmap errmsg='bitmap "spam" not defined') File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 75, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ====================================================================== FAIL: test_insertborderwidth (tkinter.test.test_tkinter.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py", line 333, in test_insertborderwidth self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, -2) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 169, in checkPixelsParam conv=conv1, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 59, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 43, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 0 != 1 ---------------------------------------------------------------------- The following test failures are observed with Tk 8.4 on OS X (python.org 32-only installer with ActiveTcl 8.4.20 on OS X 10.5.8): ====================================================================== FAIL: test_debug (tkinter.test.test_tkinter.test_text.TextTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/test_tkinter/test_text.py", line 22, in test_debug self.assertEqual(text.debug(), 0) AssertionError: '0' != 0 ====================================================================== FAIL: test_insertborderwidth (tkinter.test.test_tkinter.test_widgets.EntryTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py", line 333, in test_insertborderwidth self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, -2) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 169, in checkPixelsParam conv=conv1, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 59, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 43, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 0 != 1 ====================================================================== FAIL: test_insertborderwidth (tkinter.test.test_tkinter.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/test_tkinter/test_widgets.py", line 333, in test_insertborderwidth self.checkPixelsParam(widget, 'insertborderwidth', 0, 1.3, -2) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 169, in checkPixelsParam conv=conv1, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 59, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/test/widget_tests.py", line 43, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 0 != 1 ---------------------------------------------------------------------- ---------- components: Tests, Tkinter messages: 204285 nosy: ned.deily, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: test_tk fails on OS X with multiple test case failures with both Tk 8.5 and 8.4 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 01:07:10 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 25 Nov 2013 00:07:10 +0000 Subject: [issue19085] Add tkinter basic options tests In-Reply-To: <1380054632.03.0.105033569087.issue19085@psf.upfronthosting.co.za> Message-ID: <1385338030.71.0.142587273047.issue19085@psf.upfronthosting.co.za> Ned Deily added the comment: I've opened Issue19761 to document the current state of test failures for 3.4.0b1 on OS X with the native Tk 8.5 and 8.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:10:21 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:10:21 +0000 Subject: [issue19614] support.temp_cwd should use support.rmtree In-Reply-To: <1384537486.79.0.657999884373.issue19614@psf.upfronthosting.co.za> Message-ID: <1385349021.49.0.602671592765.issue19614@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:16:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 03:16:28 +0000 Subject: [issue19620] tokenize documentation contains typos (argment instead of argument) In-Reply-To: <1384569112.62.0.796047767365.issue19620@psf.upfronthosting.co.za> Message-ID: <3dSYLL4X2Fz7LmY@mail.python.org> Roundup Robot added the comment: New changeset 9b170d74a0a2 by Ezio Melotti in branch '2.7': #19620: Fix typo in docstring (noticed by Christopher Welborn). http://hg.python.org/cpython/rev/9b170d74a0a2 New changeset 3f99564b712e by Ezio Melotti in branch '3.3': #19620: Fix typo in docstring (noticed by Christopher Welborn). http://hg.python.org/cpython/rev/3f99564b712e New changeset 0d5da548b80a by Ezio Melotti in branch 'default': #19620: merge with 3.3. http://hg.python.org/cpython/rev/0d5da548b80a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:17:16 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:17:16 +0000 Subject: [issue19620] tokenize documentation contains typos (argment instead of argument) In-Reply-To: <1384569112.62.0.796047767365.issue19620@psf.upfronthosting.co.za> Message-ID: <1385349436.6.0.644029944011.issue19620@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:23:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:23:46 +0000 Subject: [issue19627] python open built-in function - "updating" is not defined In-Reply-To: <1384627981.21.0.789966534785.issue19627@psf.upfronthosting.co.za> Message-ID: <1385349826.58.0.571313695955.issue19627@psf.upfronthosting.co.za> Ezio Melotti added the comment: Is the doc in 3.4 (http://docs.python.org/3.4/library/functions.html#open) clear enough? If so it could be backported on 2.7/3.3. ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:24:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:24:17 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385349857.04.0.222730626102.issue19624@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy type: -> enhancement versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:26:26 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:26:26 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> Message-ID: <1385349986.57.0.997802703691.issue19629@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:28:26 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:28:26 +0000 Subject: [issue19632] doc build warning In-Reply-To: <1384699064.41.0.714714605877.issue19632@psf.upfronthosting.co.za> Message-ID: <1385350106.56.0.490222093759.issue19632@psf.upfronthosting.co.za> Ezio Melotti added the comment: See #14489. ---------- nosy: +ezio.melotti, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:45:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:45:56 +0000 Subject: [issue19680] Help missing for exec and print In-Reply-To: <1385036985.98.0.128644104733.issue19680@psf.upfronthosting.co.za> Message-ID: <1385351156.66.0.999096388819.issue19680@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached patch seems to fix the issue. ---------- assignee: docs at python -> ezio.melotti keywords: +patch nosy: +ezio.melotti, georg.brandl stage: -> patch review type: -> behavior Added file: http://bugs.python.org/file32826/issue19680.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:46:47 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:46:47 +0000 Subject: [issue19691] Weird wording in RuntimeError doc In-Reply-To: <1385130108.97.0.877442110994.issue19691@psf.upfronthosting.co.za> Message-ID: <1385351207.5.0.377281117022.issue19691@psf.upfronthosting.co.za> Ezio Melotti added the comment: So maybe it can just be removed? ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:47:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:47:46 +0000 Subject: [issue19707] Check if unittest.mock needs updating for PEP 451 Message-ID: <1385351266.42.0.634136224304.issue19707@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 04:47:59 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 03:47:59 +0000 Subject: [issue19710] Make sure documentation for PEP 451 is finished In-Reply-To: <1385138705.49.0.0614847614933.issue19710@psf.upfronthosting.co.za> Message-ID: <1385351279.04.0.44612660373.issue19710@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 05:41:18 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 25 Nov 2013 04:41:18 +0000 Subject: [issue19762] Incorrect function documentation of _get_object_traceback and _get_traces in _tracemalloc module Message-ID: <1385354478.04.0.931471819915.issue19762@psf.upfronthosting.co.za> New submission from Vajrasky Kok: >>> import _tracemalloc >>> _tracemalloc._get_object_traceback.__doc__ 'get_object_traceback(obj)\n\nGet the traceback where the Python object obj was allocated.\nReturn a tuple of (filename: str, lineno: int) tuples.\n\nReturn None if the tracemalloc module is disabled or did not\ntrace the allocation of the object.' >>> _tracemalloc._get_traces.__doc__ 'get_traces() -> list\n\nGet traces of all memory blocks allocated by Python.\nReturn a list of (size: int, traceback: tuple) tuples.\ntraceback is a tuple of (filename: str, lineno: int) tuples.\n\nReturn an empty list if the tracemalloc module is disabled.' ---------- assignee: docs at python components: Documentation, Extension Modules files: fix_doc__tracemalloc.patch keywords: patch messages: 204293 nosy: docs at python, haypo, vajrasky priority: normal severity: normal status: open title: Incorrect function documentation of _get_object_traceback and _get_traces in _tracemalloc module versions: Python 3.4 Added file: http://bugs.python.org/file32827/fix_doc__tracemalloc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 06:02:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 05:02:10 +0000 Subject: [issue19746] No introspective way to detect ModuleImportFailure in unittest In-Reply-To: <1385262963.63.0.210713286499.issue19746@psf.upfronthosting.co.za> Message-ID: <1385355730.22.0.0519799347061.issue19746@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- title: No introspective way to detect ModuleImportFailure -> No introspective way to detect ModuleImportFailure in unittest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 06:03:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 05:03:40 +0000 Subject: [issue19347] PEP 453 implementation tracking issue In-Reply-To: <1382442514.8.0.354499850572.issue19347@psf.upfronthosting.co.za> Message-ID: <1385355820.09.0.721105614192.issue19347@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19734 covers the fact that pip environment variable settings impact venv and ensurepip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 06:27:56 2013 From: report at bugs.python.org (Donald Stufft) Date: Mon, 25 Nov 2013 05:27:56 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385357276.84.0.475785736792.issue19744@psf.upfronthosting.co.za> Donald Stufft added the comment: There's a ticket in pip to make pip work even when ssl isn't available. You wouldn't be able to install from PyPI but you would be able to install from local archives. ---------- nosy: +dstufft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 07:23:03 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 06:23:03 +0000 Subject: [issue19728] PEP 453: enable pip by default in the Windows binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385360583.11.0.280128794516.issue19728@psf.upfronthosting.co.za> Nick Coghlan added the comment: Given MvL's comment above, my suggestion is that we add an "ensurepip._uninstall" submodule that uninstalls pip and setuptools if it is invoked as __main__ and the following snippet results in uinstall being set to True: try: import pip except ImportError: uninstall = False else: uninstall = (pip.__version__ == ensurepip.version()) (I believe PIP_VERSION in ensurepip is currently wrong, as it has an extra dot that shouldn't be there, but we can fix that as part of implementing this, and tweak the test in test_venv to ensure it doesn't get out of sync again) ---------- title: PEP 453: enable pip by default in the binary installers -> PEP 453: enable pip by default in the Windows binary installers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 07:45:08 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 25 Nov 2013 06:45:08 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385361908.14.0.241570627549.issue18874@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the patch to tidy up the Lib/test_tracemalloc.py. It fixed the typo, and removed unused import and unused variables. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file32828/minor_makeup_test_tracemalloc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 07:55:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Nov 2013 06:55:21 +0000 Subject: [issue19691] Weird wording in RuntimeError doc In-Reply-To: <1385130108.97.0.877442110994.issue19691@psf.upfronthosting.co.za> Message-ID: <1385362520.99.0.627586773158.issue19691@psf.upfronthosting.co.za> Georg Brandl added the comment: I think so. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 07:57:03 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Nov 2013 06:57:03 +0000 Subject: [issue19762] Incorrect function documentation of _get_object_traceback and _get_traces in _tracemalloc module In-Reply-To: <1385354478.04.0.931471819915.issue19762@psf.upfronthosting.co.za> Message-ID: <1385362623.76.0.38518570203.issue19762@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 08:00:29 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Nov 2013 07:00:29 +0000 Subject: [issue19632] doc build warning In-Reply-To: <1384699064.41.0.714714605877.issue19632@psf.upfronthosting.co.za> Message-ID: <1385362829.06.0.863829225069.issue19632@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, there's no bug here: it's what you get when you call a library the same as a builtin :) ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 08:31:36 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 07:31:36 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 Message-ID: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> New submission from Christian Heimes: A while ago I created a backport of statistics to Python 2.6 to 3.3. [1] It worked pretty and required just a few modifications to the code. I'd like to add most modifications to 3.4 to simplify backporting. The modifications are: * from __future__ import division * replace super() with super(MySuperClass, self) * changes to doc tests because Python 2 has slightly different represenstations ( / , longer float repr) * "import collections" -> "from collections import Counter" so I can simply add a Counter class for 2.6 * "import math" -> "from math import isfinite" so it's easier to add a isfinite() function for 2.x The patch does neither remove "raise ... from None" nor does it add a 2.x isfinite or range = xrange. The backport still needs some patches but I can keep the amount of changes rather small. [1] https://bitbucket.org/tiran/backports.statistics ---------- files: statistics_backports.patch keywords: patch messages: 204301 nosy: christian.heimes, larry priority: normal severity: normal stage: patch review status: open title: Make it easier to backport statistics to 2.7 type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32829/statistics_backports.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 08:43:15 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Nov 2013 07:43:15 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385365395.43.0.380471949296.issue19763@psf.upfronthosting.co.za> Georg Brandl added the comment: -1. First, I don't think stdlib modules should be forced to use old conventions and give up on new features just because of backports (the import changes are fine obviously). Second, it's putting unreasonable constraints on CPython developers to know which modules should be compatible with which version and which features that requires to ignore (Python 2.6 is not even in maintenance anymore!) This is the onus of the backporter (and you have done it already, anyway). Third, it's also a little late for this given that we're now in beta. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 08:46:21 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Nov 2013 07:46:21 +0000 Subject: [issue19631] "exec" BNF in simple statements In-Reply-To: <1384695347.39.0.482466517942.issue19631@psf.upfronthosting.co.za> Message-ID: <1385365581.79.0.0524789543936.issue19631@psf.upfronthosting.co.za> Georg Brandl added the comment: That would be correct as a handwaving description, but it's wrong as a formal spec. The "or_expr" already includes the possibility of a tuple; there is no "exec(" token etc. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 08:50:55 2013 From: report at bugs.python.org (Bulwersator) Date: Mon, 25 Nov 2013 07:50:55 +0000 Subject: [issue19627] python open built-in function - "updating" is not defined In-Reply-To: <1384627981.21.0.789966534785.issue19627@psf.upfronthosting.co.za> Message-ID: <1385365855.21.0.875628053242.issue19627@psf.upfronthosting.co.za> Bulwersator added the comment: yes, "open a disk file for updating (reading and writing)" is a good explanation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 08:52:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 07:52:31 +0000 Subject: [issue19622] Default buffering for input and output pipes in subprocess module In-Reply-To: <1384579334.66.0.612676075589.issue19622@psf.upfronthosting.co.za> Message-ID: <3dSgSt3Nnsz7LnP@mail.python.org> Roundup Robot added the comment: New changeset 0f0dc0276a7c by Georg Brandl in branch '3.3': Closes #19622: clarify message about bufsize changes in 3.2.4 and 3.3.1. http://hg.python.org/cpython/rev/0f0dc0276a7c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 09:03:08 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Mon, 25 Nov 2013 08:03:08 +0000 Subject: [issue19680] Help missing for exec and print In-Reply-To: <1385036985.98.0.128644104733.issue19680@psf.upfronthosting.co.za> Message-ID: <1385366588.88.0.894505058814.issue19680@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: Seems that Ezio was faster :) Yep, the attached patch does seem to solve the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 09:19:51 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 08:19:51 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385367591.57.0.733954953707.issue19763@psf.upfronthosting.co.za> Christian Heimes added the comment: Python's stdlib contains other modules that contain code for older versions of Python. The platform module even contains lines like "os.devnull was added in Python 2.4, so emulate it for earlier". asyncio has backward compatibility code, too. The only old syntax I'd like to add is the super() thing in the test module. They are just tests... The modified imports and doc test adjustments like - >>> mean([1, 2, 3, 4, 4]) - 2.8 + >>> mean([1, 2, 3, 4, 4]) == 2.8 + True would greatly help, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 09:29:14 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 25 Nov 2013 08:29:14 +0000 Subject: [issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed In-Reply-To: <1346159030.18.0.947370235022.issue15798@psf.upfronthosting.co.za> Message-ID: <1385368154.73.0.441878982679.issue15798@psf.upfronthosting.co.za> Gregory P. Smith added the comment: adding {0,1,2} to fds_to_keep (populated from pass_fds) is indeed an alternate approach. A variant of an alternate patch doing that attached. This actually simplifies code. Is there anything this would hurt that i'm not seeing? I suppose it adds minor overhead to the fork_exec() call by passing more in and lookups into the fds_to_keep list now that it will always contain at least 4 values instead of the previous 1. I doubt that is matters (I haven't measured anything). ---------- Added file: http://bugs.python.org/file32830/issue15798_alternate-pass_fds-gps01.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 09:31:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 08:31:09 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385368269.7.0.387758629277.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: > Here is the patch to tidy up the Lib/test_tracemalloc.py. > It fixed the typo, and removed unused import and unused variables. Thanks, I applied your patch. changeset: 87547:841dec769a04 tag: tip user: Victor Stinner date: Mon Nov 25 09:29:45 2013 +0100 files: Lib/test/test_tracemalloc.py description: Cleanup test_tracemalloc.py. Patch written by Vajrasky Kok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 09:32:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 08:32:33 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385368353.36.0.0488097435545.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Here is the patch to tidy up the Lib/test_tracemalloc.py. >> It fixed the typo, and removed unused import and unused variables. > >Thanks, I applied your patch. Oh, except: - data = [allocate_bytes(123) for count in range(1000)] + [allocate_bytes(123) for count in range(1000)] If you don't store the result, the memory is immediatly released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 09:34:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 08:34:46 +0000 Subject: [issue19762] Incorrect function documentation of _get_object_traceback and _get_traces in _tracemalloc module In-Reply-To: <1385354478.04.0.931471819915.issue19762@psf.upfronthosting.co.za> Message-ID: <3dShPd70M4z7Lmk@mail.python.org> Roundup Robot added the comment: New changeset 2e2ec595dc58 by Victor Stinner in branch 'default': Close #19762: Fix name of _get_traces() and _get_object_traceback() function http://hg.python.org/cpython/rev/2e2ec595dc58 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 09:38:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 08:38:14 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385357276.84.0.475785736792.issue19744@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Is that likely to be in 1.5 or 1.5.1? Not needing to special case this in ensurepip would be nice :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 09:41:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 08:41:15 +0000 Subject: [issue19734] venv and ensurepip are affected by pip environment variable settings In-Reply-To: <1385279331.22.0.506208600718.issue19734@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Hmm, this may also indicate a bug in pip's "require virtualenv" handling. Why isn't it detecting that sys.prefix and sys.base_prefix are different, and hence it *is* running in a venv created virtual environment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 10:01:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 09:01:56 +0000 Subject: [issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista Message-ID: <1385370115.99.0.757096187315.issue19764@psf.upfronthosting.co.za> New submission from STINNER Victor: subprocess.Popen has a race condition on Windows with file descriptors: if two threads spawn subprocesses at the same time, unwanted file descriptors may be inherited, which lead to annoying issues like "cannot delete a file because it is open by another process". For the issue #19575 for an example of such bug. Since Windows Vista, a list of handle which should be inherited can be specified in CreateProcess() using PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX. It avoids the need to mark the handle temporarly inheritable. For more information, see: http://www.python.org/dev/peps/pep-0446/#only-inherit-some-handles-on-windows ---------- messages: 204314 nosy: Bernt.R?skar.Brenna, haypo, sbt priority: normal severity: normal status: open title: subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 10:29:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 09:29:26 +0000 Subject: [issue19765] test_asyncio: test_create_server() failed on "x86 Windows Server 2008 [SB] 3.x" Message-ID: <1385371766.88.0.569586270438.issue19765@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1794/steps/test/logs/stdio ====================================================================== FAIL: test_create_server (test.test_asyncio.test_events.ProactorEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_asyncio\test_events.py", line 563, in test_create_server self.assertIsInstance(proto, MyProto) AssertionError: None is not an instance of ---------------------------------------------------------------------- ---------- components: Tests keywords: buildbot messages: 204315 nosy: gvanrossum, haypo priority: normal severity: normal status: open title: test_asyncio: test_create_server() failed on "x86 Windows Server 2008 [SB] 3.x" versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 10:41:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 09:41:00 +0000 Subject: [issue19766] test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot Message-ID: <1385372460.23.0.39838448994.issue19766@psf.upfronthosting.co.za> New submission from STINNER Victor: The line "from . import exceptions" of urllib3 failed: https://github.com/shazow/urllib3/blob/master/urllib3/__init__.py#L22 It is strange because urllib3/exceptions.py is part of the urllib3 module. http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/5674/steps/test/logs/stdio ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_venv.py", line 299, in test_with_pip self.run_with_capture(venv.create, self.env_dir, with_pip=True) subprocess.CalledProcessError: Command '['/tmp/tmpd8r2w88y/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_venv.py", line 305, in test_with_pip self.fail(msg) AssertionError: Command '['/tmp/tmpd8r2w88y/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 **Subprocess Output** Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/ensurepip/__main__.py", line 66, in main() File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/ensurepip/__main__.py", line 61, in main default_pip=args.default_pip, File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/ensurepip/__init__.py", line 92, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/ensurepip/__init__.py", line 28, in _run_pip import pip File "/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/__init__.py", line 11, in File "/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/vcs/mercurial.py", line 9, in File "/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/download.py", line 22, in File "/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/__init__.py", line 58, in File "/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/utils.py", line 24, in File "/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/compat.py", line 7, in File "/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/packages/__init__.py", line 3, in File "/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/packages/urllib3/__init__.py", line 22, in ImportError: cannot import name 'exceptions' ---------- components: Tests keywords: buildbot messages: 204316 nosy: haypo priority: normal severity: normal status: open title: test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 10:44:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 09:44:47 +0000 Subject: [issue19753] test_gdb failure on SystemZ buildbot In-Reply-To: <1385297498.35.0.580960849051.issue19753@psf.upfronthosting.co.za> Message-ID: <3dSjyQ6Y6Hz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 6ec6facb69ca by Victor Stinner in branch 'default': Issue #19753: New try to fix test_gdb on System Z buildbot http://hg.python.org/cpython/rev/6ec6facb69ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 10:48:57 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 09:48:57 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385372937.94.0.16541820117.issue19509@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch implements check_hostname in order to match SSL certs with the peer's hostname in ftp, imap, nntp, pop and smtp library. So far the patch needs more tests and doc updates. I consider the new feature a security fix. Right now everybody with any valid TLS/SSL certificate can claim that its certificate is valid for 'smtp.google.com'. ---------- keywords: +patch nosy: +georg.brandl, larry Added file: http://bugs.python.org/file32831/check_hostname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 10:59:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 09:59:11 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1385373551.52.0.644041475016.issue19654@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/7408/steps/test/logs/stdio patchlevel = 8.4.19 Does it help to know the full version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 11:11:40 2013 From: report at bugs.python.org (Martin Dengler) Date: Mon, 25 Nov 2013 10:11:40 +0000 Subject: [issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1385374300.68.0.54067091116.issue7511@psf.upfronthosting.co.za> Changes by Martin Dengler : ---------- nosy: +mdengler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 11:25:47 2013 From: report at bugs.python.org (Jonas H.) Date: Mon, 25 Nov 2013 10:25:47 +0000 Subject: [issue19767] pathlib: iterfiles() and iterdirs() Message-ID: <1385375147.52.0.820545347485.issue19767@psf.upfronthosting.co.za> New submission from Jonas H.: >From my personal experience, listing all real files and all subdirectories in a directory is a very common use case. Here's a patch that adds the `iterfiles()` and `iterdirs()` methods as a shortcut for `[f for f in p.iterdir() if f.is_dir/file()]` . ---------- components: Library (Lib) files: iterdirs_iterfiles.diff keywords: patch messages: 204320 nosy: jonash priority: normal severity: normal status: open title: pathlib: iterfiles() and iterdirs() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32832/iterdirs_iterfiles.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 11:29:50 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 25 Nov 2013 10:29:50 +0000 Subject: [issue19768] Not so correct error message when giving incorrect type to maxlen in deque Message-ID: <1385375390.08.0.216334193444.issue19768@psf.upfronthosting.co.za> New submission from Vajrasky Kok: >>> from collections import deque >>> deque('abc', maxlen='a') Traceback (most recent call last): File "", line 1, in TypeError: an integer is required But it's a lie. You can give None to maxlen >>> deque('abc', maxlen=None) deque(['a', 'b', 'c']) maxlen with None value means unlimited. You can give boolean value too to maxlen. >>> deque('abc', maxlen=True) deque(['c'], maxlen=1) But since we use boolean and integer interchangeably in Python, so this should not matter in this case. So, after the patch: >>> deque('abc', maxlen='a') Traceback (most recent call last): File "", line 1, in ValueError: maxlen must be integer or None Don't worry, I only overrode the TypeError one. So overflow error should be kept intact. >>> deque('abc', maxlen=2**68) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t I did not override the negative integer error message, because I assume when people give negative integer, they are in the mindset of giving integer value to maxlen. >>> deque('abc', maxlen=-3) Traceback (most recent call last): File "", line 1, in ValueError: maxlen must be non-negative ---------- components: Extension Modules files: fix_error_message_maxlen_deque.patch keywords: patch messages: 204321 nosy: rhettinger, vajrasky priority: normal severity: normal status: open title: Not so correct error message when giving incorrect type to maxlen in deque type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32833/fix_error_message_maxlen_deque.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 11:30:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 10:30:51 +0000 Subject: [issue19767] pathlib: iterfiles() and iterdirs() In-Reply-To: <1385375147.52.0.820545347485.issue19767@psf.upfronthosting.co.za> Message-ID: <1385375451.06.0.294960499361.issue19767@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #11406 which is more generic. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 11:35:28 2013 From: report at bugs.python.org (Dima Tisnek) Date: Mon, 25 Nov 2013 10:35:28 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1385375728.74.0.97086884449.issue5639@psf.upfronthosting.co.za> Dima Tisnek added the comment: Is this really not going into Python2 series? It's not a Python feature or a language feature, it's a matter of exporting OpenSSL feature. Furthermore it's a matter of security, same as support for session tickets is a matter of performance. SNI was first introduced in 2004, RFC in 2006, libcurl supported it from 2008, you had a patch since 2009 and still it's not in? Are you guys intentionally trying to cripple Python2? What do you think is likelier outcome, faster Python3 adoption or Python labelled insecure? ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 12:06:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 11:06:11 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1385377571.86.0.359405957318.issue5639@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > It's not a Python feature or a language feature, it's a matter of > exporting OpenSSL feature. It's a feature regardless (from our POV), and Python 2.x has been in bug fix mode for a long time now. Please understand that this is how our release process works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 12:30:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 11:30:05 +0000 Subject: [issue19769] test_venv: test_with_pip() failure on "AMD64 Windows Server 2008 [SB] 3.x" buildbot Message-ID: <1385379005.22.0.834841842674.issue19769@psf.upfronthosting.co.za> New submission from STINNER Victor: This issue looks like issue #19734, but I'm not sure, so I prefer to open a new issue. Don't hesitate to close it as a duplicate of it's the same. http://buildbot.python.org/all/builders/AMD64%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1752/steps/test/logs/stdio test_with_pip (test.test_venv.EnsurePipTest) ... FAIL ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "E:\home\cpython\buildslave\x64\3.x.snakebite-win2k8r2sp1-amd64\build\lib\test\test_venv.py", line 314, in test_with_pip self.assertEqual(err, "") AssertionError: "C:\\Users\\BUILDS~1\\AppData\\Local\\Tem[138 chars]\r\n" != '' - C:\Users\BUILDS~1\AppData\Local\Temp\tmpa0ocjb9d\Scripts\python_d.exe: No module named 'pip._vendor.requests.adapters'; 'pip' is a package and cannot be directly executed ---------- components: Tests keywords: buildbot messages: 204325 nosy: haypo, ncoghlan priority: normal severity: normal status: open title: test_venv: test_with_pip() failure on "AMD64 Windows Server 2008 [SB] 3.x" buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 12:42:13 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 25 Nov 2013 11:42:13 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <1385324828.57.0.175042877818.issue19732@psf.upfronthosting.co.za> Message-ID: <20131125114212.GB2714@sleipnir.bytereef.org> Stefan Krah added the comment: Matthias Klose wrote: > 2.4~rc1: > - configure.ac should call AC_CANONICAL_HOST, config,guess and > config.sub should be included. Hmm. configure.ac doesn't use any of the variables set by that macro, and this appears to work: ./configure --host=arm CC=arm-linux-gnueabi-gcc-4.7 > - there are still symbols which exists only for 32/64 bit archs. > intended? > (arch=@64@)mpd_qsset_i64 at Base 2.3 > (arch=@64@)mpd_qsset_u64 at Base 2.3 > (arch=@64@)mpd_sset_i64 at Base 2.3 > (arch=@64@)mpd_sset_u64 at Base 2.3 That's on purpose: These are low level functions that are supposed to set static decimals as fast as possible. A static mpd_t has a guaranteed minimum allocation of two words for the coefficient. The 32-bit version needs three words for UINT64_MAX, so they aren't available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 12:45:06 2013 From: report at bugs.python.org (Matthias Klose) Date: Mon, 25 Nov 2013 11:45:06 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <20131125114212.GB2714@sleipnir.bytereef.org> Message-ID: <5293383D.7070209@debian.org> Matthias Klose added the comment: Am 25.11.2013 12:42, schrieb Stefan Krah: > > Stefan Krah added the comment: > > Matthias Klose wrote: >> 2.4~rc1: >> - configure.ac should call AC_CANONICAL_HOST, config,guess and >> config.sub should be included. > > Hmm. configure.ac doesn't use any of the variables set by that macro, and this > appears to work: > > ./configure --host=arm CC=arm-linux-gnueabi-gcc-4.7 sure, but this should work without explicitly setting CC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 12:50:37 2013 From: report at bugs.python.org (Bill Winslow) Date: Mon, 25 Nov 2013 11:50:37 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385380237.28.0.0721902602789.issue19744@psf.upfronthosting.co.za> Bill Winslow added the comment: I've stumbled upon what appears to be a related issue, but I'm not sure it deserves its own bug report. I compiled 3.4 on my LMDE (so essentially Debian testing) system, and aside from not building tkinter, various compression modules, etc., all went well. I ran `make test` with no errors, including the success of test_venv. (There were many and various warnings about deprecated code and calling str() on bytes instances, but I'm pretty sure none of it is related). I ran `sudo make altinstall` (to not nuke my current 3.3 from the repos), and to my surprise, it failed with the following error: running install_scripts copying build/scripts-3.4/pydoc3.4 -> /usr/local/bin copying build/scripts-3.4/2to3-3.4 -> /usr/local/bin copying build/scripts-3.4/idle3.4 -> /usr/local/bin copying build/scripts-3.4/pyvenv-3.4 -> /usr/local/bin changing mode of /usr/local/bin/pydoc3.4 to 755 changing mode of /usr/local/bin/2to3-3.4 to 755 changing mode of /usr/local/bin/idle3.4 to 755 changing mode of /usr/local/bin/pyvenv-3.4 to 755 rm /usr/local/lib/python3.4/lib-dynload/_sysconfigdata.py rm -r /usr/local/lib/python3.4/lib-dynload/__pycache__ /usr/bin/install -c -m 644 ./Misc/python.man \ /usr/local/share/man/man1/python3.4.1 if test "xupgrade" != "xno" ; then \ case upgrade in \ upgrade) ensurepip="--altinstall --upgrade" ;; \ install|*) ensurepip="--altinstall" ;; \ esac; \ ./python -E -m ensurepip \ $ensurepip --root=/ ; \ fi Traceback (most recent call last): File "/home/bill/py3.4/Python-3.4.0b1/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/home/bill/py3.4/Python-3.4.0b1/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/home/bill/py3.4/Python-3.4.0b1/Lib/ensurepip/__main__.py", line 66, in main() File "/home/bill/py3.4/Python-3.4.0b1/Lib/ensurepip/__main__.py", line 61, in main default_pip=args.default_pip, File "/home/bill/py3.4/Python-3.4.0b1/Lib/ensurepip/__init__.py", line 92, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/bill/py3.4/Python-3.4.0b1/Lib/ensurepip/__init__.py", line 28, in _run_pip import pip File "/tmp/tmprwpsemxj/pip-1.5.rc1-py2.py3-none-any.whl/pip/__init__.py", line 10, in File "/tmp/tmprwpsemxj/pip-1.5.rc1-py2.py3-none-any.whl/pip/util.py", line 17, in File "/tmp/tmprwpsemxj/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/distlib/version.py", line 14, in File "/tmp/tmprwpsemxj/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/distlib/compat.py", line 66, in ImportError: cannot import name 'HTTPSHandler' make: *** [altinstall] Error 1 Note: I will certainly *not* be trying to `sudo make install`. In any case, the executable and modules were installed fine, so other than reporting it here, it's not causing me problems (so far). ---------- nosy: +Dubslow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 12:52:55 2013 From: report at bugs.python.org (=?utf-8?q?Micka=C3=ABl_Falck?=) Date: Mon, 25 Nov 2013 11:52:55 +0000 Subject: [issue17204] argparser's subparsers.add_parser() should accept an ArgumentParser In-Reply-To: <1360825267.06.0.240295052102.issue17204@psf.upfronthosting.co.za> Message-ID: <1385380375.82.0.0943992049862.issue17204@psf.upfronthosting.co.za> Changes by Micka?l Falck : ---------- nosy: +Micka?l.Falck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:02:11 2013 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 25 Nov 2013 12:02:11 +0000 Subject: [issue19585] Frame annotation In-Reply-To: <1384448970.46.0.460613881183.issue19585@psf.upfronthosting.co.za> Message-ID: <1385380931.76.0.117328539484.issue19585@psf.upfronthosting.co.za> Walter D?rwald added the comment: Here is a new version of the patch. The annotation is done on the code object instead of on the frame object. This avoids two problems: There is no runtime overhead, as the decorator returns the original function and no additional frames show up in the traceback. Since the variables are only known at runtime, the annotation is now a function that does the formatting of the annotation message and gets passed the frame object. With this there is no runtime overhead when no exception is raised and even if an exception is raise, but the traceback is never formatted. ---------- Added file: http://bugs.python.org/file32834/code-annotation.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:08:13 2013 From: report at bugs.python.org (Donald Stufft) Date: Mon, 25 Nov 2013 12:08:13 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385381293.5.0.820789684577.issue19744@psf.upfronthosting.co.za> Donald Stufft added the comment: It probably can. I just need to figure out how to test it to make sure the PR that supposedly fixes it fixes it, and then figure out how to ensure it still works into the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:28:44 2013 From: report at bugs.python.org (Szymon Sobik) Date: Mon, 25 Nov 2013 12:28:44 +0000 Subject: [issue19770] NNTP.post broken Message-ID: <1385382524.39.0.481766399265.issue19770@psf.upfronthosting.co.za> New submission from Szymon Sobik: post method fails because string methods have bytesrting arguments ie. line = line.rstrip(b"\r\n") + _CRLF ---------- components: Library (Lib) messages: 204331 nosy: sobczyk priority: normal severity: normal status: open title: NNTP.post broken type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:31:08 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 12:31:08 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385382668.16.0.00713883852053.issue19763@psf.upfronthosting.co.za> R. David Murray added the comment: This is a tricky one. I can see the arguments either way, but it just feels wrong to have future imports in stdlib code. I personally don't see anything wrong with the import and doctest changes, though. Sure, someone may come along later and unknowingly break something for your backport, but it isn't likely and IMO it's no big deal if it happens, you can just fix it when your tests fail. I also don't mind the super call change personally, but that is much more likely to get changed by someone later, since I'm sure other people find it uglier than I do :) Platform kind of operates under its own rules. I suppose asyncio does as well :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:31:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 12:31:16 +0000 Subject: [issue19770] NNTP.post broken In-Reply-To: <1385382524.39.0.481766399265.issue19770@psf.upfronthosting.co.za> Message-ID: <1385382676.07.0.926805414945.issue19770@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:39:03 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 12:39:03 +0000 Subject: [issue19767] pathlib: iterfiles() and iterdirs() In-Reply-To: <1385375147.52.0.820545347485.issue19767@psf.upfronthosting.co.za> Message-ID: <1385383143.11.0.912945283901.issue19767@psf.upfronthosting.co.za> R. David Murray added the comment: Beta is out, so this issue must be targeted for 3.5. ---------- nosy: +r.david.murray versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:39:47 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 12:39:47 +0000 Subject: [issue19771] runpy should check ImportError.name before wrapping it Message-ID: <1385383187.11.0.803942496087.issue19771@psf.upfronthosting.co.za> New submission from Nick Coghlan: Issue 19769 shows that if __main__ in a package throws ImportError, runpy will incorrectly report the package as not being directly executable (when it actually claims to be executable, it's just broken) This can be fixed in 3.3+ by checking for an appropriate value in the name attribute of the caught exception, and only wrapping it if the failed lookup was for the __main__ submodule we're looking for. The associated test can just use a __main__.py that deliberately raises ImportError. ---------- components: Library (Lib) keywords: easy messages: 204334 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: runpy should check ImportError.name before wrapping it type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:40:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 12:40:10 +0000 Subject: [issue19769] test_venv: test_with_pip() failure on "AMD64 Windows Server 2008 [SB] 3.x" buildbot In-Reply-To: <1385379005.22.0.834841842674.issue19769@psf.upfronthosting.co.za> Message-ID: <1385383210.25.0.0445052633004.issue19769@psf.upfronthosting.co.za> Nick Coghlan added the comment: So, the last part of the error message is just runpy getting confused because attempting to import pip.__main__ threw ImportError (it should check the ImportError name (see issue 19771). I'm not sure about the first part though - I'm not sure why the pip wheel would lose track of a submodule like that. ---------- nosy: +dstufft, larry priority: normal -> high versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:43:49 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 12:43:49 +0000 Subject: [issue19770] NNTP.post broken In-Reply-To: <1385382524.39.0.481766399265.issue19770@psf.upfronthosting.co.za> Message-ID: <1385383429.18.0.785838146164.issue19770@psf.upfronthosting.co.za> R. David Murray added the comment: Can you show an example of the failure, including the traceback? I would think that nttplib would be mostly operating on byte objects, and I'm sure Antoine tested posting. ---------- nosy: +pitrou, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:52:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 12:52:52 +0000 Subject: [issue19585] Frame annotation In-Reply-To: <1385380931.76.0.117328539484.issue19585@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Code objects are shared amongst multiple function objects, so you can't store mutable state on them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:58:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 12:58:05 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385384285.09.0.563803473278.issue19744@psf.upfronthosting.co.za> Nick Coghlan added the comment: That I can help with. Steal the "import_fresh_module helper function from test.support (or the gist of it anyway - you can likely leave out the stuff about deprecated imports): http://hg.python.org/cpython/file/default/Lib/test/support/__init__.py#l192 Then do: pip_nossl = import_fresh_module("pip", blocked=["ssl"]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 13:58:56 2013 From: report at bugs.python.org (Matej Cepl) Date: Mon, 25 Nov 2013 12:58:56 +0000 Subject: [issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar In-Reply-To: <1383577219.47.0.139805262488.issue19494@psf.upfronthosting.co.za> Message-ID: <1385384336.86.0.506975942871.issue19494@psf.upfronthosting.co.za> Matej Cepl added the comment: I am trying to work on fixing issue 19494 (HTTPBasicAuthHandler doesn't work with Github and other websites which require prior Authorization header in the first request). I have created this testing script calling GitHub v3 API using new ?authentication handlers? (they are subclasses of HTTPSHandler, not HTTPBasicAuthHandler) and hoped that when I manage to make this script working, I could rewrite it into patch against cpython code. However, when I run this script I get this error (using python3-3.3.2-8.el7.x86_64) matej at wycliff: $ python3 test_create_1.py DEBUG::gh_url = https://api.github.com/repos/mcepl/odt2rst/issues/ DEBUG::req = DEBUG::req.type = https DEBUG:http_request:type = https Traceback (most recent call last): File "test_create_1.py", line 80, in handler = opener.open(req, json.dumps(create_data).encode('utf8')) File "/usr/lib64/python3.3/urllib/request.py", line 475, in open response = meth(req, response) File "/usr/lib64/python3.3/urllib/request.py", line 587, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.3/urllib/request.py", line 513, in error return self._call_chain(*args) File "/usr/lib64/python3.3/urllib/request.py", line 447, in _call_chain result = func(*args) File "/usr/lib64/python3.3/urllib/request.py", line 595, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 401: Unauthorized matej at wycliff: $ Could anybody suggest what I am doing wrong? I seem to have problem of working in between two superclasses (HTTPHandler and AbstractBasicAuthHandler). I guess I need to somehow include into opener original HTTPBasicAuthHandler (for error handlers). Any ideas how to do it? ---------- Added file: http://bugs.python.org/file32835/test_create_1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:01:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 13:01:32 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385384492.36.0.0896212376496.issue19763@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If you started at 2.7 you would need less changes. ---------- nosy: +pitrou, stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:02:53 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 13:02:53 +0000 Subject: [issue19744] ensurepip should refuse to install pip if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1385384573.4.0.450998248539.issue19744@psf.upfronthosting.co.za> Nick Coghlan added the comment: If the ssl import is actually in a submodule, you may need to list additional subpackages in the "fresh" parameter. If you're wondering why this isn't in the importlib API - it's because it can go wrong in an impressively large number of ways, and we don't have any hope of documenting it well enough to make it usable by anyone that either: a) couldn't write it themselves; or b) isn't getting coached by someone that could write it themselves. But when you know what you're doing and the modules involved don't break horribly when treated this way, it's a very neat trick for testing purposes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:08:29 2013 From: report at bugs.python.org (Szymon Sobik) Date: Mon, 25 Nov 2013 13:08:29 +0000 Subject: [issue19770] NNTP.post broken In-Reply-To: <1385382524.39.0.481766399265.issue19770@psf.upfronthosting.co.za> Message-ID: <1385384909.23.0.683014761768.issue19770@psf.upfronthosting.co.za> Szymon Sobik added the comment: Traceback (most recent call last): File "./nntp_test.py", line 23, in s.post(msg) File "/usr/lib/python3.3/nntplib.py", line 909, in post return self._post('POST', data) File "/usr/lib/python3.3/nntplib.py", line 895, in _post if not line.endswith(_CRLF): TypeError: endswith first arg must be str or a tuple of str, not bytes ---------- Added file: http://bugs.python.org/file32836/nntp_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:11:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 13:11:19 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385385079.23.0.00729958129038.issue19763@psf.upfronthosting.co.za> STINNER Victor added the comment: "Python's stdlib contains other modules that contain code for older versions of Python. The platform module even contains lines like "os.devnull was added in Python 2.4, so emulate it for earlier"." I never understood why the platform module should be backport compatible. Marc Andre Lemburg wrote that it is shipped externally. I don't understand the purpose of having a third party platform module since the module is part of the stdlib. ---------- nosy: +haypo, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:14:08 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 25 Nov 2013 13:14:08 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <5293383D.7070209@debian.org> Message-ID: <20131125131407.GA3453@sleipnir.bytereef.org> Stefan Krah added the comment: Matthias Klose wrote: > > ./configure --host=arm CC=arm-linux-gnueabi-gcc-4.7 > > sure, but this should work without explicitly setting CC. I can't get it to work without passing CC even with config.guess and config.sub. If you want it to work, could you submit a patch? I've set up a temporary repo: hg clone http://bytereef.org:8000/ mpdecimal Also, do you by any chance know a better solution for ldconfig (I'm calling it unconditionally during install)? I vaguely remember that ldconfig does something different on OpenBSD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:15:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 13:15:04 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385385304.11.0.817308009847.issue19763@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'd like to add most modifications to 3.4 to simplify backporting. I would prefer to not touch Python 3.4 backport just to simplify backporting. For example, I don't expect "from __future__ import division" in new Python 3.4 modules, but only on old modules. If the Python 3.4 evolves, you can use tools like meld to compare your backport and the latest version, and merge manually new changes. Or read Mercurial history of the Python 3.4 module to get patches. For example, I maintain the faulthandler like that. I manually merge changes when I fix an issue in the CPython version. The version on PyPI is different: it uses SIGALRM instead of a thread, use PyInt_xxx() functions on Python 2, etc. Do we expect many changes in the statistics modules? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:15:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 13:15:31 +0000 Subject: [issue19770] NNTP.post broken In-Reply-To: <1385382524.39.0.481766399265.issue19770@psf.upfronthosting.co.za> Message-ID: <1385385331.22.0.753714096632.issue19770@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This won't work. The post() method needs a bytes object, or something which when iterating yields bytes data. Perhaps you can try to call as_bytes() on your MIMEText object: http://docs.python.org/dev/library/email.message.html#email.message.Message.as_bytes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:18:33 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 13:18:33 +0000 Subject: [issue19770] NNTP.post broken In-Reply-To: <1385382524.39.0.481766399265.issue19770@psf.upfronthosting.co.za> Message-ID: <1385385513.79.0.53269922322.issue19770@psf.upfronthosting.co.za> R. David Murray added the comment: as_bytes was added in 3.4. For earlier python versions, you'll have to create a BytesGenerator object and flatten the message using it to get a bytes object you can past to post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:20:11 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 13:20:11 +0000 Subject: [issue19770] NNTP.post broken In-Reply-To: <1385382524.39.0.481766399265.issue19770@psf.upfronthosting.co.za> Message-ID: <1385385611.82.0.144580609932.issue19770@psf.upfronthosting.co.za> R. David Murray added the comment: It might be worth adding a post_message method, analogous to the send_message method I added to smtplib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:30:18 2013 From: report at bugs.python.org (Szymon Sobik) Date: Mon, 25 Nov 2013 13:30:18 +0000 Subject: [issue19770] NNTP.post broken In-Reply-To: <1385382524.39.0.481766399265.issue19770@psf.upfronthosting.co.za> Message-ID: <1385386218.46.0.406679811402.issue19770@psf.upfronthosting.co.za> Szymon Sobik added the comment: Ok I found this out too on my own. It might be better to add examples using the MIME* classes to nntplib documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:35:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 13:35:13 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385386513.28.0.171377745879.issue19763@psf.upfronthosting.co.za> Antoine Pitrou added the comment: FWIW, I sympathize with Christian's goal here, since I'm gonna have to backport pathlib too :-) However, I think the following changes do make the docstrings less readable: - >>> mean([1, 2, 3, 4, 4]) - 2.8 + >>> mean([1, 2, 3, 4, 4]) == 2.8 + True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 14:44:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 13:44:41 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385387081.98.0.260686119508.issue19763@psf.upfronthosting.co.za> STINNER Victor added the comment: > However, I think the following changes do make the docstrings less readable: Doctests are not reliable. IMO it's better to use unittest with testcases. unittest is easier to maintain, work with Python 2 and 3, and usually provide more useful reports on error. unittest has more features like functions to skip a test on a specific platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 16:49:31 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 25 Nov 2013 15:49:31 +0000 Subject: [issue19765] test_asyncio: test_create_server() failed on "x86 Windows Server 2008 [SB] 3.x" In-Reply-To: <1385371766.88.0.569586270438.issue19765@psf.upfronthosting.co.za> Message-ID: <1385394571.59.0.959276384159.issue19765@psf.upfronthosting.co.za> Guido van Rossum added the comment: Can you try this fix? diff -r 8d0206f97439 Lib/test/test_asyncio/test_events.py --- a/Lib/test/test_asyncio/test_events.py Sun Nov 24 22:41:35 2013 -0800 +++ b/Lib/test/test_asyncio/test_events.py Mon Nov 25 07:48:29 2013 -0800 @@ -559,7 +559,7 @@ client = socket.socket() client.connect(('127.0.0.1', port)) client.sendall(b'xxx') - test_utils.run_briefly(self.loop) + test_utils.run_until(self.loop, lambda: proto is not None, 10) self.assertIsInstance(proto, MyProto) self.assertEqual('INITIAL', proto.state) test_utils.run_briefly(self.loop) (I can also just commit that and the test_unix_events.py fix for AIX and hope for the best.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 16:53:37 2013 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 25 Nov 2013 15:53:37 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385394817.52.0.0882656440522.issue19743@psf.upfronthosting.co.za> Dave Malcolm added the comment: FWIW, I feel that it's worth just expecting failures with an *optimized* build: with an optimizing compiler, there's likely to always be some program counter location where the debugger is going to get confused for some variables. Given umpteen different compiler variants, debugger variants etc, this is never going to be perfect. So IMHO we should run the test on a --pydebug build, but accept that there will be some failures when optimization is on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:00:38 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 25 Nov 2013 16:00:38 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <20131125131407.GA3453@sleipnir.bytereef.org> Message-ID: <20131125160037.GA5042@sleipnir.bytereef.org> Stefan Krah added the comment: Apparently the build failed because only arm-linux-gnueabi-gcc-4.7 was installed but not arm-linux-gnueabi-gcc. But the cross build succeeds with the original 2.4-rc1, except that arm-linux-gnueabi-ar isn't picked up: $ ./configure --host=arm-linux-gnueabi checking for arm-linux-gnueabi-gcc... arm-linux-gnueabi-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether arm-linux-gnueabi-gcc accepts -g... yes checking for arm-linux-gnueabi-gcc option to accept ISO C89... none needed checking system as reported by uname -s... Linux checking how to run the C preprocessor... arm-linux-gnueabi-gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking for size_t... yes checking for int32_t... yes checking for int64_t... yes checking for uint32_t... yes checking for uint64_t... yes checking for __uint128_t... no checking size of size_t... 4 checking size of __uint128_t... 0 checking for x64 gcc inline assembler... no checking for x87 gcc inline assembler... no checking for -O2... yes checking for glibc _FORTIFY_SOURCE/memmove bug... undefined configure: creating ./config.status config.status: creating Makefile config.status: creating libmpdec/Makefile config.status: creating tests/Makefile config.status: creating libmpdec/mpdecimal.h config.status: creating config.h $ make cd libmpdec && make make[1]: Entering directory `/home/stefan/tmp/mpdecimal-2.4-rc1/libmpdec' arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c basearith.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c context.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c constants.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c convolute.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c crt.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c mpdecimal.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c mpsignal.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c difradix2.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c fnt.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c fourstep.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c io.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c memory.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c numbertheory.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c sixstep.c arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 -fpic -c transpose.c ar rc libmpdec.a basearith.o context.o constants.o convolute.o crt.o mpdecimal.o mpsignal.o difradix2.o fnt.o fourstep.o io.o memory.o numbertheory.o sixstep.o transpose.o ranlib libmpdec.a arm-linux-gnueabi-gcc -shared -Wl,-soname,libmpdec.so.2 -o libmpdec.so.2.4.0 basearith.o context.o constants.o convolute.o crt.o mpdecimal.o mpsignal.o difradix2.o fnt.o fourstep.o io.o memory.o numbertheory.o sixstep.o transpose.o -lm make[1]: Leaving directory `/home/stefan/tmp/mpdecimal-2.4-rc1/libmpdec' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:05:11 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 16:05:11 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385395511.08.0.937204474174.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: Updated patch for 3.3, and a new patch for 3.4. In 3.4, set_payload raises an error if non-ascii-surrogateescape text is passed in as the argument (ie: there are non-ascii unicode characters in the string) and no charset is specified with which to encode them. In an ideal world it would instead default to utf-8, but because there may exist code that passes in unicode and then encodes it later by calling set_charset, we can't go that route in 3.4. In 3.5, after the few people who may be in that boat have fixed their code to include the charset on set_payload, we can in fact make it default to utf-8. I had to fix a couple 3.4 test, one of which was no longer valid because I've now defined the previously undefined behavior of set_payload when passed unicode, and one of which was just wrong but I didn't notice because of this bug. ---------- Added file: http://bugs.python.org/file32837/support_8bit_charset_cte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:05:53 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 16:05:53 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385395553.47.0.14542428212.issue19063@psf.upfronthosting.co.za> Changes by R. David Murray : Added file: http://bugs.python.org/file32838/support_8bit_charset_cte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:14:11 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 16:14:11 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. Message-ID: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> New submission from R. David Murray: Currently the string generator will downcast 8bit body parts to 7bit by encoding them using a 7bit CTE. This is good. However, the way it does it is to modify the Message object accordingly. This is not good. Except for filling in required missing bits of data (such as MIME borders), serializing a Message should not mutate it. (And, for the curious, I am the one who made this mistake when I wrote the code :) ---------- components: Library (Lib), email keywords: easy messages: 204356 nosy: barry, r.david.murray, vajrasky priority: normal severity: normal stage: needs patch status: open title: str serialization of Message object may mutate the payload and CTE. type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:38:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 16:38:33 +0000 Subject: [issue19765] test_asyncio: test_create_server() failed on "x86 Windows Server 2008 [SB] 3.x" In-Reply-To: <1385371766.88.0.569586270438.issue19765@psf.upfronthosting.co.za> Message-ID: <1385397513.35.0.762588747778.issue19765@psf.upfronthosting.co.za> STINNER Victor added the comment: > Can you try this fix? If you are asking to me: again, I don't own a Windows 2008 copy. Just commit and then watch buildbots :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:41:40 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 25 Nov 2013 16:41:40 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1385397700.63.0.522489310558.issue19537@psf.upfronthosting.co.za> Stefan Krah added the comment: > (gdb) p sizeof(PyASCIIObject) > $1 = 22 If the only issue is that the size should be 24 instead of 22, could we perhaps add an unused uint16_t to the struct just for this architecture? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:42:54 2013 From: report at bugs.python.org (lambrecht) Date: Mon, 25 Nov 2013 16:42:54 +0000 Subject: [issue19773] Failed to build python 2.6.9 Solaris 10 Message-ID: <1385397774.16.0.00982923688333.issue19773@psf.upfronthosting.co.za> New submission from lambrecht: u1662805 at methpr:/home/u1662805>echo $PATH /usr/sbin:/usr/bin:/usr/local/bin:/etc:/EXP_SYS/etc/ga/scripts:/EXP_SYS/etc:/EXP_SYS/UTI:/METHPR/EXP_SYS/etc:/METHPR/EXP_SYS/uti:/opt/VRTSvxfs/sbin:/EXP_SYS/etc/ga/scripts:/usr/openwin/bin:/usr/ccs/bin u1662805 at methpr:/home/u1662805>make running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers building '_ssl' extension gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/ssl/include -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -IInclude -I./Include -I/usr/local/include -I/METHPR/tmp/Python-2.6.9/Include -I/METHPR/tmp/Python-2.6.9 -c /METHPR/tmp/Python-2.6.9/Modules/_ssl.c -o build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_ssl.o /METHPR/tmp/Python-2.6.9/Modules/_ssl.c: In function `_get_peer_alt_names': /METHPR/tmp/Python-2.6.9/Modules/_ssl.c:702: warning: assignment discards qualifiers from pointer target type /METHPR/tmp/Python-2.6.9/Modules/_ssl.c: In function `PySSL_cipher': /METHPR/tmp/Python-2.6.9/Modules/_ssl.c:1095: warning: assignment discards qualifiers from pointer target type gcc -shared build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_ssl.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.solaris-2.10-sun4v-2.6/_ssl.so *** WARNING: renaming "_ssl" since importing it failed: ld.so.1: python: fatal: libssl.so.1.0.0: open failed: No such file or directory building '_hashlib' extension gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/ssl/include -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -IInclude -I./Include -I/usr/local/include -I/METHPR/tmp/Python-2.6.9/Include -I/METHPR/tmp/Python-2.6.9 -c /METHPR/tmp/Python-2.6.9/Modules/_hashopenssl.c -o build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_hashopenssl.o gcc -shared build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_hashopenssl.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.solaris-2.10-sun4v-2.6/_hashlib.so *** WARNING: renaming "_hashlib" since importing it failed: ld.so.1: python: fatal: libssl.so.1.0.0: open failed: No such file or directory building '_curses' extension gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -IInclude -I./Include -I/usr/local/include -I/METHPR/tmp/Python-2.6.9/Include -I/METHPR/tmp/Python-2.6.9 -c /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c -o build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.o /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c: In function `PyCursesWindow_ChgAt': /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:708: warning: implicit declaration of function `mvwchgat' /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:712: warning: implicit declaration of function `wchgat' gcc -shared build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.o -L/usr/local/lib -lncurses -o build/lib.solaris-2.10-sun4v-2.6/_curses.so *** WARNING: renaming "_curses" since importing it failed: ld.so.1: python: fatal: relocation error: file build/lib.solaris-2.10-sun4v-2.6/_curses.so: symbol _unctrl: referenced symbol not found building '_curses_panel' extension gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -IInclude -I./Include -I/usr/local/include -I/METHPR/tmp/Python-2.6.9/Include -I/METHPR/tmp/Python-2.6.9 -c /METHPR/tmp/Python-2.6.9/Modules/_curses_panel.c -o build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_curses_panel.o gcc -shared build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_curses_panel.o -L/usr/local/lib -lpanel -lncurses -o build/lib.solaris-2.10-sun4v-2.6/_curses_panel.so *** WARNING: renaming "_curses_panel" since importing it failed: No module named _curses Failed to find the necessary bits to build these modules: _bsddb _tkinter bsddb185 gdbm linuxaudiodev ossaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _curses _curses_panel _hashlib _ssl running build_scripts ---------- components: Build messages: 204359 nosy: lambrechtphilippe priority: normal severity: normal status: open title: Failed to build python 2.6.9 Solaris 10 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:44:11 2013 From: report at bugs.python.org (lambrecht) Date: Mon, 25 Nov 2013 16:44:11 +0000 Subject: [issue19773] Failed to build python 2.6.9 Solaris 10 In-Reply-To: <1385397774.16.0.00982923688333.issue19773@psf.upfronthosting.co.za> Message-ID: <1385397851.7.0.196043179922.issue19773@psf.upfronthosting.co.za> Changes by lambrecht : ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:45:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 16:45:52 +0000 Subject: [issue19773] Failed to build python 2.6.9 Solaris 10 In-Reply-To: <1385397774.16.0.00982923688333.issue19773@psf.upfronthosting.co.za> Message-ID: <1385397952.51.0.408230098548.issue19773@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 2.6 is out of commission and will not receive update anymore. You have to fix the issues yourself or update to Python 2.7. I'm sorry for any inconvenience. The _hashlib and _ssl errors look like a broken installation of openssl. ---------- nosy: +christian.heimes resolution: -> out of date stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:46:04 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 16:46:04 +0000 Subject: [issue19773] Failed to build python 2.6.9 Solaris 10 In-Reply-To: <1385397774.16.0.00982923688333.issue19773@psf.upfronthosting.co.za> Message-ID: <1385397964.44.0.917350193697.issue19773@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:50:05 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 16:50:05 +0000 Subject: [issue19679] smtpd.py (SMTPChannel): get rid of "conn" attribute In-Reply-To: <1385031598.99.0.0454554803988.issue19679@psf.upfronthosting.co.za> Message-ID: <1385398205.86.0.639758696968.issue19679@psf.upfronthosting.co.za> R. David Murray added the comment: Are you referring to implementing rfc 3463 and rfc 5248 insofar as they are applicable? That seems useful. I don't see anything in the RFC about the 'xab x.y.z text' form of the message, though. Where is that documented? IMO these messages should only be emitted if we got an ELHO...actually I would expect there to be an extension keyword associated with this, but I don't see one in the RFC. The conn argument is a separate issue. (And probably should not change for backward compatibility reasons. Also, it doesn't have to be a socket, although it would indeed be unusual if it wasn't.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 17:51:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 16:51:48 +0000 Subject: [issue19773] Failed to build python 2.6.9 Solaris 10 In-Reply-To: <1385397774.16.0.00982923688333.issue19773@psf.upfronthosting.co.za> Message-ID: <1385398308.58.0.773572915329.issue19773@psf.upfronthosting.co.za> STINNER Victor added the comment: /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:708: warning: implicit declaration of function `mvwchgat' /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:712: warning: implicit declaration of function `wchgat' There errors are already reported as #13552. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:00:20 2013 From: report at bugs.python.org (David Edelsohn) Date: Mon, 25 Nov 2013 17:00:20 +0000 Subject: [issue19748] test_time failures on AIX In-Reply-To: <1385296584.36.0.0978202241603.issue19748@psf.upfronthosting.co.za> Message-ID: <1385398820.52.0.655517666624.issue19748@psf.upfronthosting.co.za> David Edelsohn added the comment: The valid range is 00:00:00 UTC, January 1, 1970 to 03:14:07 UTC, January 19, 2038. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:04:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 17:04:04 +0000 Subject: [issue19765] test_asyncio: test_create_server() failed on "x86 Windows Server 2008 [SB] 3.x" In-Reply-To: <1385371766.88.0.569586270438.issue19765@psf.upfronthosting.co.za> Message-ID: <1385399044.23.0.520105292088.issue19765@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:12:38 2013 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 25 Nov 2013 17:12:38 +0000 Subject: [issue19585] Frame annotation In-Reply-To: <1384448970.46.0.460613881183.issue19585@psf.upfronthosting.co.za> Message-ID: <1385399558.07.0.628948722486.issue19585@psf.upfronthosting.co.za> Walter D?rwald added the comment: Do you have an example where code objects are shared? We could attach the annotation formatter to the function object, but unfortunately the function object is now accessible in the traceback. Note the co_annotation is not the annotation string, rather it is a function that does the formatting of the annotation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:13:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 17:13:19 +0000 Subject: [issue19691] Weird wording in RuntimeError doc In-Reply-To: <1385130108.97.0.877442110994.issue19691@psf.upfronthosting.co.za> Message-ID: <1385399599.73.0.282643958894.issue19691@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The mention was already there in 1994 (2ec96140a36b), under the following form: +\begin{excdesc}{RuntimeError} + Raised when an error is detected that doesn't fall in any of the + other categories. The associated value is a string indicating what + precisely went wrong. (This exception is a relic from a previous + version of the interpreter; it is not used any more except by some + extension modules that haven't been converted to define their own + exceptions yet.) +\end{excdesc} It was changed slightly from being "a relic" to "mostly a relic" in 1997 (238a8b6096e1): \begin{excdesc}{RuntimeError} Raised when an error is detected that doesn't fall in any of the other categories. The associated value is a string indicating what - precisely went wrong. (This exception is a relic from a previous - version of the interpreter; it is not used any more except by some - extension modules that haven't been converted to define their own - exceptions yet.) + precisely went wrong. (This exception is mostly a relic from a + previous version of the interpreter; it is not used very much any + more.) \end{excdesc} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:13:38 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 17:13:38 +0000 Subject: [issue19678] smtpd.py: channel should be passed to process_message In-Reply-To: <1385031410.17.0.520349427654.issue19678@psf.upfronthosting.co.za> Message-ID: <1385399618.14.0.463605289914.issue19678@psf.upfronthosting.co.za> R. David Murray added the comment: I think this is reasonable. A patch would be welcome. You could use inspect. When I had to do something similar I just did the call inside a try/except, caught TypeError and retried without the extra argument. See the __init__ of email.feedparser.FeedParser. I don't know which approach is better; although, with the new signature support in 3.4 perhaps inspecting the signature is better. Another approach would be to designate a new method name for the new signature, and use hasattr to decide which to call. That's actually a bit more consistent with the way the SMTPChannel works. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:14:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 Nov 2013 17:14:45 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1385399685.89.0.436454827406.issue19537@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is sizeof(PyUnicodeObject)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:17:08 2013 From: report at bugs.python.org (Eric Snow) Date: Mon, 25 Nov 2013 17:17:08 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385399828.12.0.683469105289.issue19655@psf.upfronthosting.co.za> Eric Snow added the comment: The concern, as far as I understand it, is that any change might introduce regressions or even new bugs in the next beta. Something like swapping out the parser generator implementation isn't a bug fix, but it isn't a new language (incl. stdlib) feature either. I don't have a problem with the change. Furthermore, it likely doesn't matter since there probably won't be any grammar changes during the beta that would trigger the tool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:27:48 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 Nov 2013 17:27:48 +0000 Subject: [issue19739] Legit compiler warnings in new pickle code on 32-bit Windows In-Reply-To: <1385236264.72.0.60711493858.issue19739@psf.upfronthosting.co.za> Message-ID: <1385400468.54.0.18125310525.issue19739@psf.upfronthosting.co.za> Zachary Ware added the comment: This appears to be back with slightly different line numbers: ..\Modules\_pickle.c(718): warning C4293: '>>' : shift count negative or too big, undefined behavior ..\Modules\_pickle.c(719): warning C4293: '>>' : shift count negative or too big, undefined behavior ..\Modules\_pickle.c(720): warning C4293: '>>' : shift count negative or too big, undefined behavior ..\Modules\_pickle.c(721): warning C4293: '>>' : shift count negative or too big, undefined behavior ..\Modules\_pickle.c(1647): warning C4146: unary minus operator applied to unsigned type, result still unsigned Seems to have been caused by 14f2776686b3. ---------- nosy: +zach.ware resolution: fixed -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:35:25 2013 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 25 Nov 2013 17:35:25 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385400925.38.0.37185519317.issue19729@psf.upfronthosting.co.za> Yury Selivanov added the comment: This broke a lot of our code, I think that priority needs to be raised to urgent. ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:35:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 17:35:52 +0000 Subject: [issue8881] socket.getaddrinfo() should return named tuples In-Reply-To: <1275514288.42.0.225628200657.issue8881@psf.upfronthosting.co.za> Message-ID: <1385400952.66.0.301922163571.issue8881@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:39:01 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Mon, 25 Nov 2013 17:39:01 +0000 Subject: [issue19679] smtpd.py (SMTPChannel): implement enhanced status codes In-Reply-To: <1385031598.99.0.0454554803988.issue19679@psf.upfronthosting.co.za> Message-ID: <1385401141.47.0.776569823115.issue19679@psf.upfronthosting.co.za> Leslie P. Polzer added the comment: Sorry for the confusion, the second comment (#msg203622) should actually have been a separate ticket. Since you'd like to preserve "conn" I will just change the title of this ticket. ---------- title: smtpd.py (SMTPChannel): get rid of "conn" attribute -> smtpd.py (SMTPChannel): implement enhanced status codes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:41:02 2013 From: report at bugs.python.org (paul j3) Date: Mon, 25 Nov 2013 17:41:02 +0000 Subject: [issue17204] argparser's subparsers.add_parser() should accept an ArgumentParser In-Reply-To: <1360825267.06.0.240295052102.issue17204@psf.upfronthosting.co.za> Message-ID: <1385401262.6.0.398110470914.issue17204@psf.upfronthosting.co.za> paul j3 added the comment: http://stackoverflow.com/a/20167038/901925 is an example of using `_parser_class` to produce different behavior in the subparsers. parser = ArgumentParser() parser.add_argument('foo') sp = parser.add_subparsers(dest='cmd') sp._parser_class = SubParser # use different parser class for subparsers spp1 = sp.add_parser('cmd1') spp1.add_argument('-x') spp1.add_argument('bar') spp1.add_argument('vars',nargs='*') In this case the SubParser class implements a `parse_intermixed_known_args` method that handles that `nargs='*'` argument. http://bugs.python.org/issue14191 It shouldn't be hard to add `parser_class` as a documented optional argument to `add_subparsers`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:42:40 2013 From: report at bugs.python.org (HCT) Date: Mon, 25 Nov 2013 17:42:40 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385401360.75.0.72874423102.issue19729@psf.upfronthosting.co.za> HCT added the comment: my projects are total broken by this, so my temporary solution is to down grade to 3.3.2 somehow we don't have any test to check this before releasing 3.3.3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:44:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 17:44:57 +0000 Subject: [issue19750] test_asyncio.test_unix_events constructor failures on AIX In-Reply-To: <1385296950.99.0.982628682855.issue19750@psf.upfronthosting.co.za> Message-ID: <3dSwcS5jVfz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 871d496fa06c by Guido van Rossum in branch 'default': asyncio: Change mock pipe to mock socket. Hope to fix issue 19750. http://hg.python.org/cpython/rev/871d496fa06c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 18:49:30 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 17:49:30 +0000 Subject: [issue19739] Legit compiler warnings in new pickle code on 32-bit Windows In-Reply-To: <1385236264.72.0.60711493858.issue19739@psf.upfronthosting.co.za> Message-ID: <1385401770.59.0.643593533709.issue19739@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:06:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 18:06:44 +0000 Subject: [issue19765] test_asyncio: test_create_server() failed on "x86 Windows Server 2008 [SB] 3.x" In-Reply-To: <1385371766.88.0.569586270438.issue19765@psf.upfronthosting.co.za> Message-ID: <3dSx5b0JSwz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 368b74823c76 by Guido van Rossum in branch 'default': asyncio: Hopeful fix for issue 19765. http://hg.python.org/cpython/rev/368b74823c76 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:08:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 18:08:39 +0000 Subject: [issue19691] Weird wording in RuntimeError doc In-Reply-To: <1385130108.97.0.877442110994.issue19691@psf.upfronthosting.co.za> Message-ID: <3dSx7p5Fqzz7LkR@mail.python.org> Roundup Robot added the comment: New changeset 313d9bb253bf by Antoine Pitrou in branch '2.7': Issue #19691: remove outdated mention about RuntimeError http://hg.python.org/cpython/rev/313d9bb253bf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:11:24 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 25 Nov 2013 18:11:24 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1385403084.81.0.2396486644.issue19655@psf.upfronthosting.co.za> Brett Cannon added the comment: Let's just go with Eli's latest idea and just save it for 3.5 since it won't make any visible improvement in 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:12:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 18:12:53 +0000 Subject: [issue19691] Weird wording in RuntimeError doc In-Reply-To: <1385130108.97.0.877442110994.issue19691@psf.upfronthosting.co.za> Message-ID: <3dSxDh1vM9zN4d@mail.python.org> Roundup Robot added the comment: New changeset 6aeaaa614a19 by Antoine Pitrou in branch '3.3': Issue #19691: remove outdated mention about RuntimeError http://hg.python.org/cpython/rev/6aeaaa614a19 New changeset f4de1c5e381d by Antoine Pitrou in branch 'default': Issue #19691: remove outdated mention about RuntimeError http://hg.python.org/cpython/rev/f4de1c5e381d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:13:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 18:13:51 +0000 Subject: [issue19691] Weird wording in RuntimeError doc In-Reply-To: <1385130108.97.0.877442110994.issue19691@psf.upfronthosting.co.za> Message-ID: <1385403231.13.0.984035062931.issue19691@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:32:37 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 Nov 2013 18:32:37 +0000 Subject: [issue19739] Legit compiler warnings in new pickle code on 32-bit Windows In-Reply-To: <1385236264.72.0.60711493858.issue19739@psf.upfronthosting.co.za> Message-ID: <1385404357.19.0.815019952659.issue19739@psf.upfronthosting.co.za> Zachary Ware added the comment: The attached patch fixes the warnings and doesn't appear to break anything obvious. The first 4 are fixed by reverting Alexandre's change from '#if SIZEOF_SIZE_T' to 'if (sizeof(size_t)'. The last one is different from the original 5th warning, and is fixed using the same trick that has been used in Modules/audioop.c; that is, use '(-0x7fffffffL - 1)' rather than '-0x80000000L', which MSVC can't seem to handle. ---------- keywords: +patch Added file: http://bugs.python.org/file32839/issue19739.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:51:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 18:51:59 +0000 Subject: [issue19742] pathlib group unittests can fail In-Reply-To: <1385253929.39.0.153589073777.issue19742@psf.upfronthosting.co.za> Message-ID: <3dSy5q07w0z7Ljj@mail.python.org> Roundup Robot added the comment: New changeset b58b58948c27 by Antoine Pitrou in branch 'default': Issue #19742: fix a test_pathlib failure when a file owner or group isn't in the system database http://hg.python.org/cpython/rev/b58b58948c27 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:52:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 18:52:24 +0000 Subject: [issue19742] pathlib group unittests can fail In-Reply-To: <1385253929.39.0.153589073777.issue19742@psf.upfronthosting.co.za> Message-ID: <1385405544.51.0.717298808411.issue19742@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It should be fixed now (i.e. the test is skipped). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 19:57:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 18:57:35 +0000 Subject: [issue19742] pathlib group unittests can fail In-Reply-To: <1385253929.39.0.153589073777.issue19742@psf.upfronthosting.co.za> Message-ID: <1385405855.28.0.785359723838.issue19742@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 20:23:05 2013 From: report at bugs.python.org (Steve J Borba) Date: Mon, 25 Nov 2013 19:23:05 +0000 Subject: [issue19774] strptime incorrect for weekday '0' when using week number format Message-ID: <1385407385.23.0.963319097072.issue19774@psf.upfronthosting.co.za> New submission from Steve J Borba: OS: Windows 7 Professional (64-bit) Hardware: Intel datetime.strptime returns an incorrect value when calculating a date using a week number format, such as "%Y-%W-%w" (Year-Week-Weekday). The value returned for weekday '0' of a given week is consistently 7 days greater than it should be. The following code illustrates: from datetime import datetime for i in range(0,53): if i == 0: yr=input("Enter a valid year: ") print("Wk#\tBeginning of week\tEnd of week") BegWk = datetime.strptime((yr + "-" + str(i) + "-0"),"%Y-%W-%w") EndWk = datetime.strptime((yr + "-" + str(i) + "-6"),"%Y-%W-%w") print(str(i) + "\t" + str(BegWk) + "\t" +str(EndWk)) Here is a clip (7 lines) of the output from the code above: Enter a valid year: 2013 Wk# Beginning of week End of week 0 2013-01-06 00:00:00 2013-01-05 00:00:00 1 2013-01-13 00:00:00 2013-01-12 00:00:00 2 2013-01-20 00:00:00 2013-01-19 00:00:00 3 2013-01-27 00:00:00 2013-01-26 00:00:00 4 2013-02-03 00:00:00 2013-02-02 00:00:00 5 2013-02-10 00:00:00 2013-02-09 00:00:00 6 2013-02-17 00:00:00 2013-02-16 00:00:00 The value returned for the first column of each week is exactly 7 days higher than the correct result. ---------- components: Library (Lib) messages: 204382 nosy: Steve.J.Borba priority: normal severity: normal status: open title: strptime incorrect for weekday '0' when using week number format type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 20:36:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 19:36:17 +0000 Subject: [issue19739] Legit compiler warnings in new pickle code on 32-bit Windows In-Reply-To: <1385236264.72.0.60711493858.issue19739@psf.upfronthosting.co.za> Message-ID: <3dSz4w1qPnz7Lml@mail.python.org> Roundup Robot added the comment: New changeset f8ac01a762c1 by Alexandre Vassalotti in branch 'default': Issue #19739: Try to fix compiler warnings on 32-bit Windows. http://hg.python.org/cpython/rev/f8ac01a762c1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 20:39:58 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Mon, 25 Nov 2013 19:39:58 +0000 Subject: [issue19679] smtpd.py (SMTPChannel): implement enhanced status codes In-Reply-To: <1385031598.99.0.0454554803988.issue19679@psf.upfronthosting.co.za> Message-ID: <1385408398.94.0.573988060562.issue19679@psf.upfronthosting.co.za> Leslie P. Polzer added the comment: I am indeed referring to the enhanced status codes proposed in RFC 3463. This would just entail adding information to the status codes, converting them from the format " " to " ". In this it doesn't seem necessary to differentiate by HELO/EHLO; neither is it demanded by the standard nor does it result in an incompatible form of traditional HELO status messages. HELO clients should just interpret the first three digits and regard the rest as part of the human readable informal section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 20:42:08 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Nov 2013 19:42:08 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385408528.22.0.944722075952.issue19763@psf.upfronthosting.co.za> Georg Brandl added the comment: As Victor says, I'm not keen on those examples in the stdlib that do this, I'd rather get rid of all of them. And yes, doctests are only useful if they are written in the simplest possible way. Otherwise unittest style tests should be preferred. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 20:48:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 19:48:21 +0000 Subject: [issue19775] Provide samefile() on Path objects Message-ID: <1385408901.26.0.705019475145.issue19775@psf.upfronthosting.co.za> New submission from Antoine Pitrou: It would probably be useful to provide samefile() on Path objects - basically doing the same thing as os.path.samefile(). ---------- components: Library (Lib) messages: 204386 nosy: pitrou priority: normal severity: normal status: open title: Provide samefile() on Path objects type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:02:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 20:02:58 +0000 Subject: [issue19776] Provide expanduser() on Path objects Message-ID: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Something like expanduser() may be useful on Path objects. ---------- components: Library (Lib) messages: 204387 nosy: pitrou priority: low severity: normal status: open title: Provide expanduser() on Path objects type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:04:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 20:04:23 +0000 Subject: [issue19777] Provide a home() classmethod on Path objects Message-ID: <1385409863.35.0.0114355564026.issue19777@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Similar to Path.cwd(), perhaps a Path.home() to create a new Path object pointing to the current user's home directory may be useful. ---------- components: Library (Lib) messages: 204388 nosy: pitrou priority: low severity: normal status: open title: Provide a home() classmethod on Path objects type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:06:40 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 25 Nov 2013 20:06:40 +0000 Subject: [issue19766] test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot In-Reply-To: <1385372460.23.0.39838448994.issue19766@psf.upfronthosting.co.za> Message-ID: <1385410000.04.0.0732229997949.issue19766@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:09:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 Nov 2013 20:09:24 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385410164.55.0.501316322269.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which restores optimization for frame headers. Unfortunately it breaks test_optional_frames. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:10:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 Nov 2013 20:10:41 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385410241.34.0.811046599324.issue17810@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file32840/pickle_frame_headers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:10:51 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 25 Nov 2013 20:10:51 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385410251.39.0.242656436958.issue17810@psf.upfronthosting.co.za> Larry Hastings added the comment: Isn't it a little late to be changing the pickle protocol, now that we've hit feature-freeze? If you want to check something like this in you're going to have to make a good case for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:12:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 Nov 2013 20:12:30 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385410350.68.0.527974323771.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This doesn't change the pickle protocol. This is just an implementation detail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:14:06 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 20:14:06 +0000 Subject: [issue19626] test_email and Lib/email/_policybase.py failures with -OO In-Reply-To: <1384626069.77.0.304780424813.issue19626@psf.upfronthosting.co.za> Message-ID: <1385410446.75.0.845359198105.issue19626@psf.upfronthosting.co.za> R. David Murray added the comment: Lacking feedback in the negative, I'm closing this. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:14:20 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 25 Nov 2013 20:14:20 +0000 Subject: [issue19743] test_gdb failures In-Reply-To: <1385255448.44.0.696439937315.issue19743@psf.upfronthosting.co.za> Message-ID: <1385410460.89.0.0573617128393.issue19743@psf.upfronthosting.co.za> Larry Hastings added the comment: If skipping them for optimized builds is the right call, then aren't we done here? Can we close this bug as fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:16:32 2013 From: report at bugs.python.org (Chris) Date: Mon, 25 Nov 2013 20:16:32 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385410592.24.0.912813907116.issue19624@psf.upfronthosting.co.za> Chris added the comment: I would be interested in tackling this as a first patch, can you give me some more information? ---------- nosy: +chrishood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:24:28 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 25 Nov 2013 20:24:28 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385411068.34.0.407311409898.issue19624@psf.upfronthosting.co.za> Ethan Furman added the comment: Check out socket.py for an example of constants being changed over to IntEnum. Feel free to ask more questions! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:24:55 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 20:24:55 +0000 Subject: [issue19679] smtpd.py (SMTPChannel): implement enhanced status codes In-Reply-To: <1385031598.99.0.0454554803988.issue19679@psf.upfronthosting.co.za> Message-ID: <1385411095.78.0.650796376981.issue19679@psf.upfronthosting.co.za> R. David Murray added the comment: "Should" and "do" are different, though. I wouldn't be at all surprised to find legacy code that did look at the text string part of the message. Particularly test code, which is a place that smtpd gets used commonly. Which probably means that what we really need is a keyword argument to the SMTPServer constructor (analogous to data_size_limit) that indicates whether or not enhanced status codes are enabled, and have it be off by default. If desired, we could then issue a warning that enhanced status codes will be enabled by default in 3.6. That kind of process is our usual backward-compatibility dance. In this particular instance we could go one step farther and add a deprecation warning in 3.6 that the ability to set enhanced status codes off will go away in 3.7. If anybody remembers to carry through on it :) ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:25:38 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 25 Nov 2013 20:25:38 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385411138.67.0.471885521742.issue17810@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Optimizing the output of the pickler class should be fine during the feature freeze as long the semantics of the current opcodes stay unchanged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:26:07 2013 From: report at bugs.python.org (Ethan Furman) Date: Mon, 25 Nov 2013 20:26:07 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385411167.04.0.957399274507.issue19624@psf.upfronthosting.co.za> Ethan Furman added the comment: Also see Issue18720 for those details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:27:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Nov 2013 20:27:32 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385411252.25.0.156313902547.issue17810@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, Larry may expand, but I think we don't commit performance optimizations during the feature freeze either. ("feature" is taken in the same sense as in "no new features in the bugfix branches") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:28:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 Nov 2013 20:28:04 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385411284.44.0.00741192328928.issue19624@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not so easy issue because the errno module is not pure Python module. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:33:40 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 25 Nov 2013 20:33:40 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385411620.5.0.256851512746.issue17810@psf.upfronthosting.co.za> Larry Hastings added the comment: I'll make you a deal. As long as the protocol remains 100% backwards and forwards compatible (3.4.0b1 can read anything written by trunk, and trunk can read anything written by 3.4.0b1), you can make optimizations until beta 2. After that you have to stop... or get permission again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:37:16 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Mon, 25 Nov 2013 20:37:16 +0000 Subject: [issue19778] Change re.compile display Message-ID: <1385411836.14.0.1819060635.issue19778@psf.upfronthosting.co.za> New submission from Claudiu.Popa: Hello. I attached a minimal patch which fixes the re.compile display in documentation, after issue13592 was closed. ---------- assignee: docs at python components: Documentation files: sre_re.patch keywords: patch messages: 204402 nosy: Claudiu.Popa, docs at python, serhiy.storchaka priority: normal severity: normal status: open title: Change re.compile display type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32841/sre_re.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:40:27 2013 From: report at bugs.python.org (Andreas Schwab) Date: Mon, 25 Nov 2013 20:40:27 +0000 Subject: [issue19537] Fix misalignment in fastsearch_memchr_1char In-Reply-To: <1384014728.51.0.918202421473.issue19537@psf.upfronthosting.co.za> Message-ID: <1385412027.58.0.813110453849.issue19537@psf.upfronthosting.co.za> Andreas Schwab added the comment: (gdb) p sizeof(PyUnicodeObject) $1 = 38 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:45:53 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 20:45:53 +0000 Subject: [issue19774] strptime incorrect for weekday '0' when using week number format In-Reply-To: <1385407385.23.0.963319097072.issue19774@psf.upfronthosting.co.za> Message-ID: <1385412353.97.0.471722028145.issue19774@psf.upfronthosting.co.za> R. David Murray added the comment: from the man page for strptime: %w The weekday number (0-6) with Sunday = 0. %W The week number with Monday the first day of the week (0-53). The first Monday of January is the first day of week 1. Python's documentation is just a tiny bit clearer about %W: %W Week number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Monday are considered to be in week 0. So, the result is correct, albeit very unintuitive (the week day numbers for the purposes of %W are the sequence 1-2-3-4-5-6-0). You will note that if you call strftime with the same format string, you will get your input strings out as the output. Call this a design bug in posix that python has inherited. You will get the exact same behavior if you write a C program that calls strptime/strftime. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:46:52 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 Nov 2013 20:46:52 +0000 Subject: [issue19486] Bump up version of Tcl/Tk in building Python in Windows platform In-Reply-To: <1383492601.4.0.567246282787.issue19486@psf.upfronthosting.co.za> Message-ID: <1385412412.72.0.494879354203.issue19486@psf.upfronthosting.co.za> Zachary Ware added the comment: Looks like Martin took care of it in 730d89d66b38. Thanks, Martin! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:47:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 20:47:19 +0000 Subject: [issue19778] Change re.compile display In-Reply-To: <1385411836.14.0.1819060635.issue19778@psf.upfronthosting.co.za> Message-ID: <3dT0ft3PmFz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 5237e7da8a76 by Ezio Melotti in branch 'default': #19778: fix a couple of re reprs in the documentation. http://hg.python.org/cpython/rev/5237e7da8a76 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:48:08 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 25 Nov 2013 20:48:08 +0000 Subject: [issue19778] Change re.compile display In-Reply-To: <1385411836.14.0.1819060635.issue19778@psf.upfronthosting.co.za> Message-ID: <1385412488.16.0.752240977744.issue19778@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:57:41 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 20:57:41 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385413061.87.0.179261810253.issue19729@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +georg.brandl priority: normal -> release blocker stage: -> needs patch type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 21:58:03 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Nov 2013 20:58:03 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385413083.87.0.559401141419.issue19729@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:10:41 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Mon, 25 Nov 2013 21:10:41 +0000 Subject: [issue17457] Unittest discover fails with namespace packages and builtin modules In-Reply-To: <1363608930.16.0.788491274205.issue17457@psf.upfronthosting.co.za> Message-ID: <1385413841.73.0.956708471074.issue17457@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Sorry for the delay. Here's a minimal doc patch. I don't excel at writing documentation, it's not quite my strong point, so feel free to modify anything you seem fit. ---------- Added file: http://bugs.python.org/file32842/namespace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:19:29 2013 From: report at bugs.python.org (Chris) Date: Mon, 25 Nov 2013 21:19:29 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385414369.62.0.946105620607.issue19624@psf.upfronthosting.co.za> Chris added the comment: I think I'll look for some other issues, this one looks a bit deep for a first patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:19:35 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 21:19:35 +0000 Subject: [issue19585] Frame annotation In-Reply-To: <1385399558.07.0.628948722486.issue19585@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: A nested function will always share the code object between its instances - the nested code object is a compile time constant stored as part of the containing code object. Any code object attribute must be consistent for the lifetime of the object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:20:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 21:20:38 +0000 Subject: [issue13592] repr(regex) doesn't include actual regex In-Reply-To: <1323772944.14.0.269599775604.issue13592@psf.upfronthosting.co.za> Message-ID: <3dT1PK0Mqcz7Lkx@mail.python.org> Roundup Robot added the comment: New changeset 4ba7a29fe02c by Ezio Melotti in branch 'default': #13592, #17087: add whatsnew entry about regex/match object repr improvements. http://hg.python.org/cpython/rev/4ba7a29fe02c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:20:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 21:20:38 +0000 Subject: [issue17087] Improve the repr for regular expression match objects In-Reply-To: <1359589982.45.0.929656950631.issue17087@psf.upfronthosting.co.za> Message-ID: <3dT1PK6PTPz7LlS@mail.python.org> Roundup Robot added the comment: New changeset 4ba7a29fe02c by Ezio Melotti in branch 'default': #13592, #17087: add whatsnew entry about regex/match object repr improvements. http://hg.python.org/cpython/rev/4ba7a29fe02c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:21:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 25 Nov 2013 21:21:55 +0000 Subject: [issue19766] test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot In-Reply-To: <1385372460.23.0.39838448994.issue19766@psf.upfronthosting.co.za> Message-ID: <1385414515.08.0.843495925212.issue19766@psf.upfronthosting.co.za> Nick Coghlan added the comment: Potentially another platform compatibility issue for pip's dependencies. ---------- nosy: +dstufft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:24:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 21:24:41 +0000 Subject: [issue19750] test_asyncio.test_unix_events constructor failures on AIX In-Reply-To: <1385296950.99.0.982628682855.issue19750@psf.upfronthosting.co.za> Message-ID: <1385414681.03.0.538975711712.issue19750@psf.upfronthosting.co.za> STINNER Victor added the comment: Sporadic failure (test failed and then passed), probably unrelated to your commit: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7595/steps/test/logs/stdio ====================================================================== ERROR: testWriteNonBlocking (test.test_socket.UnbufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_socket.py", line 261, in _tearDown raise exc File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_socket.py", line 273, in clientRun test_func() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_socket.py", line 4206, in _testWriteNonBlocking n = self.write_file.write(BIG) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\socket.py", line 391, in write return self._sock.send(b) OSError: [WinError 10055] An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:27:37 2013 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 25 Nov 2013 21:27:37 +0000 Subject: [issue19750] test_asyncio.test_unix_events constructor failures on AIX In-Reply-To: <1385296950.99.0.982628682855.issue19750@psf.upfronthosting.co.za> Message-ID: <1385414857.36.0.644121244294.issue19750@psf.upfronthosting.co.za> Guido van Rossum added the comment: That's not even in test_asyncio. It also doesn't belong in this bug (which is for AIX). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:28:30 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 25 Nov 2013 21:28:30 +0000 Subject: [issue19739] Legit compiler warnings in new pickle code on 32-bit Windows In-Reply-To: <1385236264.72.0.60711493858.issue19739@psf.upfronthosting.co.za> Message-ID: <1385414910.24.0.629260303055.issue19739@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Thanks Zachary for the notice! Look like my change fixed the warnings on the Windows x86 build. http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1801 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:28:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 21:28:59 +0000 Subject: [issue19750] test_asyncio.test_unix_events constructor failures on AIX In-Reply-To: <1385296950.99.0.982628682855.issue19750@psf.upfronthosting.co.za> Message-ID: <1385414939.29.0.730683411148.issue19750@psf.upfronthosting.co.za> STINNER Victor added the comment: I posted it here because the only change of this build is the changeset 871d496fa06cfeae5f00478035b8ec6703d43ee2. http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7595/ I will to see if the failure reappears before opened in a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:36:19 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 25 Nov 2013 21:36:19 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista Message-ID: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> New submission from Tim Peters: Worked OK yesterday, using current default branch in all cases. C:\Code\Python\PCbuild>.\\python_d -Wd -E -bb ../lib/test/regrtest.py test_concurrent_futures [1/1] test_concurrent_futures Fatal Python error: Segmentation fault Current thread 0x00000590 (most recent call first): File "", line 882 in spec_from_file_location File "", line 1930 in _get_spec File "", line 1971 in find_spec File "", line 1834 in _get_spec File "", line 1860 in find_spec File "", line 2074 in _find_spec File "", line 2132 in _find_and_load_unlocked File "", line 2147 in _find_and_load File "", line 303 in _call_with_frames_removed File "", line 2194 in _handle_fromlist File "C:\Code\Python\lib\multiprocessing\popen_spawn_win32.py", line 8 in File "", line 303 in _call_with_frames_removed File "", line 1422 in exec_module File "", line 1111 in _exec File "", line 1187 in _load_unlocked File "", line 2136 in _find_and_load_unlocked File "", line 2147 in _find_and_load File "C:\Code\Python\lib\multiprocessing\context.py", line 312 in _Popen File "C:\Code\Python\lib\multiprocessing\context.py", line 212 in _Popen File "C:\Code\Python\lib\multiprocessing\process.py", line 105 in start File "C:\Code\Python\lib\concurrent\futures\process.py", line 387 in _adjust_process_count File "C:\Code\Python\lib\concurrent\futures\process.py", line 368 in _start_queue_management_thread File "C:\Code\Python\lib\concurrent\futures\process.py", line 407 in submit File "C:\Code\Python\lib\test\test_concurrent_futures.py", line 83 in File "C:\Code\Python\lib\test\test_concurrent_futures.py", line 83 in _prime_executor File "C:\Code\Python\lib\test\test_concurrent_futures.py", line 70 in setUp File "C:\Code\Python\lib\unittest\case.py", line 567 in run File "C:\Code\Python\lib\unittest\case.py", line 610 in __call__ File "C:\Code\Python\lib\unittest\suite.py", line 117 in run File "C:\Code\Python\lib\unittest\suite.py", line 79 in __call__ File "C:\Code\Python\lib\unittest\suite.py", line 117 in run File "C:\Code\Python\lib\unittest\suite.py", line 79 in __call__ File "C:\Code\Python\lib\unittest\suite.py", line 117 in run File "C:\Code\Python\lib\unittest\suite.py", line 79 in __call__ File "C:\Code\Python\lib\test\support\__init__.py", line 1584 in run File "C:\Code\Python\lib\test\support\__init__.py", line 1685 in _run_suite File "C:\Code\Python\lib\test\support\__init__.py", line 1719 in run_unittest File "C:\Code\Python\lib\test\test_concurrent_futures.py", line 673 in test_main File "C:\Code\Python\lib\test\support\__init__.py", line 1831 in decorator File "../lib/test/regrtest.py", line 1278 in runtest_inner File "../lib/test/regrtest.py", line 978 in runtest File "../lib/test/regrtest.py", line 763 in main File "../lib/test/regrtest.py", line 1562 in main_in_temp_cwd File "../lib/test/regrtest.py", line 1587 in Running with -v suggests it's dying in test_submit_keyword: ... test_no_stale_references (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.88s ok test_shutdown_race_issue12456 (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.88s ok test_submit (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.88s ok test_submit_keyword (test.test_concurrent_futures.ProcessPoolExecutorTest) ... And then a box pops up complaining that python_d stopped working. ---------- messages: 204418 nosy: tim.peters priority: normal severity: normal status: open title: test_concurrent_futures crashes on 32-bit Windows Vista versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:42:04 2013 From: report at bugs.python.org (Stefan Krah) Date: Mon, 25 Nov 2013 21:42:04 +0000 Subject: [issue19732] python fails to build when configured with --with-system-libmpdec In-Reply-To: <1385195580.05.0.00984042109495.issue19732@psf.upfronthosting.co.za> Message-ID: <1385415724.83.0.45591561674.issue19732@psf.upfronthosting.co.za> Stefan Krah added the comment: I've fixed cross-compiling and a couple of small issues in the repo from msg20434. Cross-compiling seems to work also without config-guess, but I've included it anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:43:12 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 25 Nov 2013 21:43:12 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista In-Reply-To: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> Message-ID: <1385415792.19.0.915189626409.issue19779@psf.upfronthosting.co.za> Tim Peters added the comment: Hmm. Looks like it's dying in gcmodule.c's visit_decref(), here: if (PyObject_IS_GC(op)) { So it may or may not trigger depending on the vagaries of when cyclic gc runs. For op, op->_ob_next, _ob_prev, ob_refcnt, and ob_type are all 0xdddddddd. That doesn't look good - LOL ;-) Here's the call stack: > python34_d.dll!visit_decref(_object * op, void * data) Line 373 + 0x6 bytes C python34_d.dll!tupletraverse(PyTupleObject * o, int (_object *, void *)* visit, void * arg) Line 564 + 0x1f bytes C python34_d.dll!subtract_refs(_gc_head * containers) Line 400 + 0x11 bytes C python34_d.dll!collect(int generation, int * n_collected, int * n_uncollectable, int nofail) Line 957 + 0x9 bytes C python34_d.dll!collect_with_callback(int generation) Line 1128 + 0x13 bytes C python34_d.dll!collect_generations() Line 1151 + 0x9 bytes C python34_d.dll!_PyObject_GC_Malloc(unsigned int basicsize) Line 1740 C python34_d.dll!_PyObject_GC_New(_typeobject * tp) Line 1749 + 0xc bytes C python34_d.dll!mbuf_alloc() Line 68 + 0xa bytes C python34_d.dll!_PyManagedBuffer_FromObject(_object * base) Line 84 + 0x5 bytes C python34_d.dll!PyMemoryView_FromObject(_object * v) Line 789 + 0x9 bytes C python34_d.dll!bytesio_getbuffer(bytesio * self) Line 220 + 0x9 bytes C python34_d.dll!call_function(_object * * * pp_stack, int oparg) Line 4208 + 0x16 bytes C python34_d.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 2828 C python34_d.dll!PyEval_EvalCodeEx(_object * _co, _object * globals, _object * locals, _object * * args, int argcount, _object * * kws, int kwcount, _object * * defs, int defcount, _object * kwdefs, _object * closure) Line 3576 + 0xb bytes C python34_d.dll!fast_function(_object * func, _object * * * pp_stack, int n, int na, int nk) Line 4335 + 0x38 bytes C python34_d.dll!call_function(_object * * * pp_stack, int oparg) Line 4250 + 0x15 bytes C python34_d.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 2828 C python34_d.dll!PyEval_EvalCodeEx(_object * _co, _object * globals, _object * locals, _object * * args, int argcount, _object * * kws, int kwcount, _object * * defs, int defcount, _object * kwdefs, _object * closure) Line 3576 + 0xb bytes C python34_d.dll!function_call(_object * func, _object * arg, _object * kw) Line 638 + 0x41 bytes C python34_d.dll!PyObject_Call(_object * func, _object * arg, _object * kw) Line 2087 + 0xf bytes C python34_d.dll!ext_do_call(_object * func, _object * * * pp_stack, int flags, int na, int nk) Line 4549 + 0x8 bytes C python34_d.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 2869 C python34_d.dll!fast_function(_object * func, _object * * * pp_stack, int n, int na, int nk) Line 4323 C python34_d.dll!call_function(_object * * * pp_stack, int oparg) Line 4250 + 0x15 bytes C python34_d.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 2828 C python34_d.dll!fast_function(_object * func, _object * * * pp_stack, int n, int na, int nk) Line 4323 C python34_d.dll!call_function(_object * * * pp_stack, int oparg) Line 4250 + 0x15 bytes C python34_d.dll!PyEval_EvalFrameEx(_frame * f, int throwflag) Line 2828 C python34_d.dll!PyEval_EvalCodeEx(_object * _co, _object * globals, _object * locals, _object * * args, int argcount, _object * * kws, int kwcount, _object * * defs, int defcount, _object * kwdefs, _object * closure) Line 3576 + 0xb bytes C python34_d.dll!function_call(_object * func, _object * arg, _object * kw) Line 638 + 0x41 bytes C python34_d.dll!PyObject_Call(_object * func, _object * arg, _object * kw) Line 2087 + 0xf bytes C python34_d.dll!method_call(_object * func, _object * arg, _object * kw) Line 347 + 0x11 bytes C python34_d.dll!PyObject_Call(_object * func, _object * arg, _object * kw) Line 2087 + 0xf bytes C python34_d.dll!PyEval_CallObjectWithKeywords(_object * func, _object * arg, _object * kw) Line 4102 C python34_d.dll!t_bootstrap(void * boot_raw) Line 1000 + 0x1a bytes C python34_d.dll!bootstrap(void * call) Line 175 + 0x7 bytes C msvcr100d.dll!_callthreadstartex() Line 314 + 0xf bytes C msvcr100d.dll!_threadstartex(void * ptd) Line 297 C kernel32.dll!76fdd2e9() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!77181603() ntdll.dll!771815d6() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:44:26 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 Nov 2013 21:44:26 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista In-Reply-To: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> Message-ID: <1385415866.87.0.11525545204.issue19779@psf.upfronthosting.co.za> Zachary Ware added the comment: I suspect you pulled at just the wrong time and caught e39db21df580, which Alexandre has already reverted in 2a1de922651a. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:45:23 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 Nov 2013 21:45:23 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista In-Reply-To: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> Message-ID: <1385415923.21.0.814473338082.issue19779@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:49:34 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 25 Nov 2013 21:49:34 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista In-Reply-To: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> Message-ID: <1385416174.86.0.383008287876.issue19779@psf.upfronthosting.co.za> Tim Peters added the comment: BTW, I believe 0xdddddddd is what MS's debug libraries use to overwrite memory that's already been free()'d - akin to PyMalloc's "DEADBYTE". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:52:35 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 25 Nov 2013 21:52:35 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista In-Reply-To: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> Message-ID: <1385416355.6.0.407385384489.issue19779@psf.upfronthosting.co.za> Tim Peters added the comment: Zach, after pulling again and rebuilding, still failing in what looks like the same way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:55:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 Nov 2013 21:55:09 +0000 Subject: [issue19780] Pickle 4 frame headers optimization Message-ID: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which restores (removed at last moment before 3.4beta1 release) frame headers optimization for the pickle protocol 4. Frame header now saved as a part of previous frame. This decreases the number of unbuffered reads per frame from 3 to 1. ---------- components: Library (Lib) files: pickle_frame_headers.patch keywords: patch messages: 204424 nosy: alexandre.vassalotti, larry, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Pickle 4 frame headers optimization type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32843/pickle_frame_headers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:56:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 25 Nov 2013 21:56:35 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1385416595.12.0.566324744349.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have opened separate issue19780 for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 22:56:31 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 25 Nov 2013 21:56:31 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista In-Reply-To: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> Message-ID: <1385416591.84.0.866064247282.issue19779@psf.upfronthosting.co.za> Zachary Ware added the comment: Hmmm, that's odd; I can't reproduce on Windows 7 from 2a1de922651a, but I can from e39db21df580. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 23:02:19 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 25 Nov 2013 22:02:19 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista In-Reply-To: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> Message-ID: <1385416939.73.0.955197821838.issue19779@psf.upfronthosting.co.za> Tim Peters added the comment: Zach, that could be - my box is *really* screwed up now - going to reboot and try again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 23:20:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 22:20:15 +0000 Subject: [issue19752] os.openpty() failure on Solaris 10: PermissionError: [Errno 13] Permission denied In-Reply-To: <1385297335.29.0.992027389374.issue19752@psf.upfronthosting.co.za> Message-ID: <3dT2k66YGNz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 63c1fbc4de4b by Victor Stinner in branch 'default': Issue #19752: Fix "HAVE_DEV_PTMX" implementation of os.openpty() http://hg.python.org/cpython/rev/63c1fbc4de4b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 23:21:52 2013 From: report at bugs.python.org (Tim Peters) Date: Mon, 25 Nov 2013 22:21:52 +0000 Subject: [issue19779] test_concurrent_futures crashes on 32-bit Windows Vista In-Reply-To: <1385415379.8.0.787528986127.issue19779@psf.upfronthosting.co.za> Message-ID: <1385418112.17.0.571161654053.issue19779@psf.upfronthosting.co.za> Tim Peters added the comment: Yup, a reboot & rebuild fixed it. I think stray processes left over from older test runs were preventing a rebuild from replacing my debug DLL. Gotta love Windows ;-) ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 23:22:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 22:22:18 +0000 Subject: [issue19752] os.openpty() failure on Solaris 10: PermissionError: [Errno 13] Permission denied In-Reply-To: <1385297335.29.0.992027389374.issue19752@psf.upfronthosting.co.za> Message-ID: <1385418138.03.0.0974638768156.issue19752@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks to the Snakebite, I was able to connect to Solaris 10 to reproduce and fix the issue. Thank you Trent! ---------- nosy: +trent resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 23:25:08 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 25 Nov 2013 22:25:08 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385418308.62.0.0629437518628.issue19780@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 25 23:29:23 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 25 Nov 2013 22:29:23 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385418563.93.0.955557849994.issue19729@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:09:34 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 23:09:34 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385420974.12.0.745909253782.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: @neologix: I run test_tracemalloc on "IRIX64 silicon 6.5 07202013 IP35" (our IRIX buildbot) which uses a 32-bit MIPS CPU, and the test pass. The code was compiled with gcc 3.4.6. So packed structures works also on 32-bit MIPS. Well, it is not surprising, int and void* have the same size: 32 bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:41:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 23:41:55 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <3dT4XL3FRSz7Lmq@mail.python.org> Roundup Robot added the comment: New changeset 2da28004dfac by Victor Stinner in branch 'default': Issue #18874: tracemalloc: explain the purpose of get_traces.tracebacks in a comment http://hg.python.org/cpython/rev/2da28004dfac New changeset b6414aa8cf77 by Victor Stinner in branch 'default': Issue #18874: apply Jim Jewett's patch on tracemalloc doc http://hg.python.org/cpython/rev/b6414aa8cf77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:44:24 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 23:44:24 +0000 Subject: [issue19781] No SSL match_hostname() in ftplib Message-ID: <1385423063.98.0.532680357118.issue19781@psf.upfronthosting.co.za> New submission from Christian Heimes: match_hostname patch for ftplib (see #19509) ---------- files: check_ftplib.patch keywords: patch messages: 204433 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: No SSL match_hostname() in ftplib type: security versions: Python 3.4 Added file: http://bugs.python.org/file32844/check_ftplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:45:28 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 23:45:28 +0000 Subject: [issue19782] No SSL match_hostname() in imaplib Message-ID: <1385423128.55.0.373615853043.issue19782@psf.upfronthosting.co.za> New submission from Christian Heimes: match_hostname patch for imaplib (see #19509). The patch doesn't have tests yet. ---------- components: Library (Lib) messages: 204434 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: No SSL match_hostname() in imaplib type: security versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:45:53 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 23:45:53 +0000 Subject: [issue19782] No SSL match_hostname() in imaplib In-Reply-To: <1385423128.55.0.373615853043.issue19782@psf.upfronthosting.co.za> Message-ID: <1385423153.57.0.268757582774.issue19782@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- keywords: +patch Added file: http://bugs.python.org/file32845/check_imaplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:46:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Nov 2013 23:46:01 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <3dT4d42B6rz7LpS@mail.python.org> Roundup Robot added the comment: New changeset a2811425dbde by Victor Stinner in branch 'default': Issue #18874: allow to call tracemalloc.Snapshot.statistics(cumulative=True) http://hg.python.org/cpython/rev/a2811425dbde ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:46:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 23:46:49 +0000 Subject: [issue19783] No SSL match_hostname() in nntplib Message-ID: <1385423208.98.0.59627306788.issue19783@psf.upfronthosting.co.za> New submission from Christian Heimes: match_hostname patch for nntplib (see #19509). The patch doesn't have tests yet. ---------- components: Library (Lib) files: check_nntplib.patch keywords: patch messages: 204436 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: No SSL match_hostname() in nntplib type: security versions: Python 3.4 Added file: http://bugs.python.org/file32846/check_nntplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:47:27 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 23:47:27 +0000 Subject: [issue19784] No SSL match_hostname() in poplib Message-ID: <1385423247.18.0.333542654641.issue19784@psf.upfronthosting.co.za> New submission from Christian Heimes: match_hostname patch for poplib (see #19509). The patch doesn't have tests yet. ---------- components: Library (Lib) files: check_poplib.patch keywords: patch messages: 204437 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: No SSL match_hostname() in poplib type: security versions: Python 3.4 Added file: http://bugs.python.org/file32847/check_poplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:47:59 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 23:47:59 +0000 Subject: [issue19785] No SSL match_hostname() in smtplib Message-ID: <1385423279.73.0.0929925715399.issue19785@psf.upfronthosting.co.za> New submission from Christian Heimes: match_hostname patch for smtplib (see #19509). The patch doesn't have tests yet. ---------- components: Library (Lib) messages: 204438 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: No SSL match_hostname() in smtplib type: security versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:48:42 2013 From: report at bugs.python.org (Glenn Maynard) Date: Mon, 25 Nov 2013 23:48:42 +0000 Subject: [issue14073] allow per-thread atexit() In-Reply-To: <1329833528.5.0.177059033602.issue14073@psf.upfronthosting.co.za> Message-ID: <1385423322.16.0.636994159388.issue14073@psf.upfronthosting.co.za> Glenn Maynard added the comment: This would be useful. It shouldn't be part of atexit, since atexit.register() from a thread should register a process-exit handler; instead, something like threading.(un)register_atexit(). If called in a thread, the calls happen when run() returns; if called in the main thread, call them when regular atexits are called (perhaps interleaved with atexit, as if atexit.register had been used). For example, this can be helpful to handle cleaning up per-thread singletons like database connections. ---------- nosy: +Glenn.Maynard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:48:56 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 23:48:56 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385423336.85.0.397298303767.issue19509@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- dependencies: +No SSL match_hostname() in ftplib, No SSL match_hostname() in imaplib, No SSL match_hostname() in nntplib, No SSL match_hostname() in poplib, No SSL match_hostname() in smtplib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:49:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Nov 2013 23:49:46 +0000 Subject: [issue19786] tracemalloc: remove arbitrary limit of 100 frames Message-ID: <1385423386.94.0.320211351923.issue19786@psf.upfronthosting.co.za> New submission from STINNER Victor: It should be possible to collect more than 100 frames per traceback (even it is much slower and uses much more memory). I prepared the code to make it possible. Now only one thread should call traceback_new() at the same time, and the maximum number of frames is fixed while tracemalloc is tracing. I will work on a patch. ---------- messages: 204440 nosy: haypo priority: normal severity: normal status: open title: tracemalloc: remove arbitrary limit of 100 frames versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 00:56:53 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 25 Nov 2013 23:56:53 +0000 Subject: [issue14073] allow per-thread atexit() In-Reply-To: <1329833528.5.0.177059033602.issue14073@psf.upfronthosting.co.za> Message-ID: <1385423813.19.0.389310100448.issue14073@psf.upfronthosting.co.za> Christian Heimes added the comment: A couple of years ago I suggested something similar. I'd like to see both thread_start and thread_stop hooks so code can track the creation and destruction of threads. It's a useful feature for e.g. PyLucene or profilers. The callback must be inside the thread and not from the main thread, though. Perhaps somebody likes to work on a PEP for 3.5? ---------- nosy: +christian.heimes versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 01:13:57 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 00:13:57 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() Message-ID: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> New submission from STINNER Victor: The tracemalloc module uses PyThread_set_key_value() to store an flag in the Thread Local Storage. The problem is that it is not possible to call the function twice with two different values. If PyThread_set_key_value() is called with a non-NULL pointer, the next calls do nothing. Python should expose a new function which would always call TlsSetValue() / pthread_setspecific() with the input value with no extra check on the input value. ---------- messages: 204442 nosy: haypo, neologix priority: normal severity: normal status: open title: tracemalloc: set_reentrant() should not have to call PyThread_delete_key() versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 01:14:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 00:14:30 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385424870.78.0.552877201137.issue19787@psf.upfronthosting.co.za> STINNER Victor added the comment: Extract of Modules/_tracemalloc.c: static void set_reentrant(int reentrant) { assert(reentrant == 0 || reentrant == 1); if (reentrant) { assert(PyThread_get_key_value(tracemalloc_reentrant_key) == NULL); PyThread_set_key_value(tracemalloc_reentrant_key, REENTRANT); } else { /* FIXME: PyThread_set_key_value() cannot be used to set the flag to zero, because it does nothing if the variable has already a value set. */ PyThread_delete_key_value(tracemalloc_reentrant_key); } } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 01:21:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 00:21:51 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <3dT5QQ5vG3z7LpR@mail.python.org> Roundup Robot added the comment: New changeset cf2c4cd08dd9 by Victor Stinner in branch 'default': Issue #18874: tracemalloc: Comment the trace_t structure http://hg.python.org/cpython/rev/cf2c4cd08dd9 New changeset f06a50c2bf85 by Victor Stinner in branch 'default': Issue #18874: make it more explicit than set_reentrant() only accept 0 or 1 http://hg.python.org/cpython/rev/f06a50c2bf85 New changeset 02668e24d72d by Victor Stinner in branch 'default': Issue #18874: Fix typo http://hg.python.org/cpython/rev/02668e24d72d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 02:22:27 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 26 Nov 2013 01:22:27 +0000 Subject: [issue19773] Failed to build python 2.6.9 Solaris 10 In-Reply-To: <1385397774.16.0.00982923688333.issue19773@psf.upfronthosting.co.za> Message-ID: <1385428947.02.0.342348292674.issue19773@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Python is being building correctly. Some additional modules are not so lucky, though. In particular, you must locate your OpenSSL installation. For instance, I need to do this in my Solaris 10 machines: """ export LD_RUN_PATH=/usr/local/ssl/lib """ to correctly build SSL and HASHLIB modules. You can ignore CURSES if you are not going to use curses programs. You don't probably have Berkeley DB libraries installed, so bsddb is not being build, etc. Anyway, Python is being correctly built. If you don't use the libraries that don't compile, you are fine. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 02:45:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 01:45:33 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385430333.13.0.215097849066.issue19787@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- type: -> enhancement versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 02:47:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 01:47:34 +0000 Subject: [issue14073] allow per-thread atexit() In-Reply-To: <1329833528.5.0.177059033602.issue14073@psf.upfronthosting.co.za> Message-ID: <1385430454.61.0.826568641165.issue14073@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Most logical would be an API on Thread objects (this would obviously only work with threading-created threads). A PEP also sounds unnecessary for a single new API. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 02:50:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 01:50:51 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385430651.54.0.747569614962.issue19780@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm... I thought your patch was only an optimization, but if you're overlapping frames (by adding 9 to the frame size), it becomes a protocol change. I personally am against changing the PEP at this point, especially for what looks like a rather minor win. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:24:21 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:24:21 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385432661.53.0.754524693011.issue19509@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:24:59 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:24:59 +0000 Subject: [issue19781] No SSL match_hostname() in ftplib In-Reply-To: <1385423063.98.0.532680357118.issue19781@psf.upfronthosting.co.za> Message-ID: <1385432699.85.0.318785958335.issue19781@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:25:05 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:25:05 +0000 Subject: [issue19782] No SSL match_hostname() in imaplib In-Reply-To: <1385423128.55.0.373615853043.issue19782@psf.upfronthosting.co.za> Message-ID: <1385432705.26.0.480139347855.issue19782@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:25:11 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:25:11 +0000 Subject: [issue19783] No SSL match_hostname() in nntplib In-Reply-To: <1385423208.98.0.59627306788.issue19783@psf.upfronthosting.co.za> Message-ID: <1385432711.12.0.943414335529.issue19783@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:25:17 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:25:17 +0000 Subject: [issue19784] No SSL match_hostname() in poplib In-Reply-To: <1385423247.18.0.333542654641.issue19784@psf.upfronthosting.co.za> Message-ID: <1385432717.45.0.649071786748.issue19784@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:25:23 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:25:23 +0000 Subject: [issue19785] No SSL match_hostname() in smtplib In-Reply-To: <1385423279.73.0.0929925715399.issue19785@psf.upfronthosting.co.za> Message-ID: <1385432723.32.0.855311511037.issue19785@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:27:50 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:27:50 +0000 Subject: [issue19786] tracemalloc: remove arbitrary limit of 100 frames In-Reply-To: <1385423386.94.0.320211351923.issue19786@psf.upfronthosting.co.za> Message-ID: <1385432870.64.0.94671014715.issue19786@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:27:57 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:27:57 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385432877.57.0.294847693333.issue19787@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:29:10 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:29:10 +0000 Subject: [issue19775] Provide samefile() on Path objects In-Reply-To: <1385408901.26.0.705019475145.issue19775@psf.upfronthosting.co.za> Message-ID: <1385432950.47.0.364387941296.issue19775@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:29:21 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:29:21 +0000 Subject: [issue19776] Provide expanduser() on Path objects In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za> Message-ID: <1385432961.7.0.0266202935611.issue19776@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 03:29:49 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 26 Nov 2013 02:29:49 +0000 Subject: [issue19777] Provide a home() classmethod on Path objects In-Reply-To: <1385409863.35.0.0114355564026.issue19777@psf.upfronthosting.co.za> Message-ID: <1385432989.33.0.663362412979.issue19777@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 05:45:31 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 26 Nov 2013 04:45:31 +0000 Subject: [issue19788] Always run kill_python(_d).exe when (re-)building on Windows Message-ID: <1385441131.37.0.761786658191.issue19788@psf.upfronthosting.co.za> New submission from Zachary Ware: The attached patch turns running kill_python(_d).exe into a PreBuildEvent in pythoncore.vcxproj. This should guarantee that kill_python(_d).exe is always run to guarantee no zombie pythons in the background can prevent overwriting the Python dll. The pythoncore project already depends on the kill_python project, so kill_python should always be built and ready before this PreBuildEvent fires. The patch also removes the separate building and running of kill_python_d.exe from the buildbot build scripts, since it should be unnecessary with the patch to pythoncore.vcxproj. Tim Peters, this patch was partly inspired by your issues in #19779; I suspect that perhaps your rebuild didn't take due to the segfaulted interpreter still hanging around in the background since the same thing happened to me doing a rebuild from the command line. Would you mind testing this patch to see if it would have helped in your case? Steps to test should be something like: - update to e39db21df580 - build, run test_concurrent_futures (expect segfault) - update to default - rebuild, run test_concurrent_futures (expect build error and segfault again) - apply patch - rebuild, run test_concurrent_futures (expect success (or usual result)) ---------- components: Build, Windows files: kill_python_prebuild.diff keywords: patch messages: 204448 nosy: brian.curtin, tim.golden, tim.peters, zach.ware priority: normal severity: normal stage: patch review status: open title: Always run kill_python(_d).exe when (re-)building on Windows type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32848/kill_python_prebuild.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 06:00:36 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 26 Nov 2013 05:00:36 +0000 Subject: [issue19788] Always run kill_python(_d).exe when (re-)building on Windows In-Reply-To: <1385441131.37.0.761786658191.issue19788@psf.upfronthosting.co.za> Message-ID: <1385442036.56.0.263465142732.issue19788@psf.upfronthosting.co.za> Tim Peters added the comment: Zach, I'll try the patch soon. Will this kill _all_ Python processes? I often have some unrelated Python program(s) running when waiting for a development build to finish, so that could create real havoc. BTW, I'm sure you're right that zombie Pythons were the cause of my earlier woes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 06:06:36 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 26 Nov 2013 05:06:36 +0000 Subject: [issue19788] Always run kill_python(_d).exe when (re-)building on Windows In-Reply-To: <1385441131.37.0.761786658191.issue19788@psf.upfronthosting.co.za> Message-ID: <1385442396.43.0.977512957262.issue19788@psf.upfronthosting.co.za> Tim Peters added the comment: OK, looked at the code and sees that it tries to kill only pythons created by the build process - I feel batter now :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 06:14:20 2013 From: report at bugs.python.org (Simon Weber) Date: Tue, 26 Nov 2013 05:14:20 +0000 Subject: [issue19789] Improve wording of how to "undo" a call to logging.disable(lvl) Message-ID: <1385442860.38.0.88263802784.issue19789@psf.upfronthosting.co.za> New submission from Simon Weber: In http://bugs.python.org/issue14864, this line was added to the logging.disable docstring: To undo the effect of a call to logging.disable(lvl), call logging.disable(logging.NOTSET). To prevent misunderstanding, I propose that this line be changed to: Calling logging.disable(logging.NOTSET) will undo all previous calls to logging.disable(lvl). While the original change was an improvement, it's misleading. "undoing the effect of a call" reads as "undoing the effect of the last call", which implies a stack -- think of text editor "undo" functionality. In other words, the current documentation implies behavior like a context manager: >>> import logging # start with all logging enabled >>> logging.disable(logging.CRITICAL) # all logging disabled >>> logging.disable(logging.WARNING) # only CRITICAL enabled >>> logging.disable(logging.NOTSET) # undo; all logging disabled >>> logging.disable(logging.NOTSET) # undo; all logging enabled Since logging.disable is idempotent, we're not undoing *a call*, we're undoing *all calls*. ---------- assignee: docs at python components: Documentation messages: 204451 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, simonmweber priority: normal severity: normal status: open title: Improve wording of how to "undo" a call to logging.disable(lvl) type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 06:29:59 2013 From: report at bugs.python.org (Tim Peters) Date: Tue, 26 Nov 2013 05:29:59 +0000 Subject: [issue19788] Always run kill_python(_d).exe when (re-)building on Windows In-Reply-To: <1385441131.37.0.761786658191.issue19788@psf.upfronthosting.co.za> Message-ID: <1385443799.33.0.695081706852.issue19788@psf.upfronthosting.co.za> Tim Peters added the comment: Done. I wasn't able to provoke the failing test into leaving behind rogue processes, so I eventually just ran some python_d processes of my own. Of course that stopped the build from replacing the executables, so test_concurrent_futures kept failing. But after applying your patch, my python_d processes were indeed killed off, as expected, and test_concurrent_futures started working again. So: ship it! :-) Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 06:53:23 2013 From: report at bugs.python.org (Martin Panter) Date: Tue, 26 Nov 2013 05:53:23 +0000 Subject: [issue19622] Default buffering for input and output pipes in subprocess module In-Reply-To: <1384579334.66.0.612676075589.issue19622@psf.upfronthosting.co.za> Message-ID: <1385445203.92.0.595036748442.issue19622@psf.upfronthosting.co.za> Martin Panter added the comment: The updated text to ?suprocess.rst? is better, but now it looks like the whole paragraph fails to render at http://docs.python.org/dev/library/subprocess#subprocess.Popen. I have no idea about the syntax but maybe the blank line separating ?versionchanged? from its paragraph shouldn?t be there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 07:38:32 2013 From: report at bugs.python.org (yinkaisheng) Date: Tue, 26 Nov 2013 06:38:32 +0000 Subject: [issue19790] ctypes can't load a c++ dll if the dll calls COM on Windows 8 Message-ID: <1385447912.09.0.00620803320142.issue19790@psf.upfronthosting.co.za> New submission from yinkaisheng: I created a c++ dll project that calls COM. cyptes works well with the dll on Windows XP(SP3) and Windows 7. But it can't load the dll on windows 8. The function ctypes.cdll.LoadLibrary doesn't return when I call it to load the dll on Windows 8. The version of my Python is 2.7.6 The version of my Windows 8 is 6.2.9200.16384 I uploaded a sample dll project created by VS2012 as the attachment. Here are the c++ codes // dllmain.cpp : #include "stdafx.h" #include #include IUIAutomation *g_pAutomation = NULL; #define DLL_EXPORT __declspec(dllexport) BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: { if (NULL == g_pAutomation) { CoInitialize(NULL); HRESULT hr = CoCreateInstance(__uuidof(CUIAutomation), NULL, CLSCTX_INPROC_SERVER, __uuidof(IUIAutomation), (void**)&g_pAutomation); } break; } case DLL_THREAD_ATTACH: { break; } case DLL_THREAD_DETACH: { break; } case DLL_PROCESS_DETACH: { if (g_pAutomation) { g_pAutomation->Release(); CoUninitialize(); } break; } } return TRUE; } #ifdef __cplusplus extern "C" { #endif DLL_EXPORT int AddTwoNumber(int a, int b) { return a + b; } #ifdef __cplusplus } #endif ---------- components: ctypes files: TestDll.rar messages: 204454 nosy: yinkaisheng priority: normal severity: normal status: open title: ctypes can't load a c++ dll if the dll calls COM on Windows 8 type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file32849/TestDll.rar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 07:43:26 2013 From: report at bugs.python.org (yinkaisheng) Date: Tue, 26 Nov 2013 06:43:26 +0000 Subject: [issue19790] ctypes can't load a c++ dll if the dll calls COM on Windows 8 In-Reply-To: <1385447912.09.0.00620803320142.issue19790@psf.upfronthosting.co.za> Message-ID: <1385448206.41.0.373410913844.issue19790@psf.upfronthosting.co.za> yinkaisheng added the comment: The version of my Python is 2.7.5.6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 07:48:05 2013 From: report at bugs.python.org (Martin Panter) Date: Tue, 26 Nov 2013 06:48:05 +0000 Subject: [issue19758] Warnings in tests In-Reply-To: <1385327657.07.0.59921543232.issue19758@psf.upfronthosting.co.za> Message-ID: <1385448485.3.0.223804749441.issue19758@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 08:03:08 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 26 Nov 2013 07:03:08 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support Message-ID: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> New submission from Vajrasky Kok: Right now, Lib/test/test_pathlib.py uses custom checking symbolic link function. But in test.support, we have those functions already (can_symlink and skip_unless_symlink). The only feature that test.support checking symbolic link functions don't have is getting the reason why we don't have symbolic link support. But we can create a separate ticket to add that feature in test.support. Attached the patch to use can_symlink and skip_unless_symlink. It also removed unnecessary import. ---------- components: Tests files: use_can_symlink_from_test_support.patch keywords: patch messages: 204456 nosy: pitrou, vajrasky priority: normal severity: normal status: open title: test_pathlib should use can_symlink or skip_unless_symlink from test.support type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32850/use_can_symlink_from_test_support.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 08:25:48 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Nov 2013 07:25:48 +0000 Subject: [issue19622] Default buffering for input and output pipes in subprocess module In-Reply-To: <1384579334.66.0.612676075589.issue19622@psf.upfronthosting.co.za> Message-ID: <1385450748.17.0.775450479741.issue19622@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, should be fixed now. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 08:43:34 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 26 Nov 2013 07:43:34 +0000 Subject: [issue19792] pathlib does not support symlink in Windows XP Message-ID: <1385451814.33.0.666998936425.issue19792@psf.upfronthosting.co.za> New submission from Vajrasky Kok: In Lib/pathlib.py, we got this "problematic" code: if sys.getwindowsversion()[:2] >= (6, 0): from nt import _getfinalpathname else: supports_symlinks = False _getfinalpathname = None This code means if the windows version is less than Windows NT 6, then we disable symlink support. http://en.wikipedia.org/wiki/Windows_NT_6.0 Windows NT 6.0 includes Vista, Server 2008. In other word, Windows XP is less than Windows NT 6.0. Actually, we can add symbolic link support for Windows XP. http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#symboliclinksforwindowsxp Attached the patch to add symbolic link support for Windows XP in pathlib. Actually, if this ticket is made invalid, I don't care anyway. Windows XP will "die" on 8th April 2014. http://windows.microsoft.com/en-us/windows/end-support-help Also, how many people uses pathlib in Python 3.4 in Windows XP with third-party drivers enabling symbolic link support? Should be small. I am interested in this problem because I have the same problem in Django. https://code.djangoproject.com/ticket/21482 On the proposed pull request, I let the os.symlink takes care whether we have symbolic link support or not. But I may "copy" Antoine's approach to Django's bug. ---------- components: Library (Lib) files: add_symlink_support_for_windows_xp.patch keywords: patch messages: 204458 nosy: pitrou, vajrasky priority: normal severity: normal status: open title: pathlib does not support symlink in Windows XP type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32851/add_symlink_support_for_windows_xp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 08:56:24 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 26 Nov 2013 07:56:24 +0000 Subject: [issue19777] Provide a home() classmethod on Path objects In-Reply-To: <1385409863.35.0.0114355564026.issue19777@psf.upfronthosting.co.za> Message-ID: <1385452584.2.0.563543039117.issue19777@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: IMO, this functionality is subsumed by http://bugs.python.org/issue19776 (Path.expanduser). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 09:15:05 2013 From: report at bugs.python.org (Martin Panter) Date: Tue, 26 Nov 2013 08:15:05 +0000 Subject: [issue17488] subprocess.Popen bufsize=0 parameter behaves differently in Python 3 than in 2 In-Reply-To: <1363742986.45.0.357278360182.issue17488@psf.upfronthosting.co.za> Message-ID: <1385453705.63.0.3011010223.issue17488@psf.upfronthosting.co.za> Martin Panter added the comment: For the record, this issue seemed to forget about the effect of buffering the pipe to the subprocess?s input stream. Buffering an input pipe means that data is hidden away until it is flushed, and the close() method can raise a broken pipe error. I have sometimes found that forcing ?bufsize=0? is easier than handling the extra broken pipe error. Anyway I think the damage has already been done. However I did raise Issue 19622 to clarify the documentation. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 10:05:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 09:05:49 +0000 Subject: [issue19793] Formatting of True/Falsein in pathlib docs Message-ID: <1385456749.57.0.871940933045.issue19793@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch improves formatting of True/False in pathlib documentation. "True" becomes "``True``" if it means True constant and "true" if it means true value. ---------- assignee: docs at python components: Documentation messages: 204461 nosy: chris.jerdonek, docs at python, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Formatting of True/Falsein in pathlib docs type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 10:06:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 09:06:10 +0000 Subject: [issue19793] Formatting of True/Falsein in pathlib docs In-Reply-To: <1385456749.57.0.871940933045.issue19793@psf.upfronthosting.co.za> Message-ID: <1385456770.92.0.788995022914.issue19793@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file32852/doc_pathlib_truefalse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 10:06:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 09:06:41 +0000 Subject: [issue19793] Formatting of True/False in pathlib docs In-Reply-To: <1385456749.57.0.871940933045.issue19793@psf.upfronthosting.co.za> Message-ID: <1385456801.16.0.976393580587.issue19793@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Formatting of True/Falsein in pathlib docs -> Formatting of True/False in pathlib docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 10:10:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 09:10:08 +0000 Subject: [issue19794] Formatting of True/False in decimal docs Message-ID: <1385457007.96.0.784815460487.issue19794@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch improves formatting of True/False in decimal documentation. "True/False" constants become "``True``/``False``". ---------- assignee: docs at python components: Documentation files: doc_decimal_truefalse.patch keywords: patch messages: 204462 nosy: docs at python, facundobatista, mark.dickinson, rhettinger, serhiy.storchaka, skrah priority: normal severity: normal stage: patch review status: open title: Formatting of True/False in decimal docs type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32853/doc_decimal_truefalse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 10:18:45 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 09:18:45 +0000 Subject: [issue19795] Formatting of True/False in docs Message-ID: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch improves formatting of True/False in the documentation. "True" becomes "``True``" if it means True constant and "true" if it means true value (in input arguments). See also issue19793 and issue19794. ---------- assignee: docs at python components: Documentation files: doc_truefalse.patch keywords: patch messages: 204463 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Formatting of True/False in docs type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file32854/doc_truefalse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 10:43:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 09:43:01 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385458981.36.0.276305772956.issue19780@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Frames are not overlapped. And no one opcode straddles frame boundaries. When an implementation supports optional frames, it should support optimized frames as well. All tests are passed with this optimization except test_optional_frames which hacks pickled data to remove some frame opcodes. This test relied on implementation details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 10:59:18 2013 From: report at bugs.python.org (Alex Willmer) Date: Tue, 26 Nov 2013 09:59:18 +0000 Subject: [issue19796] urllib2.HTTPError.reason is not documented as "Added in 2.7" Message-ID: <1385459958.78.0.648544615764.issue19796@psf.upfronthosting.co.za> New submission from Alex Willmer: issue13211 added a .reason attribute to urllib2.HTTPError in Python 2.7, issue16634 documented it (http://hg.python.org/cpython/rev/deb60efd32eb). The documentation for Python 2.7 doesn't mention that this attribute was added in that release. This (at least weakly) implies it's available to use in previous 2.x releases. ---------- assignee: docs at python components: Documentation files: HTTPError.reason-versionadded.diff keywords: patch messages: 204465 nosy: docs at python, moreati priority: normal severity: normal status: open title: urllib2.HTTPError.reason is not documented as "Added in 2.7" type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file32855/HTTPError.reason-versionadded.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 11:11:46 2013 From: report at bugs.python.org (lambrecht) Date: Tue, 26 Nov 2013 10:11:46 +0000 Subject: [issue19773] Failed to build python 2.6.9 Solaris 10 In-Reply-To: <1385397774.16.0.00982923688333.issue19773@psf.upfronthosting.co.za> Message-ID: <1385460706.18.0.489233050355.issue19773@psf.upfronthosting.co.za> lambrecht added the comment: Ok thanks. u1662805 at methpr:/home/u1662805>echo $LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/METHPR/produits/apache/sas/lib:/METHPR/produits/oracle/ORACLE_HOME/client/lib u1662805 at methpr:/home/u1662805>echo $LD_RUN_PATH /usr/local/ssl/lib u1662805 at methpr:/home/u1662805>make running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers building '_curses' extension gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -IInclude -I./Include -I/usr/local/include -I/METHPR/tmp/Python-2.6.9/Include -I/METHPR/tmp/Python-2.6.9 -c /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c -o build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.o /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c: In function `PyCursesWindow_ChgAt': /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:708: warning: implicit declaration of function `mvwchgat' /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:712: warning: implicit declaration of function `wchgat' gcc -shared build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.o -L/usr/local/lib -lncurses -o build/lib.solaris-2.10-sun4v-2.6/_curses.so *** WARNING: renaming "_curses" since importing it failed: ld.so.1: python: fatal: relocation error: file build/lib.solaris-2.10-sun4v-2.6/_curses.so: symbol _unctrl: referenced symbol not found building '_curses_panel' extension gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -IInclude -I./Include -I/usr/local/include -I/METHPR/tmp/Python-2.6.9/Include -I/METHPR/tmp/Python-2.6.9 -c /METHPR/tmp/Python-2.6.9/Modules/_curses_panel.c -o build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_curses_panel.o gcc -shared build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_curses_panel.o -L/usr/local/lib -lpanel -lncurses -o build/lib.solaris-2.10-sun4v-2.6/_curses_panel.so *** WARNING: renaming "_curses_panel" since importing it failed: No module named _curses Failed to find the necessary bits to build these modules: _bsddb _tkinter bsddb185 gdbm linuxaudiodev ossaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _curses _curses_panel running build_scripts I don't know if i have need _curses : I want to build mod_python. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 12:02:34 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 11:02:34 +0000 Subject: [issue19773] Failed to build python 2.6.9 Solaris 10 In-Reply-To: <1385397774.16.0.00982923688333.issue19773@psf.upfronthosting.co.za> Message-ID: <1385463754.77.0.113793418807.issue19773@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't know if i have need _curses : I want to build mod_python. You don't need curses for a web application. http://docs.python.org/dev/library/curses.html The curses compilation is already open, so please don't reopen this issue: http://bugs.python.org/issue13552 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 12:02:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 11:02:38 +0000 Subject: [issue13552] Compilation issues of the curses module on Solaris and OpenIndiana In-Reply-To: <1323305598.14.0.0193622635558.issue13552@psf.upfronthosting.co.za> Message-ID: <1385463758.89.0.740037051239.issue13552@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Compilation issues of the curses module on OpenIndiana -> Compilation issues of the curses module on Solaris and OpenIndiana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 12:45:03 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 26 Nov 2013 11:45:03 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385466303.75.0.901356350649.issue19729@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 13:27:48 2013 From: report at bugs.python.org (lambrecht) Date: Tue, 26 Nov 2013 12:27:48 +0000 Subject: [issue19797] Solaris 10. mod_python build failed. Message-ID: <1385468868.4.0.798110212412.issue19797@psf.upfronthosting.co.za> New submission from lambrecht: Bonjour. Any idea ? mod_python 3.3.1 apache 2.2.6 ... /METHPR/tmp/apache/build/libtool --silent --mode=link gcc -o mod_python.la -rpath /METHPR/tmp/apache/modules -module -avoid-version finfoob ject.lo hlistobject.lo hlist.lo filterobject.lo connobject.lo serverobject.lo util.lo tableobject.lo requestobject.lo _apachemodule.lo mod_pyth on.lo -L/METHPR/data/python/lib/python2.6/config -lm -lintl -lpython2.6 -lsocket -lnsl -lrt -ldl -lm _eprintf.o _floatdidf.o _muldi3.o *** Warning: Linking the shared library mod_python.la against the non-libtool *** objects _eprintf.o _floatdidf.o _muldi3.o is not portable! Text relocation remains referenced against symbol offset in file .text (section) 0x1510 /METHPR/data/python/lib/python2.6/config/libpython2.6.a(floatobject.o) .text (section) 0x1514 /METHPR/data/python/lib/python2.6/config/libpython2.6.a(floatobject.o) .text (section) 0x1518 /METHPR/data/python/lib/python2.6/config/libpython2.6.a(floatobject.o) .text (section) 0x151c /METHPR/data/python/lib/python2.6/config/libpython2.6.a(floatobject.o) .text (section) 0x1520 /METHPR/data/python/lib/python2.6/config/libpython2.6.a(floatobject.o) .text (section) 0x1524 /METHPR/data/python/lib/python2.6/config/libpython2.6.a(floatobject.o) .../... 0x33ec /METHPR/produits/python/lib/python2.6/config/libpython2.6.a(fileobject.o) __filbuf 0x33fc /METHPR/produits/python/lib/python2.6/config/libpython2.6.a(fileobject.o) ld: fatal: relocations remain against allocatable but non-writable sections collect2: ld returned 1 exit status apxs:Error: Command failed with rc=65536 . *** Error code 1 make: Fatal error: Command failed for target `mod_python.so' Current working directory /METHPR/data/mod_python-3.3.1/src *** Error code 1 The following command caused the error: cd src && make make: Fatal error: Command failed for target `do_dso' ---------- messages: 204468 nosy: lambrechtphilippe priority: normal severity: normal status: open title: Solaris 10. mod_python build failed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 13:37:02 2013 From: report at bugs.python.org (lambrecht) Date: Tue, 26 Nov 2013 12:37:02 +0000 Subject: [issue19797] Solaris 10. mod_python build failed. In-Reply-To: <1385468868.4.0.798110212412.issue19797@psf.upfronthosting.co.za> Message-ID: <1385469422.17.0.327464600654.issue19797@psf.upfronthosting.co.za> Changes by lambrecht : ---------- components: +Build versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 13:43:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 26 Nov 2013 12:43:26 +0000 Subject: [issue19797] Solaris 10. mod_python build failed. In-Reply-To: <1385468868.4.0.798110212412.issue19797@psf.upfronthosting.co.za> Message-ID: <1385469806.33.0.225563022996.issue19797@psf.upfronthosting.co.za> Christian Heimes added the comment: Please contact the developers of mod_python. The Python bug tracker is not the right place to get support for 3rd party software. The "3rd party" version is only for 3rd party code that is part of the main Python distribution (e.g. sqlite or zlib). ---------- nosy: +christian.heimes resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 13:55:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 12:55:01 +0000 Subject: [issue19798] tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result Message-ID: <1385470501.4.0.457090532549.issue19798@psf.upfronthosting.co.za> New submission from STINNER Victor: Jim.J.Jewett asked me to replaced "max_size" with "peak_size". It looks like Linux also uses the term "peak" for /proc/pid/status (or sometimes "High Water Mark"). See attached patch. ---------- files: peak_size.patch keywords: patch messages: 204470 nosy: haypo, neologix priority: normal severity: normal status: open title: tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result Added file: http://bugs.python.org/file32856/peak_size.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 13:55:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 12:55:08 +0000 Subject: [issue19798] tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result In-Reply-To: <1385470501.4.0.457090532549.issue19798@psf.upfronthosting.co.za> Message-ID: <1385470508.43.0.629309943545.issue19798@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Library (Lib) versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 13:58:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 12:58:30 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385470710.49.0.400622099196.issue19780@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Bad wording perhaps, but: + if not final: + n += 9 # next frame header write = self.file_write write(FRAME) write(pack(" All tests are passed with this optimization Well, perhaps there are not enough tests :-) But the protocol is standardized so that other people can implement it. The reference implementation can't do something different than the PEP does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 13:59:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 12:59:26 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385470766.34.0.783678889483.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: The code has been merged. I didn't see any test_tracemalloc on buildbots. I tried to address all remarks on the Rietveld reviews. So I'm now closing the issue. Please open new issue if you have more remarks. For example, I opened: - #19798: tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result - #19787: tracemalloc: set_reentrant() should not have to call PyThread_delete_key() - #19786: tracemalloc: remove arbitrary limit of 100 frames Thanks for your reviews. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 14:00:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 13:00:04 +0000 Subject: [issue19798] tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result In-Reply-To: <1385470501.4.0.457090532549.issue19798@psf.upfronthosting.co.za> Message-ID: <1385470804.35.0.28766978399.issue19798@psf.upfronthosting.co.za> STINNER Victor added the comment: @neologix: I would like your opinion first, because you accepted the PEP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 14:14:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 13:14:41 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385471681.15.0.764637205195.issue19780@psf.upfronthosting.co.za> STINNER Victor added the comment: If it's an optimizatio, can I see some benchmarks numbers? :-) I would be interested of benchmarks pickle 3 vs pickle 4. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 14:30:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 13:30:13 +0000 Subject: [issue19766] test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot In-Reply-To: <1385372460.23.0.39838448994.issue19766@psf.upfronthosting.co.za> Message-ID: <1385472613.3.0.345827849093.issue19766@psf.upfronthosting.co.za> STINNER Victor added the comment: In fact, it's an issue in the urllib3 library which require threads. $ cd /home/haypo/pip/PIP/pip/_vendor/requests/packages $ /home/haypo/prog/python/default/venv/bin/python -c 'import urllib3' Traceback (most recent call last): File "", line 1, in File "/home/haypo/pip/PIP/pip/_vendor/requests/packages/urllib3/__init__.py", line 24, in from .poolmanager import PoolManager, ProxyManager, proxy_from_url File "/home/haypo/pip/PIP/pip/_vendor/requests/packages/urllib3/poolmanager.py", line 14, in from ._collections import RecentlyUsedContainer File "/home/haypo/pip/PIP/pip/_vendor/requests/packages/urllib3/_collections.py", line 8, in from threading import RLock File "/home/haypo/prog/python/default/Lib/threading.py", line 4, in import _thread ImportError: No module named '_thread' Here is a patch for urllib3. I reported the issue upstream: https://github.com/shazow/urllib3/issues/289 ---------- keywords: +patch Added file: http://bugs.python.org/file32857/urllib3_no_thread.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 14:37:34 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 26 Nov 2013 13:37:34 +0000 Subject: [issue19798] tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result In-Reply-To: <1385470804.35.0.28766978399.issue19798@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > STINNER Victor added the comment: > > @neologix: I would like your opinion first, because you accepted the PEP. Well, I'm not a native speaker, but "peak" does sound better than "max" (I'd say the later refers to an externally-enforced limit, contrarily to the former). So the change looks fine, although: """ `(size: int, peak_size: int)`` """ Would maybe be better with: """ `(current: int, peak: int)`` """ no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 15:34:58 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 26 Nov 2013 14:34:58 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib Message-ID: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> New submission from Eli Bendersky: Following up from Issue #19673; The initial patch clarifies the use cases of pure vs. concrete paths a bit and adds explicit signatures for the path class constructors (moving the construction discussion under the parent class). Also, IMHO an inheritance diagram from PEP 428 is very relevant and useful. Would you mind if I add a .png for the pathlib rst doc? ---------- assignee: eli.bendersky components: Documentation messages: 204477 nosy: eli.bendersky, pitrou priority: normal severity: normal stage: patch review status: open title: Clarifications for the documentation of pathlib type: enhancement versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 15:35:32 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 26 Nov 2013 14:35:32 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385476532.41.0.24853001924.issue19799@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- keywords: +patch Added file: http://bugs.python.org/file32858/issue19799.initial.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 15:46:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 14:46:09 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385470710.49.0.400622099196.issue19780@psf.upfronthosting.co.za> Message-ID: <2587286.68As1hJAdK@raxxla> Serhiy Storchaka added the comment: > Bad wording perhaps, but: > > + if not final: > + n += 9 # next frame header > write = self.file_write > write(FRAME) > write(pack(" > does change how the frame length is calculated and emitted in the pickle > stream. Of course (as any optimizer). It produces more optimal pickled data which can be parsed by existing unpicklers. > This is not compliant with how the PEP defines it (the frame size doesn't > include the header of the next frame): > http://www.python.org/dev/peps/pep-3154/#framing "How the pickler decides to partition the pickle stream into frames is an implementation detail." > > All tests are passed with this optimization > > Well, perhaps there are not enough tests :-) But the protocol is > standardized so that other people can implement it. The reference > implementation can't do something different than the PEP does. Could you write tests which exposes behavior difference without sticking implementation details? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 15:51:35 2013 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 26 Nov 2013 14:51:35 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1385477495.78.0.784084255626.issue19557@psf.upfronthosting.co.za> anatoly techtonik added the comment: https://greentreesnakes.readthedocs.org/en/latest/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 15:55:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 14:55:48 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385471681.15.0.764637205195.issue19780@psf.upfronthosting.co.za> Message-ID: <1706595.fi3yOiHNNE@raxxla> Serhiy Storchaka added the comment: > If it's an optimizatio, can I see some benchmarks numbers? :-) First create two files. Run unpatched Python: ./python -c "import pickle, lzma; data = [bytes([i])*2**16 for i in range(256)]; with open('test.pickle4', 'wb'): pickle.dump(data, f, 4)" Then run the same with patched Python for 'test.pickle4opt'. Now benchmark loading. $ ./python -m timeit "import pickle;" "with open('test.pickle4', 'rb', buffering=0) as f: pickle.load(f)" 10 loops, best of 3: 52.9 msec per loop $ ./python -m timeit "import pickle;" "with open('test.pickle4opt', 'rb', buffering=0) as f: pickle.load(f)" 10 loops, best of 3: 48.9 msec per loop The difference is about 5%. On faster computers with slower files (sockets?) it should be larger. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 15:59:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 14:59:43 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385477983.64.0.590868247823.issue19780@psf.upfronthosting.co.za> STINNER Victor added the comment: > On faster computers with slower files (sockets?) it should be larger. If your patch avoids unbuffered reads, you can test using these commands before your benchmark: sync; echo 3 > /proc/sys/vm/drop_caches And use one large load() instead of running it in a loop. Or call these commands in the loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:07:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 15:07:28 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385478448.29.0.213033480018.issue19624@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know if it's possible/convinient, but it would be nice to have a str() method using os.strerror(). Or maybe a method with a different name. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:08:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 15:08:51 +0000 Subject: [issue19760] Deprecation warnings in ttest_sysconfig and test_distutils In-Reply-To: <1385331218.39.0.240436697883.issue19760@psf.upfronthosting.co.za> Message-ID: <3dTT5t0kgnz7Lp2@mail.python.org> Roundup Robot added the comment: New changeset 25f856d500e3 by Serhiy Storchaka in branch 'default': Issue #19760: Silence sysconfig's 'SO' key deprecation warnings in tests. http://hg.python.org/cpython/rev/25f856d500e3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:09:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 15:09:01 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <2587286.68As1hJAdK@raxxla> Message-ID: <1385478539.2292.4.camel@fsol> Antoine Pitrou added the comment: > > This is not compliant with how the PEP defines it (the frame size doesn't > > include the header of the next frame): > > http://www.python.org/dev/peps/pep-3154/#framing > > "How the pickler decides to partition the pickle stream into frames is an > implementation detail." Of course, but it still has to respect the frame structure shown in the ASCII art drawing. > Could you write tests which exposes behavior difference without sticking > implementation details? That's a good idea. At least I'll open an issue for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:10:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 15:10:07 +0000 Subject: [issue19760] Deprecation warnings in ttest_sysconfig and test_distutils In-Reply-To: <1385331218.39.0.240436697883.issue19760@psf.upfronthosting.co.za> Message-ID: <1385478607.3.0.210679945279.issue19760@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:10:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 15:10:25 +0000 Subject: [issue19800] Write more detailed framing tests Message-ID: <1385478625.17.0.0337296712121.issue19800@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The pickle tests for protocol 4 currently don't test that framing conforms strictly to the frame structure shown in: http://www.python.org/dev/peps/pep-3154/#framing It would be nice to add tests for this, especially the frame size. ---------- components: Library (Lib), Tests messages: 204485 nosy: alexandre.vassalotti, pitrou, serhiy.storchaka priority: low severity: normal status: open title: Write more detailed framing tests type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:14:19 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 Nov 2013 15:14:19 +0000 Subject: [issue19794] Formatting of True/False in decimal docs In-Reply-To: <1385457007.96.0.784815460487.issue19794@psf.upfronthosting.co.za> Message-ID: <1385478859.01.0.335212140472.issue19794@psf.upfronthosting.co.za> Mark Dickinson added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:15:54 2013 From: report at bugs.python.org (Julian Gindi) Date: Tue, 26 Nov 2013 15:15:54 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385478954.05.0.201397519776.issue19588@psf.upfronthosting.co.za> Julian Gindi added the comment: Just wanted to see if there was anything else I needed to do to get this patch rolling :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:20:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 15:20:49 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385477983.64.0.590868247823.issue19780@psf.upfronthosting.co.za> Message-ID: <5751317.Ujd9WIsME0@raxxla> Serhiy Storchaka added the comment: > If your patch avoids unbuffered reads, you can test using these commands > before your benchmark: > > sync; echo 3 > /proc/sys/vm/drop_caches Thank you. But starting Python needs a lot of I/O. This causes very unstable results for this test data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:22:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 15:22:56 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385479376.11.0.98816190628.issue19780@psf.upfronthosting.co.za> STINNER Victor added the comment: > This causes very unstable results for this test data. So try os.system("sync; echo 3 > /proc/sys/vm/drop_caches") in your timeit benchmark. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:27:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 15:27:02 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385478539.2292.4.camel@fsol> Message-ID: <1432244.LCYPA6eIQy@raxxla> Serhiy Storchaka added the comment: > Of course, but it still has to respect the frame structure shown in the > ASCII art drawing. I think the ASCII art drawing is just inaccurate. It forbids optional framing (tested in test_optional_frames). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:28:28 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 15:28:28 +0000 Subject: [issue19782] No SSL match_hostname() in imaplib In-Reply-To: <1385423128.55.0.373615853043.issue19782@psf.upfronthosting.co.za> Message-ID: <1385479708.41.0.825495318877.issue19782@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:28:53 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 15:28:53 +0000 Subject: [issue19784] No SSL match_hostname() in poplib In-Reply-To: <1385423247.18.0.333542654641.issue19784@psf.upfronthosting.co.za> Message-ID: <1385479733.89.0.926501854985.issue19784@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:29:56 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 15:29:56 +0000 Subject: [issue19785] No SSL match_hostname() in smtplib In-Reply-To: <1385423279.73.0.0929925715399.issue19785@psf.upfronthosting.co.za> Message-ID: <1385479796.16.0.430580132765.issue19785@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:33:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 15:33:52 +0000 Subject: [issue19794] Formatting of True/False in decimal docs In-Reply-To: <1385457007.96.0.784815460487.issue19794@psf.upfronthosting.co.za> Message-ID: <3dTTfl3kTFz7Ln2@mail.python.org> Roundup Robot added the comment: New changeset 04c4f141874b by Serhiy Storchaka in branch '2.7': Issue #19794: Improved markup for True/False constants. http://hg.python.org/cpython/rev/04c4f141874b New changeset c1d163203f21 by Serhiy Storchaka in branch '3.3': Issue #19794: Improved markup for True/False constants. http://hg.python.org/cpython/rev/c1d163203f21 New changeset 67e642f5ab5d by Serhiy Storchaka in branch 'default': Issue #19794: Improved markup for True/False constants. http://hg.python.org/cpython/rev/67e642f5ab5d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:34:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 15:34:51 +0000 Subject: [issue19794] Formatting of True/False in decimal docs In-Reply-To: <1385457007.96.0.784815460487.issue19794@psf.upfronthosting.co.za> Message-ID: <1385480091.27.0.830123013648.issue19794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Mark. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:45:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 15:45:39 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385480739.3.0.526146624338.issue19624@psf.upfronthosting.co.za> STINNER Victor added the comment: > This is not so easy issue because the errno module is not pure Python module. ;) An option is to rename the C errno module to _errno and leave it unchanged, and provide a Python errno module which enum API. Then slowly errno module should be used instead of _errno. Using enum for errno should not slow down Python startup time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:49:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 15:49:14 +0000 Subject: [issue14073] allow per-thread atexit() In-Reply-To: <1329833528.5.0.177059033602.issue14073@psf.upfronthosting.co.za> Message-ID: <1385480954.16.0.967806310133.issue14073@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the issue #19466: the behaviour of daemon threads changed at Python exit in Python 3.4. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:59:04 2013 From: report at bugs.python.org (Stefan Richter) Date: Tue, 26 Nov 2013 15:59:04 +0000 Subject: [issue19547] HTTPS proxy support missing without warning In-Reply-To: <1384119115.17.0.177090288449.issue19547@psf.upfronthosting.co.za> Message-ID: <1385481544.45.0.374298615214.issue19547@psf.upfronthosting.co.za> Changes by Stefan Richter : ---------- versions: +Python 2.6, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 16:59:32 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 15:59:32 +0000 Subject: [issue19766] test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot In-Reply-To: <1385372460.23.0.39838448994.issue19766@psf.upfronthosting.co.za> Message-ID: <1385481572.31.0.674886340106.issue19766@psf.upfronthosting.co.za> STINNER Victor added the comment: Cool, my patch was already applied upstream: https://github.com/shazow/urllib3/commit/929f15866e62d02a0249284cf54d1b8b6441505a @Nick: can you try to package a new wheel package for pip? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:03:54 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 26 Nov 2013 16:03:54 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385481833.99.0.514839801012.issue19588@psf.upfronthosting.co.za> Zachary Ware added the comment: Nope, your patch looks good, I just haven't gotten it committed yet :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:19:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 16:19:58 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <3dTVgx09XwzMnX@mail.python.org> Roundup Robot added the comment: New changeset eac133e13bb5 by Mark Dickinson in branch '3.3': Issue #19638: Raise ValueError instead of crashing when converting billion character strings to float. http://hg.python.org/cpython/rev/eac133e13bb5 New changeset 9c7ab3e68243 by Mark Dickinson in branch 'default': Issue #19638: Merge from 3.3 http://hg.python.org/cpython/rev/9c7ab3e68243 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:38:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 16:38:42 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <3dTW5Y2F3cz7Ljp@mail.python.org> Roundup Robot added the comment: New changeset 6d6a018a3bb0 by Mark Dickinson in branch '2.7': Issue #19638: Raise ValueError instead of crashing when converting billion character strings to float. http://hg.python.org/cpython/rev/6d6a018a3bb0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:39:55 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 Nov 2013 16:39:55 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385483995.73.0.0971542285574.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Now fixed. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:45:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Nov 2013 16:45:43 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385484343.36.0.48995652277.issue19638@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran test_strtod using: ./python -m test -M 6G test_strtod. The test passed successfully on my 64-bit Linux box. But there is an issue with the announced memory limit: it looks closer to 6 GB than 5 GB. $ ./python -m test -M 6G -v test_strtod == CPython 3.4.0b1 (default:9c7ab3e68243, Nov 26 2013, 17:24:05) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] == Linux-3.9.4-200.fc18.x86_64-x86_64-with-fedora-18-Spherical_Cow little-endian == hash algorithm: siphash24 64bit == /home/haypo/prog/python/default/build/test_python_2997 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) [1/1] test_strtod test_bigcomp (test.test_strtod.StrtodTests) ... ok test_boundaries (test.test_strtod.StrtodTests) ... ok test_halfway_cases (test.test_strtod.StrtodTests) ... ok test_large_exponents (test.test_strtod.StrtodTests) ... ok test_oversized_digit_strings (test.test_strtod.StrtodTests) ... ... expected peak memory use: 5.0G ... process data size: 2.1G (...) ... process data size: 4.1G (...) ... process data size: 6.2G (...) ... process data size: 2.1G ok test_parsing (test.test_strtod.StrtodTests) ... ok test_particular (test.test_strtod.StrtodTests) ... ok test_short_halfway_cases (test.test_strtod.StrtodTests) ... ok test_underflow_boundary (test.test_strtod.StrtodTests) ... ok ---------------------------------------------------------------------- Ran 9 tests in 63.871s OK 1 test OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:49:30 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 26 Nov 2013 16:49:30 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385484570.22.0.745195265712.issue19624@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:52:01 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 Nov 2013 16:52:01 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385484721.21.0.593816787237.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: This caused test failures on 32-bit machines on 2.7, since they can't create these huge strings in the first place. I'm working on a fix. > But there is an issue with the announced memory limit: Thanks. I'll look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:54:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 16:54:44 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385484884.79.0.910356011004.issue19799@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Would you mind if I add a .png for the pathlib rst doc? No, it sounds ok to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 17:57:10 2013 From: report at bugs.python.org (Sworddragon) Date: Tue, 26 Nov 2013 16:57:10 +0000 Subject: [issue19801] Concatenating bytes is much slower than concatenating strings Message-ID: <1385485030.81.0.978810196169.issue19801@psf.upfronthosting.co.za> New submission from Sworddragon: In the attachments is a testcase which does concatenate 100000 times a string and than 100000 times a bytes object. Here is my result: sworddragon at ubuntu:~/tmp$ ./test.py String: 0.03165316581726074 Bytes : 0.5805566310882568 ---------- components: Benchmarks files: test.py messages: 204503 nosy: Sworddragon priority: normal severity: normal status: open title: Concatenating bytes is much slower than concatenating strings type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file32859/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:00:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 17:00:22 +0000 Subject: [issue19793] Formatting of True/False in pathlib docs In-Reply-To: <1385456749.57.0.871940933045.issue19793@psf.upfronthosting.co.za> Message-ID: <1385485222.93.0.329585072264.issue19793@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think :const:`True` is the norm, but the patch looks good to me regardless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:03:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 17:03:07 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <3dTWdk3wQ0z7Lpw@mail.python.org> Roundup Robot added the comment: New changeset 4c523ea2b429 by Mark Dickinson in branch '2.7': Issue #19638: Skip large digit string tests on 32-bit platforms. http://hg.python.org/cpython/rev/4c523ea2b429 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:06:20 2013 From: report at bugs.python.org (Sworddragon) Date: Tue, 26 Nov 2013 17:06:20 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing Message-ID: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> New submission from Sworddragon: socket(7) does contain SO_PRIORITY but trying to use this value will result in this error: AttributeError: 'module' object has no attribute 'SO_PRIORITY' ---------- components: Library (Lib) messages: 204506 nosy: Sworddragon priority: normal severity: normal status: open title: socket.SO_PRIORITY is missing type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:21:01 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 Nov 2013 17:21:01 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <1385486461.55.0.925994804983.issue19802@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- keywords: +easy versions: +Python 3.5 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:21:34 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 17:21:34 +0000 Subject: [issue19801] Concatenating bytes is much slower than concatenating strings In-Reply-To: <1385485030.81.0.978810196169.issue19801@psf.upfronthosting.co.za> Message-ID: <1385486494.17.0.358374113562.issue19801@psf.upfronthosting.co.za> R. David Murray added the comment: It is definitely not a good idea to rely on that optimization of += for string. Obviously bytes doesn't have the same optimization. (String didn't either for a while in Python3, and there was some controversy around adding it back exactly because one should not rely on it.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:21:50 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 17:21:50 +0000 Subject: [issue19801] Concatenating bytes is much slower than concatenating strings In-Reply-To: <1385485030.81.0.978810196169.issue19801@psf.upfronthosting.co.za> Message-ID: <1385486510.32.0.839376009571.issue19801@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: behavior -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:23:14 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 Nov 2013 17:23:14 +0000 Subject: [issue19801] Concatenating bytes is much slower than concatenating strings In-Reply-To: <1385485030.81.0.978810196169.issue19801@psf.upfronthosting.co.za> Message-ID: <1385486594.05.0.252235368602.issue19801@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:23:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 17:23:52 +0000 Subject: [issue19801] Concatenating bytes is much slower than concatenating strings In-Reply-To: <1385485030.81.0.978810196169.issue19801@psf.upfronthosting.co.za> Message-ID: <1385486632.44.0.0238352745935.issue19801@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed. If you want to concatenate a lot of bytes objects efficiently, there are three solutions: - concatenate to a bytearray - write to a io.BytesIO object - use b''.join to concatenate all objects at once ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:35:14 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 17:35:14 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <1385487314.35.0.470488369179.issue19802@psf.upfronthosting.co.za> R. David Murray added the comment: For the record, a little googling indicates this may be a linux-only option (FreeBSD 6.4, for example, does not support it, nor does OS X 10.8, which are two systems to which I currently have access). That doesn't mean it shouldn't be added. ---------- components: +Tests -Library (Lib) nosy: +r.david.murray type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:39:12 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Nov 2013 17:39:12 +0000 Subject: [issue19793] Formatting of True/False in pathlib docs In-Reply-To: <1385456749.57.0.871940933045.issue19793@psf.upfronthosting.co.za> Message-ID: <1385487552.98.0.497585585084.issue19793@psf.upfronthosting.co.za> Georg Brandl added the comment: ``False`` is actually the preferred way, being shorter and easier to read (and we don't need to link to the documentation for False). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:55:48 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 26 Nov 2013 17:55:48 +0000 Subject: [issue14910] argparse: disable abbreviation In-Reply-To: <1337943742.57.0.897347214609.issue14910@psf.upfronthosting.co.za> Message-ID: <1385488548.34.0.0338457966654.issue14910@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 18:59:44 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Tue, 26 Nov 2013 17:59:44 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <1385488784.01.0.475266886663.issue19802@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Here's a simple patch which adds this flag. It has no tests, because I noticed that there are no tests for per-platform flags in test_socket.py (only for CAN, RDS and general flags). ---------- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file32860/socket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 19:08:45 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 18:08:45 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <1385489325.13.0.489523759043.issue19802@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, I'm not sure how you'd write a test in such a way that it would test anything meaningful. Parse the .h file in the test? Seems like overkill. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 19:28:54 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Nov 2013 18:28:54 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1385490534.87.0.713823990719.issue19557@psf.upfronthosting.co.za> Georg Brandl added the comment: When citing a link, it's customary to give at least a comment *why* you are citing it. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 19:42:46 2013 From: report at bugs.python.org (Leslie P. Polzer) Date: Tue, 26 Nov 2013 18:42:46 +0000 Subject: [issue19679] smtpd.py (SMTPChannel): implement enhanced status codes In-Reply-To: <1385031598.99.0.0454554803988.issue19679@psf.upfronthosting.co.za> Message-ID: <1385491366.57.0.544022410093.issue19679@psf.upfronthosting.co.za> Leslie P. Polzer added the comment: Sounds reasonable, I will propose a patch soon. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:23:51 2013 From: report at bugs.python.org (Will Weaver) Date: Tue, 26 Nov 2013 19:23:51 +0000 Subject: [issue17523] Additional tests for the os module. In-Reply-To: <1363974046.41.0.0636521792098.issue17523@psf.upfronthosting.co.za> Message-ID: <1385493831.21.0.698094101099.issue17523@psf.upfronthosting.co.za> Will Weaver added the comment: It seems that I probably missed some tests as I only ran then on Mac OS. Such a minor addition so no need to do anything about it. If I go about it in a better way I'll make a new issue. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:33:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 19:33:43 +0000 Subject: [issue11489] json.dumps not parsable by json.loads (on Linux only) In-Reply-To: <1300058240.59.0.513243746739.issue11489@psf.upfronthosting.co.za> Message-ID: <3dTZzV1GT1z7LpK@mail.python.org> Roundup Robot added the comment: New changeset c85305a54e6d by Serhiy Storchaka in branch '2.7': Issue #11489: JSON decoder now accepts lone surrogates. http://hg.python.org/cpython/rev/c85305a54e6d New changeset 8abbdbe86c01 by Serhiy Storchaka in branch '3.3': Issue #11489: JSON decoder now accepts lone surrogates. http://hg.python.org/cpython/rev/8abbdbe86c01 New changeset 5f7326ed850f by Serhiy Storchaka in branch 'default': Issue #11489: JSON decoder now accepts lone surrogates. http://hg.python.org/cpython/rev/5f7326ed850f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:37:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 19:37:44 +0000 Subject: [issue19793] Formatting of True/False in pathlib docs In-Reply-To: <1385456749.57.0.871940933045.issue19793@psf.upfronthosting.co.za> Message-ID: <3dTb471YZkzQN7@mail.python.org> Roundup Robot added the comment: New changeset 835007ccf2b0 by Serhiy Storchaka in branch 'default': Issue #19793: Improved markup for True/False constants in pathlib documentation. http://hg.python.org/cpython/rev/835007ccf2b0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:39:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 19:39:29 +0000 Subject: [issue19793] Formatting of True/False in pathlib docs In-Reply-To: <1385456749.57.0.871940933045.issue19793@psf.upfronthosting.co.za> Message-ID: <1385494769.84.0.458660005427.issue19793@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:40:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 19:40:18 +0000 Subject: [issue11489] json.dumps not parsable by json.loads (on Linux only) In-Reply-To: <1300058240.59.0.513243746739.issue11489@psf.upfronthosting.co.za> Message-ID: <1385494818.61.0.228206394058.issue11489@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:47:48 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 26 Nov 2013 19:47:48 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385495268.69.0.64236190433.issue19509@psf.upfronthosting.co.za> Larry Hastings added the comment: I don't know enough about SSL to make a "feature vs bug/security fix" ruling on this. Can a second person who does--maybe Bill Janssen?--chime in? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:50:25 2013 From: report at bugs.python.org (Donald Stufft) Date: Tue, 26 Nov 2013 19:50:25 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385495425.88.0.39589832171.issue19509@psf.upfronthosting.co.za> Donald Stufft added the comment: I agree with Christian, mail.stufft.io should not be able to masquerade as smtp.google.com and being able to do so is a pretty big security hole. ---------- nosy: +dstufft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:50:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 19:50:39 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385495439.19.0.671468951727.issue19509@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think adding an API in bugfix releases must be an exceptional decision and I'm honestly not convinced this issue justifies it. It'd be more convincing if there was actually demand for this feature (e.g. from higher-level library authors). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:51:36 2013 From: report at bugs.python.org (Donald Stufft) Date: Tue, 26 Nov 2013 19:51:36 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385495496.23.0.511878858231.issue19509@psf.upfronthosting.co.za> Donald Stufft added the comment: Probably the higher level libraries don't even realize it's not happening, it's similar to the issue of SSL validation for HTTPS connections where a vast swathe of people didn't even realize that their certificates weren't being validated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:56:02 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 26 Nov 2013 19:56:02 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385495762.96.0.922074999361.issue19509@psf.upfronthosting.co.za> Christian Heimes added the comment: I agree with Antoine. The five attached bug reports only refer to Python 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:56:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 19:56:38 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1385495496.23.0.511878858231.issue19509@psf.upfronthosting.co.za> Message-ID: <1385495796.2292.13.camel@fsol> Antoine Pitrou added the comment: > Probably the higher level libraries don't even realize it's not > happening, it's similar to the issue of SSL validation for HTTPS > connections where a vast swathe of people didn't even realize that > their certificates weren't being validated. Exactly. And we didn't add certificate checking in bugfix releases in the name of security. Now I appreciate that it would be a bit of a pity to wait for 3.5 to add this, so perhaps Larry wants to make an exception to the 3.4 feature freeze so that this feature can come in (assuming Christian's patch is ready). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 20:57:47 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Nov 2013 19:57:47 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385495867.4.0.316948948864.issue19509@psf.upfronthosting.co.za> Georg Brandl added the comment: For a true security fix, the default for check_hostname would have to be True. However, that will create a lot of backward compatibility problems for questionable gain. I think Larry should make an exception for 3.4 and allow this new feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:02:33 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 26 Nov 2013 20:02:33 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385496153.36.0.0659861888213.issue19638@psf.upfronthosting.co.za> Mark Dickinson added the comment: Peak memory usage appears to be around 4 times the string length on Python 3.3, and around 3 times the string length on Python 3.4. For 3.4, the peak occurs while formatting the exception message; presumably at that point we've got all three of (a) the original string, (b) the exception message string being built, and (c) some sort of temporary string used during formatting. For the purposes of this issue, I'll update the constants in the bigmemtest decorators. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:12:23 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 26 Nov 2013 20:12:23 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385496743.11.0.8557904116.issue19509@psf.upfronthosting.co.za> Larry Hastings added the comment: Okay, you have my permission to add match_hostname() and fix the security hole you cite. Can you have it done soon, so it can bake for a while in trunk before we cut beta 2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:29:07 2013 From: report at bugs.python.org (Illirgway) Date: Tue, 26 Nov 2013 20:29:07 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1385497747.78.0.60841775657.issue19662@psf.upfronthosting.co.za> Illirgway added the comment: Here is another patch for fixing this issue: https://github.com/Illirgway/cpython/commit/12d7c59e0564c408a65dd782339f585ab6b14b34 Sorry for my bad english ---------- nosy: +Illirgway versions: +Python 3.3 -Python 3.5 Added file: http://bugs.python.org/file32861/python3.3-lib-smtpd-patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:29:24 2013 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 26 Nov 2013 20:29:24 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1385497764.17.0.883976473521.issue19557@psf.upfronthosting.co.za> anatoly techtonik added the comment: SO link serves a proof that a problem is actual. It is needed, because, for example Brett doesn't think it is important. 2nd link is the same proof, and also an example of documentation wanted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:29:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 20:29:45 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1385497785.22.0.421056776394.issue19662@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:30:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 20:30:02 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385497802.3.0.361995212596.issue19509@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:30:44 2013 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 26 Nov 2013 20:30:44 +0000 Subject: [issue19557] ast - docs for every node type are missing In-Reply-To: <1384239144.67.0.857427270426.issue19557@psf.upfronthosting.co.za> Message-ID: <1385497844.27.0.877589619814.issue19557@psf.upfronthosting.co.za> anatoly techtonik added the comment: In fact it may be the documentation that could be merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:33:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 20:33:20 +0000 Subject: [issue19792] pathlib does not support symlink in Windows XP In-Reply-To: <1385451814.33.0.666998936425.issue19792@psf.upfronthosting.co.za> Message-ID: <1385498000.2.0.720365054042.issue19792@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Also, how many people uses pathlib in Python 3.4 in Windows XP with > third-party drivers enabling symbolic link support? Should be small. I've never heard of third-party driver for symlink link support before (granted, I'm not a Windows user). I'm willing to bet that this is a niche situation indeed, so I'm not very warm for tweaking pathlib around it. ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:35:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Nov 2013 20:35:17 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support In-Reply-To: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> Message-ID: <1385498117.05.0.108867845232.issue19791@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Mmh... The reason it's like that is that pathlib is originally 2.7-compatible (and I'd like to do a 1.0 release on PyPI by the Python 3.4 timeframe). How about we defer this to Python 3.5, to make merging easier ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:41:02 2013 From: report at bugs.python.org (Donald Stufft) Date: Tue, 26 Nov 2013 20:41:02 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385498462.37.0.52208091782.issue19509@psf.upfronthosting.co.za> Donald Stufft added the comment: I assumed we were talking about 3.4 and didn't even notice that the issues had 3.3 and 3.2 attached to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:41:54 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Nov 2013 20:41:54 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385498514.4.0.86461843138.issue19729@psf.upfronthosting.co.za> Georg Brandl added the comment: Hmm, sucks. Benjamin, can you come up with a fix? I'll give it a few weeks to wait for more potential regressions and then do a 3.3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:50:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 20:50:02 +0000 Subject: [issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux In-Reply-To: <1300134691.76.0.567990674923.issue11508@psf.upfronthosting.co.za> Message-ID: <3dTcgY579lz7Lk0@mail.python.org> Roundup Robot added the comment: New changeset 72951ffbdc76 by Serhiy Storchaka in branch '2.7': Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with http://hg.python.org/cpython/rev/72951ffbdc76 New changeset a5c26e57f429 by Serhiy Storchaka in branch '3.3': Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with http://hg.python.org/cpython/rev/a5c26e57f429 New changeset efd0e6d675ff by Serhiy Storchaka in branch 'default': Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with http://hg.python.org/cpython/rev/efd0e6d675ff ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:51:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Nov 2013 20:51:06 +0000 Subject: [issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux In-Reply-To: <1300134691.76.0.567990674923.issue11508@psf.upfronthosting.co.za> Message-ID: <1385499066.85.0.0570763693687.issue11508@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Kent for your contribution. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:54:09 2013 From: report at bugs.python.org (HCT) Date: Tue, 26 Nov 2013 20:54:09 +0000 Subject: [issue19803] memoryview complain ctypes byte array are not native single character Message-ID: <1385499249.85.0.446556603594.issue19803@psf.upfronthosting.co.za> New submission from HCT: I'm trying to create ctypes buffer to be used back and forth with C libraries, but I keep getting errors. I need to slice the buffer to cut out different pieces to work on, so I try to get a memoryview of the buffer. does the error message imply that c_ubyte, c_uint8, c_byte and c_char are not native single character types? >>> memoryview(c_ubyte()).cast('B') Traceback (most recent call last): File "", line 1, in ValueError: memoryview: source format must be a native single character format prefixed with an optional '@' >>> memoryview((c_ubyte*1024)()).cast('B') Traceback (most recent call last): File "", line 1, in ValueError: memoryview: source format must be a native single character format prefixed with an optional '@' >>> memoryview(c_uint8()).cast('B') Traceback (most recent call last): File "", line 1, in ValueError: memoryview: source format must be a native single character format prefixed with an optional '@' >>> memoryview((c_uint8*1024)()).cast('B') Traceback (most recent call last): File "", line 1, in ValueError: memoryview: source format must be a native single character format prefixed with an optional '@' >>> memoryview((c_byte*1024)()).cast('B') Traceback (most recent call last): File "", line 1, in ValueError: memoryview: source format must be a native single character format prefixed with an optional '@' >>> memoryview((c_char*1024)()).cast('B') Traceback (most recent call last): File "", line 1, in ValueError: memoryview: source format must be a native single character format prefixed with an optional '@' >>> memoryview((c_char*1024)())[0] Traceback (most recent call last): File "", line 1, in NotImplementedError: memoryview: unsupported format (1024)>> memoryview((c_byte*1024)())[0] Traceback (most recent call last): File "", line 1, in NotImplementedError: memoryview: unsupported format (1024)>> memoryview((c_ubyte*1024)())[0] Traceback (most recent call last): File "", line 1, in NotImplementedError: memoryview: unsupported format (1024)>> memoryview((c_uint8*1024)())[0] Traceback (most recent call last): File "", line 1, in NotImplementedError: memoryview: unsupported format (1024)>> ---------- components: Library (Lib), ctypes messages: 204536 nosy: hct priority: normal severity: normal status: open title: memoryview complain ctypes byte array are not native single character versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 21:59:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 20:59:18 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <3dTctF32MSzPSZ@mail.python.org> Roundup Robot added the comment: New changeset c8e138646be1 by Zachary Ware in branch '2.7': Issue #19588: Fixed tests in test_random that were silently skipped most http://hg.python.org/cpython/rev/c8e138646be1 New changeset c65882d79c5f by Zachary Ware in branch '3.3': Issue #19588: Fixed tests in test_random that were silently skipped most http://hg.python.org/cpython/rev/c65882d79c5f New changeset 28ec217ce510 by Zachary Ware in branch 'default': Issue #19588: Merge with 3.3 http://hg.python.org/cpython/rev/28ec217ce510 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 22:01:29 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 26 Nov 2013 21:01:29 +0000 Subject: [issue19588] Silently skipped test in test_random In-Reply-To: <1384461288.76.0.822218822712.issue19588@psf.upfronthosting.co.za> Message-ID: <1385499689.67.0.822144909457.issue19588@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch, Julian! ---------- assignee: -> zach.ware resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 22:43:37 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 26 Nov 2013 21:43:37 +0000 Subject: [issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux In-Reply-To: <1300134691.76.0.567990674923.issue11508@psf.upfronthosting.co.za> Message-ID: <1385502217.04.0.718503135959.issue11508@psf.upfronthosting.co.za> Zachary Ware added the comment: This seems to have broken 64-bit Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/3472/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.3/builds/1288/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%202.7/builds/940/steps/test/logs/stdio ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 23:22:49 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 22:22:49 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1385504569.22.0.000606107044322.issue19662@psf.upfronthosting.co.za> R. David Murray added the comment: As I said, the decoding needs to be controlled by a switch (presumably a keyword argument to SMTPServer) that defaults to the present (incorrect) behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 23:23:12 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Nov 2013 22:23:12 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1385504592.89.0.168777632317.issue19662@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 23:33:40 2013 From: report at bugs.python.org (Julian Gindi) Date: Tue, 26 Nov 2013 22:33:40 +0000 Subject: [issue18983] Specify time unit for timeit CLI In-Reply-To: <1378674956.86.0.740860392271.issue18983@psf.upfronthosting.co.za> Message-ID: <1385505220.54.0.307382664928.issue18983@psf.upfronthosting.co.za> Julian Gindi added the comment: I created a patch that allows users to specify a time unit output using the "-u" flag. Example usage: python -m timeit -u "msec" '"-".join(str(n) for n in range(100))' >> 10000 loops, best of 3: 0.156 msec per loop python -m timeit -u "sec" '"-".join(str(n) for n in range(100))' >> 10000 loops, best of 3: 0.000159 sec per loop You can specify msec, sec, or usec. I am also interested in having a JSON option as mentioned by Antoine. Any thoughts? ---------- keywords: +patch nosy: +Julian.Gindi Added file: http://bugs.python.org/file32862/issue18983.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 23:35:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Nov 2013 22:35:02 +0000 Subject: [issue19788] Always run kill_python(_d).exe when (re-)building on Windows In-Reply-To: <1385441131.37.0.761786658191.issue19788@psf.upfronthosting.co.za> Message-ID: <3dTg0j55JBz7LsN@mail.python.org> Roundup Robot added the comment: New changeset ca600150205a by Zachary Ware in branch '3.3': Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the http://hg.python.org/cpython/rev/ca600150205a New changeset 2c1e041cb504 by Zachary Ware in branch 'default': Issue #19788: kill_python(_d).exe is now run as a PreBuildEvent on the http://hg.python.org/cpython/rev/2c1e041cb504 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 26 23:35:47 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 26 Nov 2013 22:35:47 +0000 Subject: [issue19788] Always run kill_python(_d).exe when (re-)building on Windows In-Reply-To: <1385441131.37.0.761786658191.issue19788@psf.upfronthosting.co.za> Message-ID: <1385505347.62.0.0876811070509.issue19788@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the test, Tim :) ---------- assignee: -> zach.ware resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 02:12:04 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 27 Nov 2013 01:12:04 +0000 Subject: [issue12014] str.format parses replacement field incorrectly In-Reply-To: <1304646359.82.0.599761597998.issue12014@psf.upfronthosting.co.za> Message-ID: <1385514724.08.0.423705353039.issue12014@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Should be generally patched up in 3.4. Try it out. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 02:24:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 Nov 2013 01:24:13 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <3dTklw0RvPz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset bab7dc2ffc16 by Benjamin Peterson in branch '3.3': fix format spec recursive expansion (closes #19729) http://hg.python.org/cpython/rev/bab7dc2ffc16 New changeset e27684eed3b6 by Benjamin Peterson in branch 'default': merge 3.3 (#19729) http://hg.python.org/cpython/rev/e27684eed3b6 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 02:24:27 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 27 Nov 2013 01:24:27 +0000 Subject: [issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3 In-Reply-To: <1385173002.6.0.538237708826.issue19729@psf.upfronthosting.co.za> Message-ID: <1385515467.44.0.457865198692.issue19729@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Sorry about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 03:13:47 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 27 Nov 2013 02:13:47 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <1385518427.15.0.055063723215.issue19802@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I agree. The test is not that meaningful. But hey, we have the test that tests this kind of constant. http://hg.python.org/cpython/rev/513da56d28de ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 03:59:28 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 27 Nov 2013 02:59:28 +0000 Subject: [issue19804] test_uuid failing on 32-bit Windows Vista Message-ID: <1385521168.13.0.486814911092.issue19804@psf.upfronthosting.co.za> New submission from Tim Peters: Using current default branch: FAIL: test_find_mac (test.test_uuid.TestUUID) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Code\Python\lib\test\test_uuid.py", line 378, in test_find_mac self.assertEqual(mac, 0x1234567890ab) AssertionError: None != 20015998341291 ---------- assignee: serhiy.storchaka messages: 204548 nosy: serhiy.storchaka, tim.peters priority: normal severity: normal status: open title: test_uuid failing on 32-bit Windows Vista type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 04:04:24 2013 From: report at bugs.python.org (Tim Peters) Date: Wed, 27 Nov 2013 03:04:24 +0000 Subject: [issue19804] test_uuid failing on 32-bit Windows Vista In-Reply-To: <1385521168.13.0.486814911092.issue19804@psf.upfronthosting.co.za> Message-ID: <1385521464.67.0.939177692309.issue19804@psf.upfronthosting.co.za> Tim Peters added the comment: Seeing the same failure on a buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/3474/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 05:32:09 2013 From: report at bugs.python.org (Graham Wideman) Date: Wed, 27 Nov 2013 04:32:09 +0000 Subject: [issue19805] Revise FAQ Dictionary: consistent key order item Message-ID: <1385526729.76.0.941069828347.issue19805@psf.upfronthosting.co.za> New submission from Graham Wideman: FAQ entry: http://docs.python.org/3/faq/programming.html#how-can-i-get-a-dictionary-to-display-its-keys-in-a-consistent-order claims that there's no way for a dictionary to return keys in a consistent order. However, there's OrderedDict which should probably be mentioned here. ---------- assignee: docs at python components: Documentation messages: 204550 nosy: docs at python, gwideman priority: normal severity: normal status: open title: Revise FAQ Dictionary: consistent key order item type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 06:06:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 Nov 2013 05:06:26 +0000 Subject: [issue19805] Revise FAQ Dictionary: consistent key order item In-Reply-To: <1385526729.76.0.941069828347.issue19805@psf.upfronthosting.co.za> Message-ID: <3dTqhL0KCmz7Lk0@mail.python.org> Roundup Robot added the comment: New changeset 22e514e41fac by Benjamin Peterson in branch '3.3': recommend OrderedDict for this FAQ (closes #19805) http://hg.python.org/cpython/rev/22e514e41fac New changeset ddbcb86afbdc by Benjamin Peterson in branch 'default': merge 3.3 (#19805) http://hg.python.org/cpython/rev/ddbcb86afbdc ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 06:18:52 2013 From: report at bugs.python.org (Brian Curtin) Date: Wed, 27 Nov 2013 05:18:52 +0000 Subject: [issue19792] pathlib does not support symlink in Windows XP In-Reply-To: <1385451814.33.0.666998936425.issue19792@psf.upfronthosting.co.za> Message-ID: <1385529532.15.0.857084895671.issue19792@psf.upfronthosting.co.za> Brian Curtin added the comment: If users want to do that hack to get symlinks on XP, they should probably just manage doing so on their own. It's not something we'd take care of installing and running via our installer, so I don't think pathlib should be changed to work for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 07:10:48 2013 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 27 Nov 2013 06:10:48 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets Message-ID: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> New submission from Petri Lehtinen: >From Illirgway, https://github.com/akheron/cpython/pull/2: Fix utf-8 bug, when symbol byte chain splits on 2 tcp-packets: error: uncaptured python exception, closing channel (:'utf-8' codec can't decode byte 0xd0 in position 1474: unexpected end of data [/usr/lib/python3.3/asyncore.py|read|83] [/usr/lib/python3.3/asyncore.py|handle_read_event|441] [/usr/lib/python3.3/asynchat.py|handle_read|178] [/usr/lib/python3.3/smtpd.py|collect_incoming_data|289]) ---------- components: Library (Lib) files: smtpd.patch keywords: needs review, patch messages: 204553 nosy: giampaolo.rodola, petri.lehtinen priority: normal severity: normal stage: patch review status: open title: smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file32863/smtpd.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 07:58:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 Nov 2013 06:58:47 +0000 Subject: [issue19804] test_uuid failing on 32-bit Windows Vista In-Reply-To: <1385521168.13.0.486814911092.issue19804@psf.upfronthosting.co.za> Message-ID: <3dTt9y1kfsz7Lk1@mail.python.org> Roundup Robot added the comment: New changeset e5b7f140ae30 by Serhiy Storchaka in branch '2.7': Skip test_find_mac on Windows (issue #19804). http://hg.python.org/cpython/rev/e5b7f140ae30 New changeset dfadce7635ce by Serhiy Storchaka in branch '3.3': Skip test_find_mac on Windows (issue #19804). http://hg.python.org/cpython/rev/dfadce7635ce New changeset 4d5c3cb08170 by Serhiy Storchaka in branch 'default': Skip test_find_mac on Windows (issue #19804). http://hg.python.org/cpython/rev/4d5c3cb08170 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 08:00:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 Nov 2013 07:00:01 +0000 Subject: [issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux In-Reply-To: <1385502217.04.0.718503135959.issue11508@psf.upfronthosting.co.za> Message-ID: <2661818.Ue92n75VAX@raxxla> Serhiy Storchaka added the comment: Thank you Zachary for your report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 08:01:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 Nov 2013 07:01:14 +0000 Subject: [issue19804] test_uuid failing on 32-bit Windows Vista In-Reply-To: <1385521168.13.0.486814911092.issue19804@psf.upfronthosting.co.za> Message-ID: <1385535674.19.0.955808428763.issue19804@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Tim for your report. ---------- components: +Tests resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 08:02:06 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 27 Nov 2013 07:02:06 +0000 Subject: [issue19792] pathlib does not support symlink in Windows XP In-Reply-To: <1385451814.33.0.666998936425.issue19792@psf.upfronthosting.co.za> Message-ID: <1385535726.31.0.918453444864.issue19792@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I agree we should not go "extra mile" to add feature for Windows XP, a 12 year old software and soon to be "put down" a couple months forward. But in this case, Antoine goes "extra mile" to prevent symbolic link support in Windows XP. And it's not just him that has this kind of reasoning. Django developers put this code which is similar with pathlib. django/contrib/staticfiles/management/commands/collectstatic.py if self.symlink: if sys.platform == 'win32': raise CommandError("Symlinking is not supported by this " "platform (%s)." % sys.platform) if not self.local: raise CommandError("Can't symlink to a remote destination.") I opened this ticket because I am curious why developers go "extra mile" to prevent symbolic link support in certain platform. Why not just let os.symlink does the job and propagate the error from there? What is the virtue of not letting os.symlink decides who gets the symbolic link support? Surely in Windows XP (without 3rd party driver) os.symlink will throws exception and how that differs from throwing exception in pathlib library? But anyway feel free to close this ticket. I think I'll just "copy" Antoine's checking in solving this Django's bug: https://code.djangoproject.com/ticket/21482 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 08:02:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 27 Nov 2013 07:02:15 +0000 Subject: [issue11508] Virtual Interfaces cause uuid._find_mac to raise a ValueError under Linux In-Reply-To: <1385502217.04.0.718503135959.issue11508@psf.upfronthosting.co.za> Message-ID: <7000096.l8RnOcvvZ0@raxxla> Serhiy Storchaka added the comment: Fixed in issue19804. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 08:03:10 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 27 Nov 2013 07:03:10 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385535790.71.0.393337888652.issue19780@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Serhiy, I am not able to reproduce your results. I don't get any significant performance improvements with your patch. 22:34:03 [ ~/PythonDev/cpython-baseline ]$ ./python.exe -m timeit "import pickle" "with open('test.pickle4', 'rb', buffering=0) as f: pickle.load(f)" 100 loops, best of 3: 9.26 msec per loop 22:36:13 [ ~/PythonDev/cpython ]$ ./python.exe -m timeit "import pickle" "with open('test.pickle4', 'rb', buffering=0) as f: pickle.load(f)" 100 loops, best of 3: 9.28 msec per loop I wrote a benchmark to simulate slow reads. But again, there is no performance difference with the patch. 22:24:56 [ ~/PythonDev/benchmarks ]$ ./perf.py -v -b unpickle_file ../cpython-baseline/python.exe ../cpython/python.exe ### unpickle_file ### Min: 1.103715 -> 1.103666: 1.00x faster Avg: 1.158279 -> 1.146820: 1.01x faster Not significant Stddev: 0.04127 -> 0.03273: 1.2608x smaller ---------- Added file: http://bugs.python.org/file32864/unpickle_file_bench.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 08:07:10 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 27 Nov 2013 07:07:10 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support In-Reply-To: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> Message-ID: <1385536030.58.0.497700437631.issue19791@psf.upfronthosting.co.za> Vajrasky Kok added the comment: > How about we defer this to Python 3.5, to make merging easier ? Sure. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 08:21:47 2013 From: report at bugs.python.org (chili) Date: Wed, 27 Nov 2013 07:21:47 +0000 Subject: [issue19807] calculation of standard math Message-ID: <1385536907.86.0.721249156878.issue19807@psf.upfronthosting.co.za> New submission from chili: Calculation of print (162-159.9) (IDLE and source script) returns 2.0999999999999943 I don?t make my financial calculation with this command :) ---------- components: Regular Expressions messages: 204561 nosy: chili, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: calculation of standard math versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 08:28:58 2013 From: report at bugs.python.org (chili) Date: Wed, 27 Nov 2013 07:28:58 +0000 Subject: [issue19807] calculation of standard math returns incorrect value In-Reply-To: <1385536907.86.0.721249156878.issue19807@psf.upfronthosting.co.za> Message-ID: <1385537338.5.0.867620814037.issue19807@psf.upfronthosting.co.za> Changes by chili : ---------- title: calculation of standard math -> calculation of standard math returns incorrect value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 09:06:08 2013 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 27 Nov 2013 08:06:08 +0000 Subject: [issue19807] calculation of standard math returns incorrect value In-Reply-To: <1385536907.86.0.721249156878.issue19807@psf.upfronthosting.co.za> Message-ID: <1385539568.15.0.249286833262.issue19807@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sorry; this is just the way that (binary) floating-point works. See http://docs.python.org/2/tutorial/floatingpoint.html for more (or Google 'binary floating point' for a host of references). If you're doing financial calculations, you may want to look into the decimal module: http://docs.python.org/2/library/decimal.html ---------- nosy: +mark.dickinson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 09:11:36 2013 From: report at bugs.python.org (chili) Date: Wed, 27 Nov 2013 08:11:36 +0000 Subject: [issue19807] calculation of standard math returns incorrect value In-Reply-To: <1385536907.86.0.721249156878.issue19807@psf.upfronthosting.co.za> Message-ID: <1385539896.68.0.594257169595.issue19807@psf.upfronthosting.co.za> chili added the comment: Thx for help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 09:37:52 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 27 Nov 2013 08:37:52 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1385541472.24.0.731890929066.issue19772@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I come out with two patches. The first patch using bytes generator to copy the message before mutating it in string generator, then restore it after printing the mutated message. ---------- keywords: +patch Added file: http://bugs.python.org/file32865/fix_serialization_message_object_mutation_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 09:38:54 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 27 Nov 2013 08:38:54 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1385541534.65.0.504819705723.issue19772@psf.upfronthosting.co.za> Vajrasky Kok added the comment: The second patch copies the private variables of the message before mutating it in string generator, then restore the private variables after printing the mutated message. ---------- Added file: http://bugs.python.org/file32866/fix_serialization_message_object_mutation_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 09:42:42 2013 From: report at bugs.python.org (Peter Otten) Date: Wed, 27 Nov 2013 08:42:42 +0000 Subject: [issue19808] IDLE applys syntax highlighting to user input in its shell Message-ID: <1385541762.06.0.369087004664.issue19808@psf.upfronthosting.co.za> New submission from Peter Otten: For example when you type >>> input("What shall I do? ") Run for your life! in its shell window IDLE shows the 'for' as if it were a keyword. The same happens if you run a script that requires user interaction. ---------- components: IDLE messages: 204566 nosy: peter.otten priority: normal severity: normal status: open title: IDLE applys syntax highlighting to user input in its shell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 09:46:26 2013 From: report at bugs.python.org (Peter Otten) Date: Wed, 27 Nov 2013 08:46:26 +0000 Subject: [issue19808] IDLE applies syntax highlighting to user input in its shell In-Reply-To: <1385541762.06.0.369087004664.issue19808@psf.upfronthosting.co.za> Message-ID: <1385541986.56.0.864929214635.issue19808@psf.upfronthosting.co.za> Changes by Peter Otten <__peter__ at web.de>: ---------- title: IDLE applys syntax highlighting to user input in its shell -> IDLE applies syntax highlighting to user input in its shell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 09:47:33 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 27 Nov 2013 08:47:33 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1385542053.84.0.370365107678.issue19772@psf.upfronthosting.co.za> Vajrasky Kok added the comment: I got another inspiration. The third patch uses copy.copy to copy the Message before mutating it in string generator, then restore it after printing the mutated message. ---------- Added file: http://bugs.python.org/file32867/fix_serialization_message_object_mutation_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 10:08:42 2013 From: report at bugs.python.org (Martin Dengler) Date: Wed, 27 Nov 2013 09:08:42 +0000 Subject: [issue2226] Small _abcoll Bugs / Oddities In-Reply-To: <1204579501.7.0.0188509512316.issue2226@psf.upfronthosting.co.za> Message-ID: <1385543322.68.0.316038176821.issue2226@psf.upfronthosting.co.za> Changes by Martin Dengler : ---------- nosy: +mdengler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 10:10:22 2013 From: report at bugs.python.org (Martin Dengler) Date: Wed, 27 Nov 2013 09:10:22 +0000 Subject: [issue8743] set() operators don't work with collections.Set instances In-Reply-To: <1274122246.37.0.692277131409.issue8743@psf.upfronthosting.co.za> Message-ID: <1385543422.75.0.916579323954.issue8743@psf.upfronthosting.co.za> Changes by Martin Dengler : ---------- nosy: +mdengler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 10:30:46 2013 From: report at bugs.python.org (Owen Lin) Date: Wed, 27 Nov 2013 09:30:46 +0000 Subject: [issue19809] Python get stuck in second Popen call Message-ID: <1385544646.44.0.340337636792.issue19809@psf.upfronthosting.co.za> New submission from Owen Lin: If we call two subprocess.Popen simultaneously, the second one is blocked until the first one is finished. The attached file is a code snippet to reproduce this bug. I can reproduce the bug in version 2.7.3 and 2.7.6 very easily (in few seconds with the code). But it works fine on python3. Here is the backtrace of python ========================================== #0 0x00007f0eba954d2d in read () at ../sysdeps/unix/syscall-template.S:82#1 0x00000000005d8d10 in posix_read (self=0x0, args=(5, 1048576)) at ../Modules/posixmodule.c:6628#2 0x0000000000486896 in PyCFunction_Call (func=, arg=(5, 1048576), kw=0x0) at ../Objects/methodobject.c:81#3 0x00000000005278e4 in ext_do_call (func=, pp_stack=0x7fff1fc0ac80, flags=1, na=0, nk=0) at ../Python/ceval.c:4331 #4 0x00000000005215cd in PyEval_EvalFrameEx ( f=Frame 0x298f800, for file /usr/lib/python2.7/subprocess.py, line 478, in _eintr_retry_call (func=, args=(5, 1048576)), throwflag=0) at ../Python/ceval.c:2705 #5 0x0000000000523c2e in PyEval_EvalCodeEx (co=0x294b880, globals={'STDOUT': -2, '_has_poll': True, 'gc': , 'check_call': , 'mswindows': False, 'select': , 'list2cmdline': , '__all__': ['Popen', 'PIPE', 'STDOUT', 'call', 'check_call', 'check_output', 'CalledProcessError'], 'errno': , '_demo_posix': , '__package__': None, 'PIPE': -1, '_cleanup': _______________________________________ From report at bugs.python.org Wed Nov 27 11:10:45 2013 From: report at bugs.python.org (madan ram) Date: Wed, 27 Nov 2013 10:10:45 +0000 Subject: [issue19810] adding an feature to python interpreter Message-ID: <1385547045.38.0.843948844606.issue19810@psf.upfronthosting.co.za> New submission from madan ram: I found that it will be useful to show the list of function arguments using inspect module. When the function executed by the user in interpreter as "TypeError". ex: - >>def foo(a,b=4,c="hello"): ... print a,b,c >>foo() Traceback (most recent call last): File "", line 1, in TypeError: foo() takes at least 2 arguments (0 given) Rather the displaying like above it is will be much more readable to show as below. >>foo() Traceback (most recent call last): File "", line 1, in TypeError: foo() takes at least 1 arguments args=['a', 'b', 'c'], varargs=None, keywords=None, defaults=(4, 'hello') (0 given) This will be advantageous when the user has forgotten what parameter to use for builtin function when working offline. ---------- components: Interpreter Core messages: 204569 nosy: eric.araujo, ezio.melotti, georg.brandl, gpolo, madan.ram priority: normal severity: normal status: open title: adding an feature to python interpreter versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 11:12:09 2013 From: report at bugs.python.org (madan ram) Date: Wed, 27 Nov 2013 10:12:09 +0000 Subject: [issue19810] Adding a feature to python interpreter In-Reply-To: <1385547045.38.0.843948844606.issue19810@psf.upfronthosting.co.za> Message-ID: <1385547129.07.0.823798241298.issue19810@psf.upfronthosting.co.za> Changes by madan ram : ---------- title: adding an feature to python interpreter -> Adding a feature to python interpreter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 11:18:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 10:18:06 +0000 Subject: [issue19809] Python get stuck in second Popen call In-Reply-To: <1385544646.44.0.340337636792.issue19809@psf.upfronthosting.co.za> Message-ID: <1385547486.08.0.125377854179.issue19809@psf.upfronthosting.co.za> STINNER Victor added the comment: The creation of slave_popen is not protected by a lock, and so dummy_thread() may spawn a new process (master) at the same time than the main process (slave). If it occurs at the same time, the master may inherit a pipe of the slave process used internally by the subprocess module to send the exception to the parent process if a Python exception occurs in the child process. The inheritance of pipes has been partially fixed in Python 3.2 with the new function _posixsubprocess.cloexec_pipe() which uses pipe2() function to atomically create a pipe with the O_CLOEXEC flag set. The problem has been fixed complelty in Python 3.4 with the PEP 446: all files are now created non inheritable by default, and atomic functions to set the "non inheritable" flag are used when available. You posted a Python 2.7 script, so I suppose that you are stuck at Python 2. In this case, you can workaround the issue by using a lock around the creation of any subprocess. To fix your example, just surround slave_popen creation with "with lock: ..." or lock.acquire()/lock.release(), as you did for master_popen. I propose to convert this issue to a documentation issue: we should add a warning explaining that spawning processes in more than one thread can lead to such race condition and hang one or more threads. And suggest to use a lock to workaround such issue. See also the atfork proposition which includes such lock: http://bugs.python.org/issue16500 -- Your script has other issues: - you should pass a file open in write mode for stdout/stderr - you should close open(os.devnull) files, or open them outside the loop - you should join the thread, or use a daemon thread. If you don't join threads, you will quickly read the limit of the number of threads - you can use shell=True to avoid spawning two process to run sleep (or simply use time.sleep :-)) - you need a synchronization between the two threads to ensure that master_popen is created before trying to kill it ---------- nosy: +haypo, neologix, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 11:18:32 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Nov 2013 10:18:32 +0000 Subject: [issue19810] Adding a feature to python interpreter In-Reply-To: <1385547045.38.0.843948844606.issue19810@psf.upfronthosting.co.za> Message-ID: <1385547512.63.0.540025957701.issue19810@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: -georg.brandl versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 11:18:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 10:18:41 +0000 Subject: [issue19809] Doc: subprocess should warn uses on race conditions when multiple threads spawn child processes In-Reply-To: <1385544646.44.0.340337636792.issue19809@psf.upfronthosting.co.za> Message-ID: <1385547521.91.0.955316188628.issue19809@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python title: Python get stuck in second Popen call -> Doc: subprocess should warn uses on race conditions when multiple threads spawn child processes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 11:45:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 10:45:08 +0000 Subject: [issue19811] test_pathlib: "The directory is not empty" error on os.rmdir() Message-ID: <1385549108.25.0.37383053389.issue19811@psf.upfronthosting.co.za> New submission from STINNER Victor: test_pathlib should use test.support.rmtree() instead of shutil.rmtree(). The function in support tries harder on Windows. test_pathlib may also create an unique temporary directory at each test run instead of using a global variable BASE: see below, tests are failing because the directory already exist. (Well, this issue is a consequence of the first one.) http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/3476/steps/test/logs/stdio ====================================================================== ERROR: test_touch_common (test.test_pathlib.WindowsPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 477, in rmtree return _rmtree_unsafe(path, onerror) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 367, in _rmtree_unsafe _rmtree_unsafe(fullname, onerror) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 367, in _rmtree_unsafe _rmtree_unsafe(fullname, onerror) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 376, in _rmtree_unsafe onerror(os.rmdir, path, sys.exc_info()) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 374, in _rmtree_unsafe os.rmdir(path) OSError: [WinError 145] The directory is not empty: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4528\\@test_4528_tmp\\dirC\\dirD' ====================================================================== ERROR: test_touch_nochange (test.test_pathlib.WindowsPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pathlib.py", line 1081, in setUp os.mkdir(BASE) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4528\\@test_4528_tmp' ====================================================================== ERROR: test_unlink (test.test_pathlib.WindowsPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pathlib.py", line 1081, in setUp os.mkdir(BASE) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4528\\@test_4528_tmp' ====================================================================== ERROR: test_with (test.test_pathlib.WindowsPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pathlib.py", line 1081, in setUp os.mkdir(BASE) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4528\\@test_4528_tmp' ---------------------------------------------------------------------- ---------- components: Windows messages: 204571 nosy: haypo, pitrou priority: normal severity: normal status: open title: test_pathlib: "The directory is not empty" error on os.rmdir() versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 11:53:51 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 27 Nov 2013 10:53:51 +0000 Subject: [issue19803] memoryview complain ctypes byte array are not native single character In-Reply-To: <1385499249.85.0.446556603594.issue19803@psf.upfronthosting.co.za> Message-ID: <1385549631.57.0.621200335772.issue19803@psf.upfronthosting.co.za> Stefan Krah added the comment: Memoryview currently only knows the types from the struct module. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 12:10:56 2013 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 27 Nov 2013 11:10:56 +0000 Subject: [issue19812] reload() by symbol name Message-ID: <1385550656.86.0.860350821267.issue19812@psf.upfronthosting.co.za> New submission from anatoly techtonik: It would be nice if reload() supported reloading of symbols imported with "from module import ..." syntax. It is quite useful for development sessions, when you patch and test your function on some set of unexpected input. >>> from astdump import dumpattrs as dat >>> import imp >>> imp.reload(dat) TypeError: reload() argument must be module >>> imp.reload(dumpattrs) NameError: name 'dumpattrs' is not defined >>> imp.reload(astdump) NameError: name 'astdump' is not defined >>> ---------- components: Interpreter Core, Library (Lib) messages: 204573 nosy: techtonik priority: normal severity: normal status: open title: reload() by symbol name type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 12:19:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 11:19:52 +0000 Subject: [issue19812] reload() by symbol name In-Reply-To: <1385550656.86.0.860350821267.issue19812@psf.upfronthosting.co.za> Message-ID: <1385551192.19.0.612870259489.issue19812@psf.upfronthosting.co.za> STINNER Victor added the comment: You can retrieve the module using sys.modules[symbol.__module__]. Example: >>> from os import environ as ENV >>> import imp, sys >>> imp.reload(sys.modules[ENV.__module__]) >>> _.environ is ENV False But if you import symbols instead of modules, symbols will still point to the old version of the module. This explain the final "False" result. You should import modules if you want to play with reload(). I prefer to exit and restart Python instead of playing with reload, I see it as a hack which has many issues like "_.environ is ENV" returning False. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 12:57:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 11:57:08 +0000 Subject: [issue19813] Add a new optional timeout parameter to socket.socket() constructor Message-ID: <1385553428.3.0.518090447657.issue19813@psf.upfronthosting.co.za> New submission from STINNER Victor: Since Linux 2.6.28, socket() syscall accepts a new SOCK_NONBLOCK flag in the socket type. It avoids 1 or 2 extra syscalls to set the socket in non-blocking mode. This flag comes also slowly in other operating systems: NetBSD, FreeBSD, etc. FreeBSD: http://lists.freebsd.org/pipermail/freebsd-hackers/2013-March/042242.html Discussion in the POSIX standard: http://austingroupbugs.net/view.php?id=411 Avoiding the syscalls has been proposed on python-dev a few months ago: https://mail.python.org/pipermail/python-dev/2013-January/123661.html I tried to include SOCK_NONBLOCK in my PEP 446, but I have been asked to treat it separatly because it's completly different than O_CLOEXEC (even it looks similar). http://hg.python.org/peps/file/fa873d5aed27/pep-0446.txt#l64 I also proposed to add 2 functions in the PEP: * ``os.get_blocking(fd:int) -> bool`` * ``os.set_blocking(fd:int, blocking: bool)`` I propose to add a new timeout parameter to socket.socket() constructor which would set the timeout internal attribute and set O_NONBLOCK flag using the new SOCK_NONBLOCK flag, ioctl() or fcntl() (depending on the OS and on what is available). I don't know if something special should be done on Windows for non-blocking sockets? socket.socket.setblocking() already exists and I suppose that it works on Windows :-) See also the discussion in my old PEP for non-blocking operations in files on Windows: http://hg.python.org/peps/file/fa873d5aed27/pep-0446.txt#l177 I don't know if the new parameter can just be added at the end of the parameter list, or it should be a keyword-only parameter to avoid breakpoint backward compatibility? socket.socketpair() and socket.socket.dup() and socket.fromfd(), socket.create_connection() (and more generally any function creating a new socket) may also be modified. -- By the way, internal_setblocking() currently uses 2 fcntl() syscalls on Linux, whereas it could be implemented with a single ioctl() syscall using FIONBIO. Set O_NONBLOCK flag: int flag = 1; ioctl(fd, FIONBIO, &flag); Clear O_NONBLOCK flag: int flag = 0; ioctl(fd, FIONBIO, &flag); Tell me if you prefer a different issue for this optimization. ---------- messages: 204575 nosy: gvanrossum, haypo, pitrou priority: normal severity: normal status: open title: Add a new optional timeout parameter to socket.socket() constructor type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 13:02:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 12:02:58 +0000 Subject: [issue19813] Add a new optional timeout parameter to socket.socket() constructor In-Reply-To: <1385553428.3.0.518090447657.issue19813@psf.upfronthosting.co.za> Message-ID: <1385553778.2.0.719682177855.issue19813@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: Python supports socket.SOCK_NONBLOCK since Python 3.2 (issue #7523). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 13:34:08 2013 From: report at bugs.python.org (Illirgway) Date: Wed, 27 Nov 2013 12:34:08 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1385555648.84.0.508225721163.issue19806@psf.upfronthosting.co.za> Illirgway added the comment: "base64", "quoted-printable" and "7bit" messages only use ASCII range of characters so raw_message.decode('ascii') == raw_message.decode('latin1') == etc. == raw_message.decode('utf-8') due to internal representation of utf-8 characters P.S. Python 3.4.0 beta 1 Lib/smtpd has the same bug and needs the same patch to fix this issue ---------- nosy: +Illirgway versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 14:14:24 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Nov 2013 13:14:24 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1385558064.13.0.576950012057.issue19806@psf.upfronthosting.co.za> R. David Murray added the comment: It occurs to me to wonder why smtpd is receiving 8bit data at all. It isn't advertising the 8BITMIME capability, so the client should be sending only 7bit data. See also issue 19662. I'm not sure that making utf-8 decoding work better is a good idea, but I suppose that since it is a data-dependent exception in a situation that would work with different data, we should go ahead and fix it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 14:45:16 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Nov 2013 13:45:16 +0000 Subject: [issue19813] Add a new optional timeout parameter to socket.socket() constructor In-Reply-To: <1385553428.3.0.518090447657.issue19813@psf.upfronthosting.co.za> Message-ID: <1385559916.0.0.695093098293.issue19813@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This really sounds pointless to me. How many sockets do you create per second? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 14:45:19 2013 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 27 Nov 2013 13:45:19 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1385559919.72.0.551737372692.issue19806@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Is there a reason why this patch changes the decoding error handler to 'ignore' (from the default 'strict')? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 14:45:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Nov 2013 13:45:48 +0000 Subject: [issue19811] test_pathlib: "The directory is not empty" error on os.rmdir() In-Reply-To: <1385549108.25.0.37383053389.issue19811@psf.upfronthosting.co.za> Message-ID: <1385559948.33.0.887949929487.issue19811@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> duplicate status: open -> closed superseder: -> support.rmtree fails on symlinks under Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 14:46:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Nov 2013 13:46:19 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <1385559979.59.0.296743239868.issue19802@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:10:00 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 27 Nov 2013 14:10:00 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385561400.52.0.122595951661.issue19799@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching a new patch. Hopefully the image will be viewable in the code review tool ---------- Added file: http://bugs.python.org/file32869/issue19799.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:11:18 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 27 Nov 2013 14:11:18 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385561478.14.0.364193433643.issue19799@psf.upfronthosting.co.za> Eli Bendersky added the comment: Just in case it isn't: https://dl.dropboxusercontent.com/u/15602400/images/pathlib-inheritance.png ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:11:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Nov 2013 14:11:21 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385561481.85.0.53021256743.issue19799@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Hopefully the image will be viewable in the code review tool Apparently not :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:16:01 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 27 Nov 2013 14:16:01 +0000 Subject: [issue19814] Document prefix matching behavior of argparse, particularly for parse_known_args Message-ID: <1385561761.38.0.108882000791.issue19814@psf.upfronthosting.co.za> New submission from Eli Bendersky: Prefix matching behavior can lead to bugs when combined with parse_known_args. See this thread for more details: https://mail.python.org/pipermail/python-dev/2013-November/130601.html Issue #14910 deals with making it optional, but until 3.5 we'll have to do with a documentation warning. ---------- assignee: eli.bendersky components: Documentation messages: 204584 nosy: bethard, eli.bendersky, r.david.murray priority: high severity: normal status: open title: Document prefix matching behavior of argparse, particularly for parse_known_args versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:17:07 2013 From: report at bugs.python.org (Illirgway) Date: Wed, 27 Nov 2013 14:17:07 +0000 Subject: [issue19806] smtpd crashes when a multi-byte UTF-8 sequence is split between consecutive data packets In-Reply-To: <1385532648.32.0.209027401379.issue19806@psf.upfronthosting.co.za> Message-ID: <1385561827.2.0.558287640641.issue19806@psf.upfronthosting.co.za> Illirgway added the comment: because "strict" throws an exception (for example, on raw win1251) which brings down production smtp daemon and "replace" embeds "ugly" characters into received (and passed) email messages ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:20:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 14:20:44 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <1385562044.05.0.897058653038.issue19802@psf.upfronthosting.co.za> STINNER Victor added the comment: You should also modify Doc/library/socket.rst to mention the new constant in the documentation (don't forget the ".. versionadded::" flag). Adding a new constant cannot break anything in Python, so I propose to it in Python 3.4. @Larry (our release manager): Do you agree? ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:20:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 14:20:49 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> Message-ID: <1385562049.88.0.426908215227.issue19629@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:21:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 14:21:04 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385562064.03.0.154931897388.issue19799@psf.upfronthosting.co.za> STINNER Victor added the comment: Could you please attach the picture separatly? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:33:02 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Nov 2013 14:33:02 +0000 Subject: [issue19810] Adding a feature to python interpreter In-Reply-To: <1385547045.38.0.843948844606.issue19810@psf.upfronthosting.co.za> Message-ID: <1385562782.71.0.32357571829.issue19810@psf.upfronthosting.co.za> R. David Murray added the comment: That's much less readable than the output from pfydoc, which the user can access easily (via either help at the interpreter prompt or pydoc at the shell prompt). So I'm -1 on this proposed change. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:33:25 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 27 Nov 2013 14:33:25 +0000 Subject: [issue19814] Document prefix matching behavior of argparse, particularly for parse_known_args In-Reply-To: <1385561761.38.0.108882000791.issue19814@psf.upfronthosting.co.za> Message-ID: <1385562805.79.0.557541736517.issue19814@psf.upfronthosting.co.za> Eli Bendersky added the comment: Here's a patch for 3.3; if it looks ok i'll merge it to default and also to 2.7 ---------- keywords: +patch Added file: http://bugs.python.org/file32870/issue19814.doc33.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:34:10 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Nov 2013 14:34:10 +0000 Subject: [issue19810] Display function signature in TypeErrors resulting from argument mismatches In-Reply-To: <1385547045.38.0.843948844606.issue19810@psf.upfronthosting.co.za> Message-ID: <1385562850.16.0.830568230441.issue19810@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: Adding a feature to python interpreter -> Display function signature in TypeErrors resulting from argument mismatches type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:36:25 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 27 Nov 2013 14:36:25 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385562985.24.0.00499347831025.issue19799@psf.upfronthosting.co.za> Changes by Eli Bendersky : Added file: http://bugs.python.org/file32871/pathlib-inheritance.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:37:24 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 27 Nov 2013 14:37:24 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385562064.03.0.154931897388.issue19799@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Wed, Nov 27, 2013 at 6:21 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > Could you please attach the picture separatly? > > Done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:37:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 14:37:24 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385563044.58.0.488426618126.issue19799@psf.upfronthosting.co.za> STINNER Victor added the comment: Which tool did you use to draw this schema? You may attach also the source if someone would like to modify it in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:44:15 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 27 Nov 2013 14:44:15 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385563044.58.0.488426618126.issue19799@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: > > STINNER Victor added the comment: > > Which tool did you use to draw this schema? You may attach also the source > if someone would like to modify it in the future. > Sorry, but there's no source. I drew it graphically. But since I did it with Google Drive's drawing program, I can just share out a link to the editor - https://docs.google.com/drawings/d/1F8do-1WL1sIGkZuiufcxcpZRtS0w4SwAowq-Uamrwt8/edit?usp=sharing I suppose if someone wants to edit it they can copy the document and do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 15:58:38 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 27 Nov 2013 14:58:38 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <1385564318.92.0.92474940409.issue19802@psf.upfronthosting.co.za> Larry Hastings added the comment: It's *possible* but I'm willing to risk it. You have my permission to apply that patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:12:00 2013 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 27 Nov 2013 15:12:00 +0000 Subject: [issue14910] argparse: disable abbreviation In-Reply-To: <1337943742.57.0.897347214609.issue14910@psf.upfronthosting.co.za> Message-ID: <1385565120.42.0.828919752515.issue14910@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:14:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 15:14:47 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: Message-ID: STINNER Victor added the comment: You can export the schema as SVG. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:15:05 2013 From: report at bugs.python.org (Brian Curtin) Date: Wed, 27 Nov 2013 15:15:05 +0000 Subject: [issue19792] pathlib does not support symlink in Windows XP In-Reply-To: <1385451814.33.0.666998936425.issue19792@psf.upfronthosting.co.za> Message-ID: <1385565305.39.0.0825790871218.issue19792@psf.upfronthosting.co.za> Brian Curtin added the comment: If a platform does not actually support symlinks, and XP does not actually support symlinks for any usual definition of an operating system supporting a feature, then I'm not sure why pathlib is doing something wrong to make it work more reasonably in that case. "os.symlink" is a NotImplementedError on Windows versions prior to Vista because the Windows API doesn't support CreateSymbolicLink. It doesn't make sense to just let the code try to run for all versions on all platforms but be wrapped in a try/catch block for the NotImplementedError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:15:37 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 27 Nov 2013 15:15:37 +0000 Subject: [issue19810] Display function signature in TypeErrors resulting from argument mismatches In-Reply-To: <1385547045.38.0.843948844606.issue19810@psf.upfronthosting.co.za> Message-ID: <1385565337.6.0.46820800385.issue19810@psf.upfronthosting.co.za> Benjamin Peterson added the comment: While we don't print the whole signature, this is much improved in 3.3: >>> def foo(a,b=4,c="hello"): pass >>> foo() Traceback (most recent call last): File "", line 1, in TypeError: foo() missing 1 required positional argument: 'a' ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:18:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Nov 2013 15:18:58 +0000 Subject: [issue19792] pathlib does not support symlink in Windows XP In-Reply-To: <1385451814.33.0.666998936425.issue19792@psf.upfronthosting.co.za> Message-ID: <1385565538.42.0.597778446501.issue19792@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The 2.7-compatible version of pathlib explains why the code is structured this way: if sys.getwindowsversion()[:2] >= (6, 0) and sys.version_info >= (3, 2): from nt import _getfinalpathname else: supports_symlinks = False _getfinalpathname = None In the stdlib version, I removed the `sys.version_info >= (3, 2)` and so it may look like as easy to rely on os.symlink raising NotImplementedError. That would make merging back more difficult, though, so I'd rather keep it like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:19:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 Nov 2013 15:19:44 +0000 Subject: [issue19802] socket.SO_PRIORITY is missing In-Reply-To: <1385485579.99.0.471708921072.issue19802@psf.upfronthosting.co.za> Message-ID: <3dV5J00s5XzNNy@mail.python.org> Roundup Robot added the comment: New changeset 9bbada125b3f by Benjamin Peterson in branch 'default': add SO_PRIORITY (closes #19802) http://hg.python.org/cpython/rev/9bbada125b3f ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:22:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Nov 2013 15:22:50 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385565770.2.0.374964267357.issue19780@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If you want a slow file object, you could benchmark with a GzipFile or similar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:37:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Nov 2013 15:37:28 +0000 Subject: [issue19781] No SSL match_hostname() in ftplib In-Reply-To: <1385423063.98.0.532680357118.issue19781@psf.upfronthosting.co.za> Message-ID: <1385566648.68.0.332057591591.issue19781@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 16:54:05 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 27 Nov 2013 15:54:05 +0000 Subject: [issue19812] reload() by symbol name In-Reply-To: <1385550656.86.0.860350821267.issue19812@psf.upfronthosting.co.za> Message-ID: <1385567645.78.0.179162301903.issue19812@psf.upfronthosting.co.za> Brett Cannon added the comment: As Victor pointed out, this is not really feasible at the object level. You can work your way back up to reload a whole module, but it won't update the object you passed in, which is just going to confuse users. ---------- nosy: +brett.cannon resolution: -> rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 17:11:01 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 27 Nov 2013 16:11:01 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1385568661.77.0.505176496371.issue3158@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 18:26:48 2013 From: report at bugs.python.org (Yann Diorcet) Date: Wed, 27 Nov 2013 17:26:48 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler Message-ID: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> New submission from Yann Diorcet: I fell on a bug in ElementTree of Python 2.7.5 (default, Nov 12 2013, 16:18:04) The bug seems to be here: http://hg.python.org/cpython/file/ab05e7dd2788/Modules/_elementtree.c#l2341 uri is NULL and not checked before be passed to strlen Maybe linked to my expat version: expat.i686 2.1.0-5.fc19 @fedora expat.x86_64 2.1.0-5.fc19 @anaconda ---------- components: Library (Lib) files: trace messages: 204601 nosy: Yann.Diorcet priority: normal severity: normal status: open title: ElementTree segmentation fault in expat_start_ns_handler versions: Python 2.7 Added file: http://bugs.python.org/file32872/trace _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 18:27:02 2013 From: report at bugs.python.org (Yann Diorcet) Date: Wed, 27 Nov 2013 17:27:02 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385573222.6.0.724598962802.issue19815@psf.upfronthosting.co.za> Changes by Yann Diorcet : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 18:28:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 17:28:16 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385573296.23.0.401697106255.issue19815@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you please provide use the script wadl.py? Or if it's not possible, can you please try to write a short Python script reproducing the crash? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 18:34:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 27 Nov 2013 17:34:31 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385573671.23.0.781465135107.issue19815@psf.upfronthosting.co.za> Christian Heimes added the comment: Indeed, uri might be null: http://hg.python.org/cpython/file/ab05e7dd2788/Modules/expat/xmlparse.c#l3157 ---------- nosy: +christian.heimes stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 18:49:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 17:49:27 +0000 Subject: [issue19816] test.regrtest: use tracemalloc to detect memory leaks? Message-ID: <1385574567.13.0.658193624023.issue19816@psf.upfronthosting.co.za> New submission from STINNER Victor: Someone proposed to use the new tracemalloc module in test.regrtest, I don't remember who. Maybe Nick Coghlan? I tried an hack dash_R(), but the result was not reliable. I should try harder :-) ---------- components: Tests messages: 204604 nosy: haypo, ncoghlan, neologix priority: normal severity: normal status: open title: test.regrtest: use tracemalloc to detect memory leaks? versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 19:03:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 18:03:12 +0000 Subject: [issue19817] tracemalloc add a memory limit feature Message-ID: <1385575392.84.0.858805099832.issue19817@psf.upfronthosting.co.za> New submission from STINNER Victor: It would be nice to add a memory_limit feature to the tracemalloc to make memory allocation fails if it would make the traced memory greater than the limit. See also the pyfailmalloc project which is similar but different: https://bitbucket.org/haypo/pyfailmalloc pyfailmalloc doesn't count allocated bytes, it schedules an error in N allocations where N is a random number. And pyfailmalloc only schedules one error, whereas I propose to make all memory allocations fails until the limit is respected. So if you only 0 bytes free (according to the limit), all memory allocations fail until some bytes are freed. Python currently behaves badly under very low memory condition. See also the issue #19437. ---------- files: tracemalloc_memory_limit.patch keywords: patch messages: 204605 nosy: haypo, neologix priority: normal severity: normal status: open title: tracemalloc add a memory limit feature versions: Python 3.5 Added file: http://bugs.python.org/file32873/tracemalloc_memory_limit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 19:03:21 2013 From: report at bugs.python.org (Julian Gindi) Date: Wed, 27 Nov 2013 18:03:21 +0000 Subject: [issue18983] Specify time unit for timeit CLI In-Reply-To: <1378674956.86.0.740860392271.issue18983@psf.upfronthosting.co.za> Message-ID: <1385575401.66.0.212759944761.issue18983@psf.upfronthosting.co.za> Julian Gindi added the comment: Updated patch to include unit tests. ---------- Added file: http://bugs.python.org/file32874/issue18983.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 19:56:22 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 27 Nov 2013 18:56:22 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> Message-ID: <1385578582.52.0.960164513697.issue19629@psf.upfronthosting.co.za> Jeremy Kloth added the comment: The attached patch changes support.rmtree to use os.lstat() instead of the builtin _isdir() to test for directory-ness of a path. ---------- keywords: +patch Added file: http://bugs.python.org/file32875/symlink.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 20:08:27 2013 From: report at bugs.python.org (dellair jie) Date: Wed, 27 Nov 2013 19:08:27 +0000 Subject: [issue19661] AIX: Python: RuntimeError "invalid slot offset when importing a module" in _ssl module In-Reply-To: <1384940707.67.0.629503813291.issue19661@psf.upfronthosting.co.za> Message-ID: <1385579307.11.0.532516341733.issue19661@psf.upfronthosting.co.za> dellair jie added the comment: I have rebuilt Python 3.3.2 with GCC 4.4.0 on AIX6.1. There was no warning. But, still seeing the same import offset runtime error: gcc -pthread -DNDEBUG -g -fwrapv -O0 -Wall -Wstrict-prototypes -IInclude -I. -Iopenssl/include -Iopenssl/include -IPython/Python-3.3.2-aix/Include -IPython/Python-3.3.2-aix -c Python/Python-3.3.2-aix/Modules/_ssl.c -o build/temp.aix-6.1-3.3Python/Python-3.3.2-aix/Modules/_ssl.o Python/Python-3.3.2-aix/Modules/ld_so_aix gcc -pthread -bI:Python/Python-3.3.2-aix/Modules/python.exp build/temp.aix-6.1-3.3Python/Python-3.3.2-aix/Modules/_ssl.o -Lopenssl/lib -Lopenssl/lib -lssl -lcrypto -o build/lib.aix-6.1-3.3/_ssl.so *** WARNING: importing extension "_ssl" failed with build/lib.aix-6.1-3.3/_ssl.so: : invalid slot offset: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 21:34:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 20:34:48 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> Message-ID: <1385584488.62.0.564450319185.issue19629@psf.upfronthosting.co.za> STINNER Victor added the comment: Why not starting to use pathlib? pathlib.Path(path).resolve().is_dir(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 21:40:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 Nov 2013 20:40:11 +0000 Subject: [issue19798] tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result In-Reply-To: <1385470501.4.0.457090532549.issue19798@psf.upfronthosting.co.za> Message-ID: <3dVDPk3hbMzRnh@mail.python.org> Roundup Robot added the comment: New changeset 553144bd7bf1 by Victor Stinner in branch 'default': Close #19798: replace "maximum" term with "peak" in get_traced_memory() http://hg.python.org/cpython/rev/553144bd7bf1 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 21:40:39 2013 From: report at bugs.python.org (Yann Diorcet) Date: Wed, 27 Nov 2013 20:40:39 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385584839.87.0.232028276937.issue19815@psf.upfronthosting.co.za> Changes by Yann Diorcet : Added file: http://bugs.python.org/file32876/aa.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 21:41:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 20:41:04 +0000 Subject: [issue19798] tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result In-Reply-To: <1385470501.4.0.457090532549.issue19798@psf.upfronthosting.co.za> Message-ID: <1385584864.62.0.421292307439.issue19798@psf.upfronthosting.co.za> STINNER Victor added the comment: > no? yes, I also prefer "current" over "size". ---------- stage: committed/rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 22:04:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Nov 2013 21:04:48 +0000 Subject: [issue19629] support.rmtree fails on symlinks under Windows In-Reply-To: <1384636992.45.0.350630415261.issue19629@psf.upfronthosting.co.za> Message-ID: <1385586288.92.0.196901743098.issue19629@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Why not starting to use pathlib? pathlib.Path(path).resolve().is_dir(). I would rather keep using low-level APIs in test support functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 22:09:45 2013 From: report at bugs.python.org (HCT) Date: Wed, 27 Nov 2013 21:09:45 +0000 Subject: [issue19803] memoryview complain ctypes byte array are not native single character In-Reply-To: <1385499249.85.0.446556603594.issue19803@psf.upfronthosting.co.za> Message-ID: <1385586585.33.0.640639870537.issue19803@psf.upfronthosting.co.za> HCT added the comment: this seems to disagree with the statement of "Memoryview currently only knows the types from the struct module." why is memoryview aware of _pack_, a implementation detail of ctypes structures. is memoryview a collection of implementation for different types or a unique type on its own? >>> import ctypes >>> class B1(ctypes.Structure): ... _fields_ = [( "data", c_uint8 * 256 ), ] ... _pack_ = 1 ... >>> class B2(ctypes.Structure): ... _fields_ = [( "data", c_uint8 * 256 ), ] ... >>> >>> a = B1() >>> b = B2() >>> memoryview( a ).cast( 'B' ) >>> memoryview( b ).cast( 'B' ) Traceback (most recent call last): File "", line 1, in ValueError: memoryview: source format must be a native single character format prefixed with an optional '@' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 22:12:36 2013 From: report at bugs.python.org (HCT) Date: Wed, 27 Nov 2013 21:12:36 +0000 Subject: [issue19803] memoryview complain ctypes byte array are not native single character In-Reply-To: <1385499249.85.0.446556603594.issue19803@psf.upfronthosting.co.za> Message-ID: <1385586756.73.0.494348614534.issue19803@psf.upfronthosting.co.za> HCT added the comment: more examples (using 64-bit integer vs 8-bit integer in the above example) to show that ctypes aren't being translated for memoryview properly. _pack_ is the only way to make memoryview handle ctypes properly >>> import ctypes >>> class B1(ctypes.Structure): ... _fields_ = [( "data", ctypes.c_uint64 * 256 ), ] ... _pack_ = 1 ... >>> class B2(ctypes.Structure): ... _fields_ = [( "data", ctypes.c_uint64 * 256 ), ] ... >>> >>> a = B1() >>> b = B2() >>> memoryview( a ).cast( 'B' ) >>> memoryview( b ).cast( 'B' ) Traceback (most recent call last): File "", line 1, in ValueError: memoryview: source format must be a native single character format prefixed with an optional '@' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 22:30:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 Nov 2013 21:30:57 +0000 Subject: [issue19786] tracemalloc: remove arbitrary limit of 100 frames In-Reply-To: <1385423386.94.0.320211351923.issue19786@psf.upfronthosting.co.za> Message-ID: <3dVFXJ38Vgz7LmV@mail.python.org> Roundup Robot added the comment: New changeset eead17ba32d8 by Victor Stinner in branch 'default': Closes #19786: tracemalloc, remove the arbitrary limit of 100 frames http://hg.python.org/cpython/rev/eead17ba32d8 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 22:34:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 21:34:37 +0000 Subject: [issue19786] tracemalloc: remove arbitrary limit of 100 frames In-Reply-To: <1385423386.94.0.320211351923.issue19786@psf.upfronthosting.co.za> Message-ID: <1385588077.11.0.693554730339.issue19786@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran 17 random tests of the Python test suite: the longest traceback contains 85 frames, the mean is 31.6 frames. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 22:47:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 21:47:07 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385588827.39.0.170534791632.issue19815@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks, I'm able to reproduce the crash using aa.tar.gz. Python traceback on the crash: (gdb) py-bt Traceback (most recent call first): File "/home/haypo/prog/python/default/Lib/xml/etree/ElementTree.py", line 1235, in feed self._parser.feed(data) File "/home/haypo/prog/python/default/Lib/xml/etree/ElementTree.py", line 1304, in __next__ self._parser.feed(data) File "abcd.py", line 18, in _from_stream for event, elem in ET.iterparse(stream, events): File "abcd.py", line 30, in _from_stream("aa.wadl") C traceback in gdb: (gdb) where #0 0x00007ffff7258491 in __strlen_sse2_pminub () from /lib64/libc.so.6 #1 0x00007ffff06124d8 in expat_start_ns_handler (self=0x7ffff0ad6d68, prefix=0x0, uri=0x0) at /home/haypo/prog/python/default/Modules/_elementtree.c:3041 #2 0x00007ffff03d7fc7 in addBinding (parser=0xa8eea0, prefix=0x7ffff7f31c28, attId=0x7ffff0bbc190, uri=0xaa3720 "", bindingsPtr=0x7fffffff6b58) at /home/haypo/prog/python/default/Modules/expat/xmlparse.c:3158 #3 0x00007ffff03d6de0 in storeAtts (parser=0xa8eea0, enc=0x7ffff06011e0 , attStr=0xaa4170 "\n", ' ' , ", s=0xaa4170 "\n", ' ' , ", ..., nextPtr=0xa8eed0, haveMore=1 '\001') at /home/haypo/prog/python/default/Modules/expat/xmlparse.c:2464 #5 0x00007ffff03d4b7e in contentProcessor (parser=0xa8eea0, start=0xaa3fd8 "\n \n \n", ' ' , "\n \n , ..., endPtr=0xa8eed0) at /home/haypo/prog/python/default/Modules/expat/xmlparse.c:2105 #6 0x00007ffff03d9d54 in doProlog (parser=0xa8eea0, enc=0x7ffff06011e0 , s=0xaa3fd8 "\n \n \n", ' ' , "\n \n , ..., tok=29, next=0xaa3fd8 "\n \n \n", ' ' , "\n \n \n\n \n \n", ' ' , "\n\n \n \n", ' ' , "\n\n \n \n", ' ' , "\n\n \n \n", ' ' , "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n') at /home/haypo/prog/python/default/Modules/_elementtree.c:3423 #13 0x00000000005ad4fe in call_function (pp_stack=0x7fffffff7128, oparg=1) at Python/ceval.c:4212 #14 0x00000000005a5d29 in PyEval_EvalFrameEx (f=Frame 0xa38c18, for file /home/haypo/prog/python/default/Lib/xml/etree/ElementTree.py, line 1235, in feed (self=), ('start', ), ('start', ), ('start', ), ('start', ), ('start', ), ('start', ), ('start', ), ('start', ), ('start-ns', ('ns2', 'http://wadl.dev.java.net/2009/02'))], _parser=, _index=0) at remote 0x7ffff0bce468>, data=b' _______________________________________ From report at bugs.python.org Wed Nov 27 23:10:08 2013 From: report at bugs.python.org (Jim Jewett) Date: Wed, 27 Nov 2013 22:10:08 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385590208.68.0.386690501126.issue18874@psf.upfronthosting.co.za> Jim Jewett added the comment: These comments refer to http://hg.python.org/cpython/file/5c9af8194d3b/Doc/library/tracemalloc.rst which is newer than the current patches. I believe I have consolidated the still-open issues that I see (including those that aren't mine) for this file: http://hg.python.org/cpython/file/5c9af8194d3b/Doc/library/tracemalloc.rst (line 24, new comment; also repeated at line 315) frame (1 frame). To store 25 frames at startup: set the :envvar:`PYTHONTRACEMALLOC` environment variable to ``25``, or use the :option:`-X` ``tracemalloc=25`` command line option. -> frame (1 frame). To store 25 frames at startup: set the :envvar:`PYTHONTRACEMALLOC` environment variable to ``25``, or use the :option:`-X` ``tracemalloc=25`` command line option. If tracing is started later, the maximum number of frames is a parameter to the :func:`start` function. (line 111) If the system has little free memory, snapshots can be written on disk using the :meth:`Snapshot.dump` method to analyze the snapshot offline. Then use the :meth:`Snapshot.load` method reload the snapshot. -> Snapshots can be stored to disk using :meth:`Snapshot.dump` and reloaded using :meth:`Snapshot.load`. (line 180, new comment) ... The traceback is where the :mod:`importlib` loaded data most recently: on the ``import pdb`` line of the :mod:`doctest` module. The traceback may change if a new module is loaded. -> The traceback represents the call stack when those allocations were made. As this particular summary is itemized by traceback, it also represents the call stack for all 903 of those allocations. (line 252: new comment) .. function:: clear_traces() Clear traces of memory blocks allocated by Python. Add "Future allocations will still be traced." Is this just a shortcut for stop();start() ? If so, please say so. If not, please explain why. (Line 311: new comment) to measure how much memory is used -> for an approximate measure of how much memory is used I understand your reluctance to get into too many details, but ... well, it isn't a complete measure. It misses the python objects of tracemalloc itself, it misses the overhead of the module, it misses any filenames that were kept alive only by tracing, etc. (Line 372, new comment) If *inclusive* is ``True`` (include), only trace memory blocks allocated in a file with a name matching :attr:`filename_pattern` at line number :attr:`lineno`. If *inclusive* is ``False`` (exclude), ignore memory blocks allocated in a file with a name matching :attr:`filename_pattern` at line number :attr:`lineno`. -> If *inclusive* is ``True`` (include), then trace memory blocks allocated in a file with a name matching :attr:`filename_pattern` at line number :attr:`lineno`. Also excludes any blocks not selected by any filter. If *inclusive* is ``False`` (exclude), ignore memory blocks allocated in a file with a name matching :attr:`filename_pattern` at line number :attr:`lineno`, even if they would otherwise be included. (Line 394: new comment) This attribute is ignored if the traceback limit is less than ``2``. -> This attribute is meaningless if the traceback limit is ``1``. Just after Line 428, not quite a new issue: Compute the differences with an old snapshot. Get statistics as a sorted list of :class:`StatisticDiff` instances grouped by *group_by*. -> Compute the differences with an old snapshot. Get statistics as a sorted list of :class:`StatisticDiff` instances grouped by *group_by*. Note that applying different Filters can cause spurious differences; users planning to archive a Snapshot may therefore wish to first add various annotations. (Line 454, new comment) All inclusive filters are applied at once, a trace is ignored if no inclusive filters match it. A trace is ignored if at least one exclusive filter matchs it. -> If there are any inclusive filters, then they are all applied, and traces which do not match at least one of them are excluded. A trace is also ignored if at least one exclusive filter matches it. Line 544, new comment: .. attribute:: count_diff Difference of number of memory blocks between the old and the new snapshots (``int``): ``0`` if the memory blocks have been allocated in the new snapshot. -> .. attribute:: count_diff Difference of number of memory blocks between the old and the new snapshots (``int``). count_diff==count if the memory blocks do not appear in the old snapshot. Line 558, similar to above: the new snapshots (``int``): ``0`` if the memory blocks have been allocated in the new snapshot. -> the new snapshots (``int``). size_diff==size if the memory blocks do not appear in the old snapshot. ---------- nosy: +Jim.Jewett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 23:17:34 2013 From: report at bugs.python.org (Jim Jewett) Date: Wed, 27 Nov 2013 22:17:34 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385590654.05.0.265217919982.issue18874@psf.upfronthosting.co.za> Jim Jewett added the comment: Drat: forgot one at line 277 .. function:: get_traced_memory() Get the current size and maximum size of memory blocks traced by the :mod:`tracemalloc` module as a tuple: ``(size: int, max_size: int)``. I have a tendency to read "maximum size" as the most it is willing/able to trace, rather than the most it has traced at a single time so far. I therefore prefer "peak_size". Also, this doesn't suggests that the object is strictly a tuple, and that results.size or results.peak_size will not work; is that intentional? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 23:18:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 22:18:43 +0000 Subject: [issue19818] tracemalloc: comments on the doc Message-ID: <1385590723.56.0.301392704832.issue19818@psf.upfronthosting.co.za> New submission from STINNER Victor: Jim Jewett posted the message msg204618 to the issue #18874 which is now closed, so I'm opening a new issue. Copy of his message. These comments refer to http://hg.python.org/cpython/file/5c9af8194d3b/Doc/library/tracemalloc.rst which is newer than the current patches. I believe I have consolidated the still-open issues that I see (including those that aren't mine) for this file: http://hg.python.org/cpython/file/5c9af8194d3b/Doc/library/tracemalloc.rst (line 24, new comment; also repeated at line 315) frame (1 frame). To store 25 frames at startup: set the :envvar:`PYTHONTRACEMALLOC` environment variable to ``25``, or use the :option:`-X` ``tracemalloc=25`` command line option. -> frame (1 frame). To store 25 frames at startup: set the :envvar:`PYTHONTRACEMALLOC` environment variable to ``25``, or use the :option:`-X` ``tracemalloc=25`` command line option. If tracing is started later, the maximum number of frames is a parameter to the :func:`start` function. (line 111) If the system has little free memory, snapshots can be written on disk using the :meth:`Snapshot.dump` method to analyze the snapshot offline. Then use the :meth:`Snapshot.load` method reload the snapshot. -> Snapshots can be stored to disk using :meth:`Snapshot.dump` and reloaded using :meth:`Snapshot.load`. (line 180, new comment) ... The traceback is where the :mod:`importlib` loaded data most recently: on the ``import pdb`` line of the :mod:`doctest` module. The traceback may change if a new module is loaded. -> The traceback represents the call stack when those allocations were made. As this particular summary is itemized by traceback, it also represents the call stack for all 903 of those allocations. (line 252: new comment) .. function:: clear_traces() Clear traces of memory blocks allocated by Python. Add "Future allocations will still be traced." Is this just a shortcut for stop();start() ? If so, please say so. If not, please explain why. (Line 311: new comment) to measure how much memory is used -> for an approximate measure of how much memory is used I understand your reluctance to get into too many details, but ... well, it isn't a complete measure. It misses the python objects of tracemalloc itself, it misses the overhead of the module, it misses any filenames that were kept alive only by tracing, etc. (Line 372, new comment) If *inclusive* is ``True`` (include), only trace memory blocks allocated in a file with a name matching :attr:`filename_pattern` at line number :attr:`lineno`. If *inclusive* is ``False`` (exclude), ignore memory blocks allocated in a file with a name matching :attr:`filename_pattern` at line number :attr:`lineno`. -> If *inclusive* is ``True`` (include), then trace memory blocks allocated in a file with a name matching :attr:`filename_pattern` at line number :attr:`lineno`. Also excludes any blocks not selected by any filter. If *inclusive* is ``False`` (exclude), ignore memory blocks allocated in a file with a name matching :attr:`filename_pattern` at line number :attr:`lineno`, even if they would otherwise be included. (Line 394: new comment) This attribute is ignored if the traceback limit is less than ``2``. -> This attribute is meaningless if the traceback limit is ``1``. Just after Line 428, not quite a new issue: Compute the differences with an old snapshot. Get statistics as a sorted list of :class:`StatisticDiff` instances grouped by *group_by*. -> Compute the differences with an old snapshot. Get statistics as a sorted list of :class:`StatisticDiff` instances grouped by *group_by*. Note that applying different Filters can cause spurious differences; users planning to archive a Snapshot may therefore wish to first add various annotations. (Line 454, new comment) All inclusive filters are applied at once, a trace is ignored if no inclusive filters match it. A trace is ignored if at least one exclusive filter matchs it. -> If there are any inclusive filters, then they are all applied, and traces which do not match at least one of them are excluded. A trace is also ignored if at least one exclusive filter matches it. Line 544, new comment: .. attribute:: count_diff Difference of number of memory blocks between the old and the new snapshots (``int``): ``0`` if the memory blocks have been allocated in the new snapshot. -> .. attribute:: count_diff Difference of number of memory blocks between the old and the new snapshots (``int``). count_diff==count if the memory blocks do not appear in the old snapshot. Line 558, similar to above: the new snapshots (``int``): ``0`` if the memory blocks have been allocated in the new snapshot. -> the new snapshots (``int``). size_diff==size if the memory blocks do not appear in the old snapshot. ---------- messages: 204620 nosy: Jim.Jewett, haypo, neologix priority: normal severity: normal status: open title: tracemalloc: comments on the doc versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 23:18:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 22:18:58 +0000 Subject: [issue19818] tracemalloc: comments on the doc In-Reply-To: <1385590723.56.0.301392704832.issue19818@psf.upfronthosting.co.za> Message-ID: <1385590738.28.0.662362408698.issue19818@psf.upfronthosting.co.za> STINNER Victor added the comment: And copy of his second message msg204619: Drat: forgot one at line 277 .. function:: get_traced_memory() Get the current size and maximum size of memory blocks traced by the :mod:`tracemalloc` module as a tuple: ``(size: int, max_size: int)``. I have a tendency to read "maximum size" as the most it is willing/able to trace, rather than the most it has traced at a single time so far. I therefore prefer "peak_size". Also, this doesn't suggests that the object is strictly a tuple, and that results.size or results.peak_size will not work; is that intentional? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 23:19:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 22:19:44 +0000 Subject: [issue18874] Add a new tracemalloc module to trace memory allocations In-Reply-To: <1377733991.41.0.484218634069.issue18874@psf.upfronthosting.co.za> Message-ID: <1385590784.48.0.385211388243.issue18874@psf.upfronthosting.co.za> STINNER Victor added the comment: @Jim: This issue has been closed, please don't comment closed issues. I created a new issue for your new comments: #19818. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 23:20:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 27 Nov 2013 22:20:00 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385590800.51.0.845175725534.issue19815@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch removes the cause of the segfault but I'm no sure if that's the right way. I'm adding Eli und Stefan to the ticket. ---------- keywords: +patch nosy: +eli.bendersky, scoder Added file: http://bugs.python.org/file32877/empty_uri.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 23:20:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 22:20:56 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385590856.29.0.468873213685.issue19815@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 23:25:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 22:25:29 +0000 Subject: [issue19818] tracemalloc: comments on the doc In-Reply-To: <1385590723.56.0.301392704832.issue19818@psf.upfronthosting.co.za> Message-ID: <1385591129.47.0.427729236225.issue19818@psf.upfronthosting.co.za> STINNER Victor added the comment: > I have a tendency to read "maximum size" as the most it is willing/able to trace, rather than the most it has traced at a single time so far. I therefore prefer "peak_size". I already replied to this comment on Rietveld, I created the issue #19798 which is already fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 27 23:41:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 Nov 2013 22:41:53 +0000 Subject: [issue19818] tracemalloc: comments on the doc In-Reply-To: <1385590723.56.0.301392704832.issue19818@psf.upfronthosting.co.za> Message-ID: <3dVH691y95z7Ln2@mail.python.org> Roundup Robot added the comment: New changeset 8df54b9b99ef by Victor Stinner in branch 'default': Issue #19818: tracemalloc, the number of frame limit cannot be zero anymore http://hg.python.org/cpython/rev/8df54b9b99ef ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 00:05:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Nov 2013 23:05:26 +0000 Subject: [issue19818] tracemalloc: comments on the doc In-Reply-To: <1385590723.56.0.301392704832.issue19818@psf.upfronthosting.co.za> Message-ID: <1385593526.6.0.278260466314.issue19818@psf.upfronthosting.co.za> STINNER Victor added the comment: Could you please write a patch on Doc/library/tracemalloc.rst? It's really hard to review your raw comments in comments. You should probably sign the contributor agreement. http://www.python.org/psf/contrib/contrib-form/ """ Is [clear_traces()] just a shortcut for stop();start() ? If so, please say so. """ It's almost the same. clear_traces() does not uninstall and reinstall hooks on memory allocators. I prefer to not give too much details in the high-level documentation. """ Line 558, similar to above: the new snapshots (``int``): ``0`` if the memory blocks have been allocated in the new snapshot. -> the new snapshots (``int``). size_diff==size if the memory blocks do not appear in the old snapshot. """ This is not correct, size_diff is 0 if memory blocks are new, not size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 00:25:54 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 27 Nov 2013 23:25:54 +0000 Subject: [issue19146] Improvements to traceback module In-Reply-To: <1380733381.79.0.0175162036016.issue19146@psf.upfronthosting.co.za> Message-ID: <1385594754.52.0.388315534004.issue19146@psf.upfronthosting.co.za> Guido van Rossum added the comment: I decided to abandon this project and close the issue as wontfix. ---------- resolution: -> wont fix stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 00:51:14 2013 From: report at bugs.python.org (Larry Hastings) Date: Wed, 27 Nov 2013 23:51:14 +0000 Subject: [issue19819] reversing a Unicode ligature doesn't work Message-ID: <1385596274.49.0.637567872946.issue19819@psf.upfronthosting.co.za> New submission from Larry Hastings: Read this today: http://mortoray.com/2013/11/27/the-string-type-is-broken/ In it the author talks about how the 'ffl' ligature breaks some string processing. He claimed that Python 3 doesn't uppercase it correctly--well, it does. However I discovered that it doesn't reverse it properly. x = b'ba\xef\xac\x84e'.decode('utf-8') # "baffle", where "ffl" is a ligature print(x) # prints "baffle", with the ligature print(x.upper()) # prints "BAFFLE", no ligature, which is fine print("".join(reversed(x))) # prints "efflab" Shouldn't that last line print "elffab"? If this gets marked as "wontfix" I wouldn't complain. Just wondering what the Right Thing is to do here. ---------- messages: 204628 nosy: larry priority: low severity: normal stage: needs patch status: open title: reversing a Unicode ligature doesn't work type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 01:07:37 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 Nov 2013 00:07:37 +0000 Subject: [issue19819] reversing a Unicode ligature doesn't work In-Reply-To: <1385596274.49.0.637567872946.issue19819@psf.upfronthosting.co.za> Message-ID: <1385597257.94.0.868204336657.issue19819@psf.upfronthosting.co.za> Christian Heimes added the comment: There is no ligature for "lff", just "ffl". Ligatures are treated as one char. I guess Python would have to grow a str.reverse() method to handle ligatures and combining chars correctly. At work I ran into the issue with ligatures and combining chars multiple times in medieval and early modern age scripts. Eventually I started to normalize all incoming data to NFKC. That solves most of the issues. s = b'ba\xef\xac\x84e'.decode('utf-8') >>> print("".join(reversed(s))) e?ab >>> print("".join(reversed(unicodedata.normalize("NFKC", s)))) elffab ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 01:16:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 Nov 2013 00:16:31 +0000 Subject: [issue19819] reversing a Unicode ligature doesn't work In-Reply-To: <1385596274.49.0.637567872946.issue19819@psf.upfronthosting.co.za> Message-ID: <1385597791.38.0.717574872931.issue19819@psf.upfronthosting.co.za> Christian Heimes added the comment: A proper str.reverse function must deal with more extra cases. For example there are special rules for the Old German long s (?) and the round s (s). A round s may only occur at the end of a syllable. Hebrew has a special variant of several characters if the character is placed at the end of a word (HEBREW LETTER PE / HEBREW LETTER FINAL PE). A simple reversed(s) can never deal with all the complicated rules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 01:22:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 00:22:18 +0000 Subject: [issue19819] reversing a Unicode ligature doesn't work In-Reply-To: <1385596274.49.0.637567872946.issue19819@psf.upfronthosting.co.za> Message-ID: <1385598138.42.0.423936052828.issue19819@psf.upfronthosting.co.za> STINNER Victor added the comment: Python implements the Unicode standards. Except if Python failed to implement the standard correctly, the author should complain to the Unicode Consortium directly! http://www.unicode.org/contacts.html Example of data for the "?" character, U+FB04: FB04;LATIN SMALL LIGATURE FFL;Ll;0;L; 0066 0066 006C;;;;N;;;;; http://www.unicode.org/Public/6.0.0/ucd/UnicodeData.txt (I'm unable to decode these raw data :-)) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 01:33:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 00:33:12 +0000 Subject: [issue19819] reversing a Unicode ligature doesn't work In-Reply-To: <1385596274.49.0.637567872946.issue19819@psf.upfronthosting.co.za> Message-ID: <1385598792.23.0.635364872769.issue19819@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand the purpose of using reversed(). Don't use it to display a text backward. Handling bidirectional text requires more complex tools to display such text. See for example the pango library: https://developer.gnome.org/pango/stable/pango-Bidirectional-Text.html I don't see anything wrong with Python here, it just implements the Unicode standards, so I'm closing the issue as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 01:55:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 00:55:43 +0000 Subject: [issue19757] _tracemalloc.c: compiler warning with gil_state In-Reply-To: <1385317617.76.0.570657043672.issue19757@psf.upfronthosting.co.za> Message-ID: <1385600143.22.0.413302597739.issue19757@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, Clang is not kind enough to understand that gil_state is not used when uninitialized. Well, I always hesitated to refactor the code. So here is a cleanup which moves PyGILState_Ensure/PyGILState_Release to the caller. It duplicates a few lines of code, but the new code should be more readable. ---------- keywords: +patch Added file: http://bugs.python.org/file32878/cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 01:56:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 00:56:44 +0000 Subject: [issue19766] test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot: urllib3 dependency requires the threading module In-Reply-To: <1385372460.23.0.39838448994.issue19766@psf.upfronthosting.co.za> Message-ID: <1385600204.32.0.552919407838.issue19766@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot -> test_venv: test_with_pip() failed on "AMD64 Fedora without threads 3.x" buildbot: urllib3 dependency requires the threading module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 02:08:46 2013 From: report at bugs.python.org (Martin Panter) Date: Thu, 28 Nov 2013 01:08:46 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1385600926.39.0.630471128306.issue17232@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 02:25:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 01:25:04 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385601904.88.0.0573958408814.issue19787@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, here is in interesting commit: --- changeset: 33705:891042c94aed branch: legacy-trunk user: Tim Peters date: Sat Oct 09 22:33:09 2004 +0000 files: Python/thread.c description: Document the results of painful reverse-engineering of the "portable TLS" code. PyThread_set_key_value(): It's clear that this code assumes the passed-in value isn't NULL, so document that it must not be, and assert that it isn't. It remains unclear whether existing callers want the odd semantics actually implemented by this function. --- Here is a patch adding a _PyThread_set_key_value() function which behaves as I expected. It looks like PyThread_set_key_value() got its strange behaviour from the find_key() of Python/thread.c. Don't hesistate if you have a better suggestion for the name if the new function :-) Another option is to modify directly the existing function, but it might break applications relying on the current (weird) behaviour. ---------- keywords: +patch nosy: +pitrou, tim.peters Added file: http://bugs.python.org/file32879/pythread_set_key_value.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 02:27:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 01:27:09 +0000 Subject: [issue19765] test_asyncio: test_create_server() failed on "x86 Windows Server 2008 [SB] 3.x" In-Reply-To: <1385371766.88.0.569586270438.issue19765@psf.upfronthosting.co.za> Message-ID: <1385602029.59.0.282107635054.issue19765@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see the failure recently, so I hope that it was fixed. I close the issue. I will reopen it if I see the failure again. Thanks Guido for your fix. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 02:29:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 01:29:49 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385602189.57.0.576560655776.issue19787@psf.upfronthosting.co.za> STINNER Victor added the comment: I ran test_tracemalloc on Linux and Windows and the test passed successfully. It should probably be better to split the patch in two parts if the idea of changing Python/thread* files is accepted. (But initially, the issue comes from the tracemalloc module.) set_reentrant() of tracemalloc.c: + assert(PyThread_get_key_value(tracemalloc_reentrant_key) == REENTRANT); I also added a new assertion to ensure that set_reentrant(0) was not called twice. It was a suggesed of Jim Jewett. This is unrelated to this issue and should be commited separatly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 02:35:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 01:35:30 +0000 Subject: [issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista In-Reply-To: <1385370115.99.0.757096187315.issue19764@psf.upfronthosting.co.za> Message-ID: <1385602530.93.0.366993239714.issue19764@psf.upfronthosting.co.za> STINNER Victor added the comment: The purpose of this issue is to avoiding having to call CreateProcess() with bInheritHandles parameter set to TRUE on Windows, and avoid calls to self._make_inheritable() in subprocess.Popen._get_handles(). Currently, bInheritHandles is set to TRUE if stdin, stdout and/or stderr parameter of Popen constructor is set (to something else than None). Using PROC_THREAD_ATTRIBUTE_HANDLE_LIST, handles don't need to be marked as inheritable in the parent process, and CreateProcess() can be called with bInheritHandles parameter set to FALSE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 02:40:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 01:40:39 +0000 Subject: [issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista In-Reply-To: <1385370115.99.0.757096187315.issue19764@psf.upfronthosting.co.za> Message-ID: <1385602839.06.0.967155714269.issue19764@psf.upfronthosting.co.za> STINNER Victor added the comment: UpdateProcThreadAttribute() documentation says that "... handles must be created as inheritable handles ..." and a comment says that "If using PROC_THREAD_ATTRIBUTE_HANDLE_LIST, pass TRUE to bInherit in CreateProcess. Otherwise, you will get an ERROR_INVALID_PARAMETER." http://msdn.microsoft.com/en-us/library/windows/desktop/ms686880%28v=vs.85%29.aspx Seriously? What is the purpose of PROC_THREAD_ATTRIBUTE_HANDLE_LIST if it does not avoid the race condition? It's "just" to not inherit some inheritable handles? In Python 3.4, files and sockets are created non-inheritable by default, so PROC_THREAD_ATTRIBUTE_HANDLE_LIST may not improve anything :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 02:54:05 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 01:54:05 +0000 Subject: [issue19775] Provide samefile() on Path objects In-Reply-To: <1385408901.26.0.705019475145.issue19775@psf.upfronthosting.co.za> Message-ID: <1385603645.66.0.619148904905.issue19775@psf.upfronthosting.co.za> STINNER Victor added the comment: I like the idea :-) ---------- nosy: +gvanrossum, haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 02:57:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 01:57:43 +0000 Subject: [issue19776] Provide expanduser() on Path objects In-Reply-To: <1385409778.55.0.842571848249.issue19776@psf.upfronthosting.co.za> Message-ID: <1385603863.54.0.74315081324.issue19776@psf.upfronthosting.co.za> STINNER Victor added the comment: I wanted to suggest to modify the resolve() method, but '~' is a valid filename... (I tested, and it's annoying because depending on command, sometimes ~ is expanded to /home/haypo sometimes not...) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 06:58:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 28 Nov 2013 05:58:44 +0000 Subject: [issue19595] Silently skipped test in test_winsound In-Reply-To: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> Message-ID: <3dVSpC4BCbzSW4@mail.python.org> Roundup Robot added the comment: New changeset 6f1c5d0b44ed by Zachary Ware in branch 'default': Issue #19595: Re-enable a long-disabled test in test_winsound http://hg.python.org/cpython/rev/6f1c5d0b44ed ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 07:42:21 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 28 Nov 2013 06:42:21 +0000 Subject: [issue19820] docs are missing info about module attributes Message-ID: <1385620941.03.0.287546381963.issue19820@psf.upfronthosting.co.za> New submission from Eric Snow: The docs for the inspect module and the types module do not list all the import-related module attributes. I'm guessing they've been out of sync a while. The docstring for for inspect.ismodule() is likewise missing information. ---------- assignee: docs at python components: Documentation messages: 204642 nosy: docs at python, eric.snow priority: low severity: normal stage: needs patch status: open title: docs are missing info about module attributes type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 07:42:32 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 28 Nov 2013 06:42:32 +0000 Subject: [issue19820] docs are missing info about module attributes In-Reply-To: <1385620941.03.0.287546381963.issue19820@psf.upfronthosting.co.za> Message-ID: <1385620952.44.0.690904713936.issue19820@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 07:46:05 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 28 Nov 2013 06:46:05 +0000 Subject: [issue19706] Check if inspect needs updating for PEP 451 Message-ID: <1385621165.81.0.224765634594.issue19706@psf.upfronthosting.co.za> New submission from Eric Snow: The inspect module doesn't need any changes. ---------- resolution: -> works for me stage: -> committed/rejected type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 08:18:28 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 28 Nov 2013 07:18:28 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385623108.95.0.474014114277.issue19815@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the patch (by Christian Heimes) with unit test (by me). Apparently the namespace handlers (start-ns and end-ns) got problem with empty namespace. But they (start-ns and end-ns) must be combined together to create this problem. start-ns handler only will not create this problem. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file32880/fix_xml_etree_with_empty_namespace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 08:45:11 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 28 Nov 2013 07:45:11 +0000 Subject: [issue19702] Update pickle to PEP 451 Message-ID: <1385624711.1.0.561130815884.issue19702@psf.upfronthosting.co.za> New submission from Eric Snow: I don't recall the specifics of how we'd talked about making use of module specs in pickle. I vaguely remember (or misremember ) something related to saving __main__.__spec__.name in the pickle rather than __main__.__name__. Anyone have anything more concrete than that? I'm willing to work this out but only with a more specific goal relative to the pickle module. ---------- nosy: +alexandre.vassalotti, pitrou stage: test needed -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 08:55:30 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 28 Nov 2013 07:55:30 +0000 Subject: [issue19821] pydoc.ispackage() could be more accurate Message-ID: <1385625330.82.0.952141123031.issue19821@psf.upfronthosting.co.za> New submission from Eric Snow: pydoc.ispackage() is a best-effort guess at whether or not a path is the location of a package. However, it uses hard-coded suffixes when matching file names, which can miss files (e.g. extension modules and sourceless packages on Windows). It should probably use suffixes defined in importlib.util, as they're used elsewhere in pydoc. The function also does not comprehend namespace packages, but I'm not sure that's worth worrying about. FWIW, it isn't clear to me what is using pydoc.ispackage(). It may not be used in the stdlib at all. ---------- components: Library (Lib) messages: 204646 nosy: eric.snow priority: low severity: normal stage: needs patch status: open title: pydoc.ispackage() could be more accurate type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 09:38:23 2013 From: report at bugs.python.org (paul j3) Date: Thu, 28 Nov 2013 08:38:23 +0000 Subject: [issue19814] Document prefix matching behavior of argparse, particularly for parse_known_args In-Reply-To: <1385561761.38.0.108882000791.issue19814@psf.upfronthosting.co.za> Message-ID: <1385627903.6.0.52303907789.issue19814@psf.upfronthosting.co.za> paul j3 added the comment: `parse_args` just calls `parse_known_args`, and then raises an error if `rest` is not empty. So it is `parse_known_args` that is doing the abbreviation matching. Abbreviation matching is done relatively early, when `_parse_known_args` first loops through the strings, trying to decide which are arguments ('A') and which are options ('O'). This matching is done in `_parse_optional`. It's not something it does at the end on the 'leftovers'. http://bugs.python.org/issue14910, a disable abbreviation option, might be a better solution. Your example is an argument in favor of implementing that feature. Unless a reader has your example in mind, the proposed documentation warning might be more confusing than helpful. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 11:20:15 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 28 Nov 2013 10:20:15 +0000 Subject: [issue19702] Update pickle to PEP 451 In-Reply-To: <1385624711.1.0.561130815884.issue19702@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: The specific proposal was to use __spec__.name when __name__ == "__main__" to avoid the pickle compatibility issues described in PEP 395 when using the -m switch. runpy has to be updated first, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 14:08:11 2013 From: report at bugs.python.org (Dima Tisnek) Date: Thu, 28 Nov 2013 13:08:11 +0000 Subject: [issue13655] Python SSL stack doesn't have a default CA Store In-Reply-To: <1324635534.55.0.434420251569.issue13655@psf.upfronthosting.co.za> Message-ID: <1385644091.52.0.0091104416292.issue13655@psf.upfronthosting.co.za> Dima Tisnek added the comment: re: cert_paths = [...] This approach is rather problematic, there's no guarantee that a path trusted on one system is trusted on another. I saw this in setuptools branch, where it does: for path in cert_path: if os.path.exists(path) return path Let's say you're user1 on osx and your native true path is "/System/Library/OpenSSL/certs/cert.pem", can you guarantee that someone else, user2, cannot sneak their hacked files into "/etc/pki/" (presumably missing altogether) or "/usr/local/share/"? Because if user2 can do that, suddenly user1 verifies all traffic against hacked ca list. ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 14:14:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 13:14:24 +0000 Subject: [issue15495] enable type truncation warnings for gcc builds In-Reply-To: <1343612990.44.0.366704900621.issue15495@psf.upfronthosting.co.za> Message-ID: <1385644464.67.0.628718431717.issue15495@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 14:18:46 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 Nov 2013 13:18:46 +0000 Subject: [issue13655] Python SSL stack doesn't have a default CA Store In-Reply-To: <1324635534.55.0.434420251569.issue13655@psf.upfronthosting.co.za> Message-ID: <1385644726.09.0.65126077892.issue13655@psf.upfronthosting.co.za> Christian Heimes added the comment: All these paths are on directories that are supposed to be read-only for untrusted users. You can't protect yourself against a malicious admin anyway. For Python 3.4 the ssl module uses the cert path that are configured with OpenSSL. The paths and configuration are outside our control. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 14:44:29 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 28 Nov 2013 13:44:29 +0000 Subject: [issue19814] Document prefix matching behavior of argparse, particularly for parse_known_args In-Reply-To: <1385561761.38.0.108882000791.issue19814@psf.upfronthosting.co.za> Message-ID: <1385646269.72.0.76444660623.issue19814@psf.upfronthosting.co.za> Eli Bendersky added the comment: I don't see how these implementation details are relevant. The patch adds a link to the existing abbreviations section, which mentions parse_args - so it's clear that this behavior exists in both. Yes, #14910 (to which I pointed in the original message in this issue) is the long term solution, but it's only for Python 3.5; until then, as the mailing discussion has demonstrated, the documentation is unclear on this matter and needs clarification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 14:59:29 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 13:59:29 +0000 Subject: [issue19822] PEP process entrypoint Message-ID: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> New submission from anatoly techtonik: https://bitbucket.org/rirror/peps PEP repository readme lacks information about how to send Python Enhancement Proposal step-by-step. 1. hg clone https://bitbucket.org/rirror/peps 2. cd peps 3. # choose number 4. cp ??? pep-{{number}}.txt 5. # commit 6. # send pull request 7. # discuss ---------- assignee: docs at python components: Devguide, Documentation messages: 204652 nosy: docs at python, ezio.melotti, techtonik priority: normal severity: normal status: open title: PEP process entrypoint _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:03:18 2013 From: report at bugs.python.org (cost6) Date: Thu, 28 Nov 2013 14:03:18 +0000 Subject: [issue19823] for-each on list aborts earlier than expected Message-ID: <1385647398.27.0.505205145304.issue19823@psf.upfronthosting.co.za> New submission from cost6: for-each does not iterate over all entries of collection, if one removes elements during the iteration. Example (misbehaving) code: def keepByValue(self, key=None, value=[]): for row in self.flows: if not row[key] in value: flows.remove(row) ---------- components: Interpreter Core messages: 204653 nosy: cost6 priority: normal severity: normal status: open title: for-each on list aborts earlier than expected type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:04:49 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 Nov 2013 14:04:49 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385647489.51.0.143830717275.issue19822@psf.upfronthosting.co.za> Christian Heimes added the comment: The process is well explained in the PEP templates right at the top of the PEP list: http://www.python.org/dev/peps/pep-0009/ http://www.python.org/dev/peps/pep-0012/ New PEP authors should get in touch with experienced core developers or mentors in order to get assistance. ---------- nosy: +christian.heimes resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:06:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 14:06:59 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385647619.22.0.525526306839.issue19822@psf.upfronthosting.co.za> STINNER Victor added the comment: > PEP process entrypoint Do you work with developers of the distutils-* objects? It looks like Daniel Holth works on such PEP for example: https://mail.python.org/pipermail/distutils-sig/2013-July/021854.html You may join this mailing list: https://mail.python.org/mailman/listinfo/distutils-sig ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:25:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 28 Nov 2013 14:25:48 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <3dVh3H5MrDzPdS@mail.python.org> Roundup Robot added the comment: New changeset 395a266bcb5a by Eli Bendersky in branch '2.7': Issue #19815: Fix segfault when parsing empty namespace declaration. http://hg.python.org/cpython/rev/395a266bcb5a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:26:49 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 28 Nov 2013 14:26:49 +0000 Subject: [issue19819] reversing a Unicode ligature doesn't work In-Reply-To: <1385596274.49.0.637567872946.issue19819@psf.upfronthosting.co.za> Message-ID: <1385648809.61.0.82664287997.issue19819@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Unicode nosy: +ezio.melotti stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:28:10 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 14:28:10 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385648890.13.0.0743824754357.issue19822@psf.upfronthosting.co.za> anatoly techtonik added the comment: The "entrypoint" here means the point of entry for new Python Enhancement Proposals. Christian, what you propose is a 4th order link for someone who knows what PEPs are, and clones PEP repository to submit own proposal. What I propose it to make PEP repository self-sufficient, so that person who cloned it, can immediately get to work. You can argue that people who don't have time to read on all previous stuff, should not write PEPs, but I'd object that it is good to be inclusive. ---------- resolution: invalid -> status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:34:12 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 28 Nov 2013 14:34:12 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385649252.34.0.887308954603.issue19822@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Anatoly, please read http://www.python.org/dev/peps/pep-0012/ The process you are describing is not correct. In particular, the discussion happens before sending in a pull request. As for discussion of the PEP process: that should happen on python-dev, not in some ticket in the tracker. Closing the ticket again. ---------- nosy: +lemburg resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:35:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 28 Nov 2013 14:35:44 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <3dVhGl1d36z7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 68f1e5262a7a by Eli Bendersky in branch '3.3': Issue #19815: Fix segfault when parsing empty namespace declaration. http://hg.python.org/cpython/rev/68f1e5262a7a New changeset 2b2925c08a6c by Eli Bendersky in branch 'default': Issue #19815: Fix segfault when parsing empty namespace declaration. http://hg.python.org/cpython/rev/2b2925c08a6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:35:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Nov 2013 14:35:53 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385649353.15.0.541823293601.issue19787@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Calling it _PyThread_set_key_value is prone to confusion. Ideally we would fix PyThread_set_key_value's behaviour. Are there users of the function outside from CPython? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:36:16 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 28 Nov 2013 14:36:16 +0000 Subject: [issue19815] ElementTree segmentation fault in expat_start_ns_handler In-Reply-To: <1385573208.73.0.552748104114.issue19815@psf.upfronthosting.co.za> Message-ID: <1385649376.1.0.863360813578.issue19815@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the report & patches. Fixed in all active branches. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:39:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Nov 2013 14:39:26 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385649566.07.0.733987415728.issue19624@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > An option is to rename the C errno module to _errno and leave it > unchanged, and provide a Python errno module which enum API. I agree it sounds reasonable. > Using enum for errno should not slow down Python startup time. enum imports OrderedDict from collections, which imports other modules... ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:40:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Nov 2013 14:40:34 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385649634.15.0.00642987502544.issue19624@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that even if errno is migrated to enum, OSErrors raised by the interpreter will still have a raw int errno... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:43:55 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 28 Nov 2013 14:43:55 +0000 Subject: [issue19814] Document prefix matching behavior of argparse, particularly for parse_known_args In-Reply-To: <1385561761.38.0.108882000791.issue19814@psf.upfronthosting.co.za> Message-ID: <1385649835.79.0.0428070099662.issue19814@psf.upfronthosting.co.za> Eli Bendersky added the comment: If I don't see any further objections I'll go ahead and commit this by the end of the week ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:45:05 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 14:45:05 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385649905.17.0.7033270811.issue19822@psf.upfronthosting.co.za> anatoly techtonik added the comment: > The process you are describing is not correct. In particular, the discussion happens before sending in a pull request. Post the link to correct process into README.rst and then this issue can be closed. As for python-dev, I thought it is too obvious and minor issue (still issue) to raise there, so it is just a matter of somebody with knowledge, time and commit privileges to commit the patch. It may worth to raise the question there anyway as I see that communicating usability concerns is a big problem. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:48:57 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 28 Nov 2013 14:48:57 +0000 Subject: [issue19624] Switch constants in the errno module to IntEnum In-Reply-To: <1384604507.4.0.390717114428.issue19624@psf.upfronthosting.co.za> Message-ID: <1385650137.98.0.653145904148.issue19624@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I'm not sure whether changing the errno module to use enums would be conceptually correct: enums declare a fixed set of permitted values, but errno values can be any integer, are platform dependent and are sometimes not unique (e.g. EWOULDBLOCK = EAGAIN, or the various Windows WSA errno values which map to similar integers as the Unix ones). ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:50:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 Nov 2013 14:50:39 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385650239.79.0.31891406509.issue19822@psf.upfronthosting.co.za> Christian Heimes added the comment: The ticket has been closed by two people. Why do you keep re-opening the ticket? ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 15:53:31 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 28 Nov 2013 14:53:31 +0000 Subject: [issue19799] Clarifications for the documentation of pathlib In-Reply-To: <1385476498.92.0.260116093665.issue19799@psf.upfronthosting.co.za> Message-ID: <1385650411.35.0.385367783745.issue19799@psf.upfronthosting.co.za> Eli Bendersky added the comment: Committed in 90b56ec318b6 ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.2 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 16:05:44 2013 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 28 Nov 2013 15:05:44 +0000 Subject: [issue19823] for-each on list aborts earlier than expected In-Reply-To: <1385647398.27.0.505205145304.issue19823@psf.upfronthosting.co.za> Message-ID: <1385651144.11.0.934866381059.issue19823@psf.upfronthosting.co.za> Matthew Barnett added the comment: This issue is best posted to python-list and only posted here if it's agreed that it's a bug. Anyway: 1. You have "self.flows" and "flows", but haven't said what they are. 2. It's recommended that you don't modify a collection while iterating over it, but, instead, build a new collection and then the old one with the new one. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 16:21:43 2013 From: report at bugs.python.org (cost6) Date: Thu, 28 Nov 2013 15:21:43 +0000 Subject: [issue19823] for-each on list aborts earlier than expected In-Reply-To: <1385647398.27.0.505205145304.issue19823@psf.upfronthosting.co.za> Message-ID: <1385652103.51.0.122261110971.issue19823@psf.upfronthosting.co.za> cost6 added the comment: Sorry for that, i will move it to python-list. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 16:26:50 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 28 Nov 2013 15:26:50 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385649905.17.0.7033270811.issue19822@psf.upfronthosting.co.za> Message-ID: <529760B7.1040509@egenix.com> Marc-Andre Lemburg added the comment: On 28.11.2013 15:45, anatoly techtonik wrote: > > anatoly techtonik added the comment: > >> The process you are describing is not correct. In particular, the discussion happens before sending in a pull request. > > Post the link to correct process into README.rst and then this issue can be closed. The repo readme is not the right place for this. Christian already mentioned the PEPs and anything should go into the dev guide. If you have something to contribute, please open a ticket, add a patch and request review. Thanks, -- Marc-Andre Lemburg eGenix.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 16:38:20 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 Nov 2013 15:38:20 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385653100.95.0.23235045378.issue19509@psf.upfronthosting.co.za> Christian Heimes added the comment: My patch could be much simpler and easier if we could just drop support for ancient versions of OpenSSL. My idea requires at least OpenSSL 0.9.8f (release 2007) with SNI support. Six years are a lot for crypto software. All relevant platforms with vendor support have a more recent version of OpenSSL, too. >>> context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) >>> context.verify_mode = ssl.CERT_REQUIRED >>> context.check_hostname = True >>> context.wrap_socket(sock, server_hostname="www.example.org") server_hostname is used to for server name indicator (SNI) as well as the hostname for match_hostname(). It would remove lots and lots of code duplication, too. The check_hostname takes care about invalid combinations, too: >>> context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) >>> context.verify_mode == ssl.CERT_NONE True >>> context.check_hostname = True Traceback (most recent call last): File "", line 1, in ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 16:45:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Nov 2013 15:45:57 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385653557.94.0.000815261821106.issue19509@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > My patch could be much simpler and easier if we could just drop > support for ancient versions of OpenSSL. My idea requires at least > OpenSSL 0.9.8f (release 2007) with SNI support. What are you talking about? Your patch doesn't use HAS_SNI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 17:17:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 16:17:52 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385649353.15.0.541823293601.issue19787@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2013/11/28 Antoine Pitrou : > Calling it _PyThread_set_key_value is prone to confusion. > Ideally we would fix PyThread_set_key_value's behaviour. Are there users of the function outside from CPython? PyThread_set_key_value() is defined and used in CPython, and defined in the cpyext module of PyPy. I found two usages of the function: "pygobject2:/pygobject-2.28.6/glib/pygmainloop.c" and"pytools:/Servicing/1.1/Release/Product/Python/PyDebugAttach/PyDebugAttach.cpp" http://searchcode.com/codesearch/view/21308375 http://searchcode.com/codesearch/view/10353970 PyThread_delete_key_value() is always called before PyThread_set_key_value() (with the same key). So these projects would not be impacted by the change. I guess that the key is deleted to workaround the current limitation ("strange behaviour") of PyThread_set_key_value(). I cannot find pygmainloop.c in the latest development version: https://git.gnome.org/browse/pygobject/tree/gi/_glib I searched for usage at: http://code.ohloh.net/ https://github.com/search/ http://searchcode.com/ http://stackoverflow.com/search It's hard to find usage of PyThread_set_key_value() before they are a lot of copies of CPython in the search engines, and I don't know how to filter. Victor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 17:35:02 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 16:35:02 +0000 Subject: [issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista In-Reply-To: <1385370115.99.0.757096187315.issue19764@psf.upfronthosting.co.za> Message-ID: <1385656502.33.0.535882915878.issue19764@psf.upfronthosting.co.za> STINNER Victor added the comment: I read again the following blog post: http://blogs.msdn.com/b/oldnewthing/archive/2011/12/16/10248328.aspx I understood the purpose of PROC_THREAD_ATTRIBUTE_HANDLE_LIST. Let say that two Python threads create a Popen object with a pipe for stdout: * Thread A : pipe 1 * Thread B : pipe 2 * Main thread has random inheritable files and sockets Handles of the both pipes are inheritable. Currently, thread A may inherit pipe 2 and thread B may inherit pipe 1 depending exactly when pipes are created and marked as inheritable, and when CreateProcess() is called. Using PROC_THREAD_ATTRIBUTE_HANDLE_LIST, thread A will only inherit pipe 1, not pipe 2 nor inheritable handles of the other threads. Thread B will only inherit pipe 1, no other handle. It does not matter that CreateProcess() is called with bInheritHandles=TRUE nor that there are other inheritable handles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 17:51:16 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 28 Nov 2013 16:51:16 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385649353.15.0.541823293601.issue19787@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Antoine Pitrou added the comment: > > Calling it _PyThread_set_key_value is prone to confusion. > Ideally we would fix PyThread_set_key_value's behaviour. Are there users of the function outside from CPython? The question is why does it behave this way in the first place? Maybe for sub-interpreters? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:05:06 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 Nov 2013 17:05:06 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385658306.85.0.610198669646.issue19509@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file32831/check_hostname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:07:04 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 17:07:04 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example Message-ID: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> New submission from anatoly techtonik: http://docs.python.org/2/library/string.html#template-strings This class could be more useful with the following example: >>> from string import Template >>> t = Template('$who likes $what') >>> who = 'tim' >>> what = 'kung pao' >>> t.substitute(locals()) 'tim likes kung pao' This will help PHP folks to transition their .php files. ---------- assignee: docs at python components: Documentation messages: 204677 nosy: docs at python, techtonik priority: normal severity: normal status: open title: string.Template: Add PHP-style variable expansion example _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:15:48 2013 From: report at bugs.python.org (paul j3) Date: Thu, 28 Nov 2013 17:15:48 +0000 Subject: [issue14910] argparse: disable abbreviation In-Reply-To: <1337943742.57.0.897347214609.issue14910@psf.upfronthosting.co.za> Message-ID: <1385658948.15.0.910049002143.issue14910@psf.upfronthosting.co.za> paul j3 added the comment: For a programmer who needs to turn off this abbreviation matching now, a simple solution is to subclass ArgumentParser: class MyParser(ArgumentParser): def _get_option_tuples(self, option_string): return [] This could be the place to implement more specialized matching (e.g. do not match on strings like '--sync'). ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:19:30 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 17:19:30 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385659170.9.0.824834529791.issue19822@psf.upfronthosting.co.za> anatoly techtonik added the comment: > The ticket has been closed by two people. Why do you keep re-opening the ticket? Because you're not providing any arguments. If it is not important for you, just ignore. If something is not clear - ask. What you do is just closing the stuff, because you _feel_ that is not an issue. Provide rationale, address my points and then I'll close it myself. The particular stuff that is not clarified: >> Post the link to correct process into README.rst and then this >> issue can be closed. > The repo readme is not the right place for this. Christian already > mentioned the PEPs and anything should go into the dev guide. I want to know why PEPs repository README is not the place to direct users to starting point for submitting enhancement proposals? > If you have something to contribute, please open a ticket, add a patch and request review. I am already keep opening it, damn. I want to contribute an improvement for the PEP process and not forget about it. That's why I fill in into tracker, and not into email. ---------- resolution: invalid -> postponed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:20:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 17:20:45 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385659245.82.0.821367853479.issue19787@psf.upfronthosting.co.za> STINNER Victor added the comment: > The question is why does it behave this way in the first place? > Maybe for sub-interpreters? The code is old. I don't think that it's related to subinterpreter. PyThread_set_key_value() is used in _PyGILState_Init() and PyGILState_Ensure(), but its behaviour when the key already exists doesn't matter because these functions only call PyThread_set_key_value() once pr thread. It was probably simpler to implement PyThread_set_key_value() like it is nowadays. When the native TLS support was added, the new functions just mimic the old behaviour. Code history. find_key() function has been added at the same time than the PyThreadState structure. set_key_value() was already doing nothing when the key already exists. It looks like set_key_value() was not used. --- changeset: 5405:b7871ca930ad branch: legacy-trunk user: Guido van Rossum date: Mon May 05 20:56:21 1997 +0000 files: Include/Python.h Include/frameobject.h Include/pystate.h Include/pythread.h Include/thread.h Modules/threadmodule.c Objects/frameobject description: Massive changes for separate thread state management. All per-thread globals are moved into a struct which is manipulated separately. --- TLS only started to be used in CPython since the following major change: --- changeset: 28694:a4154dd5939a branch: legacy-trunk user: Mark Hammond date: Sat Apr 19 15:41:53 2003 +0000 files: Include/pystate.h Include/pythread.h Lib/test/test_capi.py Modules/_testcapimodule.c Modules/posixmodule.c Python/ceval.c Python/pystat description: New PyGILState_ API - implements pep 311, from patch 684256. --- Native TLS support is very recent (compared to the first commit): --- changeset: 64844:8e428b8e7d81 user: Kristj?n Valur J?nsson date: Mon Sep 20 02:11:49 2010 +0000 files: Python/pystate.c Python/thread_nt.h Python/thread_pthread.h description: issue 9786 Native TLS support for pthreads PyThread_create_key now has a failure mode that the applicatino can detect. --- ---------- nosy: +kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:25:38 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 28 Nov 2013 17:25:38 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385659538.64.0.880832336626.issue19509@psf.upfronthosting.co.za> Christian Heimes added the comment: The patches in the dependency tickets are using SNI. The problem is, a non-None server_hostname argument raises an error when OpenSSL doesn't support the feature. Here is a demo patch for my idea. It makes it very easy to add hostname matching to existing code. All it takes is the "server_hostname" argument to wrap_socket() and a new property "check_hostname" for the SSLContext object. The rest is done in do_handshake(). ---------- Added file: http://bugs.python.org/file32881/sslctx_check_hostname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:32:00 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 28 Nov 2013 17:32:00 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1385659920.96.0.831149182916.issue19824@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:35:15 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 28 Nov 2013 17:35:15 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <20131128123517.5d087dd6@anarchist> Barry A. Warsaw added the comment: On Nov 28, 2013, at 05:07 PM, anatoly techtonik wrote: >This class could be more useful with the following example: > >>>> from string import Template >>>> t = Template('$who likes $what') >>>> who = 'tim' >>>> what = 'kung pao' >>>> t.substitute(locals()) >'tim likes kung pao' > >This will help PHP folks to transition their .php files. I'm not sure what you want to add to the class. Your example works out of the box. See this for an approach my third party library takes: http://pythonhosted.org/flufl.i18n/docs/using.html#substitutions-and-placeholders ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:36:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Nov 2013 17:36:05 +0000 Subject: [issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules In-Reply-To: <1383692232.58.0.310780294932.issue19509@psf.upfronthosting.co.za> Message-ID: <1385660165.3.0.226623956499.issue19509@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The patches in the dependency tickets are using SNI. They all check for HAS_SNI, which is simple enough. If you want to discuss a minimum supported OpenSSL version, that's fine with me, but it should be a separate discussion (on python-dev?). If you think your patches are not ready, then please say so, so that I don't review them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:41:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 17:41:17 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385659170.9.0.824834529791.issue19822@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Anatoly, please stop reopening the issue, it's *really* annoying. Not only you failed to understand correctly your problem (it looks like nor Christian nor Marc-Andre nor me understood your request), but it looks like you don't care of our answers. > PEP repository readme lacks information about how to send Python Enhancement Proposal step-by-step. Did you at least read the *first* PEP, the PEP which describes the PEP process? http://www.python.org/dev/peps/pep-0001/ Did you also read the developer guide? The PEP process is also explained there: http://docs.python.org/devguide/langchanges.html#pep-process > What I propose it to make PEP repository self-sufficient, The PEP 1, 9 and 12 are already included in the PEP repository. I don't understand why you are focused on the README.rst file. PEPs are more convinient because automatically exported online at: http://www.python.org/dev/peps/ For example, you must read: http://www.python.org/dev/peps/pep-0001/ > I am already keep opening it, damn. I want to contribute an improvement for the PEP process and not forget about it. That's why I fill in into tracker, and not into email. The PEP process is already well described, so your issue is invalid. You don't propose anything concrete. Example of concrete thing: a patch on the pep-0001.rst or on README.rst. Or contribute to the devguide. Did you sign the contributor agreement? http://docs.python.org/devguide/coredev.html#sign-a-contributor-agreement I know that you don't want to sign it, even if I don't understand why (please don't start discuss it here, the legal mailing list is the right place), but it's required to contribute to CPython. -- The PEP process is not so formal. Just start discussing an idea on python-idea, don't worry of the exact structure of a PEP document. It can be written later. It is a waste of time to write a full PEP if an idea is quickly rejected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 18:59:01 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 17:59:01 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1385661541.24.0.32016820377.issue19824@psf.upfronthosting.co.za> anatoly techtonik added the comment: There is nothing to add to the class itself. It is about expanding docs section with helpful examples. `string.Template` is undervalued, because it is hard to see how it can be more useful than standard string formatting functions. But for people coming from PHP world, this can be a good start. The docs just need an entrypoint that shows how to use locally defined variables in template string. PHP does this for strings automatically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 19:00:02 2013 From: report at bugs.python.org (Alex Gaynor) Date: Thu, 28 Nov 2013 18:00:02 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1385661602.82.0.834833543244.issue19824@psf.upfronthosting.co.za> Alex Gaynor added the comment: Using locals() in this fashion is a serious anti-pattern, I'm -? on the docs suggesting it. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 19:01:41 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 18:01:41 +0000 Subject: [issue19825] test b.p.o email interface Message-ID: New submission from anatoly techtonik: -- anatoly t. ---------- messages: 204688 nosy: techtonik priority: normal severity: normal status: open title: test b.p.o email interface _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 19:03:55 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 28 Nov 2013 18:03:55 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385661835.5.0.197986867761.issue19822@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 19:05:12 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 18:05:12 +0000 Subject: [issue19825] test b.p.o email interface In-Reply-To: Message-ID: anatoly techtonik added the comment: Closing by email using [status=closed;resolution=invalid] suffix in header. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 20:39:29 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 28 Nov 2013 19:39:29 +0000 Subject: [issue19813] Add a new optional timeout parameter to socket.socket() constructor In-Reply-To: <1385559916.0.0.695093098293.issue19813@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: I'm with Antoine, this is *really* going too far. SOCK_CLOEXEC and friends are useful to avoid race conditions: there's no such concern with the non-blocking flag. Shaving one or two syscalls is IMO completely useless, and doesn't justify the extra code and, more importantly, clutter in the constructor. I'm -10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 20:43:33 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Nov 2013 19:43:33 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385667813.43.0.362138829716.issue19787@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Deja vu, this has come up before. I wanted to change this because native TLS implementation become awkward. https://mail.python.org/pipermail/python-dev/2008-August/081847.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 20:49:13 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Nov 2013 19:49:13 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385668153.57.0.867827443871.issue19787@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: See also issue #10517 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 20:50:45 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 19:50:45 +0000 Subject: [issue19826] Document that bug reporting by email is possible Message-ID: <1385668245.52.0.0107396832211.issue19826@psf.upfronthosting.co.za> New submission from anatoly techtonik: I found this to be convenient: http://techtonik.rainforce.org/2013/11/roundup-tracker-create-issues-by-email.html And this is missing from here: http://docs.python.org/release/2.7/bugs.html#using-the-python-issue-tracker Anf from here: http://docs.python.org/devguide/triaging.html Disclaimer: I didn't sign the CLA, and people keep telling me that I need it to do documentation edits. But I edit Wikipedia freely and I find it wrong that I can not edit Python documentation without signing papers. So I am not sending patches until either Wikipedia requires CLA to edit its contents, or PSF abandons its ill FUD policies in favor of creating collaborative environment. Regarding my aforementioned blog post, feel free to copy-paste it, as an author I release this into CC0/public domain. Ask python-legal-sig if it is enough. ---------- assignee: docs at python components: Documentation messages: 204693 nosy: docs at python, techtonik priority: normal severity: normal status: open title: Document that bug reporting by email is possible _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 20:52:24 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 28 Nov 2013 19:52:24 +0000 Subject: [issue19813] Add a new optional timeout parameter to socket.socket() constructor In-Reply-To: <1385553428.3.0.518090447657.issue19813@psf.upfronthosting.co.za> Message-ID: <1385668344.0.0.574899961067.issue19813@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, let's forget about it. ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 21:00:36 2013 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 28 Nov 2013 20:00:36 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1385668836.92.0.438028135116.issue19824@psf.upfronthosting.co.za> anatoly techtonik added the comment: @Alex, have you seen http://pythonhosted.org/flufl.i18n/docs/using.html#substitutions-and-placeholders? I really like the brevity, and it is the function that does the magic, so it is fully transparent and you don't need to instantiate string.Template every time. I think its awesome. Do you have some explanations why passing locals() to string.Template is anti-pattern? I understand that passing "all that you have" is not good, but from my past experience with PHP I can't remember any problems that there are more names than I used. It is templating after all - what do you want to protect from? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 21:06:20 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Nov 2013 20:06:20 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385669180.85.0.989838560666.issue19822@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing for the hopefully final time. Anatoly, if you keep reopening this ticket you have to expect removal of tracker privileges. ---------- nosy: +georg.brandl resolution: postponed -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:03:00 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Thu, 28 Nov 2013 21:03:00 +0000 Subject: [issue19821] pydoc.ispackage() could be more accurate In-Reply-To: <1385625330.82.0.952141123031.issue19821@psf.upfronthosting.co.za> Message-ID: <1385672580.16.0.979670631359.issue19821@psf.upfronthosting.co.za> Claudiu.Popa added the comment: It was used by pydoc.py until 2006, when it was removed with this commit: Changeset: 37821 (3135648026c4) Second phase of refactoring for runpy, pkgutil, pydoc, and setuptools. Is it worth to fix this? ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:10:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 21:10:09 +0000 Subject: [issue19827] Optimize socket.settimeout() and socket.setblocking(): avoid syscall Message-ID: <1385673009.77.0.328160102824.issue19827@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch avoids a syscall on socket.setblocking() and socket.settimeout() when possible: use ioctl(FIONBIO) when available (not only on VMS), or use fcntl() but only call fcntl() twice if the flags changed. The fcntl() optimization was suggested by Peter Portante some months ago: https://mail.python.org/pipermail/python-dev/2013-January/123661.html See also the rejected issue #19813: "Add a new optional timeout parameter to socket.socket() constructor". ---------- components: Library (Lib) files: socket.patch keywords: patch messages: 204698 nosy: haypo priority: normal severity: normal status: open title: Optimize socket.settimeout() and socket.setblocking(): avoid syscall type: performance versions: Python 3.4 Added file: http://bugs.python.org/file32882/socket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:11:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 21:11:54 +0000 Subject: [issue19813] Add a new optional timeout parameter to socket.socket() constructor In-Reply-To: <1385553428.3.0.518090447657.issue19813@psf.upfronthosting.co.za> Message-ID: <1385673114.47.0.257311305304.issue19813@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't see what I can do against a -10 vote! :-) I opened the issue #19827 for the simple syscall optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:12:59 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 28 Nov 2013 21:12:59 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example In-Reply-To: <1385668836.92.0.438028135116.issue19824@psf.upfronthosting.co.za> Message-ID: <20131128161259.14035dea@anarchist> Barry A. Warsaw added the comment: A few notes about flufl.i18n's style. We chose this (extracted from the GNU Mailman project) because $strings are *way* less error prone for translators than %s strings, especially when you consider that some languages change the order of placeholders. The automatic extraction of substitutions from locals and globals (under the hood, via the sys._getframe() hack) was critical to making the source code readable, by avoiding not just duplication, but triplication of names. There is a potential security hole though - a malicious translator with access to the source could analyze the local and global context in which the translation+substitution is being made, and craft a gettext catalog that adds some new substitutions that expose sensitive information. Given that most translations get little scrutiny, this could be used as an attack vector for users of some languages (though not English, since it's typically the source language and thus not translated). We've decided to accept the risks in exchange for the huge convenience. We've never seen such an attack and if we did, we'd address it in the code by manipulating the globals and locals to avoid the possibility of a leak. (We'd also learn to never trust the translators that added the hack.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:23:28 2013 From: report at bugs.python.org (Matthias Klose) Date: Thu, 28 Nov 2013 21:23:28 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1385673808.23.0.923568553912.issue19352@psf.upfronthosting.co.za> Matthias Klose added the comment: re-opening. the patch did break autopilot running with 2.7 on Ubuntu. I don't yet understand what this patch is supposed to fix. ---------- nosy: +doko resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:34:59 2013 From: report at bugs.python.org (Matthias Klose) Date: Thu, 28 Nov 2013 21:34:59 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1385674499.42.0.0796276420906.issue19352@psf.upfronthosting.co.za> Matthias Klose added the comment: see https://launchpad.net/bugs/1255505 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:37:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 21:37:27 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385674647.6.0.416637144703.issue19787@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch fix PyThread_set_key_value() instead of adding a new function. I prefer fix_set_key_value.patch instead of pythread_set_key_value.patch because I feel bad of keeping a buggy function and having to decide between a correct and a buggy version of the same function. > Deja vu, this has come up before. I wanted to change this because native TLS implementation become awkward. > https://mail.python.org/pipermail/python-dev/2008-August/081847.html You didn't get answer to this old email :-( I suppose that you still want to fix PyThread_set_key_value()? ---------- Added file: http://bugs.python.org/file32883/fix_set_key_value.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:55:23 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Nov 2013 21:55:23 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385675723.01.0.661686285905.issue19787@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Please see the rather long discussion in http://bugs.python.org/issue10517 There were issues having to do with fork. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 22:55:56 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Nov 2013 21:55:56 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385675756.15.0.0297251837306.issue19787@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: But yes, I'd like to see this behave like normal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 23:01:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Nov 2013 22:01:55 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385676115.61.0.924866781842.issue19787@psf.upfronthosting.co.za> STINNER Victor added the comment: > Please see the rather long discussion in http://bugs.python.org/issue10517 > There were issues having to do with fork. Python has now a _PyGILState_Reinit() function. I don't see how fix_set_key_value.patch would make the situation worse. What is the link between this issue and the issue #10517. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 23:17:38 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 28 Nov 2013 22:17:38 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385677058.64.0.475634323542.issue19787@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: AFAICT, there's no link (FWIW I wrote the patch for #10517, then the fix for threads created outside of Python calling into a subinterpreter - issue #13156). Actually, this "fix" would have avoided the regression in issue #13156. But since it's tricky, I'd really like if Graham could test it (his module does a lot of nasty things that could not show up in our test suite). ---------- nosy: +grahamd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 28 23:24:21 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Nov 2013 22:24:21 +0000 Subject: [issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key() In-Reply-To: <1385424837.9.0.232178819972.issue19787@psf.upfronthosting.co.za> Message-ID: <1385677461.08.0.690849201155.issue19787@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Only that issue #10517 mentions reasons to keep the old behavior, specifically http://bugs.python.org/issue10517#msg134573 I don't know if any of the old arguments are still valid, but I suggested changing this years ago and there was always some objection or other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 04:08:06 2013 From: report at bugs.python.org (yinkaisheng) Date: Fri, 29 Nov 2013 03:08:06 +0000 Subject: [issue19790] ctypes can't load a c++ dll if the dll calls COM on Windows 8 In-Reply-To: <1385447912.09.0.00620803320142.issue19790@psf.upfronthosting.co.za> Message-ID: <1385694486.55.0.506280821689.issue19790@psf.upfronthosting.co.za> yinkaisheng added the comment: After debugging, I found the reason. when ctypes loads the dll, CoCreateInstance blocks the flow. If I don't call CoCreateInstance in function DllMain. ctypes can load the dll. I should call function CoCreateInstance after DllMain was called. The problem was fixed. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 08:58:58 2013 From: report at bugs.python.org (Martin Pitt) Date: Fri, 29 Nov 2013 07:58:58 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1385711938.35.0.556718424579.issue19352@psf.upfronthosting.co.za> Martin Pitt added the comment: More precisely, it broke unittest's discovery (not specific to autopilot). For any installed test, you now get: $ python -m unittest discover lazr Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib/python2.7/unittest/__main__.py", line 12, in main(module=None) File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__ self.parseArgs(argv) File "/usr/lib/python2.7/unittest/main.py", line 113, in parseArgs self._do_discovery(argv[2:]) File "/usr/lib/python2.7/unittest/main.py", line 214, in _do_discovery self.test = loader.discover(start_dir, pattern, top_level_dir) File "/usr/lib/python2.7/unittest/loader.py", line 206, in discover tests = list(self._find_tests(start_dir, pattern)) File "/usr/lib/python2.7/unittest/loader.py", line 287, in _find_tests for test in self._find_tests(full_path, pattern): File "/usr/lib/python2.7/unittest/loader.py", line 287, in _find_tests for test in self._find_tests(full_path, pattern): File "/usr/lib/python2.7/unittest/loader.py", line 267, in _find_tests raise ImportError(msg % (mod_name, module_dir, expected_dir)) ImportError: 'test_error' module incorrectly imported from '/usr/lib/python2.7/dist-packages/lazr/restfulclient/tests'. Expected '/usr/lib/python2.7/dist-packages/lazr/restfulclient/tests'. Is this module globally installed? I reverted this patch in Ubuntu for now as a quickfix. This might be specific how Debian installs Python 2 modules. Packages ship them in /usr/share/pyshared//, and for every supported 2.X version, ship /usr/lib/python2.X/dist-packages// which contains only the directories and *.pyc files, but symlinks the *.py files to /usr/share/pyshared//../*.py So, it might be that upstream does not support this symlink layout, but it's the best thing to avoid having to install multiple *.py copies (this is all solved in a much more elegant way with Python 3, of course). But it would be nice if unittest's discovery could still cope with this. Thanks! ---------- nosy: +pitti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:02:31 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 29 Nov 2013 10:02:31 +0000 Subject: [issue19828] test_site fails with -S flag Message-ID: <1385719351.7.0.144059286508.issue19828@psf.upfronthosting.co.za> New submission from Vajrasky Kok: $ ./python -S Lib/test/test_site.py Traceback (most recent call last): File "Lib/test/test_site.py", line 28, in raise unittest.SkipTest("importation of site.py suppressed") unittest.case.SkipTest: importation of site.py suppressed This counts as fail test. So when you execute the whole unit test: $ ./python -S Lib/test You'll get 2 fail tests. The first one is test_trace, already fixed in #19398, but not yet committed. The second one is this one, test_site. 'raise unittest.SkipTest("importation of site.py suppressed")' will make the file counts as fail test. Attached the patch to make it does not count as fail test. ---------- components: Tests files: fix_test_site_with_s_flag.patch keywords: patch messages: 204711 nosy: vajrasky priority: normal severity: normal status: open title: test_site fails with -S flag type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32884/fix_test_site_with_s_flag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:22:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 29 Nov 2013 10:22:57 +0000 Subject: [issue19795] Formatting of True/False in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <3dWBcc5qVFz7LjP@mail.python.org> Roundup Robot added the comment: New changeset f51ca196d77a by Serhiy Storchaka in branch '2.7': Issue #19795: Improved markup of True/False constants. http://hg.python.org/cpython/rev/f51ca196d77a New changeset b2066bc8cab9 by Serhiy Storchaka in branch '3.3': Issue #19795: Improved markup of True/False constants. http://hg.python.org/cpython/rev/b2066bc8cab9 New changeset 6a3e09cd96f3 by Serhiy Storchaka in branch 'default': Issue #19795: Improved markup of True/False constants. http://hg.python.org/cpython/rev/6a3e09cd96f3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:32:00 2013 From: report at bugs.python.org (Jean-Pierre Flori) Date: Fri, 29 Nov 2013 10:32:00 +0000 Subject: [issue18634] mingw find import library In-Reply-To: <1375471005.24.0.423283634636.issue18634@psf.upfronthosting.co.za> Message-ID: <1385721120.62.0.704973325704.issue18634@psf.upfronthosting.co.za> Jean-Pierre Flori added the comment: Hello all, I've been working on porting Sage, which heavily relies on Python to say the least, to Cygwin so would be very interested in improving Python support for Cygwin. Lately we've been having troubles with Python and ncurses, see: * http://trac.sagemath.org/ticket/15317 As it would be better for everyone to avoid duplicating work, I'm reporting here. As far as the import library issue is concerned, it it really a good idea to use the dylib stuff to search for import libs? It will do the trick, but it feels like a hack as dylib and implib stuff are clearly different things. The other big problem is that ncurses support is completely broken on cygwin. A follow-up to #7384 should surely be open. Best, JP ---------- nosy: +Jean-Pierre.Flori _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:37:01 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 10:37:01 +0000 Subject: [issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed Message-ID: <1385721421.95.0.384748799117.issue19829@psf.upfronthosting.co.za> New submission from STINNER Victor: $ ./python Python 3.4.0b1 (default:acabd3f035fe, Nov 28 2013, 15:04:09) [GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import _pyio >>> f=_pyio.open("/etc/issue"); f=None >>> f=_pyio.open("/etc/issue", "rb"); f=None >>> f=_pyio.open("/etc/issue", "rb", 0); f=None __main__:1: ResourceWarning: unclosed file <_io.FileIO name='/etc/issue' mode='rb'> >>> import io >>> f=io.open("/etc/issue"); f=None __main__:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/etc/issue' mode='r' encoding='UTF-8'> >>> f=io.open("/etc/issue", "rb"); f=None __main__:1: ResourceWarning: unclosed file <_io.BufferedReader name='/etc/issue'> >>> f=io.open("/etc/issue", "rb", 0); f=None __main__:1: ResourceWarning: unclosed file <_io.FileIO name='/etc/issue' mode='rb'> I expect the same behaviour when I use _pyio or io module. ---------- messages: 204714 nosy: haypo, pitrou priority: normal severity: normal status: open title: _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:46:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 10:46:27 +0000 Subject: [issue19795] Formatting of True/False in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1385721987.52.0.785533052204.issue19795@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Georg for your help. Here is a patch which fixes markups for the None constant. It is more unequivocal. ---------- Added file: http://bugs.python.org/file32885/doc_none.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:52:52 2013 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 29 Nov 2013 10:52:52 +0000 Subject: [issue19830] test_poplib emits resource warning Message-ID: <1385722372.69.0.175458653403.issue19830@psf.upfronthosting.co.za> New submission from Vajrasky Kok: $ ./python Lib/test/test_poplib.py test_uidl (__main__.TestPOP3_TLSClass) ... ok test_user (__main__.TestPOP3_TLSClass) ... ok ---------------------------------------------------------------------- Ran 62 tests in 4.994s OK /home/ethan/Documents/code/python/cpython3.4/Lib/test/support/__init__.py:1331: ResourceWarning: unclosed gc.collect() Attached the patch to fix the resource warning. ---------- components: Tests files: fix_test_poplib_resource_warning.patch keywords: patch messages: 204716 nosy: vajrasky priority: normal severity: normal status: open title: test_poplib emits resource warning type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file32886/fix_test_poplib_resource_warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:57:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 10:57:18 +0000 Subject: [issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed In-Reply-To: <1385721421.95.0.384748799117.issue19829@psf.upfronthosting.co.za> Message-ID: <1385722638.67.0.290144800831.issue19829@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:57:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 10:57:31 +0000 Subject: [issue19831] tracemalloc: stop the module later Message-ID: <1385722651.55.0.86737779548.issue19831@psf.upfronthosting.co.za> New submission from STINNER Victor: tracemalloc cannot be used in object destructors because the module is stopped early at Python shutdown. I would like to use tracemalloc.get_object_traceback() in object destructors to retrieve where an object was allocated. Attached patch replaces the atexit handler with a builtin _PyTraceMalloc_Fini() function to stop tracemalloc much later. It does also simplify the C code of _tracemalloc.c. ---------- files: tracemalloc_fini.patch keywords: patch messages: 204717 nosy: haypo, neologix, pitrou priority: normal severity: normal status: open title: tracemalloc: stop the module later versions: Python 3.4 Added file: http://bugs.python.org/file32887/tracemalloc_fini.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 11:57:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 10:57:39 +0000 Subject: [issue19831] tracemalloc: stop the module later at Python shutdown In-Reply-To: <1385722651.55.0.86737779548.issue19831@psf.upfronthosting.co.za> Message-ID: <1385722659.69.0.325563301025.issue19831@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: tracemalloc: stop the module later -> tracemalloc: stop the module later at Python shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 12:01:00 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 11:01:00 +0000 Subject: [issue19831] tracemalloc: stop the module later at Python shutdown In-Reply-To: <1385722651.55.0.86737779548.issue19831@psf.upfronthosting.co.za> Message-ID: <1385722860.02.0.013532821405.issue19831@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh tracemalloc_fini.patch is not correct, _PyTraceMalloc_Fini() should be called after PyImport_Cleanup(). ---------- Added file: http://bugs.python.org/file32888/tracemalloc_fini-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 12:07:39 2013 From: report at bugs.python.org (Stefan Krah) Date: Fri, 29 Nov 2013 11:07:39 +0000 Subject: [issue19803] memoryview complain ctypes byte array are not native single character In-Reply-To: <1385499249.85.0.446556603594.issue19803@psf.upfronthosting.co.za> Message-ID: <1385723259.36.0.0675293001269.issue19803@psf.upfronthosting.co.za> Stefan Krah added the comment: >>> class B1(ctypes.Structure): ... _fields_ = [("data", ctypes.c_uint8 * 256), ] ... _pack_ = 1 ... >>> a= B1() >>> x = memoryview(a) >>> x.format 'B' In the first case the format is 'B', in the second case the format is: >>> x = memoryview(b) >>> x.format 'T{(256) duplicate stage: -> committed/rejected status: open -> closed superseder: -> implement PEP 3118 struct changes type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 14:33:09 2013 From: report at bugs.python.org (Tobias Kuhn) Date: Fri, 29 Nov 2013 13:33:09 +0000 Subject: [issue19832] XML version is ignored Message-ID: <1385731989.56.0.494206354245.issue19832@psf.upfronthosting.co.za> New submission from Tobias Kuhn: The first line of an XML file should be something like this: The XML parser of xml.sax, however, seems to ignore the value of "version": This should give an error, but it doesn't. It's not a very serious problem, but this should raise an error to be standards-compliant. I experienced this bug in the rdflib package: https://github.com/RDFLib/rdflib/issues/347 ---------- components: XML messages: 204720 nosy: tkuhn priority: normal severity: normal status: open title: XML version is ignored type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 15:09:20 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 14:09:20 +0000 Subject: [issue19826] Document that bug reporting by email is possible In-Reply-To: <1385668245.52.0.0107396832211.issue19826@psf.upfronthosting.co.za> Message-ID: <1385734160.59.0.0176712389754.issue19826@psf.upfronthosting.co.za> Brett Cannon added the comment: We cannot accept anything you produce until you sign the CLA. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 15:09:49 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 14:09:49 +0000 Subject: [issue19826] Document that bug reporting by email is possible In-Reply-To: <1385668245.52.0.0107396832211.issue19826@psf.upfronthosting.co.za> Message-ID: <1385734189.07.0.507055531894.issue19826@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: normal -> low stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 15:19:07 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Fri, 29 Nov 2013 14:19:07 +0000 Subject: [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1385734747.24.0.867738036885.issue15657@psf.upfronthosting.co.za> Changes by Bohuslav "Slavek" Kabrda : ---------- nosy: +bkabrda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 15:30:54 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 14:30:54 +0000 Subject: [issue19616] Fix test.test_importlib.util.test_both() to set __module__ In-Reply-To: <1384553214.36.0.335433521852.issue19616@psf.upfronthosting.co.za> Message-ID: <1385735454.01.0.0048808978549.issue19616@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 15:37:12 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 14:37:12 +0000 Subject: [issue19659] Document Argument Clinic In-Reply-To: <1384907080.98.0.430269997716.issue19659@psf.upfronthosting.co.za> Message-ID: <1385735832.13.0.291098700305.issue19659@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 15:57:10 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 29 Nov 2013 14:57:10 +0000 Subject: [issue19828] test_site fails with -S flag In-Reply-To: <1385719351.7.0.144059286508.issue19828@psf.upfronthosting.co.za> Message-ID: <1385737030.89.0.334660039949.issue19828@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:00:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 15:00:42 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385535790.71.0.393337888652.issue19780@psf.upfronthosting.co.za> Message-ID: <4090001.itgqsarfWl@raxxla> Serhiy Storchaka added the comment: > 22:36:13 [ ~/PythonDev/cpython ]$ ./python.exe -m timeit "import pickle" > "with open('test.pickle4', 'rb', buffering=0) as f: pickle.load(f)" 100 > loops, best of 3: 9.28 msec per loop Did you use the same test file or different files (generated by patched and unpatched pickler)? Try to run this command several times and take a minimum. > I wrote a benchmark to simulate slow reads. But again, there is no > performance difference with the patch. Test data are too small, they all less than frame size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:02:41 2013 From: report at bugs.python.org (=?utf-8?q?Zden=C4=9Bk_Pavlas?=) Date: Fri, 29 Nov 2013 15:02:41 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1385737361.92.0.0168074350864.issue18879@psf.upfronthosting.co.za> Zden?k Pavlas added the comment: Hit this issue too, but with the "read" method. I think that providing a custom read() and write() methods in the wrapper class that override __getattr__ is a sufficient solution. These are the attributes most likely to be used as the "tail". ---------- nosy: +Zden?k.Pavlas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:16:16 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 15:16:16 +0000 Subject: [issue19833] asyncio: patches to document EventLoop and add more examples Message-ID: <1385738176.38.0.477367051955.issue19833@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patches document get_event_loop() and BaseEventLoop; and add two "hello world" examples copied from: http://code.google.com/p/tulip/source/browse/#hg%2Fexamples ---------- assignee: docs at python components: Documentation files: asyncio_doc_eventloop.patch keywords: patch messages: 204724 nosy: docs at python, gvanrossum, haypo, pitrou priority: normal severity: normal status: open title: asyncio: patches to document EventLoop and add more examples versions: Python 3.4 Added file: http://bugs.python.org/file32889/asyncio_doc_eventloop.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:17:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 15:17:31 +0000 Subject: [issue19833] asyncio: patches to document EventLoop and add more examples In-Reply-To: <1385738176.38.0.477367051955.issue19833@psf.upfronthosting.co.za> Message-ID: <1385738251.97.0.78933573619.issue19833@psf.upfronthosting.co.za> STINNER Victor added the comment: I know that the documentation contains a lot of XXX, but it documents at least the prototype of the methods. I may provide more patches fixing XXX later ;-) I hesitated to document the Handle class, but it looks like Guido prefers to not document it? ---------- Added file: http://bugs.python.org/file32890/asyncio_doc_examples.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:18:15 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 15:18:15 +0000 Subject: [issue19698] Implement _imp.exec_builtin and exec_dynamic In-Reply-To: <1385137675.64.0.235823443194.issue19698@psf.upfronthosting.co.za> Message-ID: <1385738295.57.0.681041140136.issue19698@psf.upfronthosting.co.za> Brett Cannon added the comment: This is going to have to wait until Python 3.5, so I'm going to back out the exec_module() aspects of BuiltinImporter and ExtensionFileLoader. As Nick has pointed out previously, we are going to need to change the init function signature of extension modules to accept the module to initialize (or something). This also extends to built-in modules as on Windows all extension modules are compiled in, so there is no real distinction between the two scenarios, so this can't be only partially solved for built-ins but not extension modules. This is another reason why we will need to go with a soft deprecation of load_module() in Python 3.4 and hopefully get all of this straightened out in Python 3.5 so we can introduce a hard deprecation. And just in case we end up having to hack our way around the call signature, PyModule_Create() could be tweaked to pull modules from a cache that can be seeded with the module that is to be used for the initialization. That way call signatures don't have to change but what module gets used can be controlled. ---------- priority: normal -> critical versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:22:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Nov 2013 15:22:09 +0000 Subject: [issue19833] asyncio: patches to document EventLoop and add more examples In-Reply-To: <1385738176.38.0.477367051955.issue19833@psf.upfronthosting.co.za> Message-ID: <1385738529.03.0.10815753334.issue19833@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Since there are many event loop methods, I structured the doc so that methods are grouped in different sections: see the existing "delayed calls" and "creating connections" sections. I'm not saying it's the best solution (is it?), but I think it would be nice to be consistent :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:25:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 15:25:59 +0000 Subject: [issue19831] tracemalloc: stop the module later at Python shutdown In-Reply-To: <1385722651.55.0.86737779548.issue19831@psf.upfronthosting.co.za> Message-ID: <1385738759.06.0.518118724078.issue19831@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue19255. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:27:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 15:27:26 +0000 Subject: [issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed In-Reply-To: <1385721421.95.0.384748799117.issue19829@psf.upfronthosting.co.za> Message-ID: <1385738846.48.0.709205826114.issue19829@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it will be good. ---------- components: +IO stage: -> needs patch type: -> resource usage versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:29:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Nov 2013 15:29:34 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1385738974.83.0.831168847331.issue19352@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > ImportError: 'test_error' module incorrectly imported from '/usr/lib/python2.7/dist-packages/lazr/restfulclient/tests'. Expected '/usr/lib/python2.7/dist-packages/lazr/restfulclient/tests'. Is this module globally installed? Well, this looks like the same path to me. Can you investigate a bit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:31:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 15:31:08 +0000 Subject: [issue19832] XML version is ignored In-Reply-To: <1385731989.56.0.494206354245.issue19832@psf.upfronthosting.co.za> Message-ID: <1385739068.37.0.560798639794.issue19832@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +christian.heimes, eli.bendersky, scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:32:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Nov 2013 15:32:28 +0000 Subject: [issue19832] XML version is ignored In-Reply-To: <1385731989.56.0.494206354245.issue19832@psf.upfronthosting.co.za> Message-ID: <1385739148.88.0.579312070414.issue19832@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:34:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 15:34:58 +0000 Subject: [issue19758] Warnings in tests In-Reply-To: <1385327657.07.0.59921543232.issue19758@psf.upfronthosting.co.za> Message-ID: <1385739298.3.0.228479389669.issue19758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For test_poplib issue19830 was opened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:44:37 2013 From: report at bugs.python.org (Michael Foord) Date: Fri, 29 Nov 2013 15:44:37 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1385739877.31.0.0392109763736.issue19352@psf.upfronthosting.co.za> Michael Foord added the comment: This can happen when the code used to compare the paths is different from the code used to generate the failure message. This of course masks the real problem. I can look at where that might be possible and then hopefully we can get a genuine error message telling us the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:49:14 2013 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Fri, 29 Nov 2013 15:49:14 +0000 Subject: [issue19834] Unpickling exceptions pickled by Python 2 Message-ID: <1385740154.87.0.494742260047.issue19834@psf.upfronthosting.co.za> New submission from Walter D?rwald: Exception objects that have been pickled with Python 2 can not be unpickled with Python 3, even when fix_imports=True is specified: $ python2.7 Python 2.7.2 (default, Aug 30 2011, 11:04:13) [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> pickle.dumps(StopIteration()) 'cexceptions\nStopIteration\np0\n(tRp1\n.' >>> $ python3.3 Python 3.3.2 (default, Nov 14 2013, 12:22:14) [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> pickle.loads(b'cexceptions\nStopIteration\np0\n(tRp1\n.', fix_imports=True) Traceback (most recent call last): File "", line 1, in ImportError: No module named 'exceptions' >>> Adding an entry "exceptions": "builtins" to _compat_pickle.IMPORT_MAPPING seems to fix the problem. ---------- messages: 204733 nosy: doerwalter priority: normal severity: normal status: open title: Unpickling exceptions pickled by Python 2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 16:58:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 15:58:59 +0000 Subject: [issue19833] asyncio: patches to document EventLoop and add more examples In-Reply-To: <1385738176.38.0.477367051955.issue19833@psf.upfronthosting.co.za> Message-ID: <1385740739.23.0.981288335184.issue19833@psf.upfronthosting.co.za> STINNER Victor added the comment: > Since there are many event loop methods, I structured the doc so that methods are grouped in different sections: see the existing "delayed calls" and "creating connections" sections. Seriously, I read the documentation three times (HTML and the source), but I didn't notice that asyncio.call_later() is not a function, but a method of an object. > I'm not saying it's the best solution (is it?), but I think it would be nice to be consistent :) There are too many methods, it's a good solution. I will rewrite asyncio_doc_eventloop.patch to group the methods. Before that, here is a patch to mention the class for methods. ---------- Added file: http://bugs.python.org/file32891/asyncio_doc_methods.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:00:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 29 Nov 2013 16:00:21 +0000 Subject: [issue19698] Implement _imp.exec_builtin and exec_dynamic In-Reply-To: <1385137675.64.0.235823443194.issue19698@psf.upfronthosting.co.za> Message-ID: <3dWL5v6rzgz7Ljt@mail.python.org> Roundup Robot added the comment: New changeset b5bbd47a9bc4 by Brett Cannon in branch 'default': Issue #19698: Remove exec_module() from the built-in and extension http://hg.python.org/cpython/rev/b5bbd47a9bc4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:01:49 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 16:01:49 +0000 Subject: [issue19702] Update pickle to PEP 451 In-Reply-To: <1385624711.1.0.561130815884.issue19702@psf.upfronthosting.co.za> Message-ID: <1385740909.82.0.122768592444.issue19702@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Update runpy for PEP 451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:02:44 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 16:02:44 +0000 Subject: [issue19706] Check if inspect needs updating for PEP 451 In-Reply-To: <1385621165.81.0.224765634594.issue19706@psf.upfronthosting.co.za> Message-ID: <1385740964.17.0.383280830563.issue19706@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:06:07 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 16:06:07 +0000 Subject: [issue19713] Deprecate various things in importlib thanks to PEP 451 In-Reply-To: <1385139007.0.0.922066136531.issue19713@psf.upfronthosting.co.za> Message-ID: <1385741167.12.0.786830051545.issue19713@psf.upfronthosting.co.za> Brett Cannon added the comment: To add another point about load_module(), I just had to rip out exec_module() for Python 3.4 as working around _imp.init_builtin() and _imp.load_dynamic() are going to need to be done hand-in-hand. So load_module() should probably get documented as deprecated and nothing more. Everything else can be hard deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:07:28 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 16:07:28 +0000 Subject: [issue19705] Update test.test_namespace_pkgs to PEP 451 Message-ID: <1385741248.04.0.529225743438.issue19705@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Merge all (non-syntactic) import-related tests into test_importlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:07:44 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Nov 2013 16:07:44 +0000 Subject: [issue19704] Update test.test_threaded_import to PEP 451 Message-ID: <1385741264.08.0.0234426624712.issue19704@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Merge all (non-syntactic) import-related tests into test_importlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:10:42 2013 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 29 Nov 2013 16:10:42 +0000 Subject: [issue19832] XML version is ignored In-Reply-To: <1385731989.56.0.494206354245.issue19832@psf.upfronthosting.co.za> Message-ID: <1385741442.23.0.108974814457.issue19832@psf.upfronthosting.co.za> Stefan Behnel added the comment: If (as I assume) XML 1.1 isn't supported, then rejecting anything but "1.0" would be correct. Not for Py2.7 anymore, though, I guess, more something to fix for 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:23:54 2013 From: report at bugs.python.org (Martin Pitt) Date: Fri, 29 Nov 2013 16:23:54 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1385742234.6.0.62866633263.issue19352@psf.upfronthosting.co.za> Martin Pitt added the comment: In this new code: mod_file = os.path.abspath(getattr(module, '__file__', full_path)) realpath = os.path.splitext(os.path.realpath(mod_file))[0] fullpath_noext = os.path.splitext(os.path.realpath(full_path))[0] we get modfile == /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/test_error.pyc realpath == /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/test_error fullpath_noext == /usr/share/pyshared/lazr/restfulclient/tests/test_error for this file: lrwxrwxrwx 1 root root 71 Mai 26 2013 /usr/lib/python2.7/dist-packages/lazr/restfulclient/tests/test_error.py -> ../../../../../../share/pyshared/lazr/restfulclient/tests/test_error.py Which is as expected in Debian/Ubuntu as the *.pyc file is a real file in /usr/lib/python2.7, but the *.py is symlinked to /usr/share/. This new patch essentially enforces that the *.py file is not a symlink, which breaks the Debian-ish way of installing python 2 modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:48:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Nov 2013 16:48:46 +0000 Subject: [issue18054] Add more exception related assertions to unittest In-Reply-To: <1369464959.25.0.285327189549.issue18054@psf.upfronthosting.co.za> Message-ID: <1385743726.97.0.102339791939.issue18054@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Also, see issue #19645. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:52:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Nov 2013 16:52:03 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1385742234.6.0.62866633263.issue19352@psf.upfronthosting.co.za> Message-ID: <1385743920.2336.10.camel@fsol> Antoine Pitrou added the comment: On ven., 2013-11-29 at 16:23 +0000, Martin Pitt wrote: > This new patch essentially enforces that the *.py file is not a > symlink, which breaks the Debian-ish way of installing python 2 > modules. So it doesn't help that Debian/Ubuntu likes to put symlinks everywhere, then... (the original issue is due to another peculiarity you've added) So, how about the following algorithm: - check that both paths are equal - if they aren't, call realpath() and check again - if they are still unequal, raise an error I suppose this is 2.7-only, btw? In 3.x, __file__ points to the py file and not the pyc file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:57:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 16:57:11 +0000 Subject: [issue19834] Unpickling exceptions pickled by Python 2 In-Reply-To: <1385740154.87.0.494742260047.issue19834@psf.upfronthosting.co.za> Message-ID: <1385744231.63.0.713291038922.issue19834@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +alexandre.vassalotti, pitrou type: -> behavior versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:57:46 2013 From: report at bugs.python.org (Julian Berman) Date: Fri, 29 Nov 2013 16:57:46 +0000 Subject: [issue19645] decouple unittest assertions from the TestCase class In-Reply-To: <1384785494.56.0.149196031493.issue19645@psf.upfronthosting.co.za> Message-ID: <1385744266.95.0.0400104213242.issue19645@psf.upfronthosting.co.za> Changes by Julian Berman : ---------- nosy: +Julian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 17:58:32 2013 From: report at bugs.python.org (Martin Pitt) Date: Fri, 29 Nov 2013 16:58:32 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1385744312.26.0.630708330877.issue19352@psf.upfronthosting.co.za> Martin Pitt added the comment: Yes, this affects python 2.7 only; as I said, this is all solved in python3 by introducing the explicit extensions like __pycache__/*..cpython-33.pyc so that multiple versions can share one directory. With that these symlink hacks aren't necessary any more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 18:24:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 17:24:03 +0000 Subject: [issue19835] Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted Message-ID: <1385745842.98.0.409110544048.issue19835@psf.upfronthosting.co.za> New submission from STINNER Victor: Under very low memory condition, PyErr_NoMemory() or PyErr_NormalizeException() enters an unlimited loop when the free list of MemoryError becomes empty. I propose to add a MemoryError read-only singleton to fix this corner case. Attributes cannot be modified, new attributes cannot be added. MemoryError attributes values: * __cause__ = None * __context__ = None * __suppress_context__ = False * __traceback__ = None * args = () PyException_SetTraceback(), PyException_SetCause() and PyException_SetContext() do nothing when called on the MemoryError singleton. A MemoryError can be raised on an integer overflow when computing the size of a memory block. In this case, you may still have available free memory and so you may be able to build a traceback object, chain exceptions, etc. If you consider that attributes must be modifiable in this case, we can keep the MemoryError unchanged and keep the free list, but add a new special "ReadOnlyMemoryError" type which has exactly one instance, preallocated at startup (the singleton). Read-only attributes are required to not keep references to objects when the MemoryError (singleton) is ne more used ("destroyed"): see for example test_memory_error_cleanup() of test_exceptions. Python has already a PyExc_RecursionErrorInst singleton, which is used on recursion error. It is just a preallocated RuntimeError error, attributes are modifiable. Does this exception keep a traceback when it is no more used ("destroyed")? Maybe using read-only attributes is overkill? Replacing the free list with a singleton is enough? -- See also issue #5437: before Python had a MemoryError singleton, but it was replaced by a free list to not keep references. changeset: 65690:c6d86439aa91 branch: 3.1 parent: 65672:e4425d68dadf user: Antoine Pitrou date: Thu Oct 28 23:06:57 2010 +0000 files: Include/pyerrors.h Lib/test/test_exceptions.py Misc/NEWS Objects/exceptions.c Python/errors.c description: Merged revisions 85896 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/py3k ........ r85896 | antoine.pitrou | 2010-10-29 00:56:58 +0200 (ven., 29 oct. 2010) | 4 lines Issue #5437: A preallocated MemoryError instance should not hold traceback data (including local variables caught in the stack trace) alive infinitely. ........ -- Another option is maybe to clear frames of the traceback. Issue #17934 added a clear() method to frame objects for that. ---------- files: memerror_singleton.patch keywords: patch messages: 204742 nosy: haypo priority: normal severity: normal status: open title: Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted versions: Python 3.4 Added file: http://bugs.python.org/file32892/memerror_singleton.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 18:24:41 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Nov 2013 17:24:41 +0000 Subject: [issue19833] asyncio: patches to document EventLoop and add more examples In-Reply-To: <1385738176.38.0.477367051955.issue19833@psf.upfronthosting.co.za> Message-ID: <1385745881.46.0.742856326733.issue19833@psf.upfronthosting.co.za> Guido van Rossum added the comment: I would much rather review the docs after they've been committed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 18:24:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 17:24:51 +0000 Subject: [issue19835] Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted In-Reply-To: <1385745842.98.0.409110544048.issue19835@psf.upfronthosting.co.za> Message-ID: <1385745891.7.0.766119698105.issue19835@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +alexandre.vassalotti, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 18:27:30 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Nov 2013 17:27:30 +0000 Subject: [issue19835] Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted In-Reply-To: <1385745842.98.0.409110544048.issue19835@psf.upfronthosting.co.za> Message-ID: <1385746050.24.0.375536389693.issue19835@psf.upfronthosting.co.za> STINNER Victor added the comment: > Under very low memory condition, PyErr_NoMemory() or PyErr_NormalizeException() enters an unlimited loop when the free list of MemoryError becomes empty. I got this bug when I worked on the issue #19817 which adds an arbitary limit to memory allocations using tracemalloc. I used this limit on the Python test suite to check how Python behaves under very low memory condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 18:31:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Nov 2013 17:31:38 +0000 Subject: [issue19835] Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted In-Reply-To: <1385745842.98.0.409110544048.issue19835@psf.upfronthosting.co.za> Message-ID: <1385746298.67.0.0522455297041.issue19835@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Under very low memory condition, PyErr_NoMemory() or > PyErr_NormalizeException() enters an unlimited loop when the free list > of MemoryError becomes empty. The real question is why the free list becomes empty. Either way, I don't think a read-only singleton is a good idea. It may be simpler to call Py_FatalError in such cases. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 18:32:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 17:32:58 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <1348167705.87.0.588220983695.issue15989@psf.upfronthosting.co.za> Message-ID: <1385746378.83.0.568918366975.issue15989@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here are remnants of initial patch which were not committed. There are no tests. ---------- nosy: +haypo Added file: http://bugs.python.org/file32893/long_aslong_overflow_2-3.4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 18:33:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 17:33:05 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <1348167705.87.0.588220983695.issue15989@psf.upfronthosting.co.za> Message-ID: <1385746385.85.0.718241255784.issue15989@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 19:24:20 2013 From: report at bugs.python.org (Waffle Souffle) Date: Fri, 29 Nov 2013 18:24:20 +0000 Subject: [issue10752] build_ssl.py is relying on unreliable behaviour of os.popen In-Reply-To: <1292972982.57.0.365932571977.issue10752@psf.upfronthosting.co.za> Message-ID: <1385749460.59.0.230994382819.issue10752@psf.upfronthosting.co.za> Waffle Souffle added the comment: Replicated with Perl being discovered as follows: ['C:\\perl\\bin\\perl.exe', 'c:\\cygwin\\bin\\perl.exe', 'c:\\perl\\bin\\perl.exe'] C:\perl\bin\perl.exe is installed from ActivePerl-5.16.3.1603-MSWin32-x86-296746.msi Attempting to compile Python 2.7.6. Installed Python binary used to run build_openssl.py is Python 2.7.1. As mentioned the call to the file handle's close returns 1 for every perl installation. In this version of ActiveState Perl the errorlevel from running Perl with a successful command is 0, and with an unsuccessful command is 2. perl -e "use Win32;" echo %ERRORLEVEL% ==> 0 perl -e "use Win32x;" echo %ERRORLEVEL% ==> 2 ---------- nosy: +Waffle.Souffle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 19:26:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 29 Nov 2013 18:26:59 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <3dWPM65cPSz7Ljt@mail.python.org> Roundup Robot added the comment: New changeset 34cb64cdbf7b by Guido van Rossum in branch 'default': Add brief explanation and web pointers to README.txt. Fixes issue 19822. http://hg.python.org/peps/rev/34cb64cdbf7b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 19:35:26 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Nov 2013 18:35:26 +0000 Subject: [issue19822] PEP process entrypoint In-Reply-To: <1385647169.27.0.622120668783.issue19822@psf.upfronthosting.co.za> Message-ID: <1385750126.35.0.901849061995.issue19822@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: rejected -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 19:40:10 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Nov 2013 18:40:10 +0000 Subject: [issue19454] devguide: Document what a "platform support" is In-Reply-To: <1383159116.46.0.184690879028.issue19454@psf.upfronthosting.co.za> Message-ID: <1385750410.29.0.534150572555.issue19454@psf.upfronthosting.co.za> Guido van Rossum added the comment: This is explicitly left up to the core developers' finely tuned sense of judgment. Adding a definition will not simplify decisions or reduce disagreements, it will just cause more pointless legalistic debate about the meaning of specific words. ---------- nosy: +gvanrossum resolution: -> wont fix stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 19:56:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Nov 2013 18:56:38 +0000 Subject: [issue10752] build_ssl.py is relying on unreliable behaviour of os.popen In-Reply-To: <1292972982.57.0.365932571977.issue10752@psf.upfronthosting.co.za> Message-ID: <1385751398.66.0.86934175694.issue10752@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: ocean-city -> nosy: +tim.peters versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 20:52:15 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 29 Nov 2013 19:52:15 +0000 Subject: [issue19836] selectors: improve examples section Message-ID: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: Here's a patch improving the "examples" section for the selectors module. ---------- assignee: docs at python components: Documentation files: selectors_examples.diff keywords: needs review, patch messages: 204750 nosy: docs at python, neologix priority: normal severity: normal stage: patch review status: open title: selectors: improve examples section type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32894/selectors_examples.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 21:39:03 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 29 Nov 2013 20:39:03 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> Message-ID: <1385757543.6.0.713549061815.issue19836@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : Removed file: http://bugs.python.org/file32894/selectors_examples.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 21:39:18 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 29 Nov 2013 20:39:18 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> Message-ID: <1385757558.52.0.422019301434.issue19836@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : Added file: http://bugs.python.org/file32895/selectors_examples.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 21:41:25 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 20:41:25 +0000 Subject: [issue19696] Merge all (non-syntactic) import-related tests into test_importlib In-Reply-To: <1385136285.91.0.72176568785.issue19696@psf.upfronthosting.co.za> Message-ID: <1385757685.41.0.541971845637.issue19696@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 21:42:52 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Nov 2013 20:42:52 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> Message-ID: <1385757772.07.0.397919319787.issue19836@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This sounds ok to me. ---------- nosy: +gvanrossum, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 21:53:47 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 20:53:47 +0000 Subject: [issue19834] Unpickling exceptions pickled by Python 2 In-Reply-To: <1385740154.87.0.494742260047.issue19834@psf.upfronthosting.co.za> Message-ID: <1385758427.38.0.0879301954764.issue19834@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:00:04 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:00:04 +0000 Subject: [issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed In-Reply-To: <1385721421.95.0.384748799117.issue19829@psf.upfronthosting.co.za> Message-ID: <1385758804.8.0.54833171536.issue19829@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:01:03 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Nov 2013 21:01:03 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> Message-ID: <1385758863.51.0.907873646953.issue19836@psf.upfronthosting.co.za> Guido van Rossum added the comment: This is definitely an improvement over the previous example, but I think both examples are still pretty unrealistic; they seem to be more useful as smoke tests than as examples. My primary concern is that, in order to be both self-contained and small, both examples have both the sender and the receiver in the same code (connected by a socketpair). But this makes them useless as starting points for simple applications built around a typical select loop. Perhaps a basic echo service would be a better starting point? I'll try to create one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:02:10 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:02:10 +0000 Subject: [issue19255] Don't "wipe" builtins at shutdown In-Reply-To: <1381700055.32.0.691639350713.issue19255@psf.upfronthosting.co.za> Message-ID: <1385758930.74.0.85678978628.issue19255@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:02:17 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:02:17 +0000 Subject: [issue19831] tracemalloc: stop the module later at Python shutdown In-Reply-To: <1385722651.55.0.86737779548.issue19831@psf.upfronthosting.co.za> Message-ID: <1385758937.09.0.727269698157.issue19831@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:04:25 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:04:25 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1385759065.4.0.407299489008.issue18879@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:05:29 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:05:29 +0000 Subject: [issue19828] test_site fails with -S flag In-Reply-To: <1385719351.7.0.144059286508.issue19828@psf.upfronthosting.co.za> Message-ID: <1385759129.74.0.501961079109.issue19828@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:15:13 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Nov 2013 21:15:13 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> Message-ID: <1385759713.37.0.338591571533.issue19836@psf.upfronthosting.co.za> Guido van Rossum added the comment: Here's my suggestion. It can use a lot of cleaning up, but it shows the fundamentals of a selector-based I/O loop. ---------- Added file: http://bugs.python.org/file32896/echo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:17:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 29 Nov 2013 21:17:13 +0000 Subject: [issue19712] Make sure there are exec_module tests for _LoaderBasics subclasses Message-ID: <3dWT7W736GzQPM@mail.python.org> New submission from Roundup Robot: New changeset dad74ff75a6b by Brett Cannon in branch 'default': Issue #19712: Port test.test_importlib.import_ tests to use PEP 451 http://hg.python.org/cpython/rev/dad74ff75a6b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:18:30 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Nov 2013 21:18:30 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> Message-ID: <1385759910.03.0.544267747364.issue19836@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sorry, here's a version with slightly more logical order of the code. ---------- Added file: http://bugs.python.org/file32897/echo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:18:42 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Nov 2013 21:18:42 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> Message-ID: <1385759922.06.0.435787252746.issue19836@psf.upfronthosting.co.za> Changes by Guido van Rossum : Removed file: http://bugs.python.org/file32896/echo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:26:30 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:26:30 +0000 Subject: [issue19795] Formatting of True/False in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1385760390.96.0.741155256434.issue19795@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: > New changeset b2066bc8cab9 by Serhiy Storchaka in branch '3.3': > Issue #19795: Improved markup of True/False constants. > http://hg.python.org/cpython/rev/b2066bc8cab9 Accidental, unrelated changes in Doc/library/importlib.rst (and with conflict marker). ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:39:48 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 29 Nov 2013 21:39:48 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <1385761188.64.0.940302597255.issue19063@psf.upfronthosting.co.za> R. David Murray added the comment: 3.4 patch updated to address Vajrasky's review comment. I'll probably apply this tomorrow. ---------- Added file: http://bugs.python.org/file32898/support_8bit_charset_cte.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:43:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 29 Nov 2013 21:43:22 +0000 Subject: [issue19795] Formatting of True/False in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <3dWTjk14qFz7LjY@mail.python.org> Roundup Robot added the comment: New changeset 9d0dc3d7bf01 by Serhiy Storchaka in branch '3.3': Revert unrelated changes introduced by changeset b2066bc8cab9 (issue #19795). http://hg.python.org/cpython/rev/9d0dc3d7bf01 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:44:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 29 Nov 2013 21:44:19 +0000 Subject: [issue19795] Formatting of True/False in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1385761459.12.0.764129850721.issue19795@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Arfrever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:50:01 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:50:01 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1385761801.27.0.149998608009.issue17232@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:50:37 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:50:37 +0000 Subject: [issue19820] docs are missing info about module attributes In-Reply-To: <1385620941.03.0.287546381963.issue19820@psf.upfronthosting.co.za> Message-ID: <1385761837.81.0.624284794111.issue19820@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 22:51:34 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 29 Nov 2013 21:51:34 +0000 Subject: [issue19835] Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted In-Reply-To: <1385745842.98.0.409110544048.issue19835@psf.upfronthosting.co.za> Message-ID: <1385761894.62.0.806616435511.issue19835@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 29 23:46:27 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 29 Nov 2013 22:46:27 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385759922.09.0.494088722247.issue19836@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: Here's an updated patch adding your echo server to the examples section. ---------- Added file: http://bugs.python.org/file32899/selectors_example-1.diff _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r a1a936a3b2f6 Doc/library/selectors.rst --- a/Doc/library/selectors.rst Fri Nov 29 18:57:47 2013 +0100 +++ b/Doc/library/selectors.rst Fri Nov 29 23:44:50 2013 +0100 @@ -210,33 +210,41 @@ :func:`select.kqueue` object. -Examples of selector usage:: +Examples +-------- - >>> import selectors - >>> import socket - >>> - >>> s = selectors.DefaultSelector() - >>> r, w = socket.socketpair() - >>> - >>> r.setblocking(False) - >>> w.setblocking(False) - >>> - >>> s.register(r, selectors.EVENT_READ) - SelectorKey(fileobj=, fd=4, events=1, data=None) - >>> s.register(w, selectors.EVENT_WRITE) - SelectorKey(fileobj=, fd=5, events=2, data=None) - >>> - >>> print(s.select()) - [(SelectorKey(fileobj=, fd=5, events=2, data=None), 2)] - >>> - >>> for key, events in s.select(): - ... if events & selectors.EVENT_WRITE: - ... key.fileobj.send(b'spam') - ... - 4 - >>> for key, events in s.select(): - ... if events & selectors.EVENT_READ: - ... print(key.fileobj.recv(1024)) - ... - b'spam' - >>> s.close() +Here is a simple echo server implementation:: + + import selectors + import socket + + + sel = selectors.DefaultSelector() + + def accept(sock, mask): + conn, addr = sock.accept() # Should be ready + print('accepted', conn, 'from', addr) + conn.setblocking(False) + sel.register(conn, selectors.EVENT_READ, read) + + def read(conn, mask): + data = conn.recv(1000) # Should be ready + if data: + print('echoing', repr(data), 'to', conn) + conn.send(data) # Hope it won't block + else: + print('closing', conn) + sel.unregister(conn) + conn.close() + + sock = socket.socket() + sock.bind(('localhost', 1234)) + sock.listen(100) + sock.setblocking(False) + sel.register(sock, selectors.EVENT_READ, accept) + + while True: + events = sel.select() + for key, mask in events: + callback = key.data + callback(key.fileobj, mask) From report at bugs.python.org Fri Nov 29 23:54:00 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Nov 2013 22:54:00 +0000 Subject: [issue19836] selectors: improve examples section In-Reply-To: <1385754735.32.0.742504427925.issue19836@psf.upfronthosting.co.za> Message-ID: <1385765640.48.0.373427632839.issue19836@psf.upfronthosting.co.za> Guido van Rossum added the comment: Committed: revision 2a679870d7d2. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 01:34:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 00:34:54 +0000 Subject: [issue19834] Unpickling exceptions pickled by Python 2 In-Reply-To: <1385740154.87.0.494742260047.issue19834@psf.upfronthosting.co.za> Message-ID: <1385771694.64.0.343509806141.issue19834@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Good catch! Would you like to provide a patch together with an added unit test? ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 01:52:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 00:52:21 +0000 Subject: [issue19833] asyncio: patches to document EventLoop and add more examples In-Reply-To: <1385738176.38.0.477367051955.issue19833@psf.upfronthosting.co.za> Message-ID: <1385772741.17.0.424704799614.issue19833@psf.upfronthosting.co.za> Antoine Pitrou added the comment: One reason I originally didn't add the class names to the methods is that I don't know if we want to document the inheritance hierarchy. Guido, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 03:30:45 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 30 Nov 2013 02:30:45 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module Message-ID: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> New submission from Nick Coghlan: In the Python 3 transition, we had to make a choice regarding whether we treated the JSON module as a text transform (with load[s] reading Unicode code points and dump[s] producing them), or as a text encoding (with load[s] reading binary sequences and dump[s] producing them). To minimise the changes to the module API, the decision was made to treat it as a text transform, with the text encoding handled externally. This API design decision doesn't appear to have worked out that well in the web development context, since JSON is typically encountered as a UTF-8 encoded wire protocol, not as already decoded text. It also makes the module inconsistent with most of the other modules that offer "dumps" APIs, as those *are* specifically about wire protocols (Python 3.4): >>> import json, marshal, pickle, plistlib, xmlrpc.client >>> json.dumps('hello') '"hello"' >>> marshal.dumps('hello') b'\xda\x05hello' >>> pickle.dumps('hello') b'\x80\x03X\x05\x00\x00\x00helloq\x00.' >>> plistlib.dumps('hello') b'\n\n\nhello\n\n' The only module with a dumps function that (like the json module) returns a string, is the XML-RPC client module: >>> xmlrpc.client.dumps(('hello',)) '\n\nhello\n\n\n' And that's nonsensical, since that XML-RPC API *accepts an encoding argument*, which it now silently ignores: >>> xmlrpc.client.dumps(('hello',), encoding='utf-8') '\n\nhello\n\n\n' >>> xmlrpc.client.dumps(('hello',), encoding='utf-16') '\n\nhello\n\n\n' I now believe that an "encoding" parameter should have been added to the json.dump API in the Py3k transition (defaulting to UTF-8), allowing all of the dump/load APIs in the standard library to be consistently about converting to and from a binary wire protocol. Unfortunately, I don't have a solution to offer at this point (since backwards compatibility concerns rule out the simple solution of just changing the return type). I just wanted to get it on record as a problem (and internal inconsistency within the standard library for dump/load protocols) with the current API. ---------- components: Library (Lib) messages: 204764 nosy: chrism, ncoghlan priority: normal severity: normal status: open title: Wire protocol encoding for the JSON module versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 03:35:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 30 Nov 2013 02:35:34 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1385778934.0.0.984543180776.issue19837@psf.upfronthosting.co.za> Nick Coghlan added the comment: The other simple solution would be to add b variants of the affected APIs. That's a bit ugly though, especially since it still has the problem of making it difficult to write correct cross-version code (although that problem is likely to exist regardless) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 03:54:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Nov 2013 02:54:33 +0000 Subject: [issue19731] Fix copyright footer In-Reply-To: <1385173768.12.0.946242825352.issue19731@psf.upfronthosting.co.za> Message-ID: <1385780073.77.0.887823301434.issue19731@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I first noted, 1990 is before the first release of Python in 1992, so that seemed to be too early. I think Marc-Andre's fix is good enough and should be applied. Victor, you want something weird? You can probably find technical books now copyrighted '2014'. Publishers sometime postdate (lie) so the book will not seem obsolete so soon. But is does not mean that it is not copyrighted (protected) now. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 04:15:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 03:15:22 +0000 Subject: [issue19595] Silently skipped test in test_winsound In-Reply-To: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> Message-ID: <3dWd4n1Fr1z7Lkj@mail.python.org> Roundup Robot added the comment: New changeset 30b3798782f1 by Zachary Ware in branch '2.7': Issue #19595: Re-enable a long-disabled test in test_winsound http://hg.python.org/cpython/rev/30b3798782f1 New changeset 63f3e8670fa6 by Zachary Ware in branch '3.3': Issue #19595: Re-enable a long-disabled test in test_winsound http://hg.python.org/cpython/rev/63f3e8670fa6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 04:17:03 2013 From: report at bugs.python.org (Zachary Ware) Date: Sat, 30 Nov 2013 03:17:03 +0000 Subject: [issue19595] Silently skipped test in test_winsound In-Reply-To: <1384462856.95.0.594659229823.issue19595@psf.upfronthosting.co.za> Message-ID: <1385781423.48.0.261244292321.issue19595@psf.upfronthosting.co.za> Zachary Ware added the comment: As long as the buildbots stay happy, this test is back to actually testing. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 04:25:54 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Nov 2013 03:25:54 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1385781954.76.0.439057459948.issue19737@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In my opinion, vague ideas like this one should go to python-ideas first. I agree with David that globals() and locals() are separate issues. Since there have been and perhaps still are locals() doc issues, I will take this one to be about 'globals()'. A 'symbol table' is a mapping between 'symbols' and 'values'. I presume such were originally implemented as a concrete list of pairs, but the term is now is an abstraction. In the Python context, I think 'namespace' would be a better word, but I would not make the change without getting other opinions, such as on python-ideas. The [...] that you omitted says "This is always the dictionary of the current module (...)." I cannot interpret 'is' to mean a copy. So I think "[concrete] dictionary represents [abstract] symbol table [namespace]" is fine. ---------- nosy: +terry.reedy versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 04:51:13 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 03:51:13 +0000 Subject: [issue9276] pickle should support methods In-Reply-To: <1279308320.41.0.159043379114.issue9276@psf.upfronthosting.co.za> Message-ID: <1385783473.87.0.54698517694.issue9276@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: As part of the implementation of PEP 3154 (Pickle protocol 4), I've introduced support for pickling methods for all pickle protocols (and not just for the new protocol 4). This was implemented by adding the appropriate __reduce__ method on built-in functions and methods. In addition, pickling methods in nested classes is now supported by protocol 4 through the use of the __qualname__ attribute. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 04:56:57 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Nov 2013 03:56:57 +0000 Subject: [issue19763] Make it easier to backport statistics to 2.7 In-Reply-To: <1385364696.32.0.708082450803.issue19763@psf.upfronthosting.co.za> Message-ID: <1385783817.15.0.77544227156.issue19763@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I too prefer to move in the direction of less back-compatibility constraint rather than more. If I had written the module, I would prefer the altered doctest as being less fragile and representation dependent. For 1 or 2 objects, I prefer the from form anyway. So yes to those from me. I am curious what Steven thinks, should he care to opine. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 05:12:50 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Nov 2013 04:12:50 +0000 Subject: [issue19808] IDLE applies syntax highlighting to user input in its shell In-Reply-To: <1385541762.06.0.369087004664.issue19808@psf.upfronthosting.co.za> Message-ID: <1385784770.74.0.176661332291.issue19808@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I checked and Idle does not color code the prompt. In 2.7, it only color-codes the response to input(prompt), which is eval-ed as Python code, but not the response to raw_input(prompt). (In 2.7, the code and input displayed raises SyntaxError.) So the bug in 3.3 and 3.4 is that 3.3 input is being treated like 2.7 input rather than like 2.7 raw_input. I suspect that we just need to find and delete the code that detects 'input()' and triggers highlighting. ---------- nosy: +terry.reedy type: -> behavior versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 05:16:36 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Nov 2013 04:16:36 +0000 Subject: [issue19833] asyncio: patches to document EventLoop and add more examples In-Reply-To: <1385738176.38.0.477367051955.issue19833@psf.upfronthosting.co.za> Message-ID: <1385784996.0.0.0229911268684.issue19833@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 05:23:18 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 04:23:18 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385785398.15.0.402426869966.issue19780@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: > Test data are too small, they all less than frame size. Ah, good point! It seems your patch helps when the reads are *very* slow and buffering is disabled. ### unpickle_file ### Min: 1.125320 -> 0.663367: 1.70x faster Avg: 1.237206 -> 0.701303: 1.76x faster Significant (t=30.77) Stddev: 0.12031 -> 0.02634: 4.5682x smaller That certainly is a nice improvement though that seems to be fairly narrow use case. With more normal read times, the improvement diminishes greatly: ### unpickle_file ### Min: 0.494841 -> 0.466837: 1.06x faster Avg: 0.540923 -> 0.511165: 1.06x faster Significant (t=4.10) Stddev: 0.03740 -> 0.03510: 1.0657x smaller ---------- Added file: http://bugs.python.org/file32900/unpickle_file_bench_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 05:47:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 04:47:26 +0000 Subject: [issue3693] Obscure array.array error message In-Reply-To: <1219801896.33.0.491668230509.issue3693@psf.upfronthosting.co.za> Message-ID: <3dWg715g3Lz7LjY@mail.python.org> Roundup Robot added the comment: New changeset 2c87d3944c7a by Alexandre Vassalotti in branch 'default': Issue #3693: Fix array obscure error message when given a str. http://hg.python.org/cpython/rev/2c87d3944c7a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 05:48:33 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 04:48:33 +0000 Subject: [issue3693] Obscure array.array error message In-Reply-To: <1219801896.33.0.491668230509.issue3693@psf.upfronthosting.co.za> Message-ID: <1385786913.02.0.998880548189.issue3693@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- assignee: -> alexandre.vassalotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 05:52:45 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 04:52:45 +0000 Subject: [issue13520] Patch to make pickle aware of __qualname__ In-Reply-To: <1322843353.56.0.297081736881.issue13520@psf.upfronthosting.co.za> Message-ID: <1385787165.67.0.953216662812.issue13520@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- assignee: -> alexandre.vassalotti resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> Implement PEP 3154 (pickle protocol 4) versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 05:54:14 2013 From: report at bugs.python.org (paul j3) Date: Sat, 30 Nov 2013 04:54:14 +0000 Subject: [issue11354] argparse: nargs could accept range of options count In-Reply-To: <1298911895.1.0.590272861033.issue11354@psf.upfronthosting.co.za> Message-ID: <1385787254.72.0.994392396984.issue11354@psf.upfronthosting.co.za> paul j3 added the comment: With a minor tweak to `argparse._is_mnrep()`, `nargs='{3}'` would also work. This means the same as `nargs=3`, so it isn't needed. But it is consistent with the idea of accepting Regular Expression syntax where it makes sense. `nargs='{2,3}?'` also works, though I think that's just the same as `nargs=2`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 06:07:31 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 05:07:31 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1385788051.23.0.536752070687.issue9269@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- assignee: -> alexandre.vassalotti resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> Implement PEP 3154 (pickle protocol 4) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 06:22:48 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 30 Nov 2013 05:22:48 +0000 Subject: [issue19728] PEP 453: enable pip by default in the Windows binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385788968.03.0.841831174573.issue19728@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm going to run with the approach of adding a private _uninstall function in ensurepip (that includes the version guard), and then a "python -m ensurepip._uninstall" submodule to invoke it from the command line. I'll also extend the with_pip test in test_venv to cover uninstallation (it won't be a venv feature, it's just a convenient way to test that the uninstall command actually does the right thing). ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 06:31:16 2013 From: report at bugs.python.org (Martin Panter) Date: Sat, 30 Nov 2013 05:31:16 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1385789476.96.0.199953999245.issue19737@psf.upfronthosting.co.za> Martin Panter added the comment: How about swapping the two sentences for globals() then: ?Returns the dictionary of the module . . . This represents the symbol table . . .? I thought the current locals() entry is fairly clear. It actually says _not_ to modify the dictionary! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 06:46:58 2013 From: report at bugs.python.org (yinkaisheng) Date: Sat, 30 Nov 2013 05:46:58 +0000 Subject: [issue19790] ctypes can't load a c++ dll if the dll calls COM on Windows 8 In-Reply-To: <1385447912.09.0.00620803320142.issue19790@psf.upfronthosting.co.za> Message-ID: <1385790418.31.0.48461526792.issue19790@psf.upfronthosting.co.za> yinkaisheng added the comment: http://support.microsoft.com/kb/305723 COM application hangs when you call CoCreateInstance from DllMain SYMPTOMS When you call the CoCreateInstance function from the DllMain function, the Component Object Model (COM) application hangs. CAUSE CoCreateInstance may start a thread that tries to call the DllMain function of all dynamic-link libraries (DLLs) that exist in the process by passing a DLL_THREAD_ATTACH value. Because the call originates from DllMain, and because DllMain is not a reentrant function, the call to CoCreateInstance never returns. RESOLUTION To resolve this problem, do not call CoCreateInstance from DllMain. You can move the call to an initialization function or to any other function that is called later. STATUS This behavior is by design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 07:07:37 2013 From: report at bugs.python.org (Martin Panter) Date: Sat, 30 Nov 2013 06:07:37 +0000 Subject: [issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable In-Reply-To: <1377807943.36.0.898364678904.issue18879@psf.upfronthosting.co.za> Message-ID: <1385791657.52.0.944441815349.issue18879@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 08:07:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 30 Nov 2013 07:07:17 +0000 Subject: [issue19789] Improve wording of how to "undo" a call to logging.disable(lvl) In-Reply-To: <1385442860.38.0.88263802784.issue19789@psf.upfronthosting.co.za> Message-ID: <1385795237.05.0.487924557624.issue19789@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 08:15:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 07:15:32 +0000 Subject: [issue19728] PEP 453: enable pip by default in the Windows binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <3dWkPv6qbMz7Ll4@mail.python.org> Roundup Robot added the comment: New changeset 7dc4bf283857 by Nick Coghlan in branch 'default': Issue #19728: add private ensurepip._uninstall CLI http://hg.python.org/cpython/rev/7dc4bf283857 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 08:22:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 30 Nov 2013 07:22:55 +0000 Subject: [issue19728] PEP 453: enable pip by default in the Windows binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385796175.33.0.948571152368.issue19728@psf.upfronthosting.co.za> Nick Coghlan added the comment: Running this command in the installer should now clean up pip and setuptools: python -m ensurepip._uninstall If pip is not installed, it silently does nothing. If pip is installed, but doesn't match ensurepip.version(), it throws RuntimeError. If pip is installed and is the expected version, it removes both pip and setuptools (there's no separate version check before removing setuptools) The tests in test_ensurepip are mocked out (to avoid any side effects on the test process), but test_venv now covers both installation and uninstallation (since it invokes a subprocess, thus avoiding the side effect problem). ---------- assignee: ncoghlan -> loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 08:30:44 2013 From: report at bugs.python.org (Ajitesh Gupta) Date: Sat, 30 Nov 2013 07:30:44 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <1385796644.95.0.714600897009.issue19683@psf.upfronthosting.co.za> Ajitesh Gupta added the comment: I have attached a patch. I deleted all the empty tests. ---------- keywords: +patch nosy: +ajitesh.gupta Added file: http://bugs.python.org/file32901/issue19683.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 08:34:18 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 30 Nov 2013 07:34:18 +0000 Subject: [issue19728] PEP 453: enable pip by default in the Windows binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <1385796858.05.0.946555108928.issue19728@psf.upfronthosting.co.za> Ned Deily added the comment: Looks like the buildbots are complaining, for example: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/3300/steps/test/logs/stdio ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_venv.py", line 342, in test_with_pip self.assertEqual(err, "") AssertionError: '/tmp/tmp0hm1zng7/bin/python: No module named ensurepip._uninstall\n' != '' - /tmp/tmp0hm1zng7/bin/python: No module named ensurepip._uninstall ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 08:45:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 07:45:21 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> Message-ID: <3dWl4J6DmDz7Lkw@mail.python.org> Roundup Robot added the comment: New changeset 04088790c077 by Nick Coghlan in branch 'default': Issue #19726: actually running 'hg add' helps... http://hg.python.org/cpython/rev/04088790c077 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 09:35:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 08:35:45 +0000 Subject: [issue19728] PEP 453: enable pip by default in the Windows binary installers In-Reply-To: <1385171243.96.0.0357035720605.issue19728@psf.upfronthosting.co.za> Message-ID: <3dWmBS5vxCz7LkR@mail.python.org> Roundup Robot added the comment: New changeset a0ec33efa743 by Nick Coghlan in branch 'default': Issue #19728: don't be sensitive to line endings http://hg.python.org/cpython/rev/a0ec33efa743 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 09:37:36 2013 From: report at bugs.python.org (Rhonda Parker) Date: Sat, 30 Nov 2013 08:37:36 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> Message-ID: <1385800656.94.0.415104884753.issue19726@psf.upfronthosting.co.za> Rhonda Parker added the comment: T0 the people that manipulate universe of linux and unix based protocol should take in consideration when people skilled programming introduce downloads and install protocol to those unskilled in the like because it only creates a disassociation resulting in the majority to lean towards those who capitalize on the ignorant, creating products for the simple minded at the price of integrity and freedom to those who are swayed to such ends. I just wish linux snobs would understand that so many are behind them. They just have to open there arms and accept the ignorant... Just to explain my rant, I have 8 different programs to install to make one program to work and all but python and one other are simple and currently inastalled. All so my 2 year old can play games... ---------- nosy: +Rhonda.Parker versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 09:44:09 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sat, 30 Nov 2013 08:44:09 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS Message-ID: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> New submission from Claudiu.Popa: Hi! test_touch_common fails when using 8.3-STABLE FreeBSD 8.3-STABLE and Python 3.4.0b1 (default:a0ec33efa743+, Nov 30 2013, 10:36:58). Here are the tracebacks: ====================================================================== FAIL: test_touch_common (test.test_pathlib.PathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tank/libs/cpython/Lib/test/test_pathlib.py", line 1402, in test_touch_common self.assertGreaterEqual(st.st_mtime_ns, old_mtime_ns) AssertionError: 1385800632000000000 not greater than or equal to 1385800632871814968 ====================================================================== FAIL: test_touch_common (test.test_pathlib.PosixPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tank/libs/cpython/Lib/test/test_pathlib.py", line 1402, in test_touch_common self.assertGreaterEqual(st.st_mtime_ns, old_mtime_ns) AssertionError: 1385800633000000000 not greater than or equal to 1385800633042814928 ---------------------------------------------------------------------- Ran 319 tests in 0.368s FAILED (failures=2, skipped=85) test test_pathlib failed 1 test failed: test_pathlib This issue seems to be related with issue15745. ---------- components: Tests messages: 204786 nosy: Claudiu.Popa priority: normal severity: normal status: open title: test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 09:45:24 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 08:45:24 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> Message-ID: <1385801124.86.0.522768157765.issue19726@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- Removed message: http://bugs.python.org/msg204785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 09:52:47 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 08:52:47 +0000 Subject: [issue19828] test_site fails with -S flag In-Reply-To: <1385719351.7.0.144059286508.issue19828@psf.upfronthosting.co.za> Message-ID: <1385801567.48.0.275549312067.issue19828@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 1674555, which aims to make test_site run without -S and everything else run with -S. I think this issue is invalid, if I understand what you wrote correctly, since test_site *should* be reported as a skipped test if -S is specified. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 09:54:40 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 08:54:40 +0000 Subject: [issue19830] test_poplib emits resource warning In-Reply-To: <1385722372.69.0.175458653403.issue19830@psf.upfronthosting.co.za> Message-ID: <1385801680.38.0.165715410278.issue19830@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 10:03:59 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 30 Nov 2013 09:03:59 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> Message-ID: <1385802239.66.0.740867412272.issue19838@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 10:06:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 09:06:15 +0000 Subject: [issue19088] TypeError with pickle in embedded python3.3 when starting multiple Interpreters. In-Reply-To: <1380118274.37.0.850286724138.issue19088@psf.upfronthosting.co.za> Message-ID: <3dWmsf45Xhz7Lkx@mail.python.org> Roundup Robot added the comment: New changeset 96d1207d33d0 by Alexandre Vassalotti in branch '3.3': Issue #19088: Fix incorrect caching of the copyreg module. http://hg.python.org/cpython/rev/96d1207d33d0 New changeset 1ceb6f84b617 by Alexandre Vassalotti in branch 'default': Issue #19088: Merge with 3.3. http://hg.python.org/cpython/rev/1ceb6f84b617 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 10:06:55 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sat, 30 Nov 2013 09:06:55 +0000 Subject: [issue10203] sqlite3.Row doesn't support sequence protocol In-Reply-To: <1288120293.93.0.799619941752.issue10203@psf.upfronthosting.co.za> Message-ID: <1385802415.54.0.269299372998.issue10203@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hello! Here's a simple patch which makes sqlite.Row to act like a real sequence. ---------- keywords: +patch nosy: +Claudiu.Popa versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file32902/sqlite1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 10:07:48 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 30 Nov 2013 09:07:48 +0000 Subject: [issue11854] __or__ et al instantiate subclass of set without calling __init__ In-Reply-To: <1302931795.31.0.443472549499.issue11854@psf.upfronthosting.co.za> Message-ID: <1385802468.9.0.0715866646103.issue11854@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing. This isn't likely to change in Python 2.7. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 10:11:05 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 09:11:05 +0000 Subject: [issue19088] TypeError with pickle in embedded python3.3 when starting multiple Interpreters. In-Reply-To: <1380118274.37.0.850286724138.issue19088@psf.upfronthosting.co.za> Message-ID: <1385802665.68.0.815268772307.issue19088@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- assignee: -> alexandre.vassalotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 10:23:15 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 30 Nov 2013 09:23:15 +0000 Subject: [issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data In-Reply-To: <1384766600.77.0.898971015118.issue19638@psf.upfronthosting.co.za> Message-ID: <1385803395.73.0.66417364526.issue19638@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 10:56:35 2013 From: report at bugs.python.org (Peter Otten) Date: Sat, 30 Nov 2013 09:56:35 +0000 Subject: [issue19808] IDLE applies syntax highlighting to user input in its shell In-Reply-To: <1385541762.06.0.369087004664.issue19808@psf.upfronthosting.co.za> Message-ID: <1385805395.0.0.137548563839.issue19808@psf.upfronthosting.co.za> Peter Otten added the comment: I think the prompt can easily be treated differently because it is written to stderr. I don't see a difference for user input between input() and raw_input() on Linux with Python 2.7.2+ -- syntax-highlighting is applied to both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 10:59:23 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 30 Nov 2013 09:59:23 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: Could someone with a dual-core machine try the attached simplistic benchmark with and without Victor's patch? I can see some user-time difference with 'time' on my single-core machine, but I'm curious to see how this would affect things were both the parent and the child subprocess can run concurrently. ---------- Added file: http://bugs.python.org/file32903/test_sub.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- import subprocess from time import perf_counter as time DATA = b'x' * 200 * 1024**2 p = subprocess.Popen(['cat'], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE) t = time() p.communicate(DATA) print(time() - t) From report at bugs.python.org Sat Nov 30 11:16:59 2013 From: report at bugs.python.org (Fabio Erculiani) Date: Sat, 30 Nov 2013 10:16:59 +0000 Subject: [issue19839] bz2: regression wrt supporting files with trailing garbage after EOF Message-ID: <1385806619.04.0.329117891617.issue19839@psf.upfronthosting.co.za> New submission from Fabio Erculiani: In Sabayon Linux and Gentoo Linux, distro package metadata is appended at the end of bz2 files. Python 2.7, 3.1, 3.2 bz2 modules were handling the following attached file just fine, trailing garbage was simply ignored like the bunzip2 utility does. example test code: f = bz2.BZ2File(path, mode="rb") data = f.read(1024) while data: data = f.read(1024) f.close() The following code doesn't work with Python 3.3.3 anymore, at some point I receive the following exception (that comes from the bz2 module C code): File "/usr/lib64/python3.3/bz2.py", line 278, in read return self._read_block(size) File "/usr/lib64/python3.3/bz2.py", line 239, in _read_block while n > 0 and self._fill_buffer(): File "/usr/lib64/python3.3/bz2.py", line 203, in _fill_buffer self._buffer = self._decompressor.decompress(rawblock) OSError: Invalid data stream Please restore the compatibility with bz2 files with trailing garbage after EOF. ---------- components: Library (Lib) files: sys-libs:zlib-1.2.3-r1~1.tbz2 messages: 204793 nosy: Fabio.Erculiani priority: normal severity: normal status: open title: bz2: regression wrt supporting files with trailing garbage after EOF versions: Python 3.3 Added file: http://bugs.python.org/file32904/sys-libs:zlib-1.2.3-r1~1.tbz2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 11:17:10 2013 From: report at bugs.python.org (Fabio Erculiani) Date: Sat, 30 Nov 2013 10:17:10 +0000 Subject: [issue19839] bz2: regression wrt supporting files with trailing garbage after EOF In-Reply-To: <1385806619.04.0.329117891617.issue19839@psf.upfronthosting.co.za> Message-ID: <1385806630.69.0.306470009729.issue19839@psf.upfronthosting.co.za> Changes by Fabio Erculiani : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 11:18:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 10:18:45 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> Message-ID: <1385806725.76.0.564641489055.issue19838@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't really know what to do with this. I think you'll have to investigate a bit and find out exactly what happens during the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 11:19:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 10:19:59 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> Message-ID: <1385806799.82.0.924487912531.issue19838@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As a data point, if not for ZFS, test_pathlib passes on FreeBSD 6.4: http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/4261/steps/test/logs/stdio and FreeBSD 7.2: http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/4731/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 11:35:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 10:35:25 +0000 Subject: [issue19088] TypeError with pickle in embedded python3.3 when starting multiple Interpreters. In-Reply-To: <1380118274.37.0.850286724138.issue19088@psf.upfronthosting.co.za> Message-ID: <1385807725.85.0.19226502908.issue19088@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the fix. Perhaps you could have added some tests for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 11:35:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 10:35:46 +0000 Subject: [issue19839] bz2: regression wrt supporting files with trailing garbage after EOF In-Reply-To: <1385806619.04.0.329117891617.issue19839@psf.upfronthosting.co.za> Message-ID: <1385807746.24.0.0298194563454.issue19839@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +nadeem.vawda, serhiy.storchaka type: crash -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 11:40:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 10:40:53 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1385808053.87.0.706421889845.issue19506@psf.upfronthosting.co.za> Antoine Pitrou added the comment: On a quad-core machine: - without Victor's patch: $ time ./python test_sub.py 0.39263957000002847 real 0m0.521s user 0m0.412s sys 0m0.238s - with Victor's patch: $ time ./python test_sub.py 0.3856174530001226 real 0m0.516s user 0m0.404s sys 0m0.247s ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 11:43:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 10:43:42 +0000 Subject: [issue19780] Pickle 4 frame headers optimization In-Reply-To: <1385416509.02.0.493465582704.issue19780@psf.upfronthosting.co.za> Message-ID: <1385808222.13.0.713754165149.issue19780@psf.upfronthosting.co.za> Antoine Pitrou added the comment: While the speedup may be nice, I still don't think this optimization complies with the protocol definition in the PEP, so I would like to reject this patch. ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:07:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 11:07:07 +0000 Subject: [issue10976] json.loads() raises TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1385809627.03.0.375110929001.issue10976@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:07:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 11:07:13 +0000 Subject: [issue17909] Autodetecting JSON encoding In-Reply-To: <1367759430.76.0.988181674037.issue17909@psf.upfronthosting.co.za> Message-ID: <1385809633.72.0.301559562718.issue17909@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:07:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 11:07:56 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1385809676.22.0.895252841662.issue19837@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Still, JSON itself is not a wire protocol; HTTP is. http://www.json.org states that "JSON is a text format" and the grammar description talks "UNICODE characters", not bytes. The ECMA spec states that "JSON text is a sequence of Unicode code points". RFC 4627 is a bit more affirmative, though, and says that "JSON text SHALL be encoded in Unicode [sic]. The default encoding is UTF-8". Related issues: - issue #10976: json.loads() raises TypeError on bytes object - issue #17909 (+ patch!): autodetecting JSON encoding > The other simple solution would be to add b variants of the affected APIs. "dumpb" is not very pretty and can easily be misread as "dumb" :-) "dump_bytes" looks better to me. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:09:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 11:09:34 +0000 Subject: [issue19506] subprocess.communicate() should use a memoryview In-Reply-To: <1383683686.87.0.96753537873.issue19506@psf.upfronthosting.co.za> Message-ID: <1385809774.64.0.738883993997.issue19506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Best of 10 runs. Unpatched: 3.91057508099766 Patched: 3.86466505300632 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:13:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 11:13:07 +0000 Subject: [issue19726] BaseProtocol is not an ABC In-Reply-To: <1385163499.31.0.337273163062.issue19726@psf.upfronthosting.co.za> Message-ID: <1385809987.78.0.201560199836.issue19726@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Well, it *is* abstract because it has no implementations and all the > methods raise NotImplementedError. Hmm, actually, the methods don't raise NotImplementedError, they just have default empty implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:13:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 11:13:40 +0000 Subject: [issue19830] test_poplib emits resource warning In-Reply-To: <1385722372.69.0.175458653403.issue19830@psf.upfronthosting.co.za> Message-ID: <1385810020.73.0.812376802493.issue19830@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also http://permalink.gmane.org/gmane.comp.python.devel/143803 in which Victor had found a place of the leak. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:16:54 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 30 Nov 2013 11:16:54 +0000 Subject: [issue19789] Improve wording of how to "undo" a call to logging.disable(lvl) In-Reply-To: <1385442860.38.0.88263802784.issue19789@psf.upfronthosting.co.za> Message-ID: <1385810214.77.0.833138333397.issue19789@psf.upfronthosting.co.za> Vinay Sajip added the comment: It's not the docstring in the code, it's the actual documentation. I propose to change it so that the documentation for disable will read: Provides an overriding level *lvl* for all loggers which takes precedence over the logger's own level. When the need arises to temporarily throttle logging output down across the whole application, this function can be useful. Its effect is to disable all logging calls of severity *lvl* and below, so that if you call it with a value of INFO, then all INFO and DEBUG events would be discarded, whereas those of severity WARNING and above would be processed according to the logger's effective level. If ``logging.disable(logging.NOTSET)`` is called, it effectively removes this overriding level, so that logging output again depends on the effective levels of individual loggers. Please confirm if this is still not clear enough, otherwise I will commit this in a day or two and close the issue. ---------- versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:50:31 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 11:50:31 +0000 Subject: [issue19839] bz2: regression wrt supporting files with trailing garbage after EOF In-Reply-To: <1385806619.04.0.329117891617.issue19839@psf.upfronthosting.co.za> Message-ID: <1385812231.9.0.111274830161.issue19839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: decompress() is affected too. >>> import bz2 >>> bz2.decompress(bz2.compress(b'abcd') + b'xyz') Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/bz2.py", line 505, in decompress results.append(decomp.decompress(data)) OSError: Invalid data stream On 3.2 it returns b'abcd'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 12:59:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 11:59:43 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1385812783.77.0.778702267893.issue19837@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I propose close this issue as a duplicate of issue10976. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 13:24:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 12:24:28 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <1385814268.19.0.250982341618.issue19683@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Rather than removing these empty tests it will be better implement them. Otherwise we can accidentally break the code. I see a lot of empty tests on 3.x. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 13:30:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 12:30:48 +0000 Subject: [issue19808] IDLE applies syntax highlighting to user input in its shell In-Reply-To: <1385541762.06.0.369087004664.issue19808@psf.upfronthosting.co.za> Message-ID: <1385814648.85.0.552438158391.issue19808@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 14:05:40 2013 From: report at bugs.python.org (zodalahtathi) Date: Sat, 30 Nov 2013 13:05:40 +0000 Subject: [issue19840] The is no way to tell shutil.move to ignore metadata Message-ID: <1385816740.15.0.284400453847.issue19840@psf.upfronthosting.co.za> New submission from zodalahtathi: shutil.move sometimes fail when the underlining filesystem has limitations. Here is a part of a stacktrace I'm getting : File "/usr/local/lib/python3.3/shutil.py", line 534, in move copy2(src, real_dst) File "/usr/local/lib/python3.3/shutil.py", line 244, in copy2 copystat(src, dst, follow_symlinks=follow_symlinks) File "/usr/local/lib/python3.3/shutil.py", line 192, in copystat lookup("chmod")(dst, mode, follow_symlinks=follow) OSError: [Errno 38] This behaviour is expected because shutil.move uses shutil.copy2 under the hood to copy file data and metadata. However there is no way to tell shutil.move to use shutil.copy and to ignore metadata. Maybe a new copy_metadata parameter (defaulting to True) or copy_function (like in shutil.copytree) would be an elegant solution? ---------- components: Library (Lib) messages: 204807 nosy: zodalahtathi priority: normal severity: normal status: open title: The is no way to tell shutil.move to ignore metadata type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 14:16:59 2013 From: report at bugs.python.org (Ivailo Monev) Date: Sat, 30 Nov 2013 13:16:59 +0000 Subject: [issue19841] ConfigParser PEP issues Message-ID: <1385817419.05.0.067066998342.issue19841@psf.upfronthosting.co.za> New submission from Ivailo Monev: There are a few PEP violations like namespace clashes, the attached patch fixes some of them thus solving a problem for me where shared library build with Nuitka segmentation faults. The patch does not make the code backwards compatible with the vars and map arguments renames as there is no way to do that and maybe the new variable names, vvars and mmap are not appropriate but you can roll your own patch with the same idea. Cheers! ---------- components: Library (Lib) files: ConfigParser.patch keywords: patch messages: 204808 nosy: Ivailo.Monev priority: normal severity: normal status: open title: ConfigParser PEP issues versions: Python 2.7 Added file: http://bugs.python.org/file32905/ConfigParser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 14:44:36 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 30 Nov 2013 13:44:36 +0000 Subject: [issue19842] selectors: refactor BaseSelector implementation Message-ID: <1385819076.05.0.513809645025.issue19842@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: Initially, BaseSelector was simply designed as the base implementation used by concrete ones like SelectSelector & Co. Then BaseSelector evolved to be an ABC, but the problem is that it's really not usable as such: the register() and unregister() methods are not abstract, and instead store the fileobj -> key association in a private dictionary (_fd_to_key). Since this attribute is private, it cannot be used by third-party selectors implementation which might want to implement the ABC. Also, such implementations might not want to use a dictionay internally, and generally, inheritance should be avoided in this type of situations (since it breaks encapsulation). In short, BaseSelector mixes up the type definition (ABC) and base implementation, which cannot be reused by subclasses anyway. The attached patch cleans things up by making BaseSelector.{register,unregister,get_map} methods abstract (raising NotImplementedError by default). Together with select(), those methods are the bare minimum that a conform selector implementation should provide. get_key() still has a default implementation (atop get_map()), and so does modify() (atop register()/unregister()). The concrete base implementation (on top of which are built SelectSelector & friends) is moved in a private _BaseSelectorImpl. I think that's a cleaner design. The only problem is that it makes some methods abstract, so I had to update test_telnetlib and asyncio/test_utils because they are implementing BaseSelector for mock tests. BTW, is there a consensus on ABC names? Like AbstractSelector vs BaseSelector? ---------- components: Library (Lib) files: selectors_base_impl.diff keywords: needs review, patch messages: 204809 nosy: gvanrossum, neologix, pitrou priority: normal severity: normal stage: patch review status: open title: selectors: refactor BaseSelector implementation type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file32906/selectors_base_impl.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 15:06:01 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 30 Nov 2013 14:06:01 +0000 Subject: [issue10976] json.loads() raises TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1385820361.46.0.742716891009.issue10976@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 19837 is the complementary problem on the serialisation side - users migrating from Python 2 are accustomed to being able to use the json module directly as a wire protocol module, but the strict Python 3 interpretation as a text transform means that isn't possible - you have to apply the text encoding step separately. What appears to have happened is that the way JSON is used in practice has diverged from JSON as a formal spec. Formal spec (this is what the Py3k JSON module implements, and Py2 implements with ensure_ascii=False): JSON is a Unicode text transform, which may optionally be serialised as UTF-8, UTF-16 or UTF-32. Practice (what the Py2 JSON module implements with ensure_ascii=True, and what is covered in RFC 4627): JSON is a UTF-8 encoded wire protocol So now we're left with the options: - try to tweak the existing json APIs to handle both the str<->str and str<->bytes use cases (ugly) - add new APIs within the existing json module - add a new "jsonb" module, which dumps to UTF-8 encoded bytes, and reads from UTF-8, UTF-16 or UTF-32 encoded bytes in accordance with RFC 4627 (but being more tolerant in terms of what is allowed at the top level) I'm currently leaning towards the "jsonb" module option, and deprecating the "encoding" argument in the pure text version. It's not pretty, but I think it's better than the alternatives. ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 15:08:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 30 Nov 2013 14:08:10 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1385820490.44.0.798282534837.issue19837@psf.upfronthosting.co.za> Nick Coghlan added the comment: Not sure yet if we should merge the two issues, although they're the serialisation and deserialisation sides of the same problem. Haskell seems to have gone with the approach of a separate "jsonb" API for the case where you want the wire protocol behaviour, such a solution may work for us as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 15:09:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 14:09:49 +0000 Subject: [issue19842] selectors: refactor BaseSelector implementation In-Reply-To: <1385819076.05.0.513809645025.issue19842@psf.upfronthosting.co.za> Message-ID: <1385820589.57.0.0293902477311.issue19842@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm wondering, is there a reason we made BaseSelector a public API? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 15:37:51 2013 From: report at bugs.python.org (koobs) Date: Sat, 30 Nov 2013 14:37:51 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> Message-ID: <1385822271.97.0.858841109426.issue19838@psf.upfronthosting.co.za> koobs added the comment: Is this similar/related to #15745? I took both of my buildbots (koobs-freebsd9, koobs-freebsd10) off ZFS until it could be resolved ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 15:39:01 2013 From: report at bugs.python.org (koobs) Date: Sat, 30 Nov 2013 14:39:01 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> Message-ID: <1385822341.22.0.971180670612.issue19838@psf.upfronthosting.co.za> koobs added the comment: Sorry Claudiu I missed the issue reference in your comment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 15:41:42 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sat, 30 Nov 2013 14:41:42 +0000 Subject: [issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS In-Reply-To: <1385801049.84.0.483097954762.issue19838@psf.upfronthosting.co.za> Message-ID: <1385822502.69.0.794433210746.issue19838@psf.upfronthosting.co.za> Claudiu.Popa added the comment: I believe it's similar, both test_os and test_pathlib fails when executed from within a ZFS container. I checked, I did a fresh checkout of Python inside a normal directory and run the tests there, they ran without problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:09:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 30 Nov 2013 15:09:57 +0000 Subject: [issue18885] handle EINTR in the stdlib In-Reply-To: <1377874955.28.0.258891288899.issue18885@psf.upfronthosting.co.za> Message-ID: <1385824197.77.0.819212631731.issue18885@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Alright, here's a first step: select/poll/epoll/etc now return empty lists/tuples upon EINTR. This comes with tests (note that all those tests could probably be factored, but that's another story). ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file32907/select_eintr.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:14:20 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 30 Nov 2013 15:14:20 +0000 Subject: [issue19842] selectors: refactor BaseSelector implementation In-Reply-To: <1385820589.57.0.0293902477311.issue19842@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I'm wondering, is there a reason we made BaseSelector a public API? The idead was to have an ABC so that users can implement their own selector, and pass it to e.g. asyncio or anything alse expecting a selector. Other than that, the only use is as a documentation (i.e. to show which methods are supported by all selectors implementations). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:16:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 15:16:50 +0000 Subject: [issue16404] Uses of PyLong_FromLong that don't check for errors In-Reply-To: <1352041027.23.0.922968343734.issue16404@psf.upfronthosting.co.za> Message-ID: <1385824610.34.0.708107213025.issue16404@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. arraymodule.c is already fixed. Instead I found other bug in sysmodule.c. I'm not sure about extending.rst, PyLong_FromLong(0L) should never fail if NSMALLNEGINTS + NSMALLPOSINTS > 0. ---------- keywords: +patch stage: needs patch -> patch review versions: -Python 3.2 Added file: http://bugs.python.org/file32908/issue16404.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:17:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 15:17:19 +0000 Subject: [issue19842] selectors: refactor BaseSelector implementation In-Reply-To: Message-ID: <1385824636.2331.3.camel@fsol> Antoine Pitrou added the comment: > The idead was to have an ABC so that users can implement their own > selector, and pass it to e.g. asyncio or anything alse expecting a > selector. > Other than that, the only use is as a documentation (i.e. to show > which methods are supported by all selectors implementations). The problem for documentation use is that we're christening it as an official API, and thus it becomes more difficult to refactor the inheritance hierarchy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:22:30 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 30 Nov 2013 15:22:30 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1385824950.66.0.588181146543.issue19837@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:23:24 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 30 Nov 2013 15:23:24 +0000 Subject: [issue19842] selectors: refactor BaseSelector implementation In-Reply-To: <1385824636.2331.3.camel@fsol> Message-ID: Charles-Fran?ois Natali added the comment: > The problem for documentation use is that we're christening it as an > official API, and thus it becomes more difficult to refactor the > inheritance hierarchy. So what would you suggest? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:28:05 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Nov 2013 15:28:05 +0000 Subject: [issue19842] selectors: refactor BaseSelector implementation In-Reply-To: Message-ID: <1385825283.2331.6.camel@fsol> Antoine Pitrou added the comment: > > The problem for documentation use is that we're christening it as an > > official API, and thus it becomes more difficult to refactor the > > inheritance hierarchy. > > So what would you suggest? Hmmm... Well I guess your proposal makes sense :-) Aka. having a documented ABC, and then a private base implementation. Otherwise, you can also document the methods without saying precisely to which class they belong, which I started doing on asyncio, but apparently it confuses some people. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:39:23 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 30 Nov 2013 15:39:23 +0000 Subject: [issue18643] implement socketpair() on Windows In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: Here's a patch adding socketpair to test.support. This version has been used in test_selectors for quite some time now, and would probably be useful for other tests as well. ---------- Added file: http://bugs.python.org/file32909/socketpair-1.diff _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r a1a936a3b2f6 Lib/test/support/__init__.py --- a/Lib/test/support/__init__.py Fri Nov 29 18:57:47 2013 +0100 +++ b/Lib/test/support/__init__.py Sat Nov 30 16:35:41 2013 +0100 @@ -90,6 +90,7 @@ "is_jython", "check_impl_detail", # network "HOST", "IPV6_ENABLED", "find_unused_port", "bind_port", "open_urlresource", + "socketpair", # processes 'temp_umask', "reap_children", # logging @@ -610,6 +611,31 @@ port = sock.getsockname()[1] return port +if hasattr(socket, 'socketpair'): + socketpair = socket.socketpair +else: + def socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0): + """Ad-hoc socketpair implementation.""" + if family != socket.AF_INET: + raise ValueError("Invalid family: {r}".format(family)) + + with socket.socket(family, type, proto) as l: + l.bind((HOST, 0)) + l.listen(16) + c = socket.socket(family, type, proto) + try: + c.connect(l.getsockname()) + caddr = c.getsockname() + while True: + a, addr = l.accept() + # check that we've got the correct client + if addr == caddr: + return c, a + a.close() + except error: + c.close() + raise + def _is_ipv6_enabled(): """Check whether IPv6 is enabled on this host.""" if socket.has_ipv6: diff -r a1a936a3b2f6 Lib/test/test_support.py --- a/Lib/test/test_support.py Fri Nov 29 18:57:47 2013 +0100 +++ b/Lib/test/test_support.py Sat Nov 30 16:35:41 2013 +0100 @@ -89,6 +89,17 @@ s.listen(1) s.close() + def test_socketpair(self): + c, s = support.socketpair() + self.addCleanup(c.close) + self.addCleanup(s.close) + c.send(b'spam') + self.assertEqual(b'spam', s.recv(1024)) + s.send(b'foo') + self.assertEqual(b'foo', c.recv(1024)) + c.close() + self.assertFalse(s.recv(1024)) + # Tests for temp_dir() def test_temp_dir(self): From report at bugs.python.org Sat Nov 30 16:39:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 15:39:26 +0000 Subject: [issue16404] Uses of PyLong_FromLong that don't check for errors In-Reply-To: <1352041027.23.0.922968343734.issue16404@psf.upfronthosting.co.za> Message-ID: <1385825966.05.0.128347184161.issue16404@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file32908/issue16404.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:40:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 15:40:15 +0000 Subject: [issue16404] Uses of PyLong_FromLong that don't check for errors In-Reply-To: <1352041027.23.0.922968343734.issue16404@psf.upfronthosting.co.za> Message-ID: <1385826015.12.0.722056580734.issue16404@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: -Documentation, Interpreter Core Added file: http://bugs.python.org/file32910/issue16404.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:43:44 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 30 Nov 2013 15:43:44 +0000 Subject: [issue19842] selectors: refactor BaseSelector implementation In-Reply-To: <1385819076.05.0.513809645025.issue19842@psf.upfronthosting.co.za> Message-ID: <1385826224.9.0.0239304661509.issue19842@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:51:43 2013 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Sat, 30 Nov 2013 15:51:43 +0000 Subject: [issue19834] Unpickling exceptions pickled by Python 2 In-Reply-To: <1385740154.87.0.494742260047.issue19834@psf.upfronthosting.co.za> Message-ID: <1385826703.31.0.12440827185.issue19834@psf.upfronthosting.co.za> Walter D?rwald added the comment: OK, here is a patch. Instead of mapping the exceptions module to builtins, it does the mapping for each exception class separately. I've excluded StandardError, because I think there's no appropriate equivalent in Python 3. ---------- keywords: +patch Added file: http://bugs.python.org/file32911/python-2-exception-pickling.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 16:53:33 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 30 Nov 2013 15:53:33 +0000 Subject: [issue19843] Wait for multiple sub-processes to terminate Message-ID: <1385826813.77.0.0339260517434.issue19843@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': I recently implemented this in psutil and thought it would have been a nice addition for subprocess module as well: https://code.google.com/p/psutil/issues/detail?id=440 Patch in attachment introduces a new subprocess.wait_procs() utility function which waits for multiple processes (Popen instances) to terminate. The use case this covers is quote common: send SIGTERM to a list of processes, wait for them to terminate, send SIGKILL as last resort: >>> def on_terminate(proc): ... print("process {} terminated".format(proc)) ... >>> for p in procs: ... p.terminate() ... >>> gone, still_alive = wait_procs(procs, timeout=3, callback=on_terminate) >>> for p in still_alive: ... p.kill() Are we still in time for Python 3.4? ---------- files: wait_procs.patch keywords: patch messages: 204824 nosy: giampaolo.rodola priority: normal severity: normal status: open title: Wait for multiple sub-processes to terminate versions: Python 3.4 Added file: http://bugs.python.org/file32912/wait_procs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 17:31:34 2013 From: report at bugs.python.org (koobs) Date: Sat, 30 Nov 2013 16:31:34 +0000 Subject: [issue18885] handle EINTR in the stdlib In-Reply-To: <1377874955.28.0.258891288899.issue18885@psf.upfronthosting.co.za> Message-ID: <1385829094.73.0.0693507532653.issue18885@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 17:56:21 2013 From: report at bugs.python.org (Hanz Kanst) Date: Sat, 30 Nov 2013 16:56:21 +0000 Subject: [issue19844] os.path.split fails on windows path Message-ID: <1385830581.12.0.81004283625.issue19844@psf.upfronthosting.co.za> Changes by Hanz Kanst : ---------- components: Windows nosy: Hanz priority: normal severity: normal status: open title: os.path.split fails on windows path type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 17:57:19 2013 From: report at bugs.python.org (klappnase) Date: Sat, 30 Nov 2013 16:57:19 +0000 Subject: [issue17397] ttk::themes missing from ttk.py In-Reply-To: <1363005797.61.0.988966555267.issue17397@psf.upfronthosting.co.za> Message-ID: <1385830639.39.0.00538704608854.issue17397@psf.upfronthosting.co.za> klappnase added the comment: > What is your real name? Michael Lange > What should I add in the Misc/ACKS file? Hmm, personally I'd prefer the nick, but it seems to be common practice to use the real name; I think I'll leave it to you ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 18:06:09 2013 From: report at bugs.python.org (Hanz Kanst) Date: Sat, 30 Nov 2013 17:06:09 +0000 Subject: [issue19844] os.path.split fails on windows path Message-ID: <1385831169.77.0.484147832993.issue19844@psf.upfronthosting.co.za> New submission from Hanz Kanst: os.path.split fails on windows path to reproduce in python 3.3: file = "C:\progs\python\test\target\Amy Winehouse\Amy Winehouse - Back To Black (2006)\01 - Rehab.ogg" os.path.split(os.path.abspath(file))[0] returns 'C:\\progs\\python\testordner\target\\Amy Winehouse' and os.path.split(os.path.abspath(file))[1] returns 'Amy Winehouse - Back To Black (2006)\x01 - Rehab.ogg' According to the definition the tail should never contain a tail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 18:07:32 2013 From: report at bugs.python.org (Hanz Kanst) Date: Sat, 30 Nov 2013 17:07:32 +0000 Subject: [issue19844] os.path.split fails on windows path In-Reply-To: <1385831169.77.0.484147832993.issue19844@psf.upfronthosting.co.za> Message-ID: <1385831252.69.0.630131262112.issue19844@psf.upfronthosting.co.za> Hanz Kanst added the comment: According to the definition the tail should never contain a slash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 18:14:15 2013 From: report at bugs.python.org (SilentGhost) Date: Sat, 30 Nov 2013 17:14:15 +0000 Subject: [issue19844] os.path.split fails on windows path In-Reply-To: <1385831169.77.0.484147832993.issue19844@psf.upfronthosting.co.za> Message-ID: <1385831655.09.0.0785162593198.issue19844@psf.upfronthosting.co.za> SilentGhost added the comment: file must be a raw string: file = r'C:\progs\python' Then everthing works. ---------- nosy: +SilentGhost resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 18:16:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 17:16:16 +0000 Subject: [issue17397] ttk::themes missing from ttk.py In-Reply-To: <1363005797.61.0.988966555267.issue17397@psf.upfronthosting.co.za> Message-ID: <1385831776.27.0.309431214271.issue17397@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Now CPython trunk in feature freeze stage until 3.4 realease. So we should wait several months before commit this patch. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 18:18:50 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 30 Nov 2013 17:18:50 +0000 Subject: [issue19844] os.path.split fails on windows path In-Reply-To: <1385831169.77.0.484147832993.issue19844@psf.upfronthosting.co.za> Message-ID: <1385831930.97.0.725918826671.issue19844@psf.upfronthosting.co.za> Christian Heimes added the comment: Ah, you fell victim to a classic gotcha. :) Either you have to quote \ with \\ or you have to use a raw string. Withouth a raw string \t is TAB and \01 is the byte \x01: >>> import ntpath >>> fname = r"C:\progs\python\test\target\Amy Winehouse\Amy Winehouse - Back To Black (2006)\01 - Rehab.ogg" >>> ntpath.split(fname) ('C:\\progs\\python\\test\\target\\Amy Winehouse\\Amy Winehouse - Back To Black (2006)', '01 - Rehab.ogg') >>> len("\01") 1 >>> "\01" == chr(1) True >>> len(r"\01") 3 ---------- nosy: +christian.heimes status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 18:50:54 2013 From: report at bugs.python.org (Hanz Kanst) Date: Sat, 30 Nov 2013 17:50:54 +0000 Subject: [issue19844] os.path.split fails on windows path In-Reply-To: <1385831169.77.0.484147832993.issue19844@psf.upfronthosting.co.za> Message-ID: <1385833854.3.0.376778584951.issue19844@psf.upfronthosting.co.za> Hanz Kanst added the comment: Hm, how can I handle this if "file" is an existing string and there is no option to assign raw via r'some\raw\string'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 19:09:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 18:09:28 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1385834968.71.0.616400604787.issue17897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch is synchronized with tip (it was desynchronized since 23459df0753e). ---------- Added file: http://bugs.python.org/file32913/pickle_peek_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 19:32:18 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 18:32:18 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1385836338.38.0.12774925165.issue17897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Microbenchmark: $ ./python -c "import pickle; d = b'x' * 10**6; f = open('test.pickle3', 'wb'); pickle.dump(d, f, 3); f.close()" $ ./python -m timeit -s "from pickle import load" "with open('test.pickle3', 'rb') as f: load(f)" Unpatched: 100 loops, best of 3: 7.27 msec per loop Patched: 100 loops, best of 3: 4.87 msec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 19:45:24 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 18:45:24 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <1385837124.74.0.240226043596.issue19683@psf.upfronthosting.co.za> R. David Murray added the comment: On tip it would indeed be better to implement them. The deletion is only for the released branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 19:52:08 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 18:52:08 +0000 Subject: [issue19840] The is no way to tell shutil.move to ignore metadata In-Reply-To: <1385816740.15.0.284400453847.issue19840@psf.upfronthosting.co.za> Message-ID: <1385837528.6.0.160414641341.issue19840@psf.upfronthosting.co.za> R. David Murray added the comment: Note that the equivalent linux command generates a warning message but does the move anyway. In other words, this seems like a very reasonable request ;) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 19:52:41 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 18:52:41 +0000 Subject: [issue19840] The is no way to tell shutil.move to ignore metadata In-Reply-To: <1385816740.15.0.284400453847.issue19840@psf.upfronthosting.co.za> Message-ID: <1385837561.28.0.873442411919.issue19840@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 19:56:14 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 18:56:14 +0000 Subject: [issue19841] ConfigParser PEP issues In-Reply-To: <1385817419.05.0.067066998342.issue19841@psf.upfronthosting.co.za> Message-ID: <1385837774.96.0.286841826827.issue19841@psf.upfronthosting.co.za> R. David Murray added the comment: Can you explain what the source of the problem is that you are trying to solve? It sounds like a bug in Nuitka, whatever that is. It is doubtful that this patch would be applied, for the backward compatibility reasons you cite. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 19:58:10 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 18:58:10 +0000 Subject: [issue19841] ConfigParser PEP issues In-Reply-To: <1385817419.05.0.067066998342.issue19841@psf.upfronthosting.co.za> Message-ID: <1385837889.99.0.653063978233.issue19841@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, and even if we decided there was enough reason to want to change the parameter names (which so far it doesn't look like there is), it could never be applied to 2.7, since the 2.7 API is frozen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 20:02:14 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 19:02:14 +0000 Subject: [issue19843] Wait for multiple sub-processes to terminate In-Reply-To: <1385826813.77.0.0339260517434.issue19843@psf.upfronthosting.co.za> Message-ID: <1385838134.96.0.203398992909.issue19843@psf.upfronthosting.co.za> R. David Murray added the comment: It's not, the beta is already out. ---------- nosy: +r.david.murray versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 20:06:02 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 19:06:02 +0000 Subject: [issue19844] os.path.split fails on windows path In-Reply-To: <1385831169.77.0.484147832993.issue19844@psf.upfronthosting.co.za> Message-ID: <1385838362.99.0.105861617503.issue19844@psf.upfronthosting.co.za> R. David Murray added the comment: If it is an existing string, the backslashes are already in the string. The r prefix or the escaping is only required to get the backslashes into a string when you are coding them into a source file. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 20:29:13 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Nov 2013 19:29:13 +0000 Subject: [issue19808] IDLE applies syntax highlighting to user input in its shell In-Reply-To: <1385541762.06.0.369087004664.issue19808@psf.upfronthosting.co.za> Message-ID: <1385839753.24.0.568231599451.issue19808@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On a freshly booted machine, I retried 2.7.6/Windows/raw_input() 'for all the' and indeed I now see 'for' and 'all' colored. The colorizing is done char by char. 'fo' is black, 'for' turns orange, 'forr' turns black again. Similarly, 'al' is black, 'all is purple, and 'allo' is black again. It is not a critical bug, but certainly annoying, especially to a new user. For editor windows, colorizing is only done for .py(wo) files. I do not know how the colorizing is switched on after the file name is checked. The shell window is an editor window. It should switch to .py mode after printing >>> and back to .txt mode when \n or \n\n is entered to complete a statement. I believe the edit will be in pyshell.py I expect the prompt and echoed input are both written to stdout by the user process. Neither are errors and both are colored blue. Warnings and exception tracebacks on stderr are red. Both come into the idle process via the socket connection, which is different from the idle process stdin connected to the keyboard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 20:46:58 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 19:46:58 +0000 Subject: [issue19834] Unpickling exceptions pickled by Python 2 In-Reply-To: <1385740154.87.0.494742260047.issue19834@psf.upfronthosting.co.za> Message-ID: <1385840818.32.0.230403043534.issue19834@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I have reviewed the patch in the review tool. Please take a look! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 20:52:03 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 19:52:03 +0000 Subject: [issue6673] Uncaught comprehension SyntaxError eats up all memory In-Reply-To: <1249826985.41.0.2934011008.issue6673@psf.upfronthosting.co.za> Message-ID: <1385841123.97.0.363221599441.issue6673@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- assignee: -> docs at python components: +Documentation -Interpreter Core keywords: -64bit nosy: +docs at python stage: -> needs patch type: resource usage -> enhancement versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:14:01 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:14:01 +0000 Subject: [issue15513] Correct __sizeof__ support for pickle In-Reply-To: <1343723739.69.0.648602242607.issue15513@psf.upfronthosting.co.za> Message-ID: <1385842441.27.0.369711280933.issue15513@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26617/pickle_sizeof-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:14:05 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:14:05 +0000 Subject: [issue15513] Correct __sizeof__ support for pickle In-Reply-To: <1343723739.69.0.648602242607.issue15513@psf.upfronthosting.co.za> Message-ID: <1385842445.84.0.307265634191.issue15513@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26616/pickle_sizeof-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:15:36 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:15:36 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1385842536.12.0.530606948518.issue15490@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26586/stringio_sizeof-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:15:42 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:15:42 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1385842542.68.0.0227390189739.issue15490@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26587/stringio_sizeof-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:15:49 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:15:49 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1385842549.94.0.338416896012.issue15490@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26588/stringio_sizeof-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:15:57 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:15:57 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1385842557.25.0.0199086646631.issue15490@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26810/stringio_sizeof-3.3_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:16:10 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:16:10 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1385842570.6.0.66274916146.issue15490@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26811/stringio_sizeof-3.2_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:16:22 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:16:22 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1385842582.41.0.388314360938.issue15490@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26812/stringio_sizeof-2.7_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:16:31 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:16:31 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1385842591.25.0.303284479492.issue15490@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file27241/stringio_sizeof-3.2_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:48:20 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Nov 2013 20:48:20 +0000 Subject: [issue17397] ttk::themes missing from ttk.py In-Reply-To: <1363005797.61.0.988966555267.issue17397@psf.upfronthosting.co.za> Message-ID: <1385844500.04.0.129163347368.issue17397@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As a non-tcl/tk user except via tkinter, I am not convinced that we should add a near-duplicate function. The *Python* doc for ttk.Style.theme_names says "Returns a list of all known themes." If it does not do that, which it seems not to, it should be changed (whether the change is called a fix or enhancement). >From the referenced Epler post, the situation seems more complicated on the ttk side in that ttk has two similar functions: 'style theme_names', which only reports 'loaded' names, and 'themes' which reports 'loaded and available', though 'available' seems vague and dependent on strange package calls. For Python, a parameter for one function would suffice to restrict or augment the list returned, if indeed the option is needed. Are 'unloaded but available' themes really available to use? Does Style.theme_use(available_name) work? If so, it seems to me that available_name should be reported by theme_names. If not, what is the use of knowing it? Most any patch will need a doc patch. ---------- stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:53:27 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 20:53:27 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1385844807.16.0.808810593504.issue17897@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Looks good to me! Feel free to commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 21:54:02 2013 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 30 Nov 2013 20:54:02 +0000 Subject: [issue19845] Compiling Python on Windows docs Message-ID: <1385844842.4.0.324477828597.issue19845@psf.upfronthosting.co.za> New submission from Mark Lawrence: http://docs.python.org/3/using/windows.html#compiling-python-on-windows still refers to Visual Studio 97 but there's no mention of 2010. Can we have this updated please? ---------- assignee: docs at python components: Documentation messages: 204844 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: Compiling Python on Windows docs versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:04:11 2013 From: report at bugs.python.org (Simon Weber) Date: Sat, 30 Nov 2013 21:04:11 +0000 Subject: [issue19789] Improve wording of how to "undo" a call to logging.disable(lvl) In-Reply-To: <1385442860.38.0.88263802784.issue19789@psf.upfronthosting.co.za> Message-ID: <1385845451.09.0.673337093064.issue19789@psf.upfronthosting.co.za> Simon Weber added the comment: That sounds much clearer. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:16:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 21:16:12 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <3dX53v6NHgz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset d565310e7ae3 by Serhiy Storchaka in branch 'default': Issue #17897: Optimized unpickle prefetching. http://hg.python.org/cpython/rev/d565310e7ae3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:17:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 21:17:14 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1385846234.95.0.720921070125.issue17897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Alexandre. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:17:26 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 21:17:26 +0000 Subject: [issue17897] Optimize unpickle prefetching In-Reply-To: <1367604999.94.0.501171592637.issue17897@psf.upfronthosting.co.za> Message-ID: <1385846246.92.0.323255939804.issue17897@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:24:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 21:24:51 +0000 Subject: [issue16231] pickle persistent_id return value In-Reply-To: <1350225017.39.0.976217955919.issue16231@psf.upfronthosting.co.za> Message-ID: <3dX5Ft2j7HzSyF@mail.python.org> Roundup Robot added the comment: New changeset ee627983ba28 by Alexandre Vassalotti in branch '2.7': Issue #16231: Allow false values other than None to be used as persistent IDs. http://hg.python.org/cpython/rev/ee627983ba28 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:25:08 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 21:25:08 +0000 Subject: [issue16231] pickle persistent_id return value In-Reply-To: <1350225017.39.0.976217955919.issue16231@psf.upfronthosting.co.za> Message-ID: <1385846708.63.0.225047224212.issue16231@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- assignee: -> alexandre.vassalotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:40:45 2013 From: report at bugs.python.org (Sworddragon) Date: Sat, 30 Nov 2013 21:40:45 +0000 Subject: [issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding() Message-ID: <1385847645.21.0.327287028528.issue19846@psf.upfronthosting.co.za> New submission from Sworddragon: It seems that print() and write() (and maybe other of such I/O functions) are relying on sys.getfilesystemencoding(). But these functions are not operating with filenames but with their content. In the attachments is an example script which demonstrates this problem. Here is what I get: sworddragon at ubuntu:~/tmp$ echo $LANG de_DE.UTF-8 sworddragon at ubuntu:~/tmp$ python3 test.py sys.getdefaultencoding(): utf-8 sys.getfilesystemencoding(): utf-8 ? sworddragon at ubuntu:~/tmp$ LANG=C sworddragon at ubuntu:~/tmp$ python3 test.py sys.getdefaultencoding(): utf-8 sys.getfilesystemencoding(): ascii Traceback (most recent call last): File "test.py", line 4, in print('\xe4') UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 0: ordinal not in range(128) ---------- components: IO files: test.py messages: 204849 nosy: Sworddragon priority: normal severity: normal status: open title: print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding() type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file32914/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:45:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 30 Nov 2013 21:45:24 +0000 Subject: [issue17397] ttk::themes missing from ttk.py In-Reply-To: <1363005797.61.0.988966555267.issue17397@psf.upfronthosting.co.za> Message-ID: <1385847924.8.0.461022025779.issue17397@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: serhiy.storchaka -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:53:45 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Nov 2013 21:53:45 +0000 Subject: [issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding() In-Reply-To: <1385847645.21.0.327287028528.issue19846@psf.upfronthosting.co.za> Message-ID: <1385848425.3.0.645501883319.issue19846@psf.upfronthosting.co.za> R. David Murray added the comment: Victor can correct me if I'm wrong, but I believe that stdin/stdout/stderr all use the filesystem encoding because filenames are the most likely source of non-ascii characters on those streams. (Not a perfect solution, but the best we can do.) ---------- nosy: +haypo, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 22:58:59 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 21:58:59 +0000 Subject: [issue5885] uuid.uuid1() is too slow In-Reply-To: <1241086416.5.0.850110966894.issue5885@psf.upfronthosting.co.za> Message-ID: <1385848739.35.0.937719054819.issue5885@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- priority: low -> normal stage: needs patch -> patch review versions: +Python 3.5 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:00:44 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 22:00:44 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1385848844.83.0.835286139558.issue2281@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- priority: normal -> low versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:00:58 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 22:00:58 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1385848858.85.0.195198585763.issue2281@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- priority: normal -> low versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:01:09 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 22:01:09 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1385848869.64.0.101100741544.issue2281@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- priority: normal -> low versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:14:51 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 30 Nov 2013 22:14:51 +0000 Subject: [issue2799] Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() In-Reply-To: <1210329112.66.0.505096173761.issue2799@psf.upfronthosting.co.za> Message-ID: <1385849691.69.0.26974758153.issue2799@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: With PEP 393 implemented, there doesn't seem to anything left to be done here. Closing as fixed. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:23:56 2013 From: report at bugs.python.org (Zachary Ware) Date: Sat, 30 Nov 2013 22:23:56 +0000 Subject: [issue19845] Compiling Python on Windows docs In-Reply-To: <1385844842.4.0.324477828597.issue19845@psf.upfronthosting.co.za> Message-ID: <1385850236.03.0.00193678258607.issue19845@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:24:20 2013 From: report at bugs.python.org (Zachary Ware) Date: Sat, 30 Nov 2013 22:24:20 +0000 Subject: [issue19845] Compiling Python on Windows docs In-Reply-To: <1385844842.4.0.324477828597.issue19845@psf.upfronthosting.co.za> Message-ID: <1385850260.2.0.875477819975.issue19845@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- keywords: +easy stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:25:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 30 Nov 2013 22:25:20 +0000 Subject: [issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding() In-Reply-To: <1385848425.3.0.645501883319.issue19846@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: "Filesystem encoding" is not a good name. You should read "OS encoding" or maybe "locale encoding". This encoding is the best choice for interopability with other (python2 or non python) programs. If you don't care of interoperabilty, force the encoding using PYTHONIOENCODING environment variable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:29:52 2013 From: report at bugs.python.org (Sworddragon) Date: Sat, 30 Nov 2013 22:29:52 +0000 Subject: [issue19847] Setting the default filesystem-encoding Message-ID: <1385850592.6.0.425449057763.issue19847@psf.upfronthosting.co.za> New submission from Sworddragon: sys.getfilesystemencoding() says for Unix: On Unix, the encoding is the user?s preference according to the result of nl_langinfo(CODESET), or 'utf-8' if nl_langinfo(CODESET) failed. In my opinion relying on the locale environment is risky since filesystem-encoding != locale. This is especially the case if working on a filesystem from an external media like an external hard disk drive. Operating on multiple media can also result in different filesystem-encodings. It would be useful if the user can make his own checks and change the default filesystem-encoding if needed. ---------- components: IO messages: 204853 nosy: Sworddragon priority: normal severity: normal status: open title: Setting the default filesystem-encoding type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:46:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 30 Nov 2013 22:46:42 +0000 Subject: [issue19789] Improve wording of how to "undo" a call to logging.disable(lvl) In-Reply-To: <1385442860.38.0.88263802784.issue19789@psf.upfronthosting.co.za> Message-ID: <3dX74K4mx3z7Lk2@mail.python.org> Roundup Robot added the comment: New changeset b6377ca8087a by Vinay Sajip in branch '2.7': Issue #19789: Clarified documentation for logging.disable. http://hg.python.org/cpython/rev/b6377ca8087a New changeset 5c8130b85c17 by Vinay Sajip in branch '3.3': Issue #19789: Clarified documentation for logging.disable. http://hg.python.org/cpython/rev/5c8130b85c17 New changeset eae4b83108fb by Vinay Sajip in branch 'default': Closes #19789: Merged update from 3.3. http://hg.python.org/cpython/rev/eae4b83108fb ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 30 23:58:33 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 30 Nov 2013 22:58:33 +0000 Subject: [issue18885] handle EINTR in the stdlib In-Reply-To: <1377874955.28.0.258891288899.issue18885@psf.upfronthosting.co.za> Message-ID: <1385852313.06.0.621902119747.issue18885@psf.upfronthosting.co.za> Armin Rigo added the comment: Am I correct in thinking that you're simply replacing the OSError(EINTR) with returning empty lists? This is bound to subtly break code, e.g. the code that expects reasonably that a return value of three empty lists means the timeout really ran out (i.e. the version of the code that is already the most careful). Shouldn't you restart the poll with the remaining time until timeout? ---------- _______________________________________ Python tracker _______________________________________