From report at bugs.python.org Mon Apr 1 00:03:10 2013 From: report at bugs.python.org (Sebastian Ortiz Vasquez) Date: Sun, 31 Mar 2013 22:03:10 +0000 Subject: [issue17606] BUG: XMLGenerator cannot output with the correct encoding Message-ID: <1364767390.87.0.956919246275.issue17606@psf.upfronthosting.co.za> New submission from Sebastian Ortiz Vasquez: The XMLGenerator character method is unable to detect and encode using the encoding defined in the constructor. This yields to an UnicodeEncode exception, because always tries to encode using 'ascii' as default in python 2 ---------- components: XML files: XMLGenerator.patch keywords: patch messages: 185684 nosy: Arfrever, BreamoreBoy, benjamin.peterson, doerwalter, georg.brandl, larry, loewis, neoecos, neoecos, ngrig, pitrou, python-dev, serhiy.storchaka priority: normal severity: normal status: open title: BUG: XMLGenerator cannot output with the correct encoding versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file29640/XMLGenerator.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 00:03:43 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 31 Mar 2013 22:03:43 +0000 Subject: [issue1470548] xml.sax.saxutils.XMLGenerator cannot output UTF-16 Message-ID: <1364767423.91.0.212712166766.issue1470548@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 00:12:40 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 31 Mar 2013 22:12:40 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1364767960.7.0.798282934212.issue6698@psf.upfronthosting.co.za> Roger Serwy added the comment: We can fix the "bug" as-is and then open a separate enhancement issue for Tal's suggestions. I place bug in quotes because the correct behavior is not documented. ---------- assignee: -> roger.serwy nosy: +Todd.Rovito stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 00:13:17 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 31 Mar 2013 22:13:17 +0000 Subject: [issue17606] xml.sax.saxutils.XMLGenerator cannot output with the correct encoding In-Reply-To: <1364767390.87.0.956919246275.issue17606@psf.upfronthosting.co.za> Message-ID: <1364767997.53.0.301459181677.issue17606@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Your patch does not apply cleanly to 2.7 branch. Please read documentation: http://docs.python.org/devguide/ http://docs.python.org/devguide/setup.html#checkout Use e.g. 'hg diff' to create patch. Only security fixes are allowed in 2.6 branch. ---------- title: BUG: XMLGenerator cannot output with the correct encoding -> xml.sax.saxutils.XMLGenerator cannot output with the correct encoding versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 00:15:39 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 31 Mar 2013 22:15:39 +0000 Subject: [issue17606] xml.sax.saxutils.XMLGenerator cannot output with the correct encoding In-Reply-To: <1364767390.87.0.956919246275.issue17606@psf.upfronthosting.co.za> Message-ID: <1364768139.58.0.198395723894.issue17606@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Also please try to write a new test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 00:16:07 2013 From: report at bugs.python.org (Amit Saha) Date: Sun, 31 Mar 2013 22:16:07 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364768167.44.0.930240463247.issue17583@psf.upfronthosting.co.za> Amit Saha added the comment: Adding the patch here. I am not sure about how to add the screenshots, so I haven't done them. Just attached the document as a patch (note that I have placed in doc/howto). Thanks for the comments. ---------- hgrepos: +180 keywords: +patch Added file: http://bugs.python.org/file29641/idle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 00:30:58 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 31 Mar 2013 22:30:58 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1364758189.59.0.0992026014456.issue17206@psf.upfronthosting.co.za> Message-ID: <5158B91F.6040306@egenix.com> Marc-Andre Lemburg added the comment: On 31.03.2013 21:29, Larry Hastings wrote: > > Larry Hastings added the comment: > > For the record: I care. Generally speaking CPython is a lovingly > crafted source tree, and the choices its architects made are nearly > always sensible and well-reasoned. When I see things like this, things > that seem kind of dumb on first glance, I worry that we're missing > something. Did someone test the patch on a use case where the performance of this macro matters a lot ? E.g. deallocating large lists or dictionaries. Todays CPUs have plenty of registers available, so it's possible that the patch actually speeds up things, since the decref'ed variable may well be an indirect reference. At the time Py_DECREF was written, registers were precious golden flasks, only to be filled with the most valuable of things ;-) Just want to be sure we're not missing something... ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 00:46:52 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 31 Mar 2013 22:46:52 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364770012.26.0.956540216315.issue14254@psf.upfronthosting.co.za> Roger Serwy added the comment: Closing the shell window while in the nested event loop for readline fails to exit the nested event loop. I updated the title to reflect the broader problem with readline's handling of the nested event loop. The rev1 patch causes the nested event loop to exit when restarting or closing the shell. ---------- assignee: -> roger.serwy stage: -> patch review title: IDLE - shell restart during readline does not reset readline -> IDLE - shell restart or closing during readline does not exit nested event loop versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file29642/reading_reset_rev1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 01:04:19 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 31 Mar 2013 23:04:19 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364771059.07.0.0315411616406.issue17583@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- hgrepos: -180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 01:06:13 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 31 Mar 2013 23:06:13 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364771173.72.0.051989587695.issue14254@psf.upfronthosting.co.za> Ned Deily added the comment: With the rev1 patch (on OS X), the cursor seems to end up on the wrong line after the restart: >>> import sys >>> sys.stdin.readline() >>> ================================ RESTART ================================ >>> *Cursor left here at (*), i.e. the left margin of the next line, not on the same line as the ">>> " prompt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 01:08:04 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 31 Mar 2013 23:08:04 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364771284.04.0.758940303564.issue14254@psf.upfronthosting.co.za> Ned Deily added the comment: However, the patch *does* fix the original problem that the first input after restart is skipped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 01:08:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 31 Mar 2013 23:08:10 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364771290.94.0.591487538468.issue17583@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left a few comments on rietveld. I wonder if it's better to make two separate versions, one for py2 and one for py3, and avoid repeating things (like the name of the packages) twice. You should also be able to include the images in the patch by using "hg add" locally. This should include them when you do "hg diff > idle.patch" (if it doesn't work you might have to set "git = on" (see http://docs.python.org/devguide/committing.html#minimal-configuration)). ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 01:22:08 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 31 Mar 2013 23:22:08 +0000 Subject: [issue5492] Error on leaving IDLE with quit() or exit() under Linux In-Reply-To: <1237121077.76.0.63532373748.issue5492@psf.upfronthosting.co.za> Message-ID: <1364772128.49.0.86021422733.issue5492@psf.upfronthosting.co.za> Roger Serwy added the comment: I found the root cause of the original error. Entering "exit()" at the shell raises SystemExit which gets written to the shell's text widget. The call to actually write the text passes through .write() in Lib/idlelib/OutputWindow.py, which calls text.update(). The call to .update() enters the Tk event loop and flushes pending events, including expired .after callbacks. Forcing the .after callback in .close() to 1 ms will always trigger the error. Commenting out the text.update() in OutputWindow.py avoids the error. The patch causes .kill_subprocess() to execute immediately which prevents the subprocess from writing to sys.stderr. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 01:34:23 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 31 Mar 2013 23:34:23 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364772863.26.0.96888217423.issue14254@psf.upfronthosting.co.za> Roger Serwy added the comment: Ned, I can confirm the behavior you are seeing. I am trying to trace down why this spurious '\n' gets inserted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 01:50:45 2013 From: report at bugs.python.org (Amit Saha) Date: Sun, 31 Mar 2013 23:50:45 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364773845.79.0.867434432606.issue17583@psf.upfronthosting.co.za> Amit Saha added the comment: Hi Ezio, thanks for your review comments. I will make the changes to the document, and also add the images in a later patch. I do agree that repeating package names for Python 2 and Python 3 is perhaps not an ideal way. I am also trying to think of other ways to justify having two separate documents: may be the code samples? print 'Hello world' versus print('Hello World') ? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 02:06:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Apr 2013 00:06:51 +0000 Subject: [issue17586] fix typo in contextlib.rst Message-ID: <3ZfDPQ5jTxzPhP@mail.python.org> New submission from Roundup Robot: New changeset 18e699c4d8c0 by Ned Deily in branch 'default': Issue #17586: fix typo in contextlib.rst http://hg.python.org/cpython/rev/18e699c4d8c0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 02:07:43 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Apr 2013 00:07:43 +0000 Subject: [issue17586] fix typo in contextlib.rst In-Reply-To: <3ZfDPQ5jTxzPhP@mail.python.org> Message-ID: <1364774863.94.0.53836210283.issue17586@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for catching this! ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 03:28:32 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Apr 2013 01:28:32 +0000 Subject: [issue17593] mailbox.py tries to link even on filesystem wihch does not support symbolic links In-Reply-To: <1364759071.81.0.0901608465156.issue17593@psf.upfronthosting.co.za> Message-ID: <1364779712.59.0.409700884682.issue17593@psf.upfronthosting.co.za> R. David Murray added the comment: The problem is that mailbox decides if links are possible based on the OS rather than on the file system. This is a general problem that Python has...when the Python file system APIs, and this code, were written, OSes could only read their own file systems, and there was only one file system type per OS. Fixing this, then, pretty much requires solving the general problem of introspecting file system capabilities. I think there are open issues relating to that. ---------- components: +email nosy: +barry, r.david.murray type: -> behavior versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 03:32:34 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Apr 2013 01:32:34 +0000 Subject: [issue17587] Have all core library modules imported by default Message-ID: <1364748903.2.0.666469840535.issue17587@psf.upfronthosting.co.za> New submission from R. David Murray: The other day I was trying to make a script to import a CSV file but for the life of me couldn't remember what the name of the csv library was (turns out it was csv). So I started thinking "hey, what if all the standard library were just *there* by default"? We all know doing imports is really boring, so why don't we deal with the elephant in the room? This is what I love about PHP: once something's imported (or required? included? required_once?) you don't have to think about it anymore. It's very "set it and forget it". And then you simply remember it later when necessary. For this, I use pen and paper. Holy crap, I just had an even better idea. What if all third-party modules were imported as well? This may be a bit more challenging, but I truly believe you guys can do it. There are system settings I've heard about (Krons) that let you basically do anything over and over again. We could have Python automatically download all pips or whatever and import them without thinking. Boom! The Zen of Python. And can we put an & and a $ somewhere in Python? I think these feel very cool to use, and are easily one of the best things I miss from more advanced languages like C and PHP. Let's be honest, doesn't this: $item->method(); Look a lot more professional than: item.method() It certainly justifies my salary a bit better. I don't have a patch for this because, let's be honest, I wouldn't know where to begin. But I can't imagine it being that hard. Is there a line or two we could change somewhere? Maybe just throw an "import *" into a header file somewhere? Finally, I propose replacing meaningful whitespace with meaningful random unicode characters. This would look like the matrix and once you "got it" it would feel really cool. With all of these changes I think we have the potential to turn this toy language into a powerhouse that could even be used for stuff like forum software. Let me know what you guys think of this. Also, I offer consulting work for a modest fee (though I don't do any programming myself, I'm more of a people person). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 03:34:56 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Apr 2013 01:34:56 +0000 Subject: [issue17587] Have all core library modules imported by default In-Reply-To: <1364748903.2.0.666469840535.issue17587@psf.upfronthosting.co.za> Message-ID: <1364780096.68.0.838806175999.issue17587@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I see I misunderstood the argument, here. Upon reflection, this clearly deserves an opportunity for input from other developers. ---------- nosy: +r.david.murray resolution: invalid -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 04:17:22 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Apr 2013 02:17:22 +0000 Subject: [issue17577] Add lookahead/peek wrapper to itertools In-Reply-To: <1364600274.74.0.549757857069.issue17577@psf.upfronthosting.co.za> Message-ID: <1364782642.66.0.284723857672.issue17577@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg185533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 04:17:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Apr 2013 02:17:40 +0000 Subject: [issue17577] Add lookahead/peek wrapper to itertools In-Reply-To: <1364600274.74.0.549757857069.issue17577@psf.upfronthosting.co.za> Message-ID: <1364782660.24.0.703940117522.issue17577@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg185534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 04:21:56 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Apr 2013 02:21:56 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364782916.47.0.40245383198.issue17583@psf.upfronthosting.co.za> Todd Rovito added the comment: Ezio, I left a few comments on rietveld. This is a really nice start to a great FAQ. Thanks for your contribution I think Python needs a nice FAQ on IDLE. You might want to add some detail about the right click menu which allows a user to cut, copy, paste, and set breakpoints. I think a section on the debugger would be excellent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 04:23:46 2013 From: report at bugs.python.org (Amit Saha) Date: Mon, 01 Apr 2013 02:23:46 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364783026.34.0.202135142792.issue17583@psf.upfronthosting.co.za> Amit Saha added the comment: Hi Todd, thanks for your comments. I wanted to clarify that I intend to make this a HOWTO, not a FAQ. I hope that's fine? -Amit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 05:49:01 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Apr 2013 03:49:01 +0000 Subject: [issue17586] fix typo in contextlib.rst In-Reply-To: <3ZfDPQ5jTxzPhP@mail.python.org> Message-ID: <1364788141.51.0.811375880063.issue17586@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 05:51:45 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Apr 2013 03:51:45 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1364788305.6.0.866949872071.issue6698@psf.upfronthosting.co.za> Todd Rovito added the comment: Roger, I reviewed and tested the patch, it does seem to fix the "bug". Now when the on startup configure option is selected IDLE will behave as expected. I think this makes sense to fix the bug even though it is not documented we can infer the behavior based on the configuration dialog box. Tal's suggestion makes sense but this is for sure an enhancement. Please feel free to push the patch at your earliest convenience. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 05:59:49 2013 From: report at bugs.python.org (Roger Serwy) Date: Mon, 01 Apr 2013 03:59:49 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364788789.78.0.336435346912.issue14254@psf.upfronthosting.co.za> Roger Serwy added the comment: I reworked the patch to fix the cursor problem. The new code, hopefully, is simpler to understand and harder to break. Essentially, all code paths that terminate the subprocess must also call stop_readline which exits that nested event loop if needed. ---------- Added file: http://bugs.python.org/file29643/stop_readline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 06:25:40 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Apr 2013 04:25:40 +0000 Subject: [issue16893] Create IDLE help.txt from Doc/library/idle.rst In-Reply-To: <1357663512.19.0.739336896498.issue16893@psf.upfronthosting.co.za> Message-ID: <1364790340.3.0.0982214130811.issue16893@psf.upfronthosting.co.za> Todd Rovito added the comment: I added roger.serwy to the nosy list. Terry Reedy is already on the list. I think this issue will help maintain the IDLE documentation now and in the future. Right now it has to manually be synced between help.txt and idle.rst. Only Python 3.4 is synced right now based on this issue: http://bugs.python.org/issue5066 Zach has done a great job working the issue so I think it should be committed. ---------- nosy: +roger.serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 06:39:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Apr 2013 04:39:25 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <3ZfLRw1sQyzPPX@mail.python.org> Roundup Robot added the comment: New changeset 240c83902fca by Roger Serwy in branch '2.7': #6698: IDLE now opens just an editor window when configured to do so. http://hg.python.org/cpython/rev/240c83902fca New changeset 174caf4c901a by Roger Serwy in branch '3.3': #6698: IDLE now opens just an editor window when configured to do so. http://hg.python.org/cpython/rev/174caf4c901a New changeset ee5806d231db by Roger Serwy in branch 'default': #6698: merge with 3.3. http://hg.python.org/cpython/rev/ee5806d231db ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 06:45:51 2013 From: report at bugs.python.org (Neal Norwitz) Date: Mon, 01 Apr 2013 04:45:51 +0000 Subject: [issue17607] missed peephole optimization (unnecessary jump at end of function after yield) Message-ID: <1364791551.27.0.510465438261.issue17607@psf.upfronthosting.co.za> New submission from Neal Norwitz: >>> def foo(): ... if x: ... yield None ... >>> dis.dis(foo) 2 0 LOAD_GLOBAL 0 (x) 3 POP_JUMP_IF_FALSE 14 3 6 LOAD_CONST 0 (None) 9 YIELD_VALUE 10 POP_TOP 11 JUMP_FORWARD 0 (to 14) >> 14 LOAD_CONST 0 (None) 17 RETURN_VALUE The JUMP_FORWARD at 11 is not necessary and is not in place with a return in the code: >>> def foo(): ... if x: ... return None ... >>> dis.dis(foo) 2 0 LOAD_GLOBAL 0 (x) 3 POP_JUMP_IF_FALSE 10 3 6 LOAD_CONST 0 (None) 9 RETURN_VALUE >> 10 LOAD_CONST 0 (None) 13 RETURN_VALUE ---------- components: Interpreter Core messages: 185708 nosy: Neal.Norwitz priority: normal severity: normal status: open title: missed peephole optimization (unnecessary jump at end of function after yield) type: performance versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 06:48:00 2013 From: report at bugs.python.org (Roger Serwy) Date: Mon, 01 Apr 2013 04:48:00 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1364791680.41.0.0115701014061.issue6698@psf.upfronthosting.co.za> Roger Serwy added the comment: Thanks Todd for the review! If you have time, could you open a new issue to deal with the enhancements discussed here? ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 06:50:52 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Apr 2013 04:50:52 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1364791852.13.0.597049261444.issue6698@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If we are not sure of the 'right' behavior in cases like this, we can ask for opinions on idle-dev. That is at least part of its purpose. Does anyone there use any of the options? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 06:55:13 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 01 Apr 2013 04:55:13 +0000 Subject: [issue17589] Make documentation about macros in C API explicit about rvalue vs statement In-Reply-To: <1364758755.79.0.998719447408.issue17589@psf.upfronthosting.co.za> Message-ID: <1364792113.39.0.322309380276.issue17589@psf.upfronthosting.co.za> Larry Hastings added the comment: > Py_INCREF usable as an rvalue sounds more like an accident > than a deliberate feature I'd go with "misfeature", but in no way is it accidental. The coding deliberately preserves the rvalue-ness of it, c.f. _Py_REF_DEBUG_COMMA. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:01:18 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Apr 2013 05:01:18 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364792478.17.0.822634238767.issue14254@psf.upfronthosting.co.za> Ned Deily added the comment: With the stop_readline patch, I'm seeing this exception upon shell restart when trying the same test as above: $ ./python -m idlelib Exception in Tkinter callback Traceback (most recent call last): File "Lib/tkinter/__init__.py", line 1475, in __call__ return self.func(*args) File "Lib/idlelib/PyShell.py", line 1225, in restart_shell self.interp.restart_subprocess(with_cwd=True) File "Lib/idlelib/PyShell.py", line 457, in restart_subprocess console.stop_readline() AttributeError: 'PyShell' object has no attribute 'stop_readline' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:07:07 2013 From: report at bugs.python.org (Roger Serwy) Date: Mon, 01 Apr 2013 05:07:07 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1364792827.66.0.452289496117.issue6698@psf.upfronthosting.co.za> Roger Serwy added the comment: Terry, I read over the revision in r71126 and it looked like the behavior change was an unintended consequence of applying an ephemeral ports patch. That and Todd's reasoning of the correct behavior being inferrable from the configuration dialog convinced me that original behavior described by Guilherme was the correct behavior. Changing those options ought to be a separate enhancment issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:13:12 2013 From: report at bugs.python.org (Roger Serwy) Date: Mon, 01 Apr 2013 05:13:12 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364793192.01.0.995301915367.issue14254@psf.upfronthosting.co.za> Roger Serwy added the comment: I just re-applied the patch to a clean 2.7 and 3.4 branch and didn't see that exception raised. Are you sure that the patch applied cleanly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:28:14 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 01 Apr 2013 05:28:14 +0000 Subject: [issue17586] fix typo in contextlib.rst In-Reply-To: <1364788141.51.0.811375880063.issue17586@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: @hettinger You mentioning committing this in your wonderful keynote talk, http://pyvideo.org/video/1669/keynote-3, and that's how I checked it out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:30:21 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Apr 2013 05:30:21 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364794221.15.0.94080237754.issue14254@psf.upfronthosting.co.za> Ned Deily added the comment: Ah, sorry, I mis-edited the patch when check_whitespace.py complained about a whitespace problem. The test does now work correctly, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:39:42 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Apr 2013 05:39:42 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1364794782.85.0.636541978762.issue6698@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If at least three of you are in agreement, great. Take my comment as a general one for other issues, when applicable ;-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:40:10 2013 From: report at bugs.python.org (Rodney Persky) Date: Mon, 01 Apr 2013 05:40:10 +0000 Subject: [issue17608] configparser not honouring section but not variable case Message-ID: <1364794810.72.0.199775169756.issue17608@psf.upfronthosting.co.za> New submission from Rodney Persky: Hey, Just a fairly small one in the configparser library. I've got a bunch of variables with varying capitalisation to indicate words in the variable name. The config file contains lines such as: [GlobalSection] ParameterDelimiterCharacter = , Watching the program, at some point (this is straight from a for loop) the capitalisation gets lost: Looking for ['GlobalSection', 'parameterdelimitercharacter'] ---------- components: Library (Lib), Windows messages: 185718 nosy: Rodney.Persky priority: normal severity: normal status: open title: configparser not honouring section but not variable case type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:48:27 2013 From: report at bugs.python.org (Roger Serwy) Date: Mon, 01 Apr 2013 05:48:27 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1364794782.85.0.636541978762.issue6698@psf.upfronthosting.co.za> Message-ID: <51591FEC.1020807@gmail.com> Roger Serwy added the comment: Will do, Terry! :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 07:51:51 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Apr 2013 05:51:51 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1364795511.45.0.147926985549.issue6698@psf.upfronthosting.co.za> Ned Deily added the comment: With the patch applied, I verified that the launch behavior of OS X IDLE.app is unchanged as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 08:39:50 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 01 Apr 2013 06:39:50 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <1364798390.24.0.990893594947.issue17483@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Here is the final patch (17483.patch) for this support. I am including Ezio & David for their review comments before I check this in. Thanks! ---------- nosy: +ezio.melotti, r.david.murray Added file: http://bugs.python.org/file29644/17483.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 09:57:55 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Apr 2013 07:57:55 +0000 Subject: [issue7057] tkinter doc: more 3.x updates In-Reply-To: <1254697168.63.0.205098696566.issue7057@psf.upfronthosting.co.za> Message-ID: <1364803075.02.0.0319743078252.issue7057@psf.upfronthosting.co.za> Ned Deily added the comment: I just noticed that the changes committed earlier for this issue added a reference to the Tcl/Tk 8.6 man pages. Since there are known problems with using 8.6 with tkinter (for example, Issue16809) and we don't currently ship 8.6 with any of our binary installers, it would be better to reference the 8.5 man pages until the status of 8.6 support is resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 10:23:41 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 01 Apr 2013 08:23:41 +0000 Subject: [issue11406] There is no os.listdir() equivalent returning generator instead of list In-Reply-To: <1364765626.34.0.321979523821.issue11406@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > That way the scandir name would be left available for a future version of this that yields namedtuples of directory entry details as Martin wants to see. Which might very w'ell be Nick's walkdir, see issue #13229. BTW, I'm strongly +1 on this addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 11:05:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Apr 2013 09:05:35 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <1364807135.58.0.53230926003.issue17483@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm sorry, I'm -1 on this. It simply doesn't make sense to check the certificate but skip hostname checking. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 12:40:56 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 01 Apr 2013 10:40:56 +0000 Subject: [issue1944] Documentation for PyUnicode_AsString (et al.) missing. In-Reply-To: <1364645377.35.0.326877424936.issue1944@psf.upfronthosting.co.za> Message-ID: <51596435.2010506@egenix.com> Marc-Andre Lemburg added the comment: On 30.03.2013 13:09, Mark Lawrence wrote: > > Is it worth applying the patch given the complete rewrite of unicode for 3.3 via PEP393? PEP 393 only changed the way Unicode is internally stored. The Unicode API is mostly unaffected by this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 12:50:36 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Apr 2013 10:50:36 +0000 Subject: [issue16893] Create IDLE help.txt from Doc/library/idle.rst In-Reply-To: <1357663512.19.0.739336896498.issue16893@psf.upfronthosting.co.za> Message-ID: <1364813436.33.0.197236566515.issue16893@psf.upfronthosting.co.za> Ned Deily added the comment: Zach, thanks for addressing most of the comments. The Makefile does now work as intended and more information is retained in the help.txt. But I'm still troubled by the plaintext rendering, particularly of the inline code markup. With the `` marks from the reStructuredText directives appearing in the help.txt, the help file as displayed is, IMO, more cluttered and, more importantly, more confusing. Using `` to delimit displayed plaintext in lieu of more sophisticated text styling is unconventional at best. I think changing the help file to include such marks would be a step backward. But that's just one of the more obvious drawbacks of trying to use a plaintext format for help. Ironically, the Tk text widget is perfectly capable of rendering richer text styles. But, AFAIK, there hasn't been a use case up to now to support some sort of rich text format (be it rtf or html or rst directly) from a file in IDLE. My initial thought was to suggest adding some sort of Tk-friendly Sphinx/Docutils builder. That might be more generally useful but that will probably take a fair amount of work to define and implement. Then it struck me that having an html-format help file would be able to represent all the existing Sphinx styles and, with the doc changes in the patch, we already have an html file that contains all the help text! So rather than trying to sync the help file with the IDLE doc in the library, why not just display the library IDLE doc in a browser window? IDLE already has a menu item and code to launch a web browser for the whole Python documentation set. It would be easy to adapt that to change the IDLE help menu item to launch a web browser window with the IDLE page and get rid of help.txt. There are a few issues that would need to be resolved. The python.org binary installers and most Unix-y distributions can optionally install local copies of the Python doc set to eliminate the need for network access to docs.python.org. There is platform-specific code in EditorWindow.__init__ to search locally for the doc files, falling back to http://doc.python.org if a local copy is not found. The simplest approach would be to do the same for IDLE help, however that would have the drawback of there being no help available if the local copy had not been installed and there was no internet access. Of course, that is the case today for the Python documentation. If that is not acceptable for the help text, the docs build process could make a copy of a version of the library/idle.html into idlelib or, less desirable, the proposed plain text file could be the fallback. Also, on Windows, AFAIK, the doc set is usually installed as a chm file which normally opens to the top-level index page in the help viewer. A question is how to open directly to the IDLE page. By inspection in the help viewer on Windows 7, it seems that a web browser.open call to a URL that appends '::/library/idle.html' to the existing pythonxxx.chm URL will open a browser window to the right page. But there may be a better way to do that. >From the user's perspective, ISTM that having the help in the rich format possible with the existing doc html would be a huge advantage over what can be provided with any plain text format. Comments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 12:53:58 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 Apr 2013 10:53:58 +0000 Subject: [issue17608] configparser not honouring section but not variable case In-Reply-To: <1364794810.72.0.199775169756.issue17608@psf.upfronthosting.co.za> Message-ID: <1364813638.75.0.891989057777.issue17608@psf.upfronthosting.co.za> Eric V. Smith added the comment: Can you show us the code that causes the problem? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 13:20:49 2013 From: report at bugs.python.org (Rodney Persky) Date: Mon, 01 Apr 2013 11:20:49 +0000 Subject: [issue17608] configparser not honouring section but not variable case In-Reply-To: <1364794810.72.0.199775169756.issue17608@psf.upfronthosting.co.za> Message-ID: <1364815249.45.0.181711591348.issue17608@psf.upfronthosting.co.za> Rodney Persky added the comment: I'd probably revise this to say it's a quirk - not a bug. As looking over https://bitbucket.org/ambv/configparser/src/4bf6a6d8ebdf6eec068750a2b940944a9b1b2938/configparser.py?at=default (the configparser source) information is converted to .lower(). So it seems intended for some reason. Attached is a snippet of code that will reproduce the bug in the context of my app. ---------- Added file: http://bugs.python.org/file29645/Bug16708.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 13:44:22 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Apr 2013 11:44:22 +0000 Subject: [issue16893] Create IDLE help.txt from Doc/library/idle.rst In-Reply-To: <1357663512.19.0.739336896498.issue16893@psf.upfronthosting.co.za> Message-ID: <1364816662.46.0.0109012558721.issue16893@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Great idea. Using a browser to display help text has become pretty common. For many games, for instance, this has superseded .pdf manuals, which supercedes paper. Unless there is already a tk extension to display html this seems like a good idea. We could even put a link to a youtube video tutorial if there is one or if someone makes one. (There seems to be some creative types interested in helping with Idle. This would be a good way for someone to contribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 13:46:44 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Apr 2013 11:46:44 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1364816804.49.0.732711394516.issue6698@psf.upfronthosting.co.za> Todd Rovito added the comment: Roger, Yes I will add another issue covering the enhancement. Ned, Thanks for the review. I forgot to mention it but I too tested on the Mac :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 13:51:27 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Apr 2013 11:51:27 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only Message-ID: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> New submission from Todd Rovito: Based on enhancements from this issue: http://bugs.python.org/issue6698 Comments from Tal Einat The "editor-on-startup" config option should be removed. Running IDLE without arguments should open a shell. If IDLE is asked to open any files for editing, it should open just editor windows. IDLE should open both a shell window and one or more editor windows only when explicitly asked to do so on the command line. If this is done, the -e option ("open an editor") would tell IDLE to open an empty editor window if no files are asked to be opened for editing. If no other arguments are given, IDLE will open just an editor window (no shell window). The -i option ("open a shell") would tell IDLE to open a shell window even if asked to open files for editing. I think this is more obvious and easier to work with. It will also make the command line argument processing code simpler. And as a bonus we remove a config option :) I will also post on idle-dev for discussion as Terry Reedy requested. ---------- components: IDLE messages: 185731 nosy: Todd.Rovito, roger.serwy, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE: Remove config option 'editor on startup' and utilize command line options only type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 13:59:04 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 01 Apr 2013 11:59:04 +0000 Subject: [issue16893] Create IDLE help.txt from Doc/library/idle.rst In-Reply-To: <1357663512.19.0.739336896498.issue16893@psf.upfronthosting.co.za> Message-ID: <1364817544.21.0.995123615242.issue16893@psf.upfronthosting.co.za> Todd Rovito added the comment: Ned, Using a web browser is a great idea!!!! I like it because it removes code from IDLE making IDLE even simpler (and better). Besides it would take us forever to duplicate some of the functionally that exists in today's modern web browser. Zach, What do you think? Terry, What is this paper technology that you speak of? A youtube video showing off IDLE would be fantastic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 14:20:33 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 01 Apr 2013 12:20:33 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only In-Reply-To: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> Message-ID: <1364818833.86.0.868735478122.issue17609@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree with the change, but keep in mind that at least on OSX a lot of users start IDLE by double clicking on the IDLE application in the Finder (or double-clicking a .py file) and as such don't have an easy way to specify the -e or -i options. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 14:23:26 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 01 Apr 2013 12:23:26 +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: <1364819006.77.0.722603117451.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: d9pouces: are you willing to sign a contributor agreement? The agreement is needed before we can add these changes to the stdlib, and I'd like to that for the 3.4 release. More information on the contributor agreement: http://www.python.org/psf/contrib/contrib-form/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 14:25:39 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Apr 2013 12:25:39 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <1364819139.23.0.00505556665615.issue17483@psf.upfronthosting.co.za> R. David Murray added the comment: It may not make sense, but I've seen it supported in the wild, in a different library. Of course, we *did* treat it as a bug in our code and fix it once we realized that's what the library was doing (we were inadvertently passing it None for the hostname, and its response to that was to not check it). So I think Antoine is probably right here. Especially since this has never been reported as a bug by someone trying to use it in an application. Since it wasn't documented, perhaps we should just add a deprecation warning (that says it is a noop) instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 14:28:39 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Apr 2013 12:28:39 +0000 Subject: [issue17608] configparser not honouring section but not variable case In-Reply-To: <1364794810.72.0.199775169756.issue17608@psf.upfronthosting.co.za> Message-ID: <1364819319.87.0.0256050605472.issue17608@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 14:32:29 2013 From: report at bugs.python.org (d9pouces) Date: Mon, 01 Apr 2013 12:32:29 +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: <1364819549.62.0.922281221635.issue14455@psf.upfronthosting.co.za> d9pouces added the comment: I just signed this agreement. Thanks for accepting this patch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 14:42:09 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Mon, 01 Apr 2013 12:42:09 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only In-Reply-To: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> Message-ID: <1364820129.13.0.529977952716.issue17609@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: IDLE is widely used by students and should have its most relevant settings available in the GUI also. ---------- nosy: +Guilherme.Sim?es _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 14:49:02 2013 From: report at bugs.python.org (Zbigniew Halas) Date: Mon, 01 Apr 2013 12:49:02 +0000 Subject: [issue17610] Qsort function misuse in typeobject.c Message-ID: <1364820542.51.0.192116883803.issue17610@psf.upfronthosting.co.za> New submission from Zbigniew Halas: Comparison function slotdef_cmp in Objects/typeobject.c is based on the assumption that qsort may be stabilised by taking memory addresses of compared objects into consideration. This assumption is not guaranteed by the C standard and may not always be true, like for example in the case of qsort implemented as a typical quicksort. Sometimes it may be even more harmful, as some implementations may be unhappy about comparison function changing its value just because an element was moved to another memory location (I discovered this problem while porting Python to HelenOS, where this comparison function caused qsort to enter infinite recursion). The actual function: /* Comparison function for qsort() to compare slotdefs by their offset, and for equal offset by their address (to force a stable sort). */ static int slotdef_cmp(const void *aa, const void *bb) { const slotdef *a = (const slotdef *)aa, *b = (const slotdef *)bb; int c = a->offset - b->offset; if (c != 0) return c; else /* Cannot use a-b, as this gives off_t, which may lose precision when converted to int. */ return (a > b) ? 1 : (a < b) ? -1 : 0; } ---------- components: Interpreter Core messages: 185738 nosy: zhalas priority: normal severity: normal status: open title: Qsort function misuse in typeobject.c type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 15:31:59 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Apr 2013 13:31:59 +0000 Subject: [issue10340] asyncore doesn't properly handle EINVAL on OSX In-Reply-To: <1289055392.69.0.485144076522.issue10340@psf.upfronthosting.co.za> Message-ID: <1364823119.4.0.309783591903.issue10340@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm assuming that the buildbots stabilized so I'm going to go ahead and close this. ---------- nosy: +brett.cannon status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 17:49:46 2013 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 01 Apr 2013 15:49:46 +0000 Subject: [issue1176504] locale._build_localename treatment for utf8 Message-ID: <1364831386.09.0.201163905219.issue1176504@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably this patch should be accompanied by an equivalent for _localemodule.c, or am I in cloud cuckoo land? FTR #1699853 referenced above is closed but it refers to #10466 which is Windows specific. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 18:31:20 2013 From: report at bugs.python.org (Mark Shannon) Date: Mon, 01 Apr 2013 16:31:20 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. Message-ID: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> New submission from Mark Shannon: The handling of "pseudo exceptions" (return, break and continue) are currently handled in the interpreter. This make the interpreter loop more complex and slower than it needs to be. This change moves the handling of pseudo exceptions into the compiler. The net effects of this patch are: Simpler interpreter loop: no 'psuedo-exceptions', fewer bytecodes and some simplifed bytecodes. Eliminate the 'why_code' state variable in the interpreter. Execution is always in the 'normal' state except during explicit exception handling. Small increase in size and complexity of compiler. Speedup of 1.5% (Intel i7); this should be considered a happy side-effect rather than a motivation for the change. ---------- hgrepos: 181 messages: 185741 nosy: Mark.Shannon priority: normal severity: normal status: open title: Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 18:32:02 2013 From: report at bugs.python.org (Mark Shannon) Date: Mon, 01 Apr 2013 16:32:02 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1364833922.35.0.599711080728.issue17611@psf.upfronthosting.co.za> Changes by Mark Shannon : ---------- keywords: +patch Added file: http://bugs.python.org/file29646/b16527f84774.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 18:53:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Apr 2013 16:53:27 +0000 Subject: [issue14135] check for locale changes in test.regrtest In-Reply-To: <1330296468.42.0.0463135348779.issue14135@psf.upfronthosting.co.za> Message-ID: <3Zffkv01g2zPYD@mail.python.org> Roundup Robot added the comment: New changeset 4fcd50a6dca7 by Brett Cannon in branch 'default': Issue #14135: Make sure tests don't leave the locale changed for any http://hg.python.org/cpython/rev/4fcd50a6dca7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 18:54:11 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Apr 2013 16:54:11 +0000 Subject: [issue14135] check for locale changes in test.regrtest In-Reply-To: <1330296468.42.0.0463135348779.issue14135@psf.upfronthosting.co.za> Message-ID: <1364835251.47.0.519512800234.issue14135@psf.upfronthosting.co.za> Brett Cannon added the comment: Sorry it took so wrong to get to this. It simply fell out of my purview. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:04:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Apr 2013 17:04:06 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <3Zffz92qL7zQBt@mail.python.org> Roundup Robot added the comment: New changeset 4ed8a8e781c3 by Antoine Pitrou in branch 'default': Issue #17483: remove unreachable code in urlopen(). http://hg.python.org/cpython/rev/4ed8a8e781c3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:05:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Apr 2013 17:05:22 +0000 Subject: [issue14135] check for locale changes in test.regrtest In-Reply-To: <1330296468.42.0.0463135348779.issue14135@psf.upfronthosting.co.za> Message-ID: <1364835922.24.0.0275217554657.issue14135@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I had to back out this changeset as it totally broke the test suite here: [ 91/372/90] test_defaultdict test test_defaultdict crashed -- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 1287, in runtest_inner with saved_test_environment(test, verbose, quiet) as environment: File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 1251, in __enter__ in self.resource_info()) File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 1250, in self.saved_values = dict((name, get()) for name, get, restore File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 1237, in get_locale return tuple(map(locale.getlocale, self._locale_categories)) File "/home/antoine/cpython/default/Lib/locale.py", line 523, in getlocale raise TypeError('category LC_ALL is not supported') TypeError: category LC_ALL is not supported (etc.) ---------- nosy: +pitrou status: closed -> open versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:21:39 2013 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 01 Apr 2013 17:21:39 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1364836899.98.0.0146080424106.issue2889@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Christoph Gohlke any chance of providing a build for 3.3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:26:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Apr 2013 17:26:33 +0000 Subject: [issue17357] Add missing verbosity message to importlib In-Reply-To: <1362507829.49.0.31047461658.issue17357@psf.upfronthosting.co.za> Message-ID: <3ZfgT44WtwzQHG@mail.python.org> Roundup Robot added the comment: New changeset ac89e7bc0e2f by Brett Cannon in branch '3.3': Issue #17357: Add missing verbosity messages when running under http://hg.python.org/cpython/rev/ac89e7bc0e2f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:28:03 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Apr 2013 17:28:03 +0000 Subject: [issue17357] Add missing verbosity message to importlib In-Reply-To: <1362507829.49.0.31047461658.issue17357@psf.upfronthosting.co.za> Message-ID: <1364837283.01.0.304792722939.issue17357@psf.upfronthosting.co.za> Brett Cannon added the comment: Also done in default but since I forgot to say it was a merge for this issue it didn't add the commit message. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:43:12 2013 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 01 Apr 2013 17:43:12 +0000 Subject: [issue6335] Add support for mingw In-Reply-To: <1245849042.65.0.399048729588.issue6335@psf.upfronthosting.co.za> Message-ID: <1364838192.41.0.363776302263.issue6335@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Brian,Tim any comments on this? Out of curiosity how does cygwin manage Python? ---------- nosy: +brian.curtin, tim.golden versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:46:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Apr 2013 17:46:45 +0000 Subject: [issue14135] check for locale changes in test.regrtest In-Reply-To: <1330296468.42.0.0463135348779.issue14135@psf.upfronthosting.co.za> Message-ID: <1364838405.27.0.449367615005.issue14135@psf.upfronthosting.co.za> Brett Cannon added the comment: Can you check the attached patch works for you, Antoine? ---------- Added file: http://bugs.python.org/file29647/check_locale.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:49:26 2013 From: report at bugs.python.org (Brian Curtin) Date: Mon, 01 Apr 2013 17:49:26 +0000 Subject: [issue6335] Add support for mingw In-Reply-To: <1245849042.65.0.399048729588.issue6335@psf.upfronthosting.co.za> Message-ID: <1364838566.45.0.195149413358.issue6335@psf.upfronthosting.co.za> Brian Curtin added the comment: None from me. Not familiar with what cygwin does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 19:55:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Apr 2013 17:55:03 +0000 Subject: [issue14135] check for locale changes in test.regrtest In-Reply-To: <1330296468.42.0.0463135348779.issue14135@psf.upfronthosting.co.za> Message-ID: <1364838903.2.0.86122865692.issue14135@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It does, thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:06:19 2013 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 01 Apr 2013 18:06:19 +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: <1364839579.93.0.1689368035.issue7475@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: -flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:06:30 2013 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 01 Apr 2013 18:06:30 +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: <1364839590.11.0.0340762052838.issue7475@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:11:15 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Apr 2013 18:11:15 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only In-Reply-To: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> Message-ID: <1364839875.39.0.398051869149.issue17609@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think whatever we do should be done on all versions. This is not a 'major rewrite'. As I remember, installing Python on Windows adds 'edit with IDLE' to the right-click context menu. I cannot check at the moment because my substitute machine only has repository builds. I do not know what happens with multiple installs. Perhaps there should be 'Edit with Idle x.y' for each. 'Run with Idle' might be nice, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:11:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Apr 2013 18:11:49 +0000 Subject: [issue14135] check for locale changes in test.regrtest In-Reply-To: <1330296468.42.0.0463135348779.issue14135@psf.upfronthosting.co.za> Message-ID: <3ZfhTJ34zpzQTd@mail.python.org> Roundup Robot added the comment: New changeset dfe04eaa3924 by Brett Cannon in branch 'default': Issue #14135: Let's try this again. http://hg.python.org/cpython/rev/dfe04eaa3924 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:12:10 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Apr 2013 18:12:10 +0000 Subject: [issue14135] check for locale changes in test.regrtest In-Reply-To: <1330296468.42.0.0463135348779.issue14135@psf.upfronthosting.co.za> Message-ID: <1364839930.87.0.136060488858.issue14135@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:27:08 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 01 Apr 2013 18:27:08 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <1364840828.25.0.699843383793.issue17483@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Antoine - I approached it from idea that check_hostname "as a setting" is allowed from HTTPSConnection (http/client.py) but it not controllable from urllib. Is there a case where it is useful in HTTPSConnection, but it should not be from urllib? - Thanks for the changes. One comment on the changeset 4ed8a8e781c3 + https_handler = HTTPSHandler(context=context, check_hostname=True) check_hostname=True is redundant here. You could send the context and by default it checks the hostname. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:42:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Apr 2013 18:42:12 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1364840828.25.0.699843383793.issue17483@psf.upfronthosting.co.za> Message-ID: <1364841460.3410.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > Antoine - I approached it from idea that check_hostname "as a setting" > is allowed from HTTPSConnection (http/client.py) but it not > controllable from urllib. Is there a case where it is useful in > HTTPSConnection, but it should not be from urllib? HTTPSConnection is lower-level, so it makes sense to allow more deviations there. That's why HTTPSConnection also takes the context directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:57:16 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Apr 2013 18:57:16 +0000 Subject: [issue1528154] New sequences for Unicode groups and block ranges needed Message-ID: <1364842636.81.0.53919373876.issue1528154@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am trying to decide if this issue still serves a purpose. It seems to be a request to add something to the existing re module. Fredrik semi-rejected the idea without a (micro)-pep. A python-ideas discussion is now another option. Matthew's regex implementation already has the feature, so this issue would be moot if it were ever part of the stdlib. But the fate of #2636 is unclear. Rereading, it now seems that implementing the feature in the current re module using the TR18 syntax would be this issue, if someone were to do it. So I will not close yet. ---------- dependencies: +Adding a new regex module (compatible with re) versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:59:39 2013 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 01 Apr 2013 18:59:39 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1364842779.9.0.398776510557.issue6743@psf.upfronthosting.co.za> Mark Lawrence added the comment: @?ric I'd be interested in using this as print/pprint are part of my debugging kit, so could you take this forward please? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 20:59:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Apr 2013 18:59:56 +0000 Subject: [issue1528154] New sequences for Unicode groups and block ranges needed Message-ID: <1364842796.9.0.525643350761.issue1528154@psf.upfronthosting.co.za> Ezio Melotti added the comment: We should really just include "regex" in 3.4. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 21:04:54 2013 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 01 Apr 2013 19:04:54 +0000 Subject: [issue7094] Add alternate float formatting styles to new-style formatting. In-Reply-To: <1255118044.58.0.727731702587.issue7094@psf.upfronthosting.co.za> Message-ID: <1364843094.87.0.25616140757.issue7094@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Eric looks as if the bulk of the work has been done so would you like to dot the i's and cross the t's? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 21:07:38 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Apr 2013 19:07:38 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1364843258.29.0.531755738405.issue7559@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 21:15:14 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Apr 2013 19:15:14 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1364843714.1.0.0861372644962.issue6743@psf.upfronthosting.co.za> ?ric Araujo added the comment: Still waiting for a review. ---------- keywords: +needs review stage: needs patch -> patch review versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 21:40:19 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Apr 2013 19:40:19 +0000 Subject: [issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs In-Reply-To: <1364486422.93.0.992071692104.issue17566@psf.upfronthosting.co.za> Message-ID: <1364845219.29.0.117747302284.issue17566@psf.upfronthosting.co.za> Brett Cannon added the comment: Barry, Eric: can you clarify why you made module_repr an abstractmethod and thus require its overloading? It seems like its default is fine and you should only need to overload it when you can say something better than the default. ---------- nosy: +barry, eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 21:59:23 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 01 Apr 2013 19:59:23 +0000 Subject: [issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs In-Reply-To: <1364845219.29.0.117747302284.issue17566@psf.upfronthosting.co.za> Message-ID: <20130401155918.59ccd480@anarchist> Barry A. Warsaw added the comment: On Apr 01, 2013, at 07:40 PM, Brett Cannon wrote: >Barry, Eric: can you clarify why you made module_repr an abstractmethod and >thus require its overloading? Maybe Eric can, but I can't. ;) I honestly don't remember why we made it abstract, except perhaps because we put it in the Loader class which already had an abstract load_module() method. >It seems like its default is fine and you should only need to overload it >when you can say something better than the default. Note that moduleobject.c can handle the case of a missing or uncallable module_repr() attribute. Then it implements the defaults specified in PEP 420. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 22:11:25 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 01 Apr 2013 20:11:25 +0000 Subject: [issue17359] python modules.zip is not documented In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1364847085.48.0.629008432915.issue17359@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I don't think that's enough documentation for the feature. There's a whole PEP 338 just for the -m option due to the subtle issue associated with the "run a module" logic, so I'd expect somewhat more detail or an update of the PEP with the needed details. This page would be the appropriate place for a section on the topic, I guess: http://docs.python.org/3/library/runpy.html A mention on this page would also be good: http://docs.python.org/3/tutorial/interpreter.html Since the feature was added in Python 2.6, the documentation patch should also be backported to the Python 2.6 and 2.7. PS: I wonder why the documentation search doesn't even return the page you mentioned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 22:11:44 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 01 Apr 2013 20:11:44 +0000 Subject: [issue17359] python modules.zip is not documented In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1364847104.39.0.712195418433.issue17359@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 22:13:26 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 01 Apr 2013 20:13:26 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1364847206.91.0.224611519617.issue17561@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Being Tulip asynchronous I think that what it needs is an utility function which returns *multiple* sockets as are the addresses returned by getaddrinfo() and also possibly even disable the IPv4/6 dual stack in order to be consistent across all platforms. After the sockets are returned they can be "registered" against the event loop as two separate entities such as, say, ("0.0.0.0", 8000) *and* ("::", 8000). If you think this makes sense I can contribute something like this into Tulip, or I can bring it up on Tulip's ml and ask for other people's opinions. My current recipe is different in that it provides a function which bind()s on one socket only and tries to enable the dual stack whenever possible in order to support IPv4 and IPv6 with a single socket. In this it is similar to socket.create_connection() and clearly favors blocking socket usages (although it can also be used in non-blocking apps) which kind of represents the default for the stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 22:18:48 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Apr 2013 20:18:48 +0000 Subject: [issue17359] python modules.zip is not documented In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1364847528.71.0.557628175021.issue17359@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: -Python 2.6, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 22:20:07 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Apr 2013 20:20:07 +0000 Subject: [issue17571] broken links on Lib/datetime.py docstring In-Reply-To: <1364543666.79.0.123809819447.issue17571@psf.upfronthosting.co.za> Message-ID: <1364847607.62.0.713807472481.issue17571@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch. ---------- keywords: +patch stage: -> commit review type: -> enhancement Added file: http://bugs.python.org/file29648/issue17571.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 22:20:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Apr 2013 20:20:18 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1364847618.56.0.955335019127.issue6743@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't understand how this is supposed to work or what the point is. By construction, pprint prints a *single* object, and it will split the representation over several lines if necessary. Therefore the print() semantics (print several objects one after another, without linebreak) are incompatible with pprint. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 22:46:53 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Apr 2013 20:46:53 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1364849213.57.0.786233442827.issue6743@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 22:53:03 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Apr 2013 20:53:03 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only In-Reply-To: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> Message-ID: <1364849583.2.0.460798494525.issue17609@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A corollary of what I said is that if something is a bad idea for 3.3, it is probably a bad idea for 3.4. On idle-dev thread "Feedback requested on issue 17609: ...", Bruce Sherwood says "For the thousands of students in our intro physics curriculum who use VIDLE (which I hope eventually can be replaced by using an updated IDLE), it is extremely important that starting IDLE (by clicking on an icon) display only an edit window at startup". Idle is both a shell with editor and an editor with shell. The latter is a legitimate use case and I do not think we should remove the feature of making it a configuration option. So I think this issue should be closed as rejected (and see below). On Windows, I believe one could accomplish Bruce's purpose with a customized Window's shortcut. Even is something similar is true on *nix and Mac, the details would probably be different on both. Learning all three systems is too much to expect of anyone. I am sympathetic with the idea of making option processing easier (but not as the cost of making things harder for users). I believe using the newer argparse instead of the ancient getopt in PyShell.main might do that. It seems to me that the flow should be dict of builtin default updated by user configuration file updated by command line or function args. 'Function' refers to a possible new idlelib.idle.main for starting Idle from Python by passing options directly as arguments rather than by manipulating sys.argv. I do not see 'remove a config option' as a goal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 23:00:42 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Apr 2013 21:00:42 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364850042.83.0.413850297393.issue17583@psf.upfronthosting.co.za> Ezio Melotti added the comment: I added a few more comments. To clarify, when I said two documents, I meant that there will be only a single HOWTO, but on 2.7 it will be specific to Python 2, whereas on 3.x it will be specific to Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 23:04:35 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Apr 2013 21:04:35 +0000 Subject: [issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs In-Reply-To: <1364486422.93.0.992071692104.issue17566@psf.upfronthosting.co.za> Message-ID: <1364850275.51.0.701069525497.issue17566@psf.upfronthosting.co.za> Brett Cannon added the comment: If Eric doesn't have anything to add then I would like to change importlib.abc.Loader.module_repr() to no longer be abstract and the default to be defined as ``return repr(module)``. Else it should be entirely optional and not have a default implementation, but having it be required as abstract doesn't seem quite right to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 23:20:07 2013 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 01 Apr 2013 21:20:07 +0000 Subject: [issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules In-Reply-To: <1266342231.42.0.692171370087.issue7944@psf.upfronthosting.co.za> Message-ID: <1364851207.54.0.836472400084.issue7944@psf.upfronthosting.co.za> Mark Lawrence added the comment: #7232 has been closed so test_tarfile can presumably now be committed, also test_os. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 23:35:35 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 Apr 2013 21:35:35 +0000 Subject: [issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs In-Reply-To: <1364486422.93.0.992071692104.issue17566@psf.upfronthosting.co.za> Message-ID: <1364852135.7.0.100514217221.issue17566@psf.upfronthosting.co.za> Eric V. Smith added the comment: I was going to blame Barry, but I see he beat me to it :) It looks like an oversight, and it shouldn't be abstract. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 23:43:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 01 Apr 2013 21:43:44 +0000 Subject: [issue17610] Qsort function misuse in typeobject.c In-Reply-To: <1364820542.51.0.192116883803.issue17610@psf.upfronthosting.co.za> Message-ID: <3Zfn9q5H9ZzRFy@mail.python.org> Roundup Robot added the comment: New changeset 9431a092b708 by Benjamin Peterson in branch '3.3': list slotdefs in offset order rather than sorting them (closes #17610) http://hg.python.org/cpython/rev/9431a092b708 New changeset 96c0efe93774 by Benjamin Peterson in branch 'default': merge 3.3 (#17610) http://hg.python.org/cpython/rev/96c0efe93774 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 23:46:10 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 01 Apr 2013 21:46:10 +0000 Subject: [issue17610] Qsort function misuse in typeobject.c In-Reply-To: <1364820542.51.0.192116883803.issue17610@psf.upfronthosting.co.za> Message-ID: <1364852770.02.0.254667065079.issue17610@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the report. I fixed the 3.3 and 3.4 branches. If you felt motivated to do the associated shuffling around in 2.7, I would accept a patch. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 23:55:25 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 01 Apr 2013 21:55:25 +0000 Subject: [issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs In-Reply-To: <1364850275.51.0.701069525497.issue17566@psf.upfronthosting.co.za> Message-ID: <20130401175523.703e6657@anarchist> Barry A. Warsaw added the comment: On Apr 01, 2013, at 09:04 PM, Brett Cannon wrote: >If Eric doesn't have anything to add then I would like to change >importlib.abc.Loader.module_repr() to no longer be abstract and the default >to be defined as ``return repr(module)``. Else it should be entirely optional >and not have a default implementation, but having it be required as abstract >doesn't seem quite right to me. I have no problem making it non-abstract, but I don't think you need to define a default. The built-in module object already does the right thing by default. Maybe that's why we (mistakenly?) made it abstract. We might have hoped to document the API but not provide a default implementation, since if module_repr() is not both defined and callable, moduleobject.c already does the right thing. But at least there are unit tests so it should be hard for you to break things. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 1 23:59:36 2013 From: report at bugs.python.org (Amit Saha) Date: Mon, 01 Apr 2013 21:59:36 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364853576.32.0.395478386721.issue17583@psf.upfronthosting.co.za> Amit Saha added the comment: Thanks Ezio. I am almost done with incorporating the changes suggested and will submit a patch sometime in the next day or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 00:00:55 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 Apr 2013 22:00:55 +0000 Subject: [issue17612] hooks/mail.py requires [smtp] host to be set, despite a comment to the contrary Message-ID: <1364853655.88.0.718145768613.issue17612@psf.upfronthosting.co.za> New submission from Eric V. Smith: In the mail hook, there's a comment that says: ''' To set the SMTP server to something other than localhost, add a [smtp] section to your hgrc: [smtp] host = mail.python.org port = 25 ''' This is not true. The default host is '', which tells smtplib.SMTP to not make an initial connection. If we want the comment to be correct, then we need to set 'localhost' as the default: - host = ui.config('smtp', 'host', '') + host = ui.config('smtp', 'host', 'localhost') I guess there's some chance that we want to force the smtp host to be set. If that's the case then then comment should be changed and the code modified to require the host be specified in the config file (or at least a better error message than 'please run connect() first'). Adding Antoine because annotate points to him for these lines. ---------- assignee: eric.smith keywords: easy messages: 185777 nosy: eric.smith, pitrou priority: normal severity: normal status: open title: hooks/mail.py requires [smtp] host to be set, despite a comment to the contrary _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 00:22:45 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Apr 2013 22:22:45 +0000 Subject: [issue17566] Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs In-Reply-To: <1364486422.93.0.992071692104.issue17566@psf.upfronthosting.co.za> Message-ID: <1364854965.61.0.519341211669.issue17566@psf.upfronthosting.co.za> Brett Cannon added the comment: Totally optional and no default argument it is. ---------- assignee: docs at python -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 00:38:35 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Apr 2013 22:38:35 +0000 Subject: [issue17359] Mention "__main__.py" explicit in command line docs In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1364855915.97.0.678953003039.issue17359@psf.upfronthosting.co.za> Nick Coghlan added the comment: The previous title was not accurate, as the directory and zipfile execution feature is documented at http://docs.python.org/2/using/cmdline.html#interface-options It is also documented in http://docs.python.org/3/library/runpy#runpy.run_path ---------- title: python modules.zip is not documented -> Mention "__main__.py" explicit in command line docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 00:38:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Apr 2013 22:38:46 +0000 Subject: [issue17359] Mention "__main__.py" explicitly in command line docs In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1364855926.55.0.248291950195.issue17359@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- title: Mention "__main__.py" explicit in command line docs -> Mention "__main__.py" explicitly in command line docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 00:42:07 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Apr 2013 22:42:07 +0000 Subject: [issue17359] Mention "__main__.py" explicitly in command line docs In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1364856127.57.0.98710729645.issue17359@psf.upfronthosting.co.za> Nick Coghlan added the comment: There's also a problem where the CLI docs claim __main__.py support was added in 2.5 - that's not accurate, it was only added in 2.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 01:07:09 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Apr 2013 23:07:09 +0000 Subject: [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <1364857629.87.0.363497332116.issue14097@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached a new patch that should address all the points except the last example with Fibonacci. ---------- stage: needs patch -> patch review versions: -Python 3.2 Added file: http://bugs.python.org/file29649/issue14097-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 01:08:10 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Apr 2013 23:08:10 +0000 Subject: [issue8079] make install fails with -j8 with python2.6/config on FreeBSD In-Reply-To: <1267857630.87.0.870938560397.issue8079@psf.upfronthosting.co.za> Message-ID: <1364857690.2.0.326491117773.issue8079@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Garrett, I don't know that any of our active developers use FreeBSD. Is this a problem with 2.7.3 or 3.3.0 (or 2.7.4 or 3.3.1 when they come out in a week)? If you have lost interest, please say so and we will close until such time as it becomes current again. ---------- nosy: +terry.reedy versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 01:22:57 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Apr 2013 23:22:57 +0000 Subject: [issue6335] Add support for mingw In-Reply-To: <1245849042.65.0.399048729588.issue6335@psf.upfronthosting.co.za> Message-ID: <1364858577.44.0.368624921654.issue6335@psf.upfronthosting.co.za> Ned Deily added the comment: This issue has likely been superseded by more recent activity to support mingw, for example, activity tracked in Issue17605. Roumen? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 02:55:15 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Apr 2013 00:55:15 +0000 Subject: [issue17613] IDLE error Message-ID: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Running ILDE with 2.7.4 RC 1 on Mac OS X 10.8 and with ActiveTCL 8.5.13 using "python -m idlelib.idle", I object the following traceback messages. I'm unsure what events are triggering it: 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/lib-tk/Tkinter.py", line 531, in callit func(*args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/ColorDelegator.py", line 153, in recolorize self.recolorize_main() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/ColorDelegator.py", line 186, in recolorize_main next = self.index(mark + "+%d lines linestart" % File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/idlelib/Delegator.py", line 10, in __getattr__ attr = getattr(self.delegate, name) # May raise AttributeError AttributeError: 'NoneType' object has no attribute 'index' ---------- components: IDLE messages: 185784 nosy: rhettinger priority: normal severity: normal status: open title: IDLE error type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 03:21:43 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Apr 2013 01:21:43 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1364865703.28.0.0617454279866.issue17611@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Additional effect: Destabilizes lots of code that has had a decade to mature. It messes with the compiler, the eval loop, the peephole optimizer, the disassembler, every third-party tool that examines or alters byte codes, any tool or VM that implements python byte codes, etc. Changes like this tend to invalidate previous efforts to time and optimize code. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 03:37:06 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 02 Apr 2013 01:37:06 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <1364866626.6.0.828265929161.issue17483@psf.upfronthosting.co.za> Senthil Kumaran added the comment: > HTTPSConnection is lower-level, so it makes sense to allow more > deviations there. That's why HTTPSConnection also takes the context > directly. That's okay of an explanation. HTTPSHandler in urllib module provides an option to send the context and the check_hostname and we are using that here. I can understand the security benefits in sending the check_hostname=True (which is sane thing to do). But if someone explicitly wants to use the check_hostname=False in the HTTPSHandler, he will have to create a new local opener object and then use the opener.open to carry on with the request as he would expect it to behave. ( Do you think this warrants a doc update. Personally I am 0 on it). I am okay this change. This should be back ported as the code was unreachable 3.3 in the first place and there is no behavior change. Thanks! ---------- assignee: orsenthil -> pitrou resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 03:40:20 2013 From: report at bugs.python.org (Todd Rovito) Date: Tue, 02 Apr 2013 01:40:20 +0000 Subject: [issue17613] IDLE error In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364866820.66.0.414026891018.issue17613@psf.upfronthosting.co.za> Todd Rovito added the comment: Raymond, Is then when you simply startup IDLE or are you opening a Python file to edit? The only reason why I ask about editing a file is because ColorDelegator is used to by the EditorWindow to perform the syntax hi-lighting (I think). I have a few Macs so I can try and duplicate. In addition I added a few people to the nosy list that might know better than I do what the problem is. Thanks for the report. ---------- nosy: +Todd.Rovito, ned.deily, roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 03:43:07 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 02 Apr 2013 01:43:07 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1364866987.3.0.62309093198.issue8913@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can issue8913-3.patch be committed or are any further tweaks needed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 03:44:34 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 02 Apr 2013 01:44:34 +0000 Subject: [issue14679] Define an __all__ for html.parser In-Reply-To: <1335470773.41.0.349037543033.issue14679@psf.upfronthosting.co.za> Message-ID: <1364867074.76.0.0629273453618.issue14679@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I think, HTMLParseError should also be defined __all__ (all also servers as what public classes/methods to look for sometimes and sets some expectation while reading the code.) There is no deprecation warning added in the class here. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 03:46:13 2013 From: report at bugs.python.org (Todd Rovito) Date: Tue, 02 Apr 2013 01:46:13 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364867173.4.0.230442357566.issue17583@psf.upfronthosting.co.za> Todd Rovito added the comment: Sorry about using the wrong word, I should of used HowTo not FAQ. I really meant to suggest replacing guide with the word HowTo. A HowTo would be perfect!!!! Sorry about the confusion. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 03:52:37 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 02 Apr 2013 01:52:37 +0000 Subject: [issue6822] Error calling .storlines from ftplib In-Reply-To: <1251896489.26.0.54536142072.issue6822@psf.upfronthosting.co.za> Message-ID: <1364867557.07.0.655568730925.issue6822@psf.upfronthosting.co.za> Mark Lawrence added the comment: ftplib_doc.patch is so simple I'm assuming this has slipped under the radar, so would someone like to do the honours and commit the patch please. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 04:12:46 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 02 Apr 2013 02:12:46 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1364868766.78.0.552777678823.issue10379@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg120978 "The bug has been fixed upstream...". Have I missed something as on Windows Vista...? c:\Users\Mark\MyPython>python Python 3.3.1rc1 (v3.3.1rc1:92c2cfb92405, Mar 25 2013, 22:39:19) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import locale; print(locale.format('%.0f KB', 100)) Traceback (most recent call last): File "", line 1, in File "c:\python33\lib\locale.py", line 193, in format "format specifier, %s not valid") % repr(percent)) ValueError: format() must be given exactly one %char format specifier, '%.0f KB' not valid ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 04:16:34 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Apr 2013 02:16:34 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364868994.66.0.748853224275.issue17613@psf.upfronthosting.co.za> Ned Deily added the comment: Setting as 2.7.4 release blocker pending further analysis. Roger, any ideas? Would having the contents of Raymond's .idlerc files be of help? Raymond, does IDLE terminate when the exception occurs or does it keep running? ---------- nosy: +benjamin.peterson priority: normal -> release blocker title: IDLE error -> IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 04:59:28 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Apr 2013 02:59:28 +0000 Subject: [issue17587] Have all core library modules imported by default In-Reply-To: <1364748903.2.0.666469840535.issue17587@psf.upfronthosting.co.za> Message-ID: <1364871568.42.0.782588802809.issue17587@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Well, the fun has been had. ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:01:34 2013 From: report at bugs.python.org (Daniel Ellis) Date: Tue, 02 Apr 2013 03:01:34 +0000 Subject: [issue17587] Have all core library modules imported by default In-Reply-To: <1364871568.42.0.782588802809.issue17587@psf.upfronthosting.co.za> Message-ID: Daniel Ellis added the comment: It was a hell of a ride. On Mon, Apr 1, 2013 at 10:59 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > Well, the fun has been had. > > ---------- > nosy: +benjamin.peterson > resolution: -> rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:02:36 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Apr 2013 03:02:36 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364871756.37.0.686260326464.issue17613@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Do you get the same traceback with "python -m idlelib"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:06:59 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Apr 2013 03:06:59 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364872019.07.0.179754629539.issue17613@psf.upfronthosting.co.za> Ned Deily added the comment: "python -m idlelib" isn't implemented for 2.7.x, is it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:19:31 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Apr 2013 03:19:31 +0000 Subject: [issue1274] doctest fails to run file based tests with 8bit paths In-Reply-To: <1192213919.32.0.843568182453.issue1274@psf.upfronthosting.co.za> Message-ID: <1364872771.18.0.940699842878.issue1274@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am closing this for lack of evidence that there is a bug in a current release 2.7.3 or 3.3.0 or release candidate for 2.7.4 or 3.3.1. What would be needed is a self-contained example that shows a problem with one of the above. ---------- assignee: tim_one -> nosy: +terry.reedy resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:25:16 2013 From: report at bugs.python.org (Phillip J. Eby) Date: Tue, 02 Apr 2013 03:25:16 +0000 Subject: [issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists In-Reply-To: <1337905627.12.0.841961188355.issue14905@psf.upfronthosting.co.za> Message-ID: <1364873116.63.0.480916025149.issue14905@psf.upfronthosting.co.za> Phillip J. Eby added the comment: Just a note: the zip files produced by the distutils and friends (sdist, bdist_dumb, eggs) do not include entries for plain directories. I would guess that this is also true for wheels at the moment, unless something was specifically done to work around this property of distutils-generated zip files. So ISTM the right thing to do is to synthesize the entries at directory read time, when they're being looped over anyway. Reviewing the patch, there is a performance optimization possible by making a slight change to the algorithm. Currently the patch loops from the start of the string to the end, looking for path prefixes. This means that the total overall performance is determined by the length of the strings and especially the average directory depth. However, there is a significant shortcut possible: looping from the *end* of each string to the beginning, it's possible to break out of the loop if the prefix has already been seen -- thus saving (depth-1) dictionary lookups in the average case, and only looking at the characters in the base filename, unless a new directory is encountered... for a typical overhead of one unicode substring, dictionary lookup, and strrchr per zipfile directory entry. (Which is very small compared to what else is going on at that point in the process.) To elaborate, if you have paths of the form: x/y/a x/y/b x/y/c/d Then when processing 'x/y/a', you would first process x/y -- it's not in the dict, add it. Then x -- not in the dict, add it. Then you go to x/y/b, your first parent is x/y again -- but since it's in the dict you skip it, and don't even bother with the x. Next you see x/y/c, which is not in the dict, so you add it, then x/y, which is, so you break out of the loop for that item. Basically, about all that would change would be the for() loop starting at the end of the string and going to the beginning, with the loop position still representing the end of the prefix to be extracted. And the PyDict_Contains check would result in a break rather than a continue. So, if the only concern keeping the patch from being accepted is that it adds to startup time, this approach would cut down quite a bit on the overhead for generating the path information, in cases of repeated prefixes. (And in the common cases for zipfile use on sys.path, one would expect to see a lot of common prefixes, if only for package names.) ---------- nosy: +pje _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:31:44 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 03:31:44 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364873504.18.0.892563201728.issue17613@psf.upfronthosting.co.za> Roger Serwy added the comment: It's a "race condition" due to ColorDelegator calling .update() in its recolorize method. The call to .update() flushes pending events, including callbacks into Python code that can change out the ColorDelegator in the Percolator chain. Here's a way to trigger this bug reliably. First we need an unreasonably large file that will make the syntax highlighting routine take a while. This code will generate such a file: fid = open('/tmp/bigfile.py', 'w') L = '\n'.join(map(lambda x: "#%i\n'%i'\n" % (x,x), range(10000))) fid.writelines(L) fid.close() These next two steps need to be performed quickly to trigger the "race condition." $ python -m idlelib.idle -e /tmp/bigfile.py As soon as it loads, press Ctrl+Shift+S to bring up the Save-As dialog. You can take your time now. Overwrite the file. This triggers the filename_change_hook to call ResetColorizer, which removes the current ColorDelegator from the Percolator chain and inserts a new one. Wait a moment for the traceback to arrive. The attached patch fixes the issue. When the ColorDelegator is removed by Percolator's removefilter, the delegate is set to None. The patch detects that condition and then sets flags to stop the colorizer from continuing. In testing for this bug, I encountered another one. Pressing Alt-F4 quickly after the window loading bigfile appears triggers another traceback. I'll open a separate issue for that. ---------- keywords: +patch nosy: +georg.brandl, larry stage: -> patch review versions: +Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29650/stop_colorizer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:37:56 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Apr 2013 03:37:56 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364873876.08.0.744519179336.issue17613@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, idlelib.__main__.py was only added to 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:42:40 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 03:42:40 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback Message-ID: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> New submission from Roger Serwy: Using the bigfile.py generation program from #17613 triggers the following traceback: Traceback (most recent call last): File "/usr/bin/idle", line 5, in main() File "/usr/lib/python3.3/idlelib/PyShell.py", line 1431, in main if flist.open(filename) is None: File "/usr/lib/python3.3/idlelib/FileList.py", line 36, in open edit = self.EditorWindow(self, filename, key) File "/usr/lib/python3.3/idlelib/PyShell.py", line 113, in __init__ if self.io.filename: self.restore_file_breaks() File "/usr/lib/python3.3/idlelib/PyShell.py", line 229, in restore_file_breaks filename = self.io.filename AttributeError: 'NoneType' object has no attribute 'filename' ---------- components: IDLE messages: 185802 nosy: roger.serwy priority: critical severity: normal status: open title: IDLE - quickly closing a large file triggers a traceback type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 05:44:41 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 03:44:41 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364874281.66.0.976967276293.issue17614@psf.upfronthosting.co.za> Roger Serwy added the comment: I misworded the first sentence. It should have read: "Using bigfile.py as generated by the program in #17613 can trigger the following traceback when quickly closing the editor." Other large files can be used to trigger the bug as well, like Lib/decimal.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:05:01 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 04:05:01 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364875501.06.0.573329505492.issue17614@psf.upfronthosting.co.za> Roger Serwy added the comment: Like #17613, the root cause is a call to .update() in Lib/idlelib/PyShell.py .restore_file_breaks(). The attached patch fixes the issue. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file29651/issue17614.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:14:18 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 04:14:18 +0000 Subject: [issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default. In-Reply-To: <1364102013.73.0.373085073641.issue17535@psf.upfronthosting.co.za> Message-ID: <1364876058.5.0.00903801791779.issue17535@psf.upfronthosting.co.za> Roger Serwy added the comment: I received permission from UIUC to relicense IdleX code used for contributions into Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:16:05 2013 From: report at bugs.python.org (Todd Rovito) Date: Tue, 02 Apr 2013 04:16:05 +0000 Subject: [issue16887] IDLE - tabify/untabify applied when clicking Cancel In-Reply-To: <1357592262.2.0.644397432764.issue16887@psf.upfronthosting.co.za> Message-ID: <1364876165.69.0.401573968023.issue16887@psf.upfronthosting.co.za> Todd Rovito added the comment: Roger, I tested the patch and it does seem to function as you describe so feel free to apply the patch. The tabify function makes me scratch my head a little, according to help.txt: "Tabify Region -- Turns *leading* stretches of spaces into tabs (Note: We recommend using 4 space blocks to indent Python code.)" Yet this code doesn't seem to get tabifyed. a=[1,2,3,4,5] for i in range(0, len(a)): print("%d" % a[i]) I would expect that the print statement be tabbed in but on my Mac it does not seem to do that it just puts back in the single space in front of the print. This might be a separate issue but I was wondering if perhaps I misunderstand the purpose of this function? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:31:28 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 04:31:28 +0000 Subject: [issue16887] IDLE - tabify/untabify applied when clicking Cancel In-Reply-To: <1357592262.2.0.644397432764.issue16887@psf.upfronthosting.co.za> Message-ID: <1364877088.19.0.765197749479.issue16887@psf.upfronthosting.co.za> Roger Serwy added the comment: Todd, Tabify/Untabify are functions to deal with the great tabs vs. spaces debate (though PEP8 says that spaces are the way to go). The tabify function needs a minimum of 2 spaces before it replaces it with a tab. Its implementation in Lib/idlelib/EditorWindow.py under the tabify_region_event and untabify_region_event reveals a curiousity in its implementation. Tabify will replace spans of space characters with tabs, but still leave in extra space characters if needed. Untabify simply expands all tabs to a fixed number of spaces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:37:02 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 04:37:02 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364877422.55.0.535762210772.issue17613@psf.upfronthosting.co.za> Roger Serwy added the comment: Removing Geoge and Larry from nosy. I'm not sure how they got added. I didn't click on anything in the Nost List box. Ned, did you mean to add Benjamin to the nosy list? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:42:04 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 04:42:04 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364877724.44.0.63975169296.issue17613@psf.upfronthosting.co.za> Roger Serwy added the comment: Is there an automatic nosy-list adder routine in the bug-tracker that I should know about? Georg and Larry were re-added to nosy even after I removed them. (I'm sorry for the spam.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:43:18 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Apr 2013 04:43:18 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364877798.12.0.0354255113231.issue17613@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Raymond, does IDLE terminate when the exception occurs > or does it keep running? It keeps running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:50:42 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 02 Apr 2013 04:50:42 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364878242.46.0.566905231096.issue17614@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Is there a better way to reproduce the error in the first place. On 2.7 tip, ./python -m idelib.idle Opened and closed bigfile.py and decimal.py - and could not reproduce the error. If I could, I could have tested the patch. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:54:30 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 02 Apr 2013 04:54:30 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364878470.78.0.119711381021.issue17613@psf.upfronthosting.co.za> Larry Hastings added the comment: When an issue is marked as "release blocker", the release managers of all affected versions are automatically added to the issue. I'm the release manager of 3.4, Georg is for 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:54:53 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 02 Apr 2013 04:54:53 +0000 Subject: [issue5207] extend strftime/strptime format for RFC3339 and RFC2822 In-Reply-To: <1234285622.79.0.0309055191852.issue5207@psf.upfronthosting.co.za> Message-ID: <1364878493.08.0.470127452862.issue5207@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've no idea if this is of any use but thought I'd reference it anyway https://pypi.python.org/pypi/strict-rfc3339 ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:58:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Apr 2013 04:58:56 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364878736.27.0.906210616251.issue17613@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Is there an automatic nosy-list adder routine in the bug-tracker that > I should know about? Release managers are added automatically when an issue is set as release blocker and one of the releases they manage is selected in the "Versions" field. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 06:59:27 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 04:59:27 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364878767.13.0.687251211886.issue17614@psf.upfronthosting.co.za> Roger Serwy added the comment: I forgot to specify that the race condition gets triggered by pressing Alt-F4 the moment the IDLE editor window appears. I am reliably reproducing the error using the Konsole terminal under Arch Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 07:12:48 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 02 Apr 2013 05:12:48 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364879568.1.0.506698359159.issue17613@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I dont have ActiveState TCL, but I could use IDLE with the default libs with my Macbook Pro (OS X10.7), followed the steps given to reproduce the error and unfortunately could not. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 07:56:13 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Apr 2013 05:56:13 +0000 Subject: [issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules In-Reply-To: <1266342231.42.0.692171370087.issue7944@psf.upfronthosting.co.za> Message-ID: <1364882173.38.0.997257100476.issue7944@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW test_tarfile seems to use the "with" statement on 3.3+ already. On 2.7 is not always used, but I'm not sure it's worth backporting/fixing the remaining occurrences there. Most of the fixes in the test_os patch have already being applied too. Either someone updates the current patch and/or proposes new ones, or this can probably be closed. ---------- keywords: +easy versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 07:57:35 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Apr 2013 05:57:35 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364882255.43.0.190353426481.issue17613@psf.upfronthosting.co.za> Ned Deily added the comment: I'm able to reliably reproduce the exception using your test procedure, Roger, using either current head of 3.3 or 2.7, and am not able to reproduce it with stop_colorizer.patch applied. LGTM. So it seems to me the next questions are: 1. Raymond, does this seem like a plausible scenario for the failures you've seen? And if you apply the patch, do you see any further failures? 2. Roger, is this issue new to 2.7.4, 3.2.4, or 3.3.1? How likely do you think it will be seen by users? And what is your recommendation to the release managers about including the patch in any or all of the pending maintenance releases, understanding that the options are to cherry-pick into the final and hope for the best, cherry-pick it and do an RC2, or defer the fix to the next maintenance releases? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 08:43:41 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 02 Apr 2013 06:43:41 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364882255.43.0.190353426481.issue17613@psf.upfronthosting.co.za> Message-ID: <515A7E5E.1030806@gmail.com> Roger Serwy added the comment: On 04/02/2013 12:57 AM, Ned Deily wrote: > 2. Roger, is this issue new to 2.7.4, 3.2.4, or 3.3.1? No, this bug has been baked into IDLE since the beginning. See line 215 http://hg.python.org/cpython/file/30713d5288df/Lib/idlelib/ColorDelegator.py > How likely do you think it will be seen by users? For Windows users using pythonw.exe, it would cause IDLE to immediately terminate due to issue13582. On Linux and Mac, the errors would write to stderr, though not likely be visible to the end user. On Linux and Mac the error is not "harmful" since IDLE still remains perfectly usable. The error does not leave IDLE in an inconsistent state. > And what is your recommendation to the release managers about including the patch in any or all of the pending maintenance releases, understanding that the options are to cherry-pick into the final and hope for the best, cherry-pick it and do an RC2, or defer the fix to the next maintenance releases? I'm ok with cherry-picking it into the final, but in the interest of simplicity, I'd recommend deferring it to the next maintenance release. There are other bugs, like #8900 that are easier to trigger than this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 08:57:32 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Apr 2013 06:57:32 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364885852.92.0.565189481913.issue17614@psf.upfronthosting.co.za> Ned Deily added the comment: LGTM ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 08:59:19 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Apr 2013 06:59:19 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364885959.46.0.132207801188.issue17614@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 09:09:00 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 02 Apr 2013 07:09:00 +0000 Subject: [issue10615] Trivial mingw compile fixes In-Reply-To: <1291380362.46.0.195053370852.issue10615@psf.upfronthosting.co.za> Message-ID: <1364886540.36.0.444949889596.issue10615@psf.upfronthosting.co.za> Mark Lawrence added the comment: #17605 titled "mingw-meta: build interpeter core" was opened on 2013-03-31 so I believe this can be closed as superseded. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 09:11:14 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 02 Apr 2013 07:11:14 +0000 Subject: [issue17605] mingw-meta: build interpeter core In-Reply-To: <1364762524.12.0.901415822586.issue17605@psf.upfronthosting.co.za> Message-ID: <1364886674.0.0.278531051472.issue17605@psf.upfronthosting.co.za> Mark Lawrence added the comment: There are patches on #10615 which may be of some use here. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 09:24:03 2013 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 02 Apr 2013 07:24:03 +0000 Subject: [issue10566] gdb debugging support additions (Tools/gdb/libpython.py) In-Reply-To: <1290962543.45.0.132664091788.issue10566@psf.upfronthosting.co.za> Message-ID: <1364887443.06.0.971748447417.issue10566@psf.upfronthosting.co.za> Mark Lawrence added the comment: Comments in msg123606 seem encouraging so I'm guessing this has just slipped under the radar. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 11:14:23 2013 From: report at bugs.python.org (Neil Hodgson) Date: Tue, 02 Apr 2013 09:14:23 +0000 Subject: [issue17615] String comparison performance regression Message-ID: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> New submission from Neil Hodgson: On Windows, non-equal comparisons (<, <=, >, >=) between strings with common prefixes are slower in Python 3.3 than 3.2. This is for both 32-bit and 64-bit builds. Performance on Linux has not decreased for the same code. The attached program tests comparisons for strings that have common prefixes. On a 64-bit build, a 25 character string comparison is around 30% slower and a 100 character string averages 85% slower. A user of 32-bit Python builds reported the 25 character case to average 70% slower. Here are two runs of the program using 3.2/3.3 on Windows 7 on an i7 870: >c:\python32\python -u "charwidth.py" 3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']176 [0.7116295577956576, 0.7055591343157613, 0.7203483026429418] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']176 [0.7664397841378787, 0.7199902325464409, 0.713719289812504] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']176 [0.7341851791817691, 0.6994205901833599, 0.7106807593741005] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']180 [0.7346812372666784, 0.6995411113377914, 0.7064768417728411] >c:\python33\python -u "charwidth.py" 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']108 [0.9913326076446045, 0.9455845241056282, 0.9459076605341776] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']192 [1.0472289217234318, 1.0362342484091207, 1.0197109728048384] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']192 [1.0439643704533834, 0.9878581050301687, 0.9949265834034335] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']312 [1.0987483965446412, 1.0130257167690004, 1.024832248526499] ---------- components: Unicode files: charwidth.py messages: 185824 nosy: Neil.Hodgson, ezio.melotti priority: normal severity: normal status: open title: String comparison performance regression versions: Python 3.3 Added file: http://bugs.python.org/file29652/charwidth.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 11:16:06 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Tue, 02 Apr 2013 09:16:06 +0000 Subject: [issue17616] wave.Wave_read and wave.Wave_write can be context managers Message-ID: <1364894166.78.0.454807000252.issue17616@psf.upfronthosting.co.za> New submission from Claudiu.Popa: I think that wave.open should work with the `with` statement, given the fact that Lib/aifc.py does this. I attached a simple patch for this. Thanks in advance. ---------- components: Library (Lib) files: wave_context_manager.patch keywords: patch messages: 185825 nosy: Claudiu.Popa priority: normal severity: normal status: open title: wave.Wave_read and wave.Wave_write can be context managers type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29653/wave_context_manager.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 11:21:01 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 02 Apr 2013 09:21:01 +0000 Subject: [issue17359] Mention "__main__.py" explicitly in command line docs In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1364894461.15.0.523629954009.issue17359@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I still don't think that the available documentation is detailed enough. It leaves too many unanswered question, e.g. * What happens if you have both __init__.py and __main__.py in a directory or a ZIP file ? * What does "the script name is added to the start of sys.path" mean when using a ZIP file ? * What are the implications of "Directories and zipfiles containing a __main__.py file at the top level are now considered valid Python scripts." and where does this scope end ? The wording suggests that you can also import such directories or ZIP files. * How are sys.path, __name__ and possibly __path__ setup when using this approach of running a dir/package/ZIP file ? and probably a few more. The above can all be answered using trial-and-error, but it would be better to actually document the intended behavior. Some quirks I found (dir is a directory with both __init__.py and __main__.py): * "python2.6 dir" runs the __main__.py file, while "python2.6 -m dir" does not. Both work in the same way in Python 2.7. * In Python 2.7, the two approaches differ in the way sys.path[0] is setup: "python2.7 dir" causes this to be set to "dir", while "python2.7 -m dir" results in "". Background: The reason why I'm interested in this is that we are trying to mimic the Python command line interface with pyrun (http://www.egenix.com/products/python/PyRun/). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 11:24:07 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Apr 2013 09:24:07 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1364894647.81.0.441720112237.issue17615@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +haypo, serhiy.storchaka type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 11:45:18 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Apr 2013 09:45:18 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364895918.4.0.616591544706.issue17614@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- priority: critical -> high versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 11:45:48 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Apr 2013 09:45:48 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364895948.2.0.0557488106034.issue17613@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 12:23:50 2013 From: report at bugs.python.org (Amit Saha) Date: Tue, 02 Apr 2013 10:23:50 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364898230.38.0.809312332946.issue17583@psf.upfronthosting.co.za> Amit Saha added the comment: I have tried to incorporate most of the suggestions and made some other changes as well. Hope it looks better now. I haven't yet split it into two separate versions. ---------- Added file: http://bugs.python.org/file29654/idle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 13:32:54 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Apr 2013 11:32:54 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1364902374.8.0.228873822843.issue10379@psf.upfronthosting.co.za> Eric V. Smith added the comment: Barry meant that the upstream program that triggered this error has been changed to call format_string() instead of format(). The bug still exists in format(). My suggestion is to have format() be an alias for format_string(). Deprecating format() is an optional step, but may not be worth the hassle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 14:17:45 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Apr 2013 12:17:45 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1364905065.55.0.490573176977.issue17613@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thank you for the analysis. ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 14:19:52 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Apr 2013 12:19:52 +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: <1364905192.47.0.0229420788522.issue11406@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 14:29:54 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Apr 2013 12:29:54 +0000 Subject: [issue17608] configparser not honouring section but not variable case In-Reply-To: <1364794810.72.0.199775169756.issue17608@psf.upfronthosting.co.za> Message-ID: <1364905794.93.0.973734637196.issue17608@psf.upfronthosting.co.za> ?ukasz Langa added the comment: This is indeed deliberate. If that's unsuitable for you, consider using: cp = ConfigParser() cp.optionxform = lambda option: option as described in http://docs.python.org/3/library/configparser.html#configparser.optionxform ---------- assignee: -> lukasz.langa resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 14:36:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Apr 2013 12:36:08 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1364906168.68.0.640851687224.issue17615@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why do you care? Does it impact a real-world workload? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 14:38:46 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Apr 2013 12:38:46 +0000 Subject: [issue17453] logging.config.fileConfig error In-Reply-To: <1363592089.61.0.213350705624.issue17453@psf.upfronthosting.co.za> Message-ID: <1364906326.9.0.75221359941.issue17453@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Treating "" as empty values was a bug in configparser pre 3.2 (it made it impossible to store "" as a value). Simply change [section] option = "" to [section] option = Does that solve your problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 14:39:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Apr 2013 12:39:18 +0000 Subject: [issue17612] hooks/mail.py requires [smtp] host to be set, despite a comment to the contrary In-Reply-To: <1364853655.88.0.718145768613.issue17612@psf.upfronthosting.co.za> Message-ID: <1364906358.32.0.863219566186.issue17612@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, mercurial itself requires the presence of a "host" item in "[smtp]", so it would make sense to require it too. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 14:40:51 2013 From: report at bugs.python.org (bonnet) Date: Tue, 02 Apr 2013 12:40:51 +0000 Subject: [issue17617] struct.calcsize() incorrect Message-ID: <1364906451.57.0.179854550538.issue17617@psf.upfronthosting.co.za> New submission from bonnet: struct.calcsize('iiiii?') : 21 appears to be incorrect ; in C sizeof : 24 C code: typedef struct { int param1; int param2; int param3; int param4; int param5; unsigned char param6; } struct_titi6; main: struct_titi6 toto3; printf("taille toto3 : %d\n",sizeof(toto3)); printf("taille toto3.param1 : %d\n",sizeof(toto3.param1)); printf("taille toto3.param6 : %d\n",sizeof(toto3.param6)); results: taille toto3 : 24 taille toto3.param1 : 4 taille toto3.param6 : 1 ---------- components: Library (Lib) messages: 185834 nosy: boa124 priority: normal severity: normal status: open title: struct.calcsize() incorrect type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 15:23:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 02 Apr 2013 13:23:35 +0000 Subject: [issue17618] base85 encoding Message-ID: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Base85 encoding (see e.g. http://en.wikipedia.org/wiki/Ascii85 ) allows a tighter encoding than Base64: it has a 5/4 expansion ratio, rather than 4/3. It is used in Mercurial, git, and there's another variant that's used by Adobe in the PDF format. It would be nice to have a Base85 implementation in either the binascii or base64 modules. (unfortunately the Mercurial implementation is GPL'ed, although if we want to copy it we might simply ask them for a relicensing) ---------- components: Library (Lib) messages: 185835 nosy: christian.heimes, pitrou priority: normal severity: normal status: open title: base85 encoding type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 15:29:31 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 02 Apr 2013 13:29:31 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1364909371.14.0.894856991637.issue6743@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Maybe pprint.print() should specify sep='\n' by default? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 15:34:06 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 02 Apr 2013 13:34:06 +0000 Subject: [issue17617] struct.calcsize() incorrect In-Reply-To: <1364906451.57.0.179854550538.issue17617@psf.upfronthosting.co.za> Message-ID: <1364909646.88.0.351139033381.issue17617@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is working as designed: the result of struct.calcsize matches the length of the string that you'll get back from struct.pack using that format. Padding isn't included after the last entry in the struct. That's not to say that it was a good design decision, but that's the design that was chosen, and it's not realistic to change this for the bugfix releases. It may be possible to do something for Python 3.4. You can add a '0L' to the end of your struct to force padding bytes at the end. See: http://docs.python.org/2/library/struct.html#examples for an example of this. See also #7189, #5145. ---------- nosy: +mark.dickinson versions: +Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 15:35:48 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Apr 2013 13:35:48 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1364902374.8.0.228873822843.issue10379@psf.upfronthosting.co.za> Message-ID: <20130402093543.76679230@anarchist> Barry A. Warsaw added the comment: On Apr 02, 2013, at 11:32 AM, Eric V. Smith wrote: >My suggestion is to have format() be an alias for >format_string(). Deprecating format() is an optional step, but may not be >worth the hassle. Agreed on both counts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 15:37:44 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 02 Apr 2013 13:37:44 +0000 Subject: [issue17617] struct.calcsize() incorrect In-Reply-To: <1364906451.57.0.179854550538.issue17617@psf.upfronthosting.co.za> Message-ID: <1364909864.53.0.610634196955.issue17617@psf.upfronthosting.co.za> Mark Dickinson added the comment: And also #7355, which led to that example being added to the documentation. Closing as duplicate. ---------- resolution: -> duplicate status: open -> closed superseder: -> Struct incorrectly compiles format strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 16:16:31 2013 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 02 Apr 2013 14:16:31 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1364912191.02.0.714865205966.issue17618@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 16:40:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Apr 2013 14:40:39 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1364913639.16.0.406988894936.issue6743@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 17:04:58 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Apr 2013 15:04:58 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1364915098.27.0.347338387128.issue10379@psf.upfronthosting.co.za> Eric V. Smith added the comment: So I guess the question is: would this be a bug fix and applied to 2.7 and 3.3, or just an enhancement for 3.4? I think it would be a bug fix and thus should be backported. It's not like we'd be breaking any working code, unless it was expecting the exception. ---------- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 17:38:06 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Apr 2013 15:38:06 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1364915098.27.0.347338387128.issue10379@psf.upfronthosting.co.za> Message-ID: <20130402113803.77dde4cd@anarchist> Barry A. Warsaw added the comment: On Apr 02, 2013, at 03:04 PM, Eric V. Smith wrote: >I think it would be a bug fix and thus should be backported. It's not like >we'd be breaking any working code, unless it was expecting the exception. That would be my preference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 18:09:46 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Apr 2013 16:09:46 +0000 Subject: [issue13110] test_socket.py failures on ARM In-Reply-To: <1317851475.03.0.915061914039.issue13110@psf.upfronthosting.co.za> Message-ID: <1364918986.01.0.825814286887.issue13110@psf.upfronthosting.co.za> R. David Murray added the comment: For the record I'm seeing this on Gentoo with linux kernel 3.5.3. Commenting out the localhost ipv6 entry lets the test pass, as indicated in the ubuntu bug report (which was subsequently closed with no action). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 18:15:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Apr 2013 16:15:43 +0000 Subject: [issue13163] `port` and `host` are confused in `_get_socket In-Reply-To: <1318459881.81.0.817663809275.issue13163@psf.upfronthosting.co.za> Message-ID: <3ZgFrt4dhvzPQ2@mail.python.org> Roundup Robot added the comment: New changeset 5d99042bd40f by R David Murray in branch '2.7': #13163: fix names of _get_socket args http://hg.python.org/cpython/rev/5d99042bd40f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 18:16:27 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Apr 2013 16:16:27 +0000 Subject: [issue13163] `port` and `host` are confused in `_get_socket In-Reply-To: <1318459881.81.0.817663809275.issue13163@psf.upfronthosting.co.za> Message-ID: <1364919387.75.0.653391646856.issue13163@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks Victor. I decided not to put in the doc string because Python3 doesn't have one. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 18:35:51 2013 From: report at bugs.python.org (Drekin) Date: Tue, 02 Apr 2013 16:35:51 +0000 Subject: [issue17619] input() swallows KeyboardInterrupt in Python 3.3 Message-ID: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> New submission from Drekin: At least on Windows, input() doesn't raise KeyboardInterrupt when Ctrl-C is hit in Python 3.3 (it does in Python 3.2). 3.3: >>> x = input() # Ctrl-C hit - no exception raised >>> x NameError 3.2: >>> x = input() # Ctrl-C hit KeyboardInterrupt ---------- messages: 185845 nosy: Drekin priority: normal severity: normal status: open title: input() swallows KeyboardInterrupt in Python 3.3 type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 18:42:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Apr 2013 16:42:25 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1364920945.53.0.616087436344.issue17615@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 18:48:15 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Apr 2013 16:48:15 +0000 Subject: [issue17492] Increase test coverage for random (up to 99%) In-Reply-To: <1363748570.23.0.662961868349.issue17492@psf.upfronthosting.co.za> Message-ID: <3ZgGZQ2yyDzNWm@mail.python.org> Roundup Robot added the comment: New changeset 2a340f963518 by R David Murray in branch 'default': #17492: Additional tests for random module. http://hg.python.org/cpython/rev/2a340f963518 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 18:48:51 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Apr 2013 16:48:51 +0000 Subject: [issue17492] Increase test coverage for random (up to 99%) In-Reply-To: <1363748570.23.0.662961868349.issue17492@psf.upfronthosting.co.za> Message-ID: <1364921331.71.0.333285586759.issue17492@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Victor. ---------- nosy: +r.david.murray resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 18:59:14 2013 From: report at bugs.python.org (Drekin) Date: Tue, 02 Apr 2013 16:59:14 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input Message-ID: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> New submission from Drekin: The Python interactive console actually doesn't use sys.stdin but standard C stdin for input. Is there any reason for this? Why it then uses its encoding attribute? (Assigning sys.stdin something, that doesn't have encoding attribute freezes the interpreter.) If anything, wouldn't it make more sense if it used sys.__stdin__.encoding instead of sys.stdin? sys.stdin is intended to be set by user (it affects input() and code.inpterrupt() which tries to minic standard interactive console). ---------- messages: 185848 nosy: Drekin priority: normal severity: normal status: open title: Python interactive console doesn't use sys.stdin for input type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 19:02:57 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 02 Apr 2013 17:02:57 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364847206.91.0.224611519617.issue17561@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Nikolay, you may want to check out this Python tracker issue. Giampaolo: I didn't even know it was possible for a single socket to be dual-stack. (It would seem problematic for UDP recvfrom() for example.) In Tulip it does indeed make more sense to create separate sockets and just listen on all of them (using the same protocol factory). This can be completely transparent to the code calling start_serving() and to the protocol implementation. So if you're brave you can just send a code review using codereview.appspot.com to the python-tulip list! On Mon, Apr 1, 2013 at 1:13 PM, Giampaolo Rodola' wrote: > > Giampaolo Rodola' added the comment: > > Being Tulip asynchronous I think that what it needs is an utility function > which returns *multiple* sockets as are the addresses returned by > getaddrinfo() and also possibly even disable the IPv4/6 dual stack in order > to be consistent across all platforms. > > After the sockets are returned they can be "registered" against the event > loop as two separate entities such as, say, ("0.0.0.0", 8000) *and* ("::", > 8000). > If you think this makes sense I can contribute something like this into > Tulip, or I can bring it up on Tulip's ml and ask for other people's > opinions. > > My current recipe is different in that it provides a function which > bind()s on one socket only and tries to enable the dual stack whenever > possible in order to support IPv4 and IPv6 with a single socket. > In this it is similar to socket.create_connection() and clearly favors > blocking socket usages (although it can also be used in non-blocking apps) > which kind of represents the default for the stdlib. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 19:13:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Apr 2013 17:13:29 +0000 Subject: [issue17489] random.Random implements __getstate__() and __reduce__() In-Reply-To: <1363744152.72.0.512816356839.issue17489@psf.upfronthosting.co.za> Message-ID: <3ZgH7X5BmCzPs7@mail.python.org> Roundup Robot added the comment: New changeset 68ed5b2ca867 by R David Murray in branch 'default': #17489: Add explanatory comment that __getstate__ is not called. http://hg.python.org/cpython/rev/68ed5b2ca867 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 19:55:37 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 02 Apr 2013 17:55:37 +0000 Subject: [issue6822] Error calling .storlines from ftplib In-Reply-To: <1251896489.26.0.54536142072.issue6822@psf.upfronthosting.co.za> Message-ID: <1364925337.53.0.705486816946.issue6822@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Apparently the doc has already been changed and mentions that a binary file is necessary. The unit test is legitimate and can be committed though (Victor, you want to do it?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 20:00:47 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Apr 2013 18:00:47 +0000 Subject: [issue17621] Create a lazy import loader mixin Message-ID: <1364925647.64.0.233663837419.issue17621@psf.upfronthosting.co.za> New submission from Brett Cannon: People keep asking and I keep promising to get a lazy loader into Python 3.4. This issue is for me to track what I have done towards meeting that promise. To start, I have something working at https://code.google.com/p/importers/, but I need to make sure that the code copies any newly assigned objects post-import but before completing an attribute read:: import lazy_mod lazy_mod.attr = True # Does not have to trigger import, although there is nothing wrong if it did. lazy_mod.func() # Since it might depend on 'attr', don't return attr until after import and 'attr' with a value of True has been set. Also need to see if anything can be done about isinstance/issubclass checks as super() is used for assigning to __loader__ and thus might break checks for ABCs. Maybe create a class from scratch w/o the mixin somehow (which I don't see from looking at http://docs.python.org/3.4/library/types.html#module-types w/o re-initializing everything)? Somehow get __subclasscheck__() on the super() class? Some other crazy solution that avoids having to call __init__() a second time? ---------- assignee: brett.cannon components: Library (Lib) messages: 185852 nosy: brett.cannon priority: low severity: normal stage: test needed status: open title: Create a lazy import loader mixin type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 20:24:44 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Apr 2013 18:24:44 +0000 Subject: [issue17621] Create a lazy import loader mixin In-Reply-To: <1364925647.64.0.233663837419.issue17621@psf.upfronthosting.co.za> Message-ID: <1364927084.5.0.637595744211.issue17621@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 20:27:47 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Apr 2013 18:27:47 +0000 Subject: [issue17579] socket module in 2.7.4 raises error instead of gaierror in 2.7.3 In-Reply-To: <1364646410.74.0.12025948597.issue17579@psf.upfronthosting.co.za> Message-ID: <1364927267.26.0.933591237801.issue17579@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Okay, so this is not a Python problem, but an Ubuntu problem. It's also not a problem with Ubuntu's version of Python. I can reproduce it on Ubuntu 13.04 with hg trunk, but not Debian Wheezy with hg trunk. Closing as invalid and will investigate further in Ubuntu. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 20:31:23 2013 From: report at bugs.python.org (Sebastian Ortiz Vasquez) Date: Tue, 02 Apr 2013 18:31:23 +0000 Subject: [issue17606] xml.sax.saxutils.XMLGenerator cannot output with the correct encoding In-Reply-To: <1364767390.87.0.956919246275.issue17606@psf.upfronthosting.co.za> Message-ID: <1364927483.38.0.0209496172967.issue17606@psf.upfronthosting.co.za> Sebastian Ortiz Vasquez added the comment: Added new test and patch generated following the python development directions found on http://docs.python.org/devguide/patch.html ---------- type: -> crash Added file: http://bugs.python.org/file29655/XMLGenerator.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 20:32:33 2013 From: report at bugs.python.org (Sebastian Ortiz Vasquez) Date: Tue, 02 Apr 2013 18:32:33 +0000 Subject: [issue17606] xml.sax.saxutils.XMLGenerator cannot output with the correct encoding In-Reply-To: <1364767390.87.0.956919246275.issue17606@psf.upfronthosting.co.za> Message-ID: <1364927553.88.0.804864603112.issue17606@psf.upfronthosting.co.za> Changes by Sebastian Ortiz Vasquez : Removed file: http://bugs.python.org/file29655/XMLGenerator.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 20:32:57 2013 From: report at bugs.python.org (Sebastian Ortiz Vasquez) Date: Tue, 02 Apr 2013 18:32:57 +0000 Subject: [issue17606] xml.sax.saxutils.XMLGenerator cannot output with the correct encoding In-Reply-To: <1364767390.87.0.956919246275.issue17606@psf.upfronthosting.co.za> Message-ID: <1364927577.84.0.977130812211.issue17606@psf.upfronthosting.co.za> Changes by Sebastian Ortiz Vasquez : Added file: http://bugs.python.org/file29656/XMLGenerator.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 21:03:54 2013 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Apr 2013 19:03:54 +0000 Subject: [issue17621] Create a lazy import loader mixin In-Reply-To: <1364925647.64.0.233663837419.issue17621@psf.upfronthosting.co.za> Message-ID: <1364929434.57.0.173987900374.issue17621@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 21:08:32 2013 From: report at bugs.python.org (Berker Peksag) Date: Tue, 02 Apr 2013 19:08:32 +0000 Subject: [issue5207] extend strftime/strptime format for RFC3339 and RFC2822 In-Reply-To: <1234285622.79.0.0309055191852.issue5207@psf.upfronthosting.co.za> Message-ID: <1364929712.26.0.718683937429.issue5207@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 22:14:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Apr 2013 20:14:01 +0000 Subject: [issue6822] Error calling .storlines from ftplib In-Reply-To: <1251896489.26.0.54536142072.issue6822@psf.upfronthosting.co.za> Message-ID: <3ZgM7s2JqpzPZN@mail.python.org> Roundup Robot added the comment: New changeset c78dfc6ce37a by Victor Stinner in branch '3.3': Close #6822: ftplib.FTP.storlines() expects a binary file, not a text file http://hg.python.org/cpython/rev/c78dfc6ce37a New changeset 9328e2b8a397 by Victor Stinner in branch 'default': (Merge 3.3) Close #6822: ftplib.FTP.storlines() expects a binary file, not a text file http://hg.python.org/cpython/rev/9328e2b8a397 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 22:27:32 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 02 Apr 2013 20:27:32 +0000 Subject: [issue17588] runpy cannot run Unicode path on Windows In-Reply-To: <1364753330.76.0.973974217823.issue17588@psf.upfronthosting.co.za> Message-ID: <1364934452.28.0.0488655949436.issue17588@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The issue is actually with compile(): compile('x=1', '\u222b.py', 'exec') fails on my Western Windows machine (mbcs = cp1252). This conversion should not be necessary, since the filename is only used for error messages (and decoded again!) But unfortunately the various API functions used by compile() are documented to take a filename encoded with the filesystem encoding: http://docs.python.org/dev/c-api/veryhigh.html#Py_CompileStringExFlags This API is unfortunate; on Windows Python should never have to convert filenames unless bytes strings are explicitly used. I can see two ways to fix the issue: - build another set of APIs which take unicode strings for the filename, or at least encoded to UTF-8. - use some trick for unencodable filenames; filename.encode('mbcs', 'backslashreplace') works, but does not round-trip (and cannot fetch source code in tracebacks). I don't know if there is some variant of surrogateescape that we could use. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 22:46:30 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 02 Apr 2013 20:46:30 +0000 Subject: [issue17588] runpy cannot run Unicode path on Windows In-Reply-To: <1364753330.76.0.973974217823.issue17588@psf.upfronthosting.co.za> Message-ID: <1364935590.14.0.974976985022.issue17588@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I have a similar issue with a directory '?' ('\u222b') containing a file foo.py: >>> sys.path.insert(0, '\u222b') >>> import foo Traceback (most recent call last): File "", line 1, in File "", line 1564, in _find_and_load File "", line 1531, in _find_and_load_unlocked File "", line 586, in _check_name_wrapper File "", line 1023, in load_module File "", line 1004, in load_module File "", line 562, in module_for_loader_wrapper File "", line 854, in _load_module File "", line 981, in get_code File "", line 313, in _call_with_frames_removed UnicodeEncodeError: 'mbcs' codec can't encode characters in position 0--1: invalid character (I got this traceback with "python -v") line 981 contains a call to compile(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 22:50:24 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Apr 2013 20:50:24 +0000 Subject: [issue17588] runpy cannot run Unicode path on Windows In-Reply-To: <1364753330.76.0.973974217823.issue17588@psf.upfronthosting.co.za> Message-ID: <1364935824.77.0.228476566289.issue17588@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is a duplicate of the issue #11619. In short: when importing a Python module, Python 3.3 only supports paths encodable to the ANSI code page. The issue #11619 contains an huge patch to support *any* Unicode character in module path. I closed the issue because I consider that nobody needs such feature :-) What is your usecase? Do you really need to support ? as *Python* module name or a Python script filename? Is Windows able to display this character at least? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 22:50:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Apr 2013 20:50:36 +0000 Subject: [issue17588] runpy cannot run Unicode path on Windows In-Reply-To: <1364753330.76.0.973974217823.issue17588@psf.upfronthosting.co.za> Message-ID: <1364935836.79.0.82435067204.issue17588@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 23:06:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Apr 2013 21:06:41 +0000 Subject: [issue17607] missed peephole optimization (unnecessary jump at end of function after yield) In-Reply-To: <1364791551.27.0.510465438261.issue17607@psf.upfronthosting.co.za> Message-ID: <1364936801.17.0.0668596516897.issue17607@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is similar to #17430. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 23:36:58 2013 From: report at bugs.python.org (Ethan Furman) Date: Tue, 02 Apr 2013 21:36:58 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1364938618.72.0.379004559008.issue17615@psf.upfronthosting.co.za> Ethan Furman added the comment: As Ian Kelly said on Python-List: Micro-benchmarks like the ones [jmf] have been reporting are *useful* when it comes to determining what operations can be better optimized, but they are not *important* in and of themselves. What is important is that actual, real-world programs are not significantly slowed by these kinds of optimizations. Until [it] can demonstrated that real programs are adversely affected by PEP 393, there is not in my opinion any regression that is worth worrying over. I think this issue should be closed. ---------- nosy: +stoneleaf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 2 23:45:33 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 02 Apr 2013 21:45:33 +0000 Subject: [issue17588] runpy cannot run Unicode path on Windows In-Reply-To: <1364753330.76.0.973974217823.issue17588@psf.upfronthosting.co.za> Message-ID: <1364939133.5.0.148134428206.issue17588@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: No need to use weird characters. Greek or Cyrillic letters are enough. Suppose I download a library with language modules such as ???????.py or ????????.py; they are allowed as identifiers and can be regularly imported... on utf8 system at least. Actually such a project already exists: https://code.google.com/p/hellenic-language-toolkit/ "svn co" will correctly create files (win32 explorer show correct names); when importing from IDLE, I get >>> import HLT Traceback (most recent call last): File "", line 1, in import HLT File ".\HLT.py", line 29, in from ????????.???????? import ???????? UnicodeEncodeError: 'mbcs' codec can't encode characters in position 0--1: invalid character ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 00:05:41 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Apr 2013 22:05:41 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1364940341.93.0.469988405912.issue17615@psf.upfronthosting.co.za> STINNER Victor added the comment: Compare (Unicode) strings was optimized after the release of Python 3.3. changeset: 79469:54154be6b27d user: Victor Stinner date: Thu Oct 04 22:59:45 2012 +0200 files: Objects/unicodeobject.c description: Optimize unicode_compare(): use memcmp() when comparing two UCS1 strings changeset: 79902:b68be1025c42 user: Victor Stinner date: Tue Oct 23 02:48:49 2012 +0200 files: Objects/unicodeobject.c description: Optimize PyUnicode_RichCompare() for Py_EQ and Py_NE: always use memcmp() --- It looks like Python 3.4 is faster than 3.2 for this specific micro-benchmark on my computer. So I'm closing the issue. If you see an interesting optimization, please write a patch and open an issue. But complaining that PEP 393 slowed down Unicode does not help at all. PEP 393 solved a lot of other issues! 3.2.3+ (3.2:d40afd489b6a, Apr 2 2013, 23:46:20) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']176 [0.38440799713134766, 0.38411498069763184, 0.38804006576538086] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']176 [0.3850290775299072, 0.38683581352233887, 0.3845059871673584] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']176 [0.38274407386779785, 0.3805210590362549, 0.38046717643737793] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']180 [0.3880500793457031, 0.38711094856262207, 0.3869481086730957] 3.3.0+ (3.3:c78dfc6ce37a, Apr 2 2013, 23:48:14) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']108 [0.4134676969842985, 0.4146421169862151, 0.41625474498141557] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']192 [0.42760137701407075, 0.42286567797418684, 0.42544596805237234] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']192 [0.4288683719933033, 0.4251258020522073, 0.4281281529692933] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']312 [0.40928812394849956, 0.4099267750279978, 0.4107871470041573] 3.4.0a0 (default:9328e2b8a397, Apr 2 2013, 23:46:24) [GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']108 [0.31218199292197824, 0.30999370804056525, 0.31113169400487095] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']192 [0.3712720649782568, 0.37407689797692, 0.3728883999865502] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']192 [0.36971510702278465, 0.3688076320104301, 0.36580446804873645] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']312 [0.3653324950719252, 0.3652214870089665, 0.36527683096937835] ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 00:31:43 2013 From: report at bugs.python.org (Edmond Burnett) Date: Tue, 02 Apr 2013 22:31:43 +0000 Subject: [issue17390] display python version on idle title bar In-Reply-To: <1362920194.83.0.464215113749.issue17390@psf.upfronthosting.co.za> Message-ID: <1364941903.41.0.348055588624.issue17390@psf.upfronthosting.co.za> Edmond Burnett added the comment: Here is a patch to add a more descriptive title to the IDLE editor. Python Editor: - ---------- Added file: http://bugs.python.org/file29657/issue17390_editor_title.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 00:42:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Apr 2013 22:42:52 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1364942572.93.0.529089611161.issue16061@psf.upfronthosting.co.za> STINNER Victor added the comment: How can we move this issu forward? I still prefer unicode_2.patch over str_replace_1char.patch because the code is simpler and so easier to maintain. str_replace_1char.patch has a "bug": replace_1char() does not use "pos" for the latin1 path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 00:58:22 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 02 Apr 2013 22:58:22 +0000 Subject: [issue15351] Add to unittest.TestCase support for using context managers In-Reply-To: <1342280032.27.0.345733068822.issue15351@psf.upfronthosting.co.za> Message-ID: <1364943502.37.0.534386787809.issue15351@psf.upfronthosting.co.za> Changes by Chris Calloway : ---------- nosy: +cbc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 01:10:38 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Tue, 02 Apr 2013 23:10:38 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1364944238.14.0.834784969557.issue16754@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I just tried building trunk on MacOS 10.6.8, and make install fails with this traceback: Traceback (most recent call last): File "./setup.py", line 2175, in main() File "./setup.py", line 2170, in main "Tools/scripts/2to3", "Tools/scripts/pyvenv"] File "/Users/akuchling/source/p/cpython/Lib/distutils/core.py", line 148, in setup dist.run_commands() File "/Users/akuchling/source/p/cpython/Lib/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/Users/akuchling/source/p/cpython/Lib/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/Users/akuchling/source/p/cpython/Lib/distutils/command/install.py", line 566, in run self.run_command(cmd_name) File "/Users/akuchling/source/p/cpython/Lib/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Users/akuchling/source/p/cpython/Lib/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/Users/akuchling/source/p/cpython/Lib/distutils/command/install_lib.py", line 93, in run outfiles = self.install() File "./setup.py", line 2068, in install self.set_file_modes(outfiles, 0o644, 0o755) File "./setup.py", line 2079, in set_file_modes if filename.endswith(self.shlib_suffix): mode = sharedLibMode TypeError: endswith first arg must be str or a tuple of str, not NoneType make: *** [sharedinstall] Error 1 The following patch fixes the traceback, but I don't know why shlib_suffix is None. -> hg diff diff -r 9328e2b8a397 setup.py --- a/setup.py Tue Apr 02 22:13:49 2013 +0200 +++ b/setup.py Tue Apr 02 19:10:27 2013 -0400 @@ -2076,7 +2076,9 @@ for filename in files: if os.path.islink(filename): continue mode = defaultMode - if filename.endswith(self.shlib_suffix): mode = sharedLibMode + if (self.shlib_suffix is not None and + filename.endswith(self.shlib_suffix)): + mode = sharedLibMode log.info("changing mode of %s to %o", filename, mode) if not self.dry_run: os.chmod(filename, mode) ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 02:02:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 00:02:52 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: <1356281435.93.0.623434455043.issue16757@psf.upfronthosting.co.za> Message-ID: <1364947372.15.0.247305470278.issue16757@psf.upfronthosting.co.za> STINNER Victor added the comment: Related commit: changeset: 83066:b5d5f422299f tag: tip user: Victor Stinner date: Wed Apr 03 01:48:39 2013 +0200 files: Include/unicodeobject.h Lib/test/test_format.py Objects/stringlib/unicode_format.h Objects/unicodeobject.c description: Add _PyUnicodeWriter_WriteSubstring() function Write a function to enable more optimizations: * If the substring is the whole string and overallocation is disabled, just keep a reference to the string, don't copy characters * Avoid a call to the expensive _PyUnicode_FindMaxChar() function when possible ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 02:03:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Apr 2013 00:03:49 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: <1356281435.93.0.623434455043.issue16757@psf.upfronthosting.co.za> Message-ID: <3ZgSF05V49zQMv@mail.python.org> Roundup Robot added the comment: New changeset 7132bca093ad by Victor Stinner in branch 'default': Close #16757: Avoid calling the expensive _PyUnicode_FindMaxChar() function http://hg.python.org/cpython/rev/7132bca093ad ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 02:06:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 00:06:36 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: <1356281435.93.0.623434455043.issue16757@psf.upfronthosting.co.za> Message-ID: <1364947596.28.0.349997447957.issue16757@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 7132bca093ad by Victor Stinner in branch 'default': > Close #16757: Avoid calling the expensive _PyUnicode_FindMaxChar() function This changeset is almost the same than unicode_findmaxchar_2.patch. I prefered to keep the API unchanged and not call _PyUnicode_FindMaxChar() instead of adding a test in the function to exit it. There is just a minor difference in Python/formatter_unicode.c: the test for _PyUnicode_FindMaxChar() is done after the test on format->fill_char (which should avoid a call to for _PyUnicode_FindMaxChar() if fill_char is wider than the actual buffer). Thanks Serhiy for your great idea! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 02:27:54 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 00:27:54 +0000 Subject: [issue16334] Faster unicode-escape and raw-unicode-escape codecs In-Reply-To: <1351291705.86.0.638624862326.issue16334@psf.upfronthosting.co.za> Message-ID: <1364948874.78.0.142906074162.issue16334@psf.upfronthosting.co.za> STINNER Victor added the comment: unicode-escape and raw-unicode-escape decoders now use the PyUnicodeWriter API. Can you please compare performances of your patch to PyUnicodeWriter API? Decoders overallocate the buffer. According to a comment in the decoder, overallocating is never needed (and will be slower). Your patch does not overallocate the buffer. The decoder should probably be adjusted to disable overallocation. Can you please update your patch on the encoder to the last development version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 02:43:20 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Apr 2013 00:43:20 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1364949800.61.0.992296004693.issue16754@psf.upfronthosting.co.za> Ned Deily added the comment: Did you start with a clean build directory and rerun ./configure? What ./configure options did you use? Make sure that an existing install isn't getting in the way during a build, particularly with --enable-shared. With a current tip of the default branch, I've built all three standard OS X configurations (default unix (non-shared), --enable-shared, and --enable-framework) on OS X 10.8 and "make install" succeeds for all of them with sysconfig.get_config_var("SHLIB_SUFFIX") returning ".so" as expecting. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:13:03 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Apr 2013 01:13:03 +0000 Subject: [issue17484] add tests for getpass In-Reply-To: <1363731601.11.0.00161818926238.issue17484@psf.upfronthosting.co.za> Message-ID: <1364951583.2.0.36306613232.issue17484@psf.upfronthosting.co.za> R. David Murray added the comment: Thomas, did you submit a contributor agreement at PyCon (or after)? If so I need to go bug someone to get the tracker updated. I'm attaching a slightly modified version of your patch, cleaning up the output that was showing up on stdout and using assertWarns rather than monkey patching the warnings module. Oh, and making the with-clause indentation PEP8 compliant...I wasn't very clear in my review comment about how that was supposed to look. ---------- Added file: http://bugs.python.org/file29658/getpass_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:19:41 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 03 Apr 2013 01:19:41 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1364951981.3.0.582263299106.issue17620@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:23:48 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 03 Apr 2013 01:23:48 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1364952228.15.0.991820700244.issue6743@psf.upfronthosting.co.za> ?ric Araujo added the comment: Antoine: the desired behavior is to have a function with the same signature as print (so multiple objects to print are supported), but which calls pprint.pformat instead of str. It lets people monkey-patch builtins.print or somemodule.print with pprint.print and get nicer output. (I rarely use print these days, as I work in web applications that use logging and responses, but in many other cases people use print and might want a quick way to make it pretty-print.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:26:37 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Apr 2013 01:26:37 +0000 Subject: [issue17619] input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364952397.65.0.61313724638.issue17619@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Seems to be windows specific. It works fine on Linux and Solaris. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:26:55 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Apr 2013 01:26:55 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364952415.81.0.416157899606.issue17619@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- title: input() swallows KeyboardInterrupt in Python 3.3 -> MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:27:35 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 03 Apr 2013 01:27:35 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364952455.04.0.448047374987.issue17583@psf.upfronthosting.co.za> ?ric Araujo added the comment: This is a great idea, thank you. FYI You can share text and images with a diff file: if you call ?hg add path/to/images? and create the diff with the --git option, it will use an extended unified diff format which includes binary changes. Our review system is not compatible with that format though, so you can simply attach the files here. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:29:53 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 03 Apr 2013 01:29:53 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1364952593.1.0.506899600585.issue8913@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ezio, you are the latest reviewer, do you have outstanding comments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:35:52 2013 From: report at bugs.python.org (Amit Saha) Date: Wed, 03 Apr 2013 01:35:52 +0000 Subject: [issue17583] IDLE HOWTO In-Reply-To: <1364685156.29.0.769214841654.issue17583@psf.upfronthosting.co.za> Message-ID: <1364952952.02.0.538386038842.issue17583@psf.upfronthosting.co.za> Amit Saha added the comment: Hello ?ric Araujo, thanks. Oh I thought it did support, and hence I created the diff in exactly the way you mention. i also went ahead and tested it by 'hg import' -ing it into a cpython clone and i was all excited to see all my images there :-) But, yeah I can certainly attach the images separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:42:50 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Apr 2013 01:42:50 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1364953370.87.0.981635654983.issue17618@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:43:31 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 03 Apr 2013 01:43:31 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1364953411.34.0.545058326897.issue17618@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:46:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 01:46:36 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364953596.91.0.205387746586.issue17619@psf.upfronthosting.co.za> STINNER Victor added the comment: It may be related to the following commit: changeset: 77861:9523c122d6fc user: Tim Golden date: Fri Jun 29 18:39:26 2012 +0100 files: Parser/myreadline.c description: Issue #1677: Handle better a race condition between the interactive interpreter and the Ctrl-C signal handler on Windows ---------- nosy: +haypo, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:47:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 01:47:12 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364953632.55.0.520401139443.issue17619@psf.upfronthosting.co.za> STINNER Victor added the comment: @Drekin: What is your Windows version? How did you start Python? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 03:55:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 01:55:14 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1364954114.3.0.956596842002.issue17561@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 04:01:48 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 02:01:48 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364954508.86.0.28350979298.issue17614@psf.upfronthosting.co.za> Roger Serwy added the comment: Updated patch based on Ezio's comments. Thank you, Ezio! Senthil, I wish I had a Mac to test against. I am able to trigger the bug on Win7 with 3.3. Without objection, I will commit the patch in the upcoming hours. ---------- assignee: -> roger.serwy Added file: http://bugs.python.org/file29659/issue17614_rev1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 05:25:16 2013 From: report at bugs.python.org (Sean Wolfe) Date: Wed, 03 Apr 2013 03:25:16 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only In-Reply-To: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> Message-ID: <1364959516.6.0.00488238747355.issue17609@psf.upfronthosting.co.za> Sean Wolfe added the comment: fwiw, I like the configuration option. I tend to set idle to editor only, but the configuration option is useful to me. ---------- nosy: +seanfelipewolfe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 05:41:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Apr 2013 03:41:58 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <3ZgY4k1kb5zN3d@mail.python.org> Roundup Robot added the comment: New changeset 1e5e497ee33b by Roger Serwy in branch '2.7': #17614: IDLE no longer raises exception when quickly closing a file. http://hg.python.org/cpython/rev/1e5e497ee33b New changeset d759b7bc9785 by Roger Serwy in branch '3.3': #17614: IDLE no longer raises exception when quickly closing a file. http://hg.python.org/cpython/rev/d759b7bc9785 New changeset 578edbe38f0a by Roger Serwy in branch 'default': #17614: merge with 3.3. http://hg.python.org/cpython/rev/578edbe38f0a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 05:45:32 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 03:45:32 +0000 Subject: [issue17614] IDLE - quickly closing a large file triggers a traceback In-Reply-To: <1364874160.69.0.887183749933.issue17614@psf.upfronthosting.co.za> Message-ID: <1364960732.07.0.786047878888.issue17614@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 05:49:13 2013 From: report at bugs.python.org (Todd Rovito) Date: Wed, 03 Apr 2013 03:49:13 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only In-Reply-To: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> Message-ID: <1364960953.76.0.292242513772.issue17609@psf.upfronthosting.co.za> Todd Rovito added the comment: Thanks for the feedback I am good with closing but want to check with Roger because he suggested that we open a new issue to discuss. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 06:07:27 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 04:07:27 +0000 Subject: [issue17060] IDLE -- jump to home should not go past the PS1 and PS2 prompts In-Reply-To: <1359364664.26.0.133025400757.issue17060@psf.upfronthosting.co.za> Message-ID: <1364962047.31.0.779906992361.issue17060@psf.upfronthosting.co.za> Roger Serwy added the comment: When using the IDLE Classic OSX key set, the "beginning-of-line" virtual event gets bound to . Using this key set I can repeat the behavior that Raymond observed. The .home_callback() in Lib/idlelib/EditorWindow.py contains the logic from #3851 for placing the cursor at the beginning of the prompt, but it requires that a key combination be bound to the beginning-of-line virtual event. Should we append " " to the begining-of-line config in Lib/idlelib/config-keys.def ? ---------- nosy: +roger.serwy type: behavior -> enhancement versions: +Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 06:13:05 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 04:13:05 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364962385.02.0.333286562061.issue14254@psf.upfronthosting.co.za> Roger Serwy added the comment: Ned, I was reading the dev guide more closely about the meaning of the "commit review" stage. Would it be ok to place this issue into that stage with your test result? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 06:16:19 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Apr 2013 04:16:19 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364962579.8.0.613463268875.issue14254@psf.upfronthosting.co.za> Ned Deily added the comment: Sure, or just go ahead and commit it. LGTM. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 06:20:43 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 04:20:43 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only In-Reply-To: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> Message-ID: <1364962843.3.0.801110457826.issue17609@psf.upfronthosting.co.za> Roger Serwy added the comment: Todd, thank you for opening this issue. Given the feedback, it looks like we should keep the configuration. Feel free to close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 06:27:19 2013 From: report at bugs.python.org (Neil Hodgson) Date: Wed, 03 Apr 2013 04:27:19 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1364963239.78.0.701674447593.issue17615@psf.upfronthosting.co.za> Neil Hodgson added the comment: The common cases are likely to be 1:1, 2:2, and 1:2. There is already a specialisation for 1:1. wmemcmp is widely available but is based on wchar_t so is for different widths on Windows and Unix. On Windows it would handle the 2:2 case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 06:30:18 2013 From: report at bugs.python.org (Todd Rovito) Date: Wed, 03 Apr 2013 04:30:18 +0000 Subject: [issue17609] IDLE: Remove config option 'editor on startup' and utilize command line options only In-Reply-To: <1364817087.43.0.386717084157.issue17609@psf.upfronthosting.co.za> Message-ID: <1364963418.65.0.193142722607.issue17609@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 06:47:45 2013 From: report at bugs.python.org (paul j3) Date: Wed, 03 Apr 2013 04:47:45 +0000 Subject: [issue15427] Describe use of args parameter of argparse.ArgumentParser.parse_args In-Reply-To: <1342995154.12.0.902919829048.issue15427@psf.upfronthosting.co.za> Message-ID: <1364964465.88.0.56695967004.issue15427@psf.upfronthosting.co.za> paul j3 added the comment: The 'args=' parameter is the same as the first positional parameter used in most of the examples. That is normal Python behavior. 15.4.4.5. Beyond sys.argv explains this alternative way of specifying argv. Still 2 bullet points could be added to 15.4.4. - args - A list of strings, default is sys.argv[1:] (link to 15.4.4.5.) - namespace - A Namespace object, default is a new Namespace (link to 15.4.4.6.) Maybe a 15.4.4.5. example using args=['1', '2', '3', '4'] would also be helpful. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 07:07:35 2013 From: report at bugs.python.org (Illia Polosukhin) Date: Wed, 03 Apr 2013 05:07:35 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1360858057.09.0.617835061471.issue17206@psf.upfronthosting.co.za> Message-ID: <1364965655.24.0.930543536884.issue17206@psf.upfronthosting.co.za> Illia Polosukhin added the comment: Fixed Py_DECREF and Py_CLEAR as well. Added tests for Py_INCREF and Py_XINCREF (if somebody has a better idea how to tests that INCREF doesn't leak - please, let me know). Removed comment that Py_DECREF evaluate it's argument multiple times as not relevant anymore. About considerations from performance point of view - I've made toy example (only this defines and main function) to test how gcc optimizer behaves in different cases - from what I see, if expression is like this (which is majority of cases in the code): PyObject* obj = Foo(); Py_XDECREF(obj) assembly code that will be produced (with -O3) is the same before and after patch. ---------- Added file: http://bugs.python.org/file29660/17206-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 07:44:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Apr 2013 05:44:57 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <3Zgbpc2NTCzQNn@mail.python.org> Roundup Robot added the comment: New changeset 097554712637 by Roger Serwy in branch '2.7': #14254: IDLE now handles readline correctly across shell restarts. http://hg.python.org/cpython/rev/097554712637 New changeset 0be85a7fc839 by Roger Serwy in branch '3.3': #14254: IDLE now handles readline correctly across shell restarts. http://hg.python.org/cpython/rev/0be85a7fc839 New changeset 4b4f142befea by Roger Serwy in branch 'default': #14254: merge with 3.3. http://hg.python.org/cpython/rev/4b4f142befea ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 07:45:33 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 05:45:33 +0000 Subject: [issue14254] IDLE - shell restart or closing during readline does not exit nested event loop In-Reply-To: <1331488273.19.0.978623849585.issue14254@psf.upfronthosting.co.za> Message-ID: <1364967933.73.0.315009131387.issue14254@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 07:55:15 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 05:55:15 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1364968515.91.0.120940384342.issue15348@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- assignee: -> roger.serwy versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 08:10:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Apr 2013 06:10:00 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1364952228.15.0.991820700244.issue6743@psf.upfronthosting.co.za> Message-ID: <1364969395.3376.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Antoine: the desired behavior is to have a function with the same > signature as print (so multiple objects to print are supported), but > which calls pprint.pformat instead of str. But it can't work. pprint() uses all the width for a single object. How are you supposed to print multiple objects? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 08:12:57 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 06:12:57 +0000 Subject: [issue14576] IDLE: resolving home directory for configuration uses HOMEDRIVE, HOMEPATH, and USERPROFILE inconsistently on Windows. In-Reply-To: <1334400065.92.0.605072928338.issue14576@psf.upfronthosting.co.za> Message-ID: <1364969577.01.0.942011467686.issue14576@psf.upfronthosting.co.za> Roger Serwy added the comment: This issue triggers the problem described in #13582. It points out problems with IDLE's configuration manager w.r.t. determining the home directory. I changed the title so that it reflects that point. ---------- title: IDLE: closes when writing warnings on Windows -> IDLE: resolving home directory for configuration uses HOMEDRIVE, HOMEPATH, and USERPROFILE inconsistently on Windows. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 08:44:01 2013 From: report at bugs.python.org (paul j3) Date: Wed, 03 Apr 2013 06:44:01 +0000 Subject: [issue15427] Describe use of args parameter of argparse.ArgumentParser.parse_args In-Reply-To: <1342995154.12.0.902919829048.issue15427@psf.upfronthosting.co.za> Message-ID: <1364971441.05.0.274708389949.issue15427@psf.upfronthosting.co.za> paul j3 added the comment: This patch to argparse.rst adds the argument points to parse_args(). It also adds two points to the 'Upgrading optparse code' section, one about using 'nargs=argparse.REMAINDER', and other about 'parse_known_args()'. I'm not entirely happy with the format of the internal hyperlinks. ---------- keywords: +patch Added file: http://bugs.python.org/file29661/remainder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 08:46:48 2013 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Apr 2013 06:46:48 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1364971608.85.0.344889157851.issue8913@psf.upfronthosting.co.za> Eric V. Smith added the comment: My only suggestion would be that the datetime example would be better if it actually used a time portion, similar to the strftime example above it. Otherwise, it looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 09:18:43 2013 From: report at bugs.python.org (paul j3) Date: Wed, 03 Apr 2013 07:18:43 +0000 Subject: [issue15427] Describe use of args parameter of argparse.ArgumentParser.parse_args In-Reply-To: <1342995154.12.0.902919829048.issue15427@psf.upfronthosting.co.za> Message-ID: <1364973523.72.0.0691205733897.issue15427@psf.upfronthosting.co.za> paul j3 added the comment: I changed the reference to the optparse allow_interspersed_args attribute to the disable_interspersed_args() method. ---------- Added file: http://bugs.python.org/file29662/remainder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 09:23:29 2013 From: report at bugs.python.org (Yuri) Date: Wed, 03 Apr 2013 07:23:29 +0000 Subject: [issue17622] Python sets wrong pid in window properties Message-ID: <1364973809.38.0.992357465661.issue17622@psf.upfronthosting.co.za> New submission from Yuri: When I click on "Close Window" button for the unresponsive python-based app 'meld', message from window manager shows up offering to kill the non-existent pid. It looks like python libs set wrong pid for windows when python multithreading is in use by this app. Here are my original PRs with detailed description for kde4 and meld: https://bugs.kde.org/show_bug.cgi?id=317750 https://bugzilla.gnome.org/show_bug.cgi?id=697143 ---------- components: Library (Lib) messages: 185896 nosy: yurivict priority: normal severity: normal status: open title: Python sets wrong pid in window properties versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 10:15:45 2013 From: report at bugs.python.org (Heikki Partanen) Date: Wed, 03 Apr 2013 08:15:45 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1364976945.89.0.150409399816.issue8913@psf.upfronthosting.co.za> Heikki Partanen added the comment: Improved the datetime example to have time part ---------- Added file: http://bugs.python.org/file29663/issue8913-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 10:31:34 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 03 Apr 2013 08:31:34 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1364977894.56.0.274717138308.issue6743@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > But it can't work. pprint() uses all the width for a single object. > How are you supposed to print multiple objects? On multiple lines? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 10:49:29 2013 From: report at bugs.python.org (Drekin) Date: Wed, 03 Apr 2013 08:49:29 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364978969.38.0.147978531893.issue17619@psf.upfronthosting.co.za> Drekin added the comment: I have Windows Vista Business SP2, 64-bit, (6.0.6002). If I start Python any way (from console, from shortcut, via py.exe or not) the same behavior occurs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 11:17:04 2013 From: report at bugs.python.org (Drekin) Date: Wed, 03 Apr 2013 09:17:04 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364980624.39.0.553599417463.issue17619@psf.upfronthosting.co.za> Drekin added the comment: However it raises the exception correctly in IDLE. The same behavior occured on Windows 7 Home Premium SP1, 64-bit, (6.1.7601). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 11:22:47 2013 From: report at bugs.python.org (Thomas Heller) Date: Wed, 03 Apr 2013 09:22:47 +0000 Subject: [issue17623] Typo in Doc/whatsnew/3.3.rst Message-ID: <1364980967.1.0.766058009466.issue17623@psf.upfronthosting.co.za> New submission from Thomas Heller: Typo: trucate instead of truncate ---------- assignee: docs at python components: Documentation files: work.patch keywords: patch messages: 185901 nosy: docs at python, theller priority: normal severity: normal status: open title: Typo in Doc/whatsnew/3.3.rst Added file: http://bugs.python.org/file29664/work.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 11:26:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Apr 2013 09:26:37 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1364977894.56.0.274717138308.issue6743@psf.upfronthosting.co.za> Message-ID: <1997568173.21896648.1364981191115.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > Amaury Forgeot d'Arc added the comment: > > > But it can't work. pprint() uses all the width for a single object. > > How are you supposed to print multiple objects? > > On multiple lines? But then, it doesn't have anything similar to print() except that it takes multiple arguments (which is a very weak similarity). It can only be confusing to name it print(), not to mention that shadowing builtins is generally considered bad. Overall, -1 from me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 11:28:08 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 03 Apr 2013 09:28:08 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364980624.39.0.553599417463.issue17619@psf.upfronthosting.co.za> Message-ID: <515BF625.6070807@timgolden.me.uk> Tim Golden added the comment: That's because IDLE uses a completely different input loop from the console interpreter. I'll try to get to this but I'm chock-a-block with other work at the moment. If anyone else wants to dig, please do so. if the worst came to the worst we could back out my previous changeset but that would still leave us with an intermittent race-condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 11:36:05 2013 From: report at bugs.python.org (Drekin) Date: Wed, 03 Apr 2013 09:36:05 +0000 Subject: [issue17588] runpy cannot run Unicode path on Windows In-Reply-To: <1364753330.76.0.973974217823.issue17588@psf.upfronthosting.co.za> Message-ID: <1364981765.18.0.647903584396.issue17588@psf.upfronthosting.co.za> Drekin added the comment: I have no specific use case. I just thought that runpy.run_path should work similarily as if the file was run directly (which works). File ?.py can be created, displayed and run by Python with no problem in Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 11:48:37 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Apr 2013 09:48:37 +0000 Subject: [issue17622] Python sets wrong pid in window properties In-Reply-To: <1364973809.38.0.992357465661.issue17622@psf.upfronthosting.co.za> Message-ID: <1364982517.09.0.786643572368.issue17622@psf.upfronthosting.co.za> R. David Murray added the comment: Python doesn't know anything about X windows or window properties. (Well, it might in tkinter, but meld appears to use GTK). This is a bug in the meld application or one of the libraries it depends on, not Python or its stdlib. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior versions: +3rd party -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:17:40 2013 From: report at bugs.python.org (Drekin) Date: Wed, 03 Apr 2013 10:17:40 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364984260.01.0.79618444458.issue17619@psf.upfronthosting.co.za> Drekin added the comment: There is related weird behavior: >>> try: ... input() ... except KeyboardInterrupt: ... print("exception occured") ... # Ctrl-C hit Traceback (most recent call last): File "", line 2, in KeyboardInterrupt During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 2, in KeyboardInterrupt >>> Seems like handling of Ctrl-C is kind of ?out of sync?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:18:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Apr 2013 10:18:13 +0000 Subject: [issue17623] Typo in Doc/whatsnew/3.3.rst In-Reply-To: <1364980967.1.0.766058009466.issue17623@psf.upfronthosting.co.za> Message-ID: <3Zgjsx2yLHzQ1G@mail.python.org> Roundup Robot added the comment: New changeset 5dc976ce1b50 by R David Murray in branch '3.3': #17623: fix whatsnew typo http://hg.python.org/cpython/rev/5dc976ce1b50 New changeset 3c7a9c31001c by R David Murray in branch 'default': Merge #17623: fix whatsnew typo http://hg.python.org/cpython/rev/3c7a9c31001c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:18:37 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Apr 2013 10:18:37 +0000 Subject: [issue17623] Typo in Doc/whatsnew/3.3.rst In-Reply-To: <1364980967.1.0.766058009466.issue17623@psf.upfronthosting.co.za> Message-ID: <1364984317.8.0.993295546771.issue17623@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:19:48 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Apr 2013 10:19:48 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364984388.65.0.117299693058.issue17619@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Maybe this is related to http://bugs.python.org/issue13673 which causes PyTraceback_Print() to fail if a signal is received but PyErr_CheckSignals() has not been called. Note that wrapping in "try: ... except: raise" makes a traceback appear: >>> try: input() ... except: raise ... Traceback (most recent call last): File "", line 1, in KeyboardInterrupt During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in KeyboardInterrupt ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:20:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Apr 2013 10:20:13 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1364984413.88.0.162965716684.issue17611@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Simplifying the eval loop is a rather good thing. Could you post examples of bytecode disassembly before and after the patch? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:28:17 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 03 Apr 2013 10:28:17 +0000 Subject: [issue16208] getaddrinfo returns wrong results if IPv6 is disabled In-Reply-To: <1350029317.3.0.399140827664.issue16208@psf.upfronthosting.co.za> Message-ID: <1364984897.57.0.961368454721.issue16208@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:39:03 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Apr 2013 10:39:03 +0000 Subject: [issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called In-Reply-To: <1325108100.49.0.901203078622.issue13673@psf.upfronthosting.co.za> Message-ID: <1364985543.26.0.613883015568.issue13673@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Adding PyErr_CheckSignals() after PyOS_Readline() in builtin_input() seems to fix the problem. ---------- Added file: http://bugs.python.org/file29665/input-ctrlc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:39:44 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Apr 2013 10:39:44 +0000 Subject: [issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called In-Reply-To: <1325108100.49.0.901203078622.issue13673@psf.upfronthosting.co.za> Message-ID: <1364985584.12.0.401332814976.issue13673@psf.upfronthosting.co.za> Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file29665/input-ctrlc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:41:05 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Apr 2013 10:41:05 +0000 Subject: [issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called In-Reply-To: <1325108100.49.0.901203078622.issue13673@psf.upfronthosting.co.za> Message-ID: <1364985665.21.0.788930723351.issue13673@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Sorry, last message was for another issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:42:22 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Apr 2013 10:42:22 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364985742.94.0.0588809903767.issue17619@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Adding PyErr_CheckSignals() after PyOS_Readline() in builtin_input() seems to fix the problem. ---------- keywords: +patch Added file: http://bugs.python.org/file29666/input-ctrlc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:45:06 2013 From: report at bugs.python.org (Stefan Bucur) Date: Wed, 03 Apr 2013 10:45:06 +0000 Subject: [issue17624] Confusing TypeError in urllib.urlopen Message-ID: <1364985905.97.0.615690774313.issue17624@psf.upfronthosting.co.za> New submission from Stefan Bucur: When calling urllib.urlopen with a string containing the NULL ('\x00') character, a TypeError exception is thrown, as in the following example: urllib.urlopen('\x00\x00\x00') [...] File "/home/bucur/onion/python-bin/lib/python2.7/urllib.py", line 86, in urlopen return opener.open(url) File "/home/bucur/onion/python-bin/lib/python2.7/urllib.py", line 207, in open return getattr(self, name)(url) File "/home/bucur/onion/python-bin/lib/python2.7/urllib.py", line 462, in open_file return self.open_local_file(url) File "/home/bucur/onion/python-bin/lib/python2.7/urllib.py", line 474, in open_local_file stats = os.stat(localname) TypeError: must be encoded string without NULL bytes, not str This exception is confusing, since apparently the right type (a string) is passed to the function. Since this behavior cannot change, it would be good to mention this exception in the function documentation. I can imagine code that composes a URL based on user-supplied input and passes it to urlopen crashing if it doesn't properly sanitize the URL and/or doesn't catch TypeError. ---------- components: Library (Lib) messages: 185913 nosy: Stefan.Bucur priority: normal severity: normal status: open title: Confusing TypeError in urllib.urlopen type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 12:47:03 2013 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Apr 2013 10:47:03 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1364986023.52.0.739689263491.issue8913@psf.upfronthosting.co.za> Eric V. Smith added the comment: That looks great. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 13:09:50 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Apr 2013 11:09:50 +0000 Subject: [issue17624] Confusing TypeError in urllib.urlopen In-Reply-To: <1364985905.97.0.615690774313.issue17624@psf.upfronthosting.co.za> Message-ID: <1364987390.27.0.436642177585.issue17624@psf.upfronthosting.co.za> R. David Murray added the comment: In Python3 the equivalent urllib.request.urlopen call produces: ValueError: unknown url type: So this is effectively already fixed (although that error message should be doing a repr on the value, so I fixed that). We don't in general document every exception that might be raised by a function. Here the TypeError is coming from treating the url as a local filename. I don't think it is appropriate to document all the errors that can arise from treating the URL as a filename in the urllib docs, so I don't believe any changes should be made here. I've added the 'doc' componennt, so if someone from the doc team disagrees with me they can reopen the issue. As for your specific concern, the application has more problems (as in, security problems) than crashing because of a TypeError if it is composing the URL from user input such that the URL gets treated as a local filename. (This is arguably a bug in urllib, that it appears has been fixed in Python3.) ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 13:23:13 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Apr 2013 11:23:13 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1364988193.38.0.152208757076.issue17611@psf.upfronthosting.co.za> Stefan Krah added the comment: The change seems to slow down the pi float benchmark. Run this and hit Ctrl-C after the first decimal result appears: ./python Modules/_decimal/tests/bench.py I've run the benchmark seven times and the average for float is something like 8-10% slower (64-bit Linux, Core 2 Duo). Decimal is not affected. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 13:27:24 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Apr 2013 11:27:24 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear Message-ID: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> New submission from Raymond Hettinger: In an editor window, select Edit-Replace and click ReplaceAll. The dialog window stays open. Formerly, it cleared immediately which was useful. The new behavior is confusing and less useful. ---------- assignee: roger.serwy components: IDLE messages: 185917 nosy: rhettinger, roger.serwy priority: normal severity: normal status: open title: IDLE regression -- Search and Replace Window doesn't automatically clear versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 14:19:11 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 03 Apr 2013 12:19:11 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364985742.94.0.0588809903767.issue17619@psf.upfronthosting.co.za> Message-ID: <515C1E3C.8060205@timgolden.me.uk> Tim Golden added the comment: +1 Richard - are you in a position to commit / push? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 14:46:24 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 03 Apr 2013 12:46:24 +0000 Subject: [issue17561] Add socket.create_server_sock() convenience function In-Reply-To: <1364402909.97.0.467946240817.issue17561@psf.upfronthosting.co.za> Message-ID: <1364993184.84.0.551564245546.issue17561@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Here's a patch for Tulip: https://codereview.appspot.com/8307045 Will ping Tulip's ml as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 14:51:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Apr 2013 12:51:01 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <3ZgnGF0wrXzQwy@mail.python.org> Roundup Robot added the comment: New changeset 241cd716bf5f by Richard Oudkerk in branch '3.3': Issue #17619: Make input() check for Ctrl-C correctly on Windows. http://hg.python.org/cpython/rev/241cd716bf5f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 14:51:47 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Apr 2013 12:51:47 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364993507.91.0.614454164478.issue17619@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Richard - are you in a position to commit / push? Done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 15:12:44 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 03 Apr 2013 13:12:44 +0000 Subject: [issue12964] Two improvements for the locale aliasing engine In-Reply-To: <1315831287.41.0.402878841254.issue12964@psf.upfronthosting.co.za> Message-ID: <1364994764.03.0.644278375722.issue12964@psf.upfronthosting.co.za> Mark Lawrence added the comment: >From msg143902 "Both of the two calls *do not work* since Windows does not recognize strings such as 'en_US.ISO8859-1'." so how can this be an enhancement? But anyway #10466 talks about the same thing, could this be closed as a duplicate? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 15:35:06 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Apr 2013 13:35:06 +0000 Subject: [issue12964] Two improvements for the locale aliasing engine In-Reply-To: <1315831287.41.0.402878841254.issue12964@psf.upfronthosting.co.za> Message-ID: <1364996106.54.0.837248397172.issue12964@psf.upfronthosting.co.za> R. David Murray added the comment: I believe Martin is working on a proposal that will solve the windows issue, but it may be quite some time before that happens. Yes, the windows issue is essentially a dup, but the linux issue is different. As for your question, fixing the Windows issue is definitely an enhancement, since it requires mapping (or providing, as Martin proposes) the standard locale names on Windows, which is a service that currently doesn't exist. The linux issue might be a bug...we sometimes update alias tables in maintenance release. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 16:05:57 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 03 Apr 2013 14:05:57 +0000 Subject: [issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3 In-Reply-To: <1364920551.51.0.354757016043.issue17619@psf.upfronthosting.co.za> Message-ID: <1364997957.38.0.679597562051.issue17619@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 16:11:07 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 03 Apr 2013 14:11:07 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <1364998267.49.0.176587070024.issue17625@psf.upfronthosting.co.za> Roger Serwy added the comment: That behavior was introduced as part of the patch I wrote a long time ago for #13052. In retrospect that extra functionality went beyond the scope of that issue and should not have been included. Does anyone else think that the new behavior ought to be reverted? I don't mind reverting it. A related issue is #17511 which wants to keep the Find dialog open instead of closing. ---------- stage: -> needs patch type: -> behavior versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 16:12:37 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 03 Apr 2013 14:12:37 +0000 Subject: [issue1634774] locale 1251 does not convert to upper case properly Message-ID: <1364998357.3.0.412289827526.issue1634774@psf.upfronthosting.co.za> Mark Lawrence added the comment: Am I correct in saying that fixing this wouldn't help much as there are known issues with locales on Windows, e.g. #10466 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 16:16:30 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Apr 2013 14:16:30 +0000 Subject: [issue1634774] locale 1251 does not convert to upper case properly Message-ID: <1364998590.08.0.875524987357.issue1634774@psf.upfronthosting.co.za> R. David Murray added the comment: No, the issues with locale on Windows have to do with the locale names. Locale otherwise works fine on windows. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 16:52:36 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 03 Apr 2013 14:52:36 +0000 Subject: [issue12558] Locale-dependent exception for float width argument to Tkinter widget constructor In-Reply-To: <1310655906.95.0.630445767575.issue12558@psf.upfronthosting.co.za> Message-ID: <1365000756.06.0.706930249524.issue12558@psf.upfronthosting.co.za> Mark Lawrence added the comment: FWIW this can be reproduced on Windows Vista with Python 3.3.1rc1. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 17:00:14 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 03 Apr 2013 15:00:14 +0000 Subject: [issue14143] test_ntpath failure on Windows In-Reply-To: <1330369660.88.0.127957807148.issue14143@psf.upfronthosting.co.za> Message-ID: <1365001214.66.0.869404074288.issue14143@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm guessing this is a one off. As nobody is screaming or shouting can it be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 17:05:27 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 03 Apr 2013 15:05:27 +0000 Subject: [issue8639] Allow callable objects in inspect.getfullargspec In-Reply-To: <1273183110.15.0.600505035287.issue8639@psf.upfronthosting.co.za> Message-ID: <1365001527.64.0.667601665272.issue8639@psf.upfronthosting.co.za> Mark Lawrence added the comment: Would someone please review the patch file as it's out of my league. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 17:10:49 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 03 Apr 2013 15:10:49 +0000 Subject: [issue12327] in HTTPConnection the are len(body) and TypeError catch exception to detect if body is file like object, this hack do work with StringIO object In-Reply-To: <1307987409.37.0.379147237937.issue12327@psf.upfronthosting.co.za> Message-ID: <1365001849.08.0.725315934163.issue12327@psf.upfronthosting.co.za> Mark Lawrence added the comment: @harobed if you still have a problem please provide more data as requested in msg138692. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 17:18:34 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Apr 2013 15:18:34 +0000 Subject: [issue14143] test_ntpath failure on Windows In-Reply-To: <1330369660.88.0.127957807148.issue14143@psf.upfronthosting.co.za> Message-ID: <1365002314.86.0.835963224252.issue14143@psf.upfronthosting.co.za> R. David Murray added the comment: Possibly. However, it's an intermittent buildbot failure, so it is a bit difficult to know if it fixed or not. We really need a way to track intermittent failures so we can figure out when they have gone away :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 18:00:29 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 03 Apr 2013 16:00:29 +0000 Subject: [issue1634774] locale 1251 does not convert to upper case properly Message-ID: <1365004829.3.0.375194077843.issue1634774@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: With Python3 .upper() is locale-independent for unicode and bytes strings. For serious work with non-ascii text Python3 is strongly recommended anyway, so I suggest to close this issue. ---------- resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 18:11:12 2013 From: report at bugs.python.org (Phil Connell) Date: Wed, 03 Apr 2013 16:11:12 +0000 Subject: [issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists In-Reply-To: <1337905627.12.0.841961188355.issue14905@psf.upfronthosting.co.za> Message-ID: <1365005472.62.0.565070748399.issue14905@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 18:33:21 2013 From: report at bugs.python.org (Martin Morrison) Date: Wed, 03 Apr 2013 16:33:21 +0000 Subject: [issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists In-Reply-To: <1337905627.12.0.841961188355.issue14905@psf.upfronthosting.co.za> Message-ID: <1365006801.69.0.24307971914.issue14905@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 18:41:20 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 03 Apr 2013 16:41:20 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365007280.06.0.3386049367.issue17615@psf.upfronthosting.co.za> Georg Brandl added the comment: Reopening for consideration of using wmemcmp(). ---------- nosy: +georg.brandl status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 18:42:36 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 Apr 2013 16:42:36 +0000 Subject: [issue16895] Batch file to mimic 'make' on Windows In-Reply-To: <1357677821.21.0.151237367429.issue16895@psf.upfronthosting.co.za> Message-ID: <1365007356.03.0.827535116002.issue16895@psf.upfronthosting.co.za> Zachary Ware added the comment: I was rather off about kill_python, wasn't I? Anyway, I've finally gotten another version put together that I'd like to get comments on. Major differences between this patch and the previous one, in no particular order: - Add a 'configure.bat' script to increase the parallel with Unix building. Currently only has 2 options, --with-pydebug and --with(out)-64-bit, which affect how PY_PLATFORM and PY_CONFIGURATION are set in make.bat, which allows for building any combination of Debug, Release, 32 bit, and 64 bit with make.bat. - Add 'win-config.dat' to .hgignore; this file stores configure.bat's options for make.bat's use. - Update documentation: PCbuild/readme.txt gets significant updates, including some that apply without make.bat and which I can split out into a separate patch if someone wants to commit those separately. Doc/using/windows.rst also gets a small update which actually just goes with one of the PCbuild/readme.txt updates and isn't affected by make.bat. - make.bat is now stand-alone; it does not rely on any other batch scripts except configure.bat (namely Tools/buildbot/*). - Renamed "ready" target to "external", as promised. - Reimplemented "test" target to match the Unix implementation. Also added "buildbottest" target, which matches Unix implementation. - Added separate "tcltk" target to build tcltk and copy the built .dlls to the appropriate place for the built Python to find them. - Added "all" alias to "build" target (to match Unix). "build" calls :external on its own, and calls :tcltk if it can't find the appropriate tcl/tk .dlls. - Added "clobber" target, which does its best to obliterate everything make.bat can create. The only way I've thought of to be more thorough is to actually delete the entire contents of the PCbuild directory and do an ``hg revert -C PCbuild`` to get it back, but that does have the possibility to be more destructive than desired. - Added variables to the top of the file to set the versions of the external projects. This means there's only one place to update when an external is updated, and for easy testing one could do something akin to ``make "OPENSSLVERSION=openssl-1.0.1e"`` - Added "msi" target to perform the task of Tools/buildbot/buildmsi.bat. Note that this one is hard for me to test, as buildmsi.bat does not work properly for me. However, the msi target works as well or better than buildmsi.bat for me, and should work assuming msi.py can do what it is meant to. I wonder, though; does anybody use buildmsi.bat? I noticed that it has information in it hard-coded for Python 2.6a3... Several things have gone through an iteration or two since the last patch; I'll try to go through and add some comments on Rietveld myself. Since make.bat is now stand-alone, if it is accepted (and it is deemed desirable to do so), the Windows buildbots could be converted to use make.bat instead of Tools/buildbot/*, and that directory could actually be removed. This would also make it easy to set up a buildbot that tests a Release configuration of Python. All comments welcome :) ---------- Added file: http://bugs.python.org/file29667/win_configure-make.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 18:43:14 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 03 Apr 2013 16:43:14 +0000 Subject: [issue13249] argparse.ArgumentParser() lists arguments in the wrong order In-Reply-To: <1319394759.74.0.692830705102.issue13249@psf.upfronthosting.co.za> Message-ID: <1365007394.95.0.99982929489.issue13249@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone please review the latest patch and commit if appropriate. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 18:47:11 2013 From: report at bugs.python.org (Phil Connell) Date: Wed, 03 Apr 2013 16:47:11 +0000 Subject: [issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists In-Reply-To: <1337905627.12.0.841961188355.issue14905@psf.upfronthosting.co.za> Message-ID: <1365007631.88.0.995872123012.issue14905@psf.upfronthosting.co.za> Phil Connell added the comment: The problem appears to be more general. zipimport fails for deeper hierarchies, even with directory entries. With the supplied patch (zipimport-issue14905-2.patch) I see the following: $ unzip -l foo.zip Archive: foo.zip Length Date Time Name --------- ---------- ----- ---- 0 2013-04-03 17:28 a/b/c/foo.py 0 2013-04-03 17:34 a/ 0 2013-04-03 17:34 a/b/ 0 2013-04-03 17:34 a/b/c/ --------- ------- 0 4 files $ ls foo.zip $ PYTHONPATH=foo.zip ~/dev/cpython/python Python 3.4.0a0 (default:3b1dbe7a2aa0+, Apr 3 2013, 17:31:54) [GCC 4.8.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import a >>> import a.b Traceback (most recent call last): File "", line 1, in ImportError: No module named 'a.b' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 18:50:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Apr 2013 16:50:46 +0000 Subject: [issue15940] Time module: effect of locale In-Reply-To: <1347559427.35.0.589419592153.issue15940@psf.upfronthosting.co.za> Message-ID: <3ZgtZt0tl9zMWp@mail.python.org> Roundup Robot added the comment: New changeset ee5add45bf9d by Terry Jan Reedy in branch '3.3': Issue #15940: Specify effect of locale on time functions. http://hg.python.org/cpython/rev/ee5add45bf9d New changeset 5ffb808683e1 by Terry Jan Reedy in branch '2.7': Issue #15940: Specify effect of locale on time functions. http://hg.python.org/cpython/rev/5ffb808683e1 New changeset a6d5fde72843 by Terry Jan Reedy in branch '3.3': Issue #15940: Replace tab. http://hg.python.org/cpython/rev/a6d5fde72843 New changeset b7d2cb2214d8 by Terry Jan Reedy in branch '2.7': Issue #15940: Replace tab. http://hg.python.org/cpython/rev/b7d2cb2214d8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 19:05:27 2013 From: report at bugs.python.org (Thomas Fenzl) Date: Wed, 03 Apr 2013 17:05:27 +0000 Subject: [issue17484] add tests for getpass In-Reply-To: <1363731601.11.0.00161818926238.issue17484@psf.upfronthosting.co.za> Message-ID: <1365008727.57.0.66795579434.issue17484@psf.upfronthosting.co.za> Thomas Fenzl added the comment: I signed the contributor agreement during pycon, with the pdf sent to me on March 19th, 15:25 PDT ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 19:09:26 2013 From: report at bugs.python.org (Thomas Fenzl) Date: Wed, 03 Apr 2013 17:09:26 +0000 Subject: [issue5609] Create Unit Tests for nturl2path module In-Reply-To: <1238434174.72.0.622903214477.issue5609@psf.upfronthosting.co.za> Message-ID: <1365008966.09.0.714718283804.issue5609@psf.upfronthosting.co.za> Thomas Fenzl added the comment: The authoritative implementation of this functionality would be Microsoft's PathCreateFromUrl (http://msdn.microsoft.com/en-us/library/windows/desktop/bb773581%28v=vs.85%29.aspx) and UrlCreateFromPath (http://msdn.microsoft.com/en-us/library/windows/desktop/bb773773%28v=vs.85%29.aspx), right? If so I'll run a few more complex conversions and round-trips through those and add the tests ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 19:25:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Apr 2013 17:25:13 +0000 Subject: [issue15940] Time module: effect of locale In-Reply-To: <1347559427.35.0.589419592153.issue15940@psf.upfronthosting.co.za> Message-ID: <3ZgvLc6TF2zR0l@mail.python.org> Roundup Robot added the comment: New changeset 3daa20ce817e by Terry Jan Reedy in branch '3.3': Issue #15940: NEWS entry http://hg.python.org/cpython/rev/3daa20ce817e New changeset be9273375b61 by Terry Jan Reedy in branch '2.7': Issue #15940: NEWS entry http://hg.python.org/cpython/rev/be9273375b61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 19:26:15 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Apr 2013 17:26:15 +0000 Subject: [issue15940] Time module: effect of locale In-Reply-To: <1347559427.35.0.589419592153.issue15940@psf.upfronthosting.co.za> Message-ID: <1365009975.46.0.0479423787178.issue15940@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 19:34:58 2013 From: report at bugs.python.org (Roy Wellington) Date: Wed, 03 Apr 2013 17:34:58 +0000 Subject: [issue17626] set's __isub__ doesn't support non-sets. Message-ID: <1365010498.59.0.57626371366.issue17626@psf.upfronthosting.co.za> New submission from Roy Wellington: The following: s = set(range(10)) s -= (1, 2, 3) raises a TypeError. Yet the following, which is more verbose and equivalent, succeeds: s.difference_update((1, 2, 3)) Under the hood, __isub__ calls difference_update to do its work. Unfortunately, __isub__ explicitly checks that the parameter is a set, even though difference_update can handle more than just sets. Could set.__isub__ just pass along the tuple to difference update, allowing __isub__ to operate on any iterable? For the purposes of "remove these elements from this set", any iterable works just as well as any other. It should O(number of elements to remove) in time (for sets, tuples, lists, etc.) and constant in memory, aside from the memory required for the parameters themselves. ---------- messages: 185941 nosy: Roy.Wellington priority: normal severity: normal status: open title: set's __isub__ doesn't support non-sets. type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 19:55:13 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 03 Apr 2013 17:55:13 +0000 Subject: [issue17626] set's __isub__ doesn't support non-sets. In-Reply-To: <1365010498.59.0.57626371366.issue17626@psf.upfronthosting.co.za> Message-ID: <1365011713.73.0.904057756745.issue17626@psf.upfronthosting.co.za> Georg Brandl added the comment: Assigning to Raymond for confirmation, but IIRC this is by design. ---------- assignee: -> rhettinger nosy: +georg.brandl, rhettinger status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 20:39:11 2013 From: report at bugs.python.org (CM) Date: Wed, 03 Apr 2013 18:39:11 +0000 Subject: [issue17627] Datetime and time doesn't update timezone in a running Win app Message-ID: <1365014351.49.0.143463684024.issue17627@psf.upfronthosting.co.za> New submission from CM: On Windows (tested on XP), the datetime module (and, as reported online in [1], time module) apparently gets the timezone only when a Python instance first starts, but then never updates the timezone during the life of that Python instance. So, if the user changes the system time zone while an application is running, datetime still uses the time zone that the Python instance started with, and so it is incorrect. Example, Python 2.7.3: First, the system time zone is set to Eastern U.S. and the system time shows 14:27. >>> import datetime >>> print datetime.datetime.now() 2013-04-03 14:27:43.124000 This is correct, and matches the system clock. Now user changes time zone on Windows to GMT (and doesn't change the time). Clock now shows the time as 18:29. >>> print datetime.datetime.now() 2013-04-03 14:29:02.875000 ^ This is incorrect and doesn't match the time shown on the system clock. Note: if the user changes the system clock time and NOT the time zone, then datetime updates the time fine. This has been discussed in a Stack Overflow question, with a proposed workaround[1], but it doesn't fix the fact that this makes datetime incorrect for those that have processes that ought to continue across time zone changes as the user moves. [1]See accepted answer in particular here: http://stackoverflow.com/questions/4360981/make-python-respond-to-windows-timezone-changes ---------- components: Library (Lib) messages: 185943 nosy: cm priority: normal severity: normal status: open title: Datetime and time doesn't update timezone in a running Win app type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 21:19:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 19:19:31 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365016771.82.0.206650268132.issue17615@psf.upfronthosting.co.za> STINNER Victor added the comment: "wmemcmp is widely available but is based on wchar_t so is for different widths on Windows and Unix. On Windows it would handle the 2:2 case." I don't know if wmemcmp() can be used if wchar_t type is signed. Is there an OS with signed wchar_t? If yes, we need to check if wchar_t is signed in configure. On Windows, wchar_t size is 16 bits, whereas it is 32 bits on Mac OS X and Linux (and most OSes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 21:39:31 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 03 Apr 2013 19:39:31 +0000 Subject: [issue5609] Create Unit Tests for nturl2path module In-Reply-To: <1238434174.72.0.622903214477.issue5609@psf.upfronthosting.co.za> Message-ID: <1365017971.03.0.0586627861558.issue5609@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for the patch and test coverage. LGTM. I shall verify further and commit it. ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 21:39:33 2013 From: report at bugs.python.org (Mark Shannon) Date: Wed, 03 Apr 2013 19:39:33 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1365017973.82.0.871947806324.issue17611@psf.upfronthosting.co.za> Mark Shannon added the comment: Stefan, I tried running your pi_bench (increasing the numer of iterations by x10 to reduce jitter). The run to run variation exceed the difference between the two versions. Here are the fastest of 7 runs on my machine. i3-2370M CPU @ 2.40GHz ? 4. linux 64bit. With patch: 1.154152s Without patch: 1.157730s I'm somewhat surprised by the slowdown on your machine. There should be no difference in the bytecodes executed or their implementation in the pi_float loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 21:58:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Apr 2013 19:58:07 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <1365019087.29.0.780277933464.issue17483@psf.upfronthosting.co.za> Antoine Pitrou added the comment: IMO, there's not much point backporting such a simple cleanup, so I'm simply closing the issue. ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:00:57 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Apr 2013 20:00:57 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1365019257.68.0.403906108897.issue16061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My experiments last September, before this was filed, showed that str.find (index) had most of the relative slowdown of str.replace. I assumed at that time that .replace used .find or .index to find substrings to replace, so that the fix for .replace would include speeding up .find/index. Looking at the patches, I see that I was wrong; I guess because .replace copies as it goes. I will open a separate issue sometime unless .find gets fixed here. For both .find and .replace, the regression was worse on Windows than on linux, so the patches should be tested on Windows also. If I can get vc++ express 2008 installed and working on my current substitute machine. I will give them a try. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:07:53 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 03 Apr 2013 20:07:53 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <1365019673.34.0.778409428183.issue17483@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I shall do it. Just for keeping it clean and it may help when future patches can be merged across branches cleanly. There is no loss IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:25:54 2013 From: report at bugs.python.org (Mark Shannon) Date: Wed, 03 Apr 2013 20:25:54 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1365020754.91.0.312023351881.issue17611@psf.upfronthosting.co.za> Mark Shannon added the comment: Antoine, Two bytecode examples. For the following function: >>> def f(x): ... try: ... return x ... except: ... pass Without the patch: 2 0 SETUP_EXCEPT 8 (to 11) 3 3 LOAD_FAST 0 (x) 6 RETURN_VALUE 7 POP_BLOCK 8 JUMP_FORWARD 8 (to 19) 4 >> 11 POP_TOP 12 POP_TOP 13 POP_TOP 5 14 POP_EXCEPT 15 JUMP_FORWARD 1 (to 19) 18 END_FINALLY >> 19 LOAD_CONST 0 (None) 22 RETURN_VALUE With the patch: 2 0 SETUP_EXCEPT 9 (to 12) 3 3 LOAD_FAST 0 (x) 6 POP_BLOCK 7 RETURN_VALUE 8 POP_BLOCK 9 JUMP_FORWARD 8 (to 20) 4 >> 12 POP_TOP 13 POP_TOP 14 POP_TOP 5 15 POP_EXCEPT 16 JUMP_FORWARD 1 (to 20) 19 RERAISE >> 20 LOAD_CONST 0 (None) 23 RETURN_VALUE The difference is the 'POP_BLOCK' inserted at offset 7 *before* the 'RETURN_VALUE', so that the RETURN_VALUE bytecode does not have to do any unwinding of the block stack. For loops the SETUP_LOOP and the matching POP_BLOCK are eliminated: >>> def f(x): ... for y in x: ... g(x) Without the patch: 2 0 SETUP_LOOP 24 (to 27) 3 LOAD_FAST 0 (x) 6 GET_ITER >> 7 FOR_ITER 16 (to 26) 10 STORE_FAST 1 (y) 3 13 LOAD_GLOBAL 0 (g) 16 LOAD_FAST 1 (y) 19 CALL_FUNCTION 1 (1 positional, 0 keyword pair) 22 POP_TOP 23 JUMP_ABSOLUTE 7 >> 26 POP_BLOCK >> 27 LOAD_CONST 0 (None) 30 RETURN_VALUE With the patch: 2 0 LOAD_FAST 0 (x) 3 GET_ITER >> 4 FOR_ITER 16 (to 23) 7 STORE_FAST 1 (y) 3 10 LOAD_GLOBAL 0 (g) 13 LOAD_FAST 0 (x) 16 CALL_FUNCTION 1 (1 positional, 0 keyword pair) 19 POP_TOP 20 END_ITER 4 >> 23 LOAD_CONST 0 (None) 26 RETURN_VALUE END_ITER is a synonym for JUMP_ABSOLUTE. It is needed so that frame.set_lineno() can identify loop blocks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:27:10 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 Apr 2013 20:27:10 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1365020830.73.0.624254251977.issue17611@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:32:27 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Apr 2013 20:32:27 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1365017973.82.0.871947806324.issue17611@psf.upfronthosting.co.za> Message-ID: <20130403203230.GA14058@sleipnir.bytereef.org> Stefan Krah added the comment: I'm surprised, too, but after a couple of retries the results stay the same. On an i7 there's also a difference, but not quite as large. I'm using b16527f84774.diff, which applies cleanly apart from importlib.h (which I just regenerated). With an increased loop count the difference is also the same (10% on the Core2 Duo). Core2 Duo, 3.16GHz, Linux 64-bit ================================ patched: -------- (0.10855+0.10901+0.1168+0.1119+0.1095+0.1090+0.1084+0.1130+0.1235+0.1183) / 10 = 0.113 unpatched: ---------- (0.0995+0.1049+0.1009+0.1021+0.0986+0.1005+0.0988+0.10171+0.0987+0.0992) / 10 = 0.10 (i7, 2.80GHz, Linux 64-bit) ============================ patched: -------- (0.1021+0.1078+0.1072+0.1058+0.1091+0.1067+0.1064+0.1071+0.1069+0.1067) / 10 = 0.107 unpatched: ---------- (0.1029+0.1033+0.1023+0.1029+0.1050+0.1020+0.1031+0.1024+0.10149+0.10247) / 10 = 0.103 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:53:15 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Apr 2013 20:53:15 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <20130403203230.GA14058@sleipnir.bytereef.org> Message-ID: <20130403205318.GA14198@sleipnir.bytereef.org> Stefan Krah added the comment: BTW, there's no general slowdown on the Core2 Duo: In the patched version, the telco benchmark is consistently 4% faster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:55:02 2013 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 Apr 2013 20:55:02 +0000 Subject: [issue17470] random.choice should accept a set as input In-Reply-To: <1363643232.74.0.469965121668.issue17470@psf.upfronthosting.co.za> Message-ID: <1365022502.14.0.727367839868.issue17470@psf.upfronthosting.co.za> Mark Dickinson added the comment: See also issue #7522 (with an identical title!) for previous discussion. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:57:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Apr 2013 20:57:22 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <20130403205318.GA14198@sleipnir.bytereef.org> Message-ID: <1365022637.3554.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > BTW, there's no general slowdown on the Core2 Duo: In the patched version, > the telco benchmark is consistently 4% faster. It's customary for even innocent changes in ceval to produce small changes in some benchmarks. It's only really important to consider the global average. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 22:58:02 2013 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 Apr 2013 20:58:02 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1365022682.32.0.210380264523.issue17611@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:15:07 2013 From: report at bugs.python.org (Chris Kaynor) Date: Wed, 03 Apr 2013 21:15:07 +0000 Subject: [issue17263] crash when tp_dealloc allows other threads In-Reply-To: <1361414271.61.0.154662693899.issue17263@psf.upfronthosting.co.za> Message-ID: <1365023707.52.0.140102744209.issue17263@psf.upfronthosting.co.za> Changes by Chris Kaynor : ---------- nosy: +DragonFireCK _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:23:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Apr 2013 21:23:26 +0000 Subject: [issue17094] sys._current_frames() reports too many/wrong stack frames In-Reply-To: <1359668363.58.0.777154629349.issue17094@psf.upfronthosting.co.za> Message-ID: <1365024206.49.0.561555047242.issue17094@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:28:58 2013 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Apr 2013 21:28:58 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1365022637.3554.0.camel@localhost.localdomain> Message-ID: <20130403212901.GA14488@sleipnir.bytereef.org> Stefan Krah added the comment: Antoine Pitrou wrote: > It's customary for even innocent changes in ceval to produce small > changes in some benchmarks. It's only really important to consider the > global average. Yes, the float benchmark appears to be particularly sensitive. In the 3.3.0 release it also runs 8% slower than it does now (unpatched). I'm trying to keep track of changes because in 2.7 the (float) benchmark runs something like 25% faster than in 3.3.0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:29:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 21:29:12 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() Message-ID: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> New submission from STINNER Victor: In Python 3.4, str==str is implemented by calling memcmp(). unicode_eq() function, used by dict and set types, checks the first byte before calling memcmp(). bytes==bytes uses the same check. Py_UNICODE_MATCH macro checks the first *and* last character before calling memcmp() since this commit: --- changeset: 38242:0de9a789de39 branch: legacy-trunk user: Fredrik Lundh date: Tue May 23 10:10:57 2006 +0000 files: Include/unicodeobject.h description: needforspeed: check first *and* last character before doing a full memcmp --- Attached patch changes str==str to check the first and last character before calling memcmp(). It might reduce the overhead of a C function call, but it is much faster when comparing two different strings of the same length with a common prefix (but a different suffix). The patch merges also unicode_compare_eq() and unicode_eq() to use the same code for str, dict and set. We may use the same optimization on byte strings. See also #16321. ---------- files: unicode_eq.patch keywords: patch messages: 185956 nosy: haypo, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: str==str: compare the first and last character before calling memcmp() versions: Python 3.4 Added file: http://bugs.python.org/file29668/unicode_eq.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:33:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 21:33:04 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1365024783.99.0.0118644940753.issue17628@psf.upfronthosting.co.za> STINNER Victor added the comment: According to my benchmark, performances are almost the same with the patch. The major difference is on comparing two strings longer than 10 characters, of the same length, with a common prefix but a different suffix. See attached benchmark for the result. ---------- Added file: http://bugs.python.org/file29669/benchmark _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:34:14 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Apr 2013 21:34:14 +0000 Subject: [issue17568] re: Infinite loop with repeated empty alternative In-Reply-To: <1364514602.25.0.0249156897876.issue17568@psf.upfronthosting.co.za> Message-ID: <1365024854.52.0.104636313847.issue17568@psf.upfronthosting.co.za> Ezio Melotti added the comment: I can reproduce on 3.2.3, but otherwise this work fine in the upcoming 3.2.4 and on 3.3+. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:37:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Apr 2013 21:37:14 +0000 Subject: [issue17627] Datetime and time doesn't update timezone in a running Win app In-Reply-To: <1365014351.49.0.143463684024.issue17627@psf.upfronthosting.co.za> Message-ID: <1365025034.49.0.139336880777.issue17627@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am not sure this is a bug, as I don't think it reasonable to expect every time function call to re-initialize the timezone setting. I think you should change this to a request to see if time.tzset can now be made to work on Windows and not unix-only (as documented, when added in 2.3). The second StackOverflow answer by Lentjes suggests that it can for current Python. datetime.now(tz=None) has an option to pass a timezone for adjusting the output. An user-friendly app can pass a real timezone instead of the default None and give users means to change what tz they want times displayed for, which may or may not be the current local timezone. ---------- nosy: +belopolsky, brian.curtin, lemburg, terry.reedy, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:40:21 2013 From: report at bugs.python.org (Brian Curtin) Date: Wed, 03 Apr 2013 21:40:21 +0000 Subject: [issue17627] Datetime and time doesn't update timezone in a running Win app In-Reply-To: <1365014351.49.0.143463684024.issue17627@psf.upfronthosting.co.za> Message-ID: <1365025221.15.0.202876479235.issue17627@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:45:56 2013 From: report at bugs.python.org (Neil Hodgson) Date: Wed, 03 Apr 2013 21:45:56 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365025556.9.0.984566980085.issue17615@psf.upfronthosting.co.za> Neil Hodgson added the comment: For 32-bits whether wchar_t is signed shouldn't matter as Unicode is only 21-bits so no character will be seen as negative. On Windows, wchar_t is unsigned. C11 has char16_t and char32_t which are both unsigned but it doesn't include comparison functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:46:09 2013 From: report at bugs.python.org (Trent Nelson) Date: Wed, 03 Apr 2013 21:46:09 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1365025569.66.0.195048688514.issue17611@psf.upfronthosting.co.za> Changes by Trent Nelson : ---------- nosy: +trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:47:56 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Apr 2013 21:47:56 +0000 Subject: [issue17627] Datetime and time doesn't update timezone in a running Win app In-Reply-To: <1365014351.49.0.143463684024.issue17627@psf.upfronthosting.co.za> Message-ID: <1365025676.03.0.0767076354621.issue17627@psf.upfronthosting.co.za> R. David Murray added the comment: On linux, if you call time.ctime() before and after changing the system /etc/localtime file, the time will be updated without restarting Python. The same applies to datetime.now(). ---------- nosy: +r.david.murray stage: needs patch -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:53:11 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Apr 2013 21:53:11 +0000 Subject: [issue17554] Compact output for regrtest In-Reply-To: <1364331735.49.0.0652208703783.issue17554@psf.upfronthosting.co.za> Message-ID: <1365025991.04.0.332254603287.issue17554@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached patch shows the "Fetching ..." only in verbose mode. ---------- Added file: http://bugs.python.org/file29670/issue17554-urlfetch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:54:31 2013 From: report at bugs.python.org (Chris Angelico) Date: Wed, 03 Apr 2013 21:54:31 +0000 Subject: [issue17629] Expose string width to Python Message-ID: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> New submission from Chris Angelico: As of PEP 393, a string's width is recorded in its header - effectively, a marker that says whether the highest codepoint in the string is >0xFFFF, >0xFF, or <=0xFF. This is, on some occasions, useful to know; for instance, when testing string performance, it's handy to be able to very quickly throw something down that, without scanning the contents of all the strings used, can identify the width spread. A similar facility is provided by Pike, which has a similar flexible string representation: http://pike.lysator.liu.se/generated/manual/modref/ex/7.2_3A_3A/String/width.html accessible to a script as String.width(). Since this is not something frequently needed, it would make sense to hide it away in the sys or inspect modules, or possibly in strings or as a method on the string itself. Currently, the best way to do this is something like: def str_width(s): width=1 for ch in map(ord,s): if n > 0xFFFF: return 4 if n > 0xFF: width=2 return width which necessitates a scan of the entire string, unless it has an astral character. ---------- components: Library (Lib) messages: 185963 nosy: Rosuav priority: normal severity: normal status: open title: Expose string width to Python versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:56:35 2013 From: report at bugs.python.org (Chris Angelico) Date: Wed, 03 Apr 2013 21:56:35 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365026195.46.0.466209504562.issue17629@psf.upfronthosting.co.za> Chris Angelico added the comment: And of course, I make a copy/paste error in a trivial piece of example code. def str_width(s): width=1 for ch in map(ord,s): if ch > 0xFFFF: return 4 if ch > 0xFF: width=2 return width ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 3 23:58:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 21:58:19 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1365026299.47.0.111171484065.issue17628@psf.upfronthosting.co.za> STINNER Victor added the comment: Attach the benchmark script. ---------- Added file: http://bugs.python.org/file29671/bench_unicode_eq.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:00:53 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Apr 2013 22:00:53 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365026453.79.0.898203735985.issue17629@psf.upfronthosting.co.za> Ezio Melotti added the comment: Not sure this is a good idea. The fact that CPython knows the width is an implementation detail. The method you suggested might not be too fast but it works, so we would be adding a new function/method just to optimize a fairly uncommon operation that depends on an implementation detail. ---------- components: +Unicode nosy: +ezio.melotti, haypo, loewis type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:05:56 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 Apr 2013 22:05:56 +0000 Subject: [issue17630] Create a pure Python zipfile importer Message-ID: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> New submission from Brett Cannon: I'm going to write an importer using zipfile and importlib in pure Python. I'm doing this so that (a) there is an importer that relies on zipfile and thus what features it adds over time, (b) to have good example code to point people to when they need to implement their own importers, and (c) for me to see where there are API holes in importlib and the ABCs in order to continue to try and make things easier for people. Do realize that the last point means I will most likely be writing this myself no matter what people contribute (sorry). If people still want to tackle it to provide feedback on what importlib is lacking that's totally fine and welcome feedback, but since this is partially an exercise for myself I feel like I do need to type it all out from scratch to discover sticking points, even from an experienced perspective. But I'm happy to discuss design choices, etc. here with folks as this progresses. ---------- assignee: brett.cannon components: Library (Lib) messages: 185967 nosy: brett.cannon priority: low severity: normal stage: test needed status: open title: Create a pure Python zipfile importer type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:06:43 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 03 Apr 2013 22:06:43 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1365026803.53.0.557685013504.issue17630@psf.upfronthosting.co.za> Brett Cannon added the comment: I should mention I have an old implementation at https://code.google.com/p/importers/. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:09:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 22:09:19 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365026959.28.0.0421612065936.issue17629@psf.upfronthosting.co.za> STINNER Victor added the comment: "This is, on some occasions, useful to know; for instance, when testing string performance, it's handy to be able to very quickly throw something down that, without scanning the contents of all the strings used, can identify the width spread." When you test string performances, you can get manually the biggest code point using: max(map(ord, str)). Do you have an other use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:10:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 22:10:33 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1365027033.17.0.0119638159655.issue17628@psf.upfronthosting.co.za> STINNER Victor added the comment: benchmark2: Results on a slower computer. Comparing equal strings is much faster with the patch. Example: equal, 'A', 1000000 | 945 us (*) | 1.25 ms (+32%) I don't understand why the patch makes the comparaison much slower, since most time is supposed to be spend in memcmp()? Is it because I starts at the second character to compare strings, instead of the first character? Memory alignment issue? ---------- Added file: http://bugs.python.org/file29672/benchmark2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:11:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Apr 2013 22:11:25 +0000 Subject: [issue16321] Move eq.h out of stringlib In-Reply-To: <1351157379.02.0.714048258846.issue16321@psf.upfronthosting.co.za> Message-ID: <1365027085.61.0.399578613932.issue16321@psf.upfronthosting.co.za> STINNER Victor added the comment: Issue #17628 proposes a patch which reuses unicode_eq() in PyUnicode_RichCompare. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:13:22 2013 From: report at bugs.python.org (Phil Connell) Date: Wed, 03 Apr 2013 22:13:22 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1365027202.74.0.87837980093.issue17630@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:17:53 2013 From: report at bugs.python.org (Chris Angelico) Date: Wed, 03 Apr 2013 22:17:53 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365027473.38.0.0730940576338.issue17629@psf.upfronthosting.co.za> Chris Angelico added the comment: CPython also knows the length of a string, which means that len(s) is a fast operation. I wouldn't expect anyone to rewrite len() as: def get_string_length(s): length=0 for ch in s: length+=1 return length even though that works. No, we have a built-in function that's able to simply query the header. (Via a special method, but it's still ultimately the same thing.) The only other use-case that I have at the moment relates to a query on python-list about a broken MySQL, which was unable to handle astral characters. With a simple and fast way to query the string's width, this could have been checked for at practically zero cost; as it is, he had to scan all his strings to find out what was in them. It's not something that's of immense value, but it's a handy introspection, and one that should cost little or nothing to provide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:26:16 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 03 Apr 2013 22:26:16 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1365027976.12.0.974988925413.issue17630@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:27:24 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Apr 2013 22:27:24 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365028044.43.0.395988592053.issue17629@psf.upfronthosting.co.za> Ezio Melotti added the comment: max(map(ord, s)) or your str_width(s) are not much more complicated than s.width(), just slower, so it's just a problem of performance. len() is a much more common operation so it makes sense to have a fast built-in function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 00:54:56 2013 From: report at bugs.python.org (Neil Hodgson) Date: Wed, 03 Apr 2013 22:54:56 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365029696.53.0.503821886831.issue17615@psf.upfronthosting.co.za> Neil Hodgson added the comment: For 32-bit Windows, the code generated for unicode_compare is quite slow. There are either 1 or 2 kind checks in each call to PyUnicode_READ and 2 calls to PyUnicode_READ inside the loop. A compiler may decide to move the kind checks out of the loop and specialize the loop but MSVC 2010 appears to not do so. The assembler (32-bit build) for each PyUnicode_READ looks like mov ecx, DWORD PTR _kind1$[ebp] cmp ecx, 1 jne SHORT $LN17 at unicode_co@2 lea ecx, DWORD PTR [ebx+eax] movzx edx, BYTE PTR [ecx+edx] jmp SHORT $LN16 at unicode_co@2 $LN17 at unicode_co@2: cmp ecx, 2 jne SHORT $LN15 at unicode_co@2 movzx edx, WORD PTR [ebx+edi] jmp SHORT $LN16 at unicode_co@2 $LN15 at unicode_co@2: mov edx, DWORD PTR [ebx+esi] $LN16 at unicode_co@2: The kind1/kind2 variables aren't even going into registers and at least one test+branch and a jump are executed for every character. Two tests for 2 and 4 byte kinds. len1 and len2 don't get to go into registers either. My system isn't set up for 64-bit MSVC 2010 but looking at the code from 64-bit MSVC 2012 shows that all the variables have been moved into registers but the kind checking is still inside the loop. This accounts for better results with 64-bit Python 3.3 on Windows but isn't as good as Unix or Python 3.2. ; 10431: c1 = PyUnicode_READ(kind1, data1, i); cmp rsi, 1 jne SHORT $LN17 at unicode_co lea rax, QWORD PTR [r9+rcx] movzx r8d, BYTE PTR [rax+rbx] jmp SHORT $LN16 at unicode_co $LN17 at unicode_co: cmp rsi, 2 jne SHORT $LN15 at unicode_co movzx r8d, WORD PTR [r9+r11] jmp SHORT $LN16 at unicode_co $LN15 at unicode_co: mov r8d, DWORD PTR [r9+r10] $LN16 at unicode_co: Attached the 32-bit assembler listing. ---------- Added file: http://bugs.python.org/file29673/unicode_compare.asm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 01:05:16 2013 From: report at bugs.python.org (Danek Duvall) Date: Wed, 03 Apr 2013 23:05:16 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1365030315.98.0.816688176316.issue1222585@psf.upfronthosting.co.za> Changes by Danek Duvall : ---------- nosy: +dhduvall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 01:13:59 2013 From: report at bugs.python.org (Alexey Spiridonov) Date: Wed, 03 Apr 2013 23:13:59 +0000 Subject: [issue17631] inspect getsource does not display full text of lambda Message-ID: <1365030839.21.0.0882950227622.issue17631@psf.upfronthosting.co.za> New submission from Alexey Spiridonov: This happens because the block search algorithm seems not to be handling lambda arguments correctly. $ cat x.py import inspect def a(y): print inspect.getsource(y) print inspect.getsourcelines(y) a( lambda x: x * 3 ) $ python x.py lambda x: ([' lambda x:\n'], 8) ---------- components: Library (Lib) messages: 185975 nosy: Alexey.Spiridonov priority: normal severity: normal status: open title: inspect getsource does not display full text of lambda versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 01:16:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Apr 2013 23:16:40 +0000 Subject: [issue17572] strptime exception context In-Reply-To: <1364554084.0.0.791831324367.issue17572@psf.upfronthosting.co.za> Message-ID: <3Zh38811vZzRDV@mail.python.org> Roundup Robot added the comment: New changeset 3203e083aa7b by Ezio Melotti in branch '3.3': #17572: Avoid chained exceptions while passing bad directives to time.strptime(). Initial patch by Claudiu Popa. http://hg.python.org/cpython/rev/3203e083aa7b New changeset d408c9bd4bf7 by Ezio Melotti in branch 'default': #17572: merge with 3.3. http://hg.python.org/cpython/rev/d408c9bd4bf7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 01:17:26 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Apr 2013 23:17:26 +0000 Subject: [issue17572] strptime exception context In-Reply-To: <1364554084.0.0.791831324367.issue17572@psf.upfronthosting.co.za> Message-ID: <1365031046.39.0.105757312118.issue17572@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 01:25:57 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Apr 2013 23:25:57 +0000 Subject: [issue15331] Codecs docs should explain that the bytes-bytes shorthand aliases are missing In-Reply-To: <1342091074.63.0.386956250979.issue15331@psf.upfronthosting.co.za> Message-ID: <1365031557.03.0.989864164041.issue15331@psf.upfronthosting.co.za> Ezio Melotti added the comment: Should they just be removed from the table then? ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 01:43:43 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Apr 2013 23:43:43 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1365032623.74.0.216985375068.issue17221@psf.upfronthosting.co.za> Ezio Melotti added the comment: Serhiy, can you update and commit the patch? A new IDLE section would be especially useful for #17506. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 01:46:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Apr 2013 23:46:29 +0000 Subject: [issue17506] Improve IDLE news handling In-Reply-To: <1363852723.03.0.237286956936.issue17506@psf.upfronthosting.co.za> Message-ID: <1365032789.68.0.683609286415.issue17506@psf.upfronthosting.co.za> Ezio Melotti added the comment: Setting #17221 as a dependency. Once that is fixed it would be good to keep IDLE entries in Misc/NEWS, and copy them in Lib/idlelib/NEWS.txt before the release. ---------- dependencies: +Resort Misc/NEWS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:16:00 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 04 Apr 2013 00:16:00 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <1365034560.24.0.294631233964.issue17625@psf.upfronthosting.co.za> Roger Serwy added the comment: The attached patch restores the original behavior. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file29674/issue17625.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:27:39 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Apr 2013 00:27:39 +0000 Subject: [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1365035259.11.0.118705192816.issue15964@psf.upfronthosting.co.za> Ezio Melotti added the comment: Do you want to provide a patch and test that it works? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:36:15 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Apr 2013 00:36:15 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1365035775.22.0.342814296144.issue17221@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Has anyone checked that the last patch is basically correct? Which is to say, does every entry removed get put back someplace? I tried to import the last patch, NEWS-3.4_3.patch 73/74 chumks were applied, 1 rejected, which can be hand edited. I am willing to do that if the sanity check has been done. (I personally would have done this in multiple patches, like moving only IDLE issues for one patch, that would have been easier to check.) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:43:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Apr 2013 00:43:22 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1365036202.94.0.280729418828.issue6743@psf.upfronthosting.co.za> Ezio Melotti added the comment: > But then, it doesn't have anything similar to print() It has the same signature. Isn't that the point of the whole issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:47:10 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Apr 2013 00:47:10 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1365036430.15.0.350720049075.issue17221@psf.upfronthosting.co.za> Terry J. Reedy added the comment: That was easy. The .patch has a space at the end of this line: - Issue #17028: Allowed Python arguments to be supplied to the Windows which the file, of course, does not. That removed and it applies cleanly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:47:44 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 04 Apr 2013 00:47:44 +0000 Subject: [issue1442493] IDLE shell window gets very slow when displaying long lines Message-ID: <1365036464.04.0.243713358333.issue1442493@psf.upfronthosting.co.za> Roger Serwy added the comment: The only reason that the IDLE shell is slow is due to the shell's text widget being configured to have wrap="char". If we manually wrapped the output then the shell responds very quickly to rendering really long strings. The attached proof-of-concept patch (against 2.7 tip) implements manual wrapping. You can type "print('a' * 10**6)" and the shell responds almost instantly when using no-subprocess mode. (The RPC overhead becomes readily apparent when using a subprocess, introducing a large uninteruptable delay. That's another issue.) I left text wrapping enabled in the shell since the user may be using a variable-spaced font. A possible compromise would be to increase the wrap_index to a large number, like 32768, before IDLE inserts a '\n' into the output. This would mimic the wrapping behavior of the original shell, but keep the shell responsive when you write a very long string to the output. ---------- keywords: +patch versions: -Python 3.2 Added file: http://bugs.python.org/file29675/manual_wrap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:51:48 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Apr 2013 00:51:48 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <1365036708.28.0.918159460747.issue17625@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks. Please go ahead and apply it. I'm teaching some Python classes right now using the 2.7.4rc1 and the students are tripping over the new behavior. ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:52:07 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Apr 2013 00:52:07 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <1365036727.55.0.585891432515.issue17625@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +benjamin.peterson, georg.brandl, larry priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:53:12 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Apr 2013 00:53:12 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1365036792.65.0.784360016538.issue17221@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is also this double entry before and after the patch. This is current patch with space and duplicate removed. - Issue #15116: Remove references to appscript as it is no longer being supported. - Issue #15116: Remove references to appscript as it is no longer being supported. ---------- Added file: http://bugs.python.org/file29676/NEWS-3.4_4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 02:56:49 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Apr 2013 00:56:49 +0000 Subject: [issue17506] Improve IDLE news handling In-Reply-To: <1363852723.03.0.237286956936.issue17506@psf.upfronthosting.co.za> Message-ID: <1365037009.71.0.255768418849.issue17506@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I put 1 or 2 items in idlelib/NEWS, but it does not really matter which way they go. I guess the greater separation in Misc/NEWS says they should go there first, as moving to idlelib would delete reliease info. I will move the one item over sometime, maybe after the big patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 03:04:12 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Apr 2013 01:04:12 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1365037452.49.0.327870405604.issue8913@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left another review with a couple of suggestions. The patch is OK, it's just that the examples look a bit meaningless to me. ---------- stage: -> patch review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 03:11:06 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 04 Apr 2013 01:11:06 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <1365037866.95.0.0264362290194.issue17625@psf.upfronthosting.co.za> Roger Serwy added the comment: If students are having trouble, then it should be changed. This behavior is also in 3.2. Do applied patches in 2.7 tip go toward 2.7.4 or 2.7.5? (I don't know the mechanics of the release candidate process just yet.) ---------- stage: patch review -> commit review versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 03:34:04 2013 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Apr 2013 01:34:04 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1365039244.78.0.729625732867.issue17630@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 03:55:20 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Apr 2013 01:55:20 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365040520.52.0.441998081913.issue17629@psf.upfronthosting.co.za> Terry J. Reedy added the comment: ord(max(s)) == max(map(ord,s)) == ord(max(s, key=ord)) Using a*30000000 and mental counting, the first is clearly fastest (about 2 seconds) with a 3.4 build, which has the optimized string comparison patches from last October. The reduction to 3 categories takes almost no time. I'm -1 without some real use case. For most testing, the data are constructed, so we already know the CPython internal width. There is no comparison in importance between and len/__len__. bool(x) calls x.__len__ if no x.__bool__. strings and other builtin collection classes have no __bool__. > .. cost little or nothing Every addition has a real cost: for developers, write code, write test, test test, write doc, maintain; for users, more to learn and understand -- and forget. I doubt the value of the compute time saved would ever come close to the value of the human time expended. There is also a cost to adding something CPython-specific. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 04:12:42 2013 From: report at bugs.python.org (paul j3) Date: Thu, 04 Apr 2013 02:12:42 +0000 Subject: [issue13966] Add disable_interspersed_args() to argparse.ArgumentParser In-Reply-To: <1328687368.18.0.265955669963.issue13966@psf.upfronthosting.co.za> Message-ID: <1365041562.97.0.169630208149.issue13966@psf.upfronthosting.co.za> paul j3 added the comment: The optparse page gives a reason for disable_interspersed_args(): "Use this if you have a command processor which runs another command which has options of its own and you want to make sure these options don?t get confused. For example, each command might have a different set of options." In argparse: "argparse.REMAINDER. All the remaining command-line arguments are gathered into a list. This is commonly useful for command line utilities that dispatch to other command line utilities:" If you have only one positional argument, and its nargs is REMAINDER, you have effectively disabled interspersed. Argparse doesn't prohibit all interspersed positionals. You could, for example, have one or more positionals with other nargs that could be interspersed. But the REMAINDER one has to be last. In the library, profile.py uses 'optparse.disable_interspersed'. I just replaced optparse with argparse using the REMAINDER, and got the same behavior. (Actually I used argparse.PARSER which effectively requires at least one argument.) ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 04:21:12 2013 From: report at bugs.python.org (paul j3) Date: Thu, 04 Apr 2013 02:21:12 +0000 Subject: [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1365042072.82.0.103989209443.issue16399@psf.upfronthosting.co.za> paul j3 added the comment: The test file, test_argparse.py, has a test case for this: 'class TestOptionalsActionAppendWithDefault' argument_signatures = [Sig('--baz', action='append', default=['X'])] successes = [ ('--baz a --baz b', NS(baz=['X', 'a', 'b'])), ] ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 04:32:42 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 04 Apr 2013 02:32:42 +0000 Subject: [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1365042762.84.0.880353872672.issue15964@psf.upfronthosting.co.za> Roger Serwy added the comment: The attached patch allows the same parser code to run under Python 2 and Python 3. I'm not sure how to test it other than by running the test suite which passed. ---------- Added file: http://bugs.python.org/file29677/patch_2and3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 04:33:35 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 04 Apr 2013 02:33:35 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <1365042815.22.0.016171080612.issue17625@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'll handle it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 04:38:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Apr 2013 02:38:12 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <3Zh7cg17kczMs9@mail.python.org> Roundup Robot added the comment: New changeset edcfd18840cc by Benjamin Peterson in branch '2.7': close search and replace dialog after it is used (closes #17625) http://hg.python.org/cpython/rev/edcfd18840cc New changeset 36130b84cd22 by Benjamin Peterson in branch '3.3': close search and replace dialog after it is used (closes #17625) http://hg.python.org/cpython/rev/36130b84cd22 New changeset a6c2210220dd by Benjamin Peterson in branch 'default': merge 3.3 (#17625) http://hg.python.org/cpython/rev/a6c2210220dd ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 04:39:15 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 04 Apr 2013 02:39:15 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <1365043155.76.0.366218218489.issue17625@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Over to Georg for 3.3 cherry picking. ---------- assignee: roger.serwy -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 04:51:40 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 04 Apr 2013 02:51:40 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365043900.86.0.631106379659.issue17629@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is an implementation detail we don't want to expose. (It might change someday!) ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 05:15:44 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 04 Apr 2013 03:15:44 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1365045344.28.0.397225743284.issue17630@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 05:26:25 2013 From: report at bugs.python.org (paul j3) Date: Thu, 04 Apr 2013 03:26:25 +0000 Subject: [issue13966] Add disable_interspersed_args() to argparse.ArgumentParser In-Reply-To: <1328687368.18.0.265955669963.issue13966@psf.upfronthosting.co.za> Message-ID: <1365045985.1.0.0908498798519.issue13966@psf.upfronthosting.co.za> paul j3 added the comment: Oops, I was wrong about this: "Argparse doesn't prohibit all interspersed positionals. You could, for example, have one or more positionals with other nargs that could be interspersed. But the REMAINDER one has to be last." parser.add_argument('a') parser.add_argument('--foo') parser.add_argument('rest', nargs='...') parser.parse_args('a --foo b c'.split(' ') produces: Namespace(a='a', foo=None, rest=['--foo', 'b', 'c']) That is because, 'rest' matches an empty list of arguments. With an nargs='*' or '?', the same thing happens, both 'a' and 'rest' are used up when processing the first positional argument string. nargs=argparse.PARSER (= 'A...') gives the expected Namespace(a='a', foo='b', rest=['c']) In this case, 'rest' has to wait till the second set of positionals. Documentation warns "Note that it generally doesn?t make much sense to have more than one positional argument with nargs='*'". Maybe it should warn against combining any of the 'zero or more' positionals with other positionals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 07:05:36 2013 From: report at bugs.python.org (Heikki Partanen) Date: Thu, 04 Apr 2013 05:05:36 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1365051936.79.0.378990516563.issue8913@psf.upfronthosting.co.za> Heikki Partanen added the comment: The examples in the previous patches were trying to show some "real-worldish" use cases, but I admit that they don't fit in that well to the existing examples shown in the docs. The new examples Ezio suggested are more straightforward and better in line with existing docs, so uploaded a new patch with updated examples. ---------- Added file: http://bugs.python.org/file29678/issue8913-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 07:48:58 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Apr 2013 05:48:58 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1365054538.77.0.419758810726.issue17630@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Brett. I look forward to this. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 07:56:24 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Apr 2013 05:56:24 +0000 Subject: [issue1721083] Add File - Reload Message-ID: <1365054984.19.0.379194969996.issue1721083@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Roger, can you pick this one up? Adding a "reload" option to the file menu benefits IDLE in two ways. First, it allows users to easily discard changes. Second, it helps IDLE play well with reverts and updates in version control systems. In the absence of this feature, users have to close their current file without saving and then re-open it from disk. ---------- assignee: rhettinger -> roger.serwy nosy: +roger.serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 07:59:59 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Apr 2013 05:59:59 +0000 Subject: [issue17632] IDLE: Add clear-window option to the Shell menu. Message-ID: <1365055199.08.0.309826591604.issue17632@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Without a restart-and-clear option, the shell window tends to grow without bound, becoming increasingly lethargic along the way. I've have recurring student requests for this minor feature. ---------- components: IDLE keywords: easy messages: 186004 nosy: rhettinger priority: normal severity: normal status: open title: IDLE: Add clear-window option to the Shell menu. type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 08:18:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Apr 2013 06:18:38 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <3ZhDW158HfzQyQ@mail.python.org> Roundup Robot added the comment: New changeset 40f582a73901 by Ezio Melotti in branch '3.3': #8913: add examples and docs for date/time/datetime.__format__. Patch by Heikki Partanen. http://hg.python.org/cpython/rev/40f582a73901 New changeset 8dd7f7134700 by Ezio Melotti in branch 'default': #8913: merge with 3.3. http://hg.python.org/cpython/rev/8dd7f7134700 New changeset 0dac103a41bb by Ezio Melotti in branch '2.7': #8913: add examples and docs for date/time/datetime.__format__. Patch by Heikki Partanen. http://hg.python.org/cpython/rev/0dac103a41bb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 08:19:16 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Apr 2013 06:19:16 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1365056356.62.0.0900952365278.issue8913@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 08:21:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Apr 2013 06:21:07 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1365056467.35.0.93204293438.issue17628@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I don't understand why the patch makes the comparaison much slower, > since most time is supposed to be spend in memcmp()? Because reading the last character evicts useful data from the CPU cache, just before memcmp() reads it again from memory? In other words, I'm not convinced this is a useful heuristic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 08:22:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Apr 2013 06:22:42 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1365036202.94.0.280729418828.issue6743@psf.upfronthosting.co.za> Message-ID: <1365056557.3340.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > > But then, it doesn't have anything similar to print() > > It has the same signature. Isn't that the point of the whole issue? This is becoming stupid. How about making it the same signature as sum() or max() too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 08:23:29 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Apr 2013 06:23:29 +0000 Subject: [issue1721083] Add File - Reload Message-ID: <1365056609.81.0.479980792466.issue1721083@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Notepad++ has 'Reload from disk' right after New and Open, and I like that explicit wording. 'Revert' is a bit esoteric for beginners. (And I do not see that on the menu now.) Kurt's argument applies to Notepad++ also -- one could close the file and reload from the recent files list, but there it is. There is a subtle psychological factor: reloading may mean 'I messed up and want to start over'. In that state, a simple direct reload is tension defuser. Quite separately, Notepad++ check file modification times when it gets the focus and if the disk copy is newer, it pops up a box saying so and asking if one wants to reload. (Or perhaps it check for OS notifications at this time.) This is the feature directed at catching reverts and merges. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 09:44:46 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Apr 2013 07:44:46 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1365029696.53.0.503821886831.issue17615@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: "For 32-bit Windows, the code generated for unicode_compare is quite slow. There are either 1 or 2 kind checks in each call to PyUnicode_READ (...)" Yes, PyUnicode_READ() *is* slow. It should not be used in a loop. And unicode_compare() uses PyUnicode_READ() in a loop. An improvment would be to write specialized version of each combinaison of Unicode kinds: (UCS1, UCS2), (UCS1, UCS4), (UCS2, UCS1), (UCS2, UCS2), (UCS2, UCS4) (UCS4, UCS1), (UCS4, UCS2), (UCS4, UCS4) # (UCS1, UCS1) uses memcmp() But I am not convinced that the gain would be visible, and I don't know how to factorize the code. We should probably use a huge macro. 2013/4/4 Neil Hodgson : > > Neil Hodgson added the comment: > > For 32-bit Windows, the code generated for unicode_compare is quite slow. > > There are either 1 or 2 kind checks in each call to PyUnicode_READ and 2 calls to PyUnicode_READ inside the loop. A compiler may decide to move the kind checks out of the loop and specialize the loop but MSVC 2010 appears to not do so. The assembler (32-bit build) for each PyUnicode_READ looks like > > mov ecx, DWORD PTR _kind1$[ebp] > cmp ecx, 1 > jne SHORT $LN17 at unicode_co@2 > lea ecx, DWORD PTR [ebx+eax] > movzx edx, BYTE PTR [ecx+edx] > jmp SHORT $LN16 at unicode_co@2 > $LN17 at unicode_co@2: > cmp ecx, 2 > jne SHORT $LN15 at unicode_co@2 > movzx edx, WORD PTR [ebx+edi] > jmp SHORT $LN16 at unicode_co@2 > $LN15 at unicode_co@2: > mov edx, DWORD PTR [ebx+esi] > $LN16 at unicode_co@2: > > The kind1/kind2 variables aren't even going into registers and at least one test+branch and a jump are executed for every character. Two tests for 2 and 4 byte kinds. len1 and len2 don't get to go into registers either. > > My system isn't set up for 64-bit MSVC 2010 but looking at the code from 64-bit MSVC 2012 shows that all the variables have been moved into registers but the kind checking is still inside the loop. This accounts for better results with 64-bit Python 3.3 on Windows but isn't as good as Unix or Python 3.2. > > ; 10431: c1 = PyUnicode_READ(kind1, data1, i); > > cmp rsi, 1 > jne SHORT $LN17 at unicode_co > lea rax, QWORD PTR [r9+rcx] > movzx r8d, BYTE PTR [rax+rbx] > jmp SHORT $LN16 at unicode_co > $LN17 at unicode_co: > cmp rsi, 2 > jne SHORT $LN15 at unicode_co > movzx r8d, WORD PTR [r9+r11] > jmp SHORT $LN16 at unicode_co > $LN15 at unicode_co: > mov r8d, DWORD PTR [r9+r10] > $LN16 at unicode_co: > > Attached the 32-bit assembler listing. > > ---------- > Added file: http://bugs.python.org/file29673/unicode_compare.asm > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 09:57:23 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 04 Apr 2013 07:57:23 +0000 Subject: [issue17094] sys._current_frames() reports too many/wrong stack frames In-Reply-To: <1363461002.32.0.549416696415.issue17094@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Here is an updated patch. _PyThreadState_DeleteExcept uses HEAD_LOCK: ISTM that PyThreadState_Clear() can trigger arbitrary code execution: if a thread ends up being created/destroyed, I think we can get a deadlock when trying to acquire the head lock. I think it should be turned into an open call if possible. Also, as noted by Stefan, shouldn't we also iterate over other interpreters? > Note that I think this patch could break some programs. For example, if you have a thread in your main process which has a database connection open, deleting the thread state in a child process might shutdown the database connection (depending on the exact protocol). Therefore, I think it would be better to only apply the patch in 3.4. Indeed. For the database example, there's this other issue where the database connection is stored in a thread-local storage... Some people will definitely get bitten by this... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 10:33:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Apr 2013 08:33:11 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365056467.35.0.93204293438.issue17628@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > In other words, I'm not convinced this is a useful heuristic. Me neither, but we should use the same optimization strategy for all functions. If we don't compare first and/or last character for str==str, we should do the same for bytes==bytes and Py_UNICODE_MATCH. str==str performances depends on the compiler and the libc. So performances may be very different on Windows, I will try to run the benchmark on Windows. GCC has also a known performance issue on memcmp. Its builtin memcmp implementation is slower than glibc >= 2.10, especiall glibc >= 2.13. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052 "GCC can't beat glibc if function call overhead is low." 2013/4/4 Antoine Pitrou : > > Antoine Pitrou added the comment: > >> I don't understand why the patch makes the comparaison much slower, >> since most time is supposed to be spend in memcmp()? > > Because reading the last character evicts useful data from the CPU cache, just before memcmp() reads it again from memory? > > In other words, I'm not convinced this is a useful heuristic. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 10:54:59 2013 From: report at bugs.python.org (Martin Gfeller) Date: Thu, 04 Apr 2013 08:54:59 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365065699.72.0.961585382021.issue13169@psf.upfronthosting.co.za> Martin Gfeller added the comment: I see (under Windows) the same symptoms as reported for Debian under http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704084. Python refuses to start. 2.7.4.rc1 Windows 32-bit. ---------- nosy: +Martin.Gfeller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 10:59:49 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 04 Apr 2013 08:59:49 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1365065989.66.0.28498907829.issue6743@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: -1 from me as well. Such kind of debatable (in terms of usefulness and inclusion) things are usually better off being served by a custom function in user's code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 11:08:10 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Apr 2013 09:08:10 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <1365066490.6.0.576010448813.issue17625@psf.upfronthosting.co.za> Georg Brandl added the comment: Done, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 11:09:36 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 04 Apr 2013 09:09:36 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: Message-ID: <515D4349.4020904@egenix.com> Marc-Andre Lemburg added the comment: On 04.04.2013 10:33, STINNER Victor wrote: >>> I don't understand why the patch makes the comparaison much slower, >>> since most time is supposed to be spend in memcmp()? >> >> Because reading the last character evicts useful data from the CPU cache, just before memcmp() reads it again from memory? >> >> In other words, I'm not convinced this is a useful heuristic. Same here. The heuristic may work for short strings that easily fit into the CPU cache, but as soon as you use it on longer strings, this will result in much slower comparisons. Whether this results in a speedup or not also depends a lot on the domain of where you need to run comparisons, e.g. if you have run the heuristic on Python's special method names (such as "__init__") it won't give you any benefit. OTOH, it's easy to construct strings that benefit a lot from it :-) Something that typically works well in practice is to inline the comparison of the first few characters and then call memcmp() on the remaining ones. This avoids cache corruption and safes a few cycles setup costs for memcmp() for short strings. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 11:21:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Apr 2013 09:21:43 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <515D4349.4020904@egenix.com> Message-ID: STINNER Victor added the comment: By the way, my initial concern was to merge unicode_compare_eq() and unicode_eq() functions. unicode_compare_eq() only uses memcmp(), whereas unicode_eq() checks if the first byte is different before calling memcmp(). So the question is to decide which one is faster ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 11:22:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Apr 2013 09:22:55 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365067375.9.0.896272031835.issue13169@psf.upfronthosting.co.za> STINNER Victor added the comment: "Python refuses to start. 2.7.4.rc1 Windows 32-bit." Oh oh. I reopen the issue and set its priority to release blocker. ---------- nosy: +benjamin.peterson, georg.brandl, larry priority: normal -> release blocker resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 11:30:40 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 04 Apr 2013 09:30:40 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: Message-ID: <515D483A.1070609@egenix.com> Marc-Andre Lemburg added the comment: On 04.04.2013 11:21, STINNER Victor wrote: > > STINNER Victor added the comment: > > By the way, my initial concern was to merge unicode_compare_eq() and > unicode_eq() functions. > > unicode_compare_eq() only uses memcmp(), whereas unicode_eq() checks > if the first byte is different before calling memcmp(). So the > question is to decide which one is faster ;-) The second one was faster a couple of years ago. Things may have changed since then (better compilers, CPUs, etc.). Perhaps you could run a benchmark with increasing sizes of strings, one set with mismatches in the last character, the other with matching strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 11:49:18 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Apr 2013 09:49:18 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365068958.69.0.878628172462.issue13169@psf.upfronthosting.co.za> Georg Brandl added the comment: "Python refuses to start." is not a very good description. * What script are you running/module are you importing? * What is the traceback/error message? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 11:51:24 2013 From: report at bugs.python.org (Martin Gfeller) Date: Thu, 04 Apr 2013 09:51:24 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365069084.17.0.794442558583.issue13169@psf.upfronthosting.co.za> Martin Gfeller added the comment: @Georg, the referenced Debian issue (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704084) already contains the stack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 11:58:32 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Apr 2013 09:58:32 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365069512.37.0.6680990796.issue13169@psf.upfronthosting.co.za> Georg Brandl added the comment: And this happens when you simply start Python, not executing any code? Can you start with "python -S", then do "import _sre", and see if it has a _sre.MAXREPEAT attribute? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 12:01:24 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Apr 2013 10:01:24 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365069684.26.0.292733677015.issue13169@psf.upfronthosting.co.za> Ezio Melotti added the comment: IIRC a few days ago I've seen a similar issue and the cause was that they did something wrong while porting the rc to Debian, but I don't remember the details. If I'm not mistaken they also fixed it shortly after. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 12:04:15 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Apr 2013 10:04:15 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365069855.69.0.0749199813942.issue13169@psf.upfronthosting.co.za> Georg Brandl added the comment: Just tested with 2.7.4rc1 32bit on Windows 7; no problem here. I suspect your 2.7.4rc1 install picks up a python27.dll from an earlier version. ---------- resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 12:10:23 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 04 Apr 2013 10:10:23 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect Message-ID: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> New submission from Phil Connell: Only one level of namespace package nesting is handled correctly: $ unzip -l foo.zip Archive: foo.zip Length Date Time Name --------- ---------- ----- ---- 0 2013-04-03 17:28 a/b/c/foo.py 0 2013-04-03 17:34 a/ 0 2013-04-03 17:34 a/b/ 0 2013-04-03 17:34 a/b/c/ --------- ------- 0 4 files $ ls foo.zip $ PYTHONPATH=foo.zip ~/dev/cpython/python Python 3.4.0a0 (default:3b1dbe7a2aa0+, Apr 3 2013, 17:31:54) [GCC 4.8.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import a >>> import a.b Traceback (most recent call last): File "", line 1, in ImportError: No module named 'a.b' >>> The problem appears to be that check_is_directory constructs the wrong directory path (it should be 'a/b'): check_is_directory (self=0x7ffff6d3dc88, prefix='a/', path='a.b') at ./Modules/zipimport.c:280 280 dirpath = PyUnicode_FromFormat("%U%U%c", prefix, path, SEP); (gdb) n 281 if (dirpath == NULL) (gdb) p dirpath $11 = 'a/a.b/' I've attached a tentative initial patch that appears to fix the issue, although it probably needs some more thought (and definitely some more testing - the existing tests still pass though). ---------- components: Extension Modules files: zipimport_ns.diff keywords: patch messages: 186025 nosy: brett.cannon, eric.snow, ncoghlan, pconnell priority: normal severity: normal status: open title: zipimport's handling of namespace packages is incorrect versions: Python 3.4 Added file: http://bugs.python.org/file29679/zipimport_ns.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 12:12:12 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 04 Apr 2013 10:12:12 +0000 Subject: [issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists In-Reply-To: <1337905627.12.0.841961188355.issue14905@psf.upfronthosting.co.za> Message-ID: <1365070332.92.0.449615838728.issue14905@psf.upfronthosting.co.za> Phil Connell added the comment: I've raised issue17633 to track the issue in my last message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 13:14:19 2013 From: report at bugs.python.org (Martin Gfeller) Date: Thu, 04 Apr 2013 11:14:19 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365074059.02.0.765056524946.issue13169@psf.upfronthosting.co.za> Martin Gfeller added the comment: Sorry for passing on my confusion, and thanks for your help! There was indeed an old python.dll lying in one of the places Windows likes to put DLLs. Deleting it resolved the problem. Thanks again and sorry to use your valuable time. Best regards, Martin ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 13:15:43 2013 From: report at bugs.python.org (Georg Brandl) Date: Thu, 04 Apr 2013 11:15:43 +0000 Subject: [issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError In-Reply-To: <1318523427.81.0.476768111228.issue13169@psf.upfronthosting.co.za> Message-ID: <1365074143.22.0.47798734156.issue13169@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the confirmation! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 13:49:38 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 04 Apr 2013 11:49:38 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1365076178.32.0.826122428461.issue17633@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 14:06:36 2013 From: report at bugs.python.org (Marten Lehmann) Date: Thu, 04 Apr 2013 12:06:36 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1365077196.84.0.16384394331.issue16480@psf.upfronthosting.co.za> Marten Lehmann added the comment: Could you please tell me, in which exact release or commit this is resolved? I'm using Python 3.3.0 on Ubuntu Precise and I noticed like the others, that e.g. easy_install and pip are installed to venv/local/bin instead of venv/bin and the site-packages folder being used is venv/local/lib/python3.3/dist-packages instead of venv/lib/python3.3/site-packages. Are both issues solved in experimental? So far I only saw a symlink-patch for virtualenv but that doesn't actually fix the problem of being double-local (venv and local-folder within venv), neither dist-packages: https://github.com/pypa/virtualenv/commit/285679cfd326c918676e765e06ed142db66efde0 ---------- nosy: +marten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 14:39:27 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 04 Apr 2013 12:39:27 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1365079167.82.0.107333375035.issue17633@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 15:18:01 2013 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Apr 2013 13:18:01 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1365081481.6.0.66414024205.issue17633@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 15:19:58 2013 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Apr 2013 13:19:58 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1365081598.47.0.447752954079.issue17633@psf.upfronthosting.co.za> Eric V. Smith added the comment: Could you construct a test (that would fail without your patch)? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 15:38:50 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 04 Apr 2013 13:38:50 +0000 Subject: [issue6699] IDLE: Warn user about overwriting a file that has a newer version on filesystem In-Reply-To: <1250207930.18.0.223468874802.issue6699@psf.upfronthosting.co.za> Message-ID: <1365082730.1.0.817711226081.issue6699@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- assignee: -> roger.serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 15:39:34 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 04 Apr 2013 13:39:34 +0000 Subject: [issue1721083] Add File - Reload Message-ID: <1365082774.35.0.283052740469.issue1721083@psf.upfronthosting.co.za> Roger Serwy added the comment: Raymond, I can pick this up. I might as well work on #6699 at the same time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 15:45:43 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 04 Apr 2013 13:45:43 +0000 Subject: [issue17632] IDLE: Add clear-window option to the Shell menu. In-Reply-To: <1365055199.08.0.309826591604.issue17632@psf.upfronthosting.co.za> Message-ID: <1365083143.38.0.460135800227.issue17632@psf.upfronthosting.co.za> Roger Serwy added the comment: This is a different spin on issue6143. Here the suggestion is to combine the clear function with the restart option for a new menu option. I am closing this one as a duplicate of #6143, but adding the Shell "restart and clear" suggestion. ---------- nosy: +roger.serwy resolution: -> duplicate status: open -> closed superseder: -> IDLE - an extension to clear the shell window _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 15:46:38 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 04 Apr 2013 13:46:38 +0000 Subject: [issue6143] IDLE - an extension to clear the shell window In-Reply-To: <1243631391.82.0.146122427664.issue6143@psf.upfronthosting.co.za> Message-ID: <1365083198.93.0.502308351971.issue6143@psf.upfronthosting.co.za> Roger Serwy added the comment: In #17632, Raymond suggests adding a "Restart and Clear" menu item under the Shell menu. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 16:34:15 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 04 Apr 2013 14:34:15 +0000 Subject: [issue1387483] sys.path[0] when executed thru a symbolic link Message-ID: <1365086055.58.0.588039246332.issue1387483@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Just came across this when running hadoop jobs it takes your .py script folder, puts each file in its own cache folder, then recreates the script folder populating it with individual symlinks. When run like this, the scripts can no longer import each other, because sys.path[0] is set to the "real" place of the file, rather than the place it was invoked from. I just reproed this with python 2.7.3 on a new ubuntu system: repro: mkdir pydir mkdir pydir/lnk echo "import sys; print ">", sys.path[0]" >> pydir/lnk/test.py lndir -s lnk/test.py pydir/test.py python pydir/test.py > /home/kristjan/pydir/lnk You would have expected "/home/kristjan/pydir" since this is the apparent directory of the file. When "pydir" contains many .py files, each residing in their own unique real target directories, then they cannot import each other. ---------- nosy: +kristjan.jonsson status: closed -> open versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 16:42:27 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Apr 2013 14:42:27 +0000 Subject: [issue16893] Create IDLE help.txt from Doc/library/idle.rst In-Reply-To: <1357663512.19.0.739336896498.issue16893@psf.upfronthosting.co.za> Message-ID: <1365086547.5.0.660165601783.issue16893@psf.upfronthosting.co.za> Zachary Ware added the comment: Defaulting to opening a browser window sounds great to me. In those cases where there is no network access, though, I think we should keep a fallback help.txt, and I think the Sphinx text rendering is about the simplest and easiest fallback we can get. Shall we open another issue for using a browser for Help, and should this issue wait on that one, or can this go ahead in the meantime? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 16:49:56 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Apr 2013 14:49:56 +0000 Subject: [issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible In-Reply-To: <1362781994.31.0.121984055749.issue17386@psf.upfronthosting.co.za> Message-ID: <1365086996.94.0.757529237525.issue17386@psf.upfronthosting.co.za> Zachary Ware added the comment: Any comments? Christian, I'd especially like to hear from you since it looks like you were the original author of Doc/make.bat (issue1472). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 16:51:04 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 04 Apr 2013 14:51:04 +0000 Subject: [issue1387483] sys.path[0] when executed thru a symbolic link Message-ID: <1365087064.49.0.701952647793.issue1387483@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The haddoop thingie in question is called cloudera CDH4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 16:53:47 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 04 Apr 2013 14:53:47 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1365087227.93.0.784427097907.issue16480@psf.upfronthosting.co.za> ?ric Araujo added the comment: >From Python?s viewpoint this is closed, please follow up on the Debian bug tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 17:49:59 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 04 Apr 2013 15:49:59 +0000 Subject: [issue1387483] sys.path[0] when executed thru a symbolic link Message-ID: <1365090599.01.0.494186384503.issue1387483@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > You would have expected "/home/kristjan/pydir" since this is the > apparent directory of the file. That's questionable. You usually have the libraries along with the binary: that's for example the case when you do a CPython checkout. Changing this to not resolve the symlink would break some use cases. An alternative would be to add both the original and target directory if they differ, hoping that there's no conflict in the modules. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 17:58:37 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Apr 2013 15:58:37 +0000 Subject: [issue16893] Create IDLE help.txt from Doc/library/idle.rst In-Reply-To: <1357663512.19.0.739336896498.issue16893@psf.upfronthosting.co.za> Message-ID: <1365091117.74.0.553897504493.issue16893@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I just discovered that on Windows, the 3rd help option "Python Docs - F1" opens the local doc set whatever.chm in the Windows Help (HTML) Viewer. This is the same as the start menu choice. So on Windows, opening the same offline copy to the IDLE page, if possible, would be the thing to do. Perhaps the Windows code for opening the docs to the toc page can be reused to open them to the IDLE page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 18:23:18 2013 From: report at bugs.python.org (Andrej Krpic) Date: Thu, 04 Apr 2013 16:23:18 +0000 Subject: [issue17634] Win32: shutil.copy leaks file handles to child processes Message-ID: <1365092598.25.0.167628873092.issue17634@psf.upfronthosting.co.za> New submission from Andrej Krpic: Function shutil.copy opens source file with open('rb') and destination file with open('wb') and then proceeds to copy the content. If you create child process from the same python process during that time, that process will inherit open file handles. This could lead to situation when parent process tries to delete the file, but child process prevents that by holding an open handle to the file (Windows XP, Windows 7). This is not expected side effect for copy file operation. Win32's native CopyFile API call doesn't leak file handles to child processes. Python's open function behavior is defined by platform's implementation, which translates C function fopen with 'rb' and 'wb' modes to CRT open call without O_NOINHERIT flag, which creates inheritable Win32 HANDLEs. Possible fix would be to add 'N' to mode string in calls to open function in shutil.copy. ---------- components: Library (Lib), Windows messages: 186041 nosy: akrpic77 priority: normal severity: normal status: open title: Win32: shutil.copy leaks file handles to child processes type: security versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 18:33:32 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 04 Apr 2013 16:33:32 +0000 Subject: [issue1387483] sys.path[0] when executed thru a symbolic link Message-ID: <1365093212.55.0.0497999086796.issue1387483@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: There is no "binary" here contributing to the problem. The particular case is a the hadoop runtime engine which creates a "virtual" folder of your working directory. We have set up a directory of .py files: foo/ a.py b.py c.py The hadoop job is then to run a.py. It is run simply as python a.py. In this case, by cd-ing into the dir and running the file. hadoop knows nothing of python and merely executes the given file. Now, what this hadoop implementation does, however, is to create a virtual symlink image of your project directory, and duplicate this in various places, e.g.: tmp1/ a.py -> /secret/filecache/0001/a.py b.py -> /secret/filecache/0002/b.py c.py -> /secret/filecache/0003/c.py tmp2/ a.py -> /secret/filecache/0001/a.py b.py -> /secret/filecache/0002/b.py c.py -> /secret/filecache/0003/c.py Notice how each file, previously together in a folder, now pyhysically resides in a unique place. now, when you run a.py from either tmp1 or tmp2, it will contain sys.path[0] == "/secret/filecache/0001" This means that a.py can no longer import b.py. I am unaware of a workaround for this issue which does not involve modifying the individual .py files themselves to set up a path. Fixing this would mean that rather than to - get the absolute path of the .py file, and extract the path from it you would - extract the relative path of the .py file and retrieve the absolute path for it. I am not sure about what use cases could be broken by the above change, do you have examples? Normal use cases of symbolic links have to do with linking entire folders, not individual files, and that behaviour would not be broken by such a hypothetical change, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 18:43:53 2013 From: report at bugs.python.org (Antony Lee) Date: Thu, 04 Apr 2013 16:43:53 +0000 Subject: [issue17635] Doc of multiprocessing.connection mentions answerChallenge instead of answer_challenge Message-ID: <1365093833.89.0.404146948486.issue17635@psf.upfronthosting.co.za> New submission from Antony Lee: The documentation for multiprocessing.connection mentions the answerChallenge function, but it is actually called answer_challenge in 2.6, 2.7 and 3.3 -- I guess it's also the case in 3.1 and 3.2 but I didn't check. ---------- assignee: docs at python components: Documentation messages: 186043 nosy: Antony.Lee, docs at python priority: normal severity: normal status: open title: Doc of multiprocessing.connection mentions answerChallenge instead of answer_challenge versions: Python 2.6, Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 19:00:13 2013 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Apr 2013 17:00:13 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1365094813.48.0.21403965853.issue17628@psf.upfronthosting.co.za> Eric Snow added the comment: > Marc-Andre Lemburg added the comment: > Same here. The heuristic may work for short strings that easily fit > into the CPU cache, but as soon as you use it on longer strings, > this will result in much slower comparisons. When testing both, would it help to test the end of the string before the beginning? I'd expect that be more likely to leave the beginning in the cache for any subsequent memcmp() call. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 19:30:09 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 04 Apr 2013 17:30:09 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365094813.48.0.21403965853.issue17628@psf.upfronthosting.co.za> Message-ID: <515DB89B.5000106@egenix.com> Marc-Andre Lemburg added the comment: On 04.04.2013 19:00, Eric Snow wrote: > > Eric Snow added the comment: > >> Marc-Andre Lemburg added the comment: >> Same here. The heuristic may work for short strings that easily fit >> into the CPU cache, but as soon as you use it on longer strings, >> this will result in much slower comparisons. > > When testing both, would it help to test the end of the string before the beginning? I'd expect that be more likely to leave the beginning in the cache for any subsequent memcmp() call. Again: this depends a lot on what strings you are dealing with. If you are comparing strings that only vary in the first few characters, testing the last character first would not be ideal :-) Given that CPUs are optimized to read ahead in memory, it's always better to avoid jumping around too much when accessing memory. http://en.wikipedia.org/wiki/CPU_cache http://en.wikipedia.org/wiki/Locality_of_reference http://lwn.net/Articles/252125/ Ideally, you want to stay within a cache line, typically 64 bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 19:39:01 2013 From: report at bugs.python.org (paul j3) Date: Thu, 04 Apr 2013 17:39:01 +0000 Subject: [issue13966] Add disable_interspersed_args() to argparse.ArgumentParser In-Reply-To: <1328687368.18.0.265955669963.issue13966@psf.upfronthosting.co.za> Message-ID: <1365097141.11.0.441534949981.issue13966@psf.upfronthosting.co.za> paul j3 added the comment: Looking further at test_argparse.py, I should say that the behavior of multiple positionals when there is one cluster of positional argstrings is well illustrated in the tests. It's the behavior when there are multiple clusters (interspersed positionals) that can go against some intuitions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 20:24:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 04 Apr 2013 18:24:24 +0000 Subject: [issue17634] Win32: shutil.copy leaks file handles to child processes In-Reply-To: <1365092598.25.0.167628873092.issue17634@psf.upfronthosting.co.za> Message-ID: <1365099864.02.0.184011392425.issue17634@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo, hynek, sbt, tarek versions: +Python 3.4 -Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 21:04:04 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Apr 2013 19:04:04 +0000 Subject: [issue17634] Win32: shutil.copy leaks file handles to child processes In-Reply-To: <1365092598.25.0.167628873092.issue17634@psf.upfronthosting.co.za> Message-ID: <1365102244.3.0.258927317605.issue17634@psf.upfronthosting.co.za> R. David Murray added the comment: Unless I'm misunderstanding something, this has already been fixed in python3, where subprocess closes any open files (other than stdin/stdout/stderr) by default. In Python2.7 (and possibly earlier, I haven't checked) you can get the same effect by specifying close_fds=True in the Popen call. I don't see any reason why shutil should take any special action in this case, this is a general problem with open file descriptors and subprocess. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 21:21:36 2013 From: report at bugs.python.org (Berker Peksag) Date: Thu, 04 Apr 2013 19:21:36 +0000 Subject: [issue17365] Remove Python 2 code from test_print In-Reply-To: <1362553593.04.0.139053683866.issue17365@psf.upfronthosting.co.za> Message-ID: <1365103296.38.0.75674114705.issue17365@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the reviews. Patch updated. ?ric, since the test file is relatively small, I went ahead and made some cosmetic fixes, but I can open a new issue for them :) ---------- Added file: http://bugs.python.org/file29680/test_print_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 21:26:49 2013 From: report at bugs.python.org (Julian Taylor) Date: Thu, 04 Apr 2013 19:26:49 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1365103609.57.0.475031921211.issue16754@psf.upfronthosting.co.za> Julian Taylor added the comment: is SHLIB_SUFFIX=".so" really correct on mac? shared libraries have .dylib extension, loadable modules have .so (which would be EXT_SUFFIX?) e.g libpython itself uses .dylib. ---------- nosy: +jtaylor108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 21:32:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Apr 2013 19:32:39 +0000 Subject: [issue17365] Remove Python 2 code from test_print In-Reply-To: <1362553593.04.0.139053683866.issue17365@psf.upfronthosting.co.za> Message-ID: <3ZhZ7C0xDbzQct@mail.python.org> Roundup Robot added the comment: New changeset 178075fbff3a by Andrew Svetlov in branch 'default': #17365: Remove Python 2 code from test_print http://hg.python.org/cpython/rev/178075fbff3a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 21:33:15 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 04 Apr 2013 19:33:15 +0000 Subject: [issue17365] Remove Python 2 code from test_print In-Reply-To: <1362553593.04.0.139053683866.issue17365@psf.upfronthosting.co.za> Message-ID: <1365103995.4.0.846783379242.issue17365@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Berker ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 4 21:37:21 2013 From: report at bugs.python.org (mike bayer) Date: Thu, 04 Apr 2013 19:37:21 +0000 Subject: [issue10740] sqlite3 module should allow DDL statements in transactions In-Reply-To: <1292868135.81.0.257293444934.issue10740@psf.upfronthosting.co.za> Message-ID: <1365104241.17.0.622159540144.issue10740@psf.upfronthosting.co.za> Changes by mike bayer : ---------- nosy: +zzzeek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 00:16:45 2013 From: report at bugs.python.org (Sebastien Luttringer) Date: Thu, 04 Apr 2013 22:16:45 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1365113805.77.0.559319721411.issue9253@psf.upfronthosting.co.za> Sebastien Luttringer added the comment: I got the same issue that mike bayer with argparse doesn't throw error when subparser are missing. Is it a bug which should be fixed in Python or in all python script? This sounds like an API break. ---------- nosy: +seblu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 00:18:03 2013 From: report at bugs.python.org (Matthias Klose) Date: Thu, 04 Apr 2013 22:18:03 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1365113883.93.0.303009717918.issue16754@psf.upfronthosting.co.za> Matthias Klose added the comment: are you speculating, or is your comment based on some testing? MacOS had this value before, and apparently it did work before that change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 00:21:47 2013 From: report at bugs.python.org (Neil Hodgson) Date: Thu, 04 Apr 2013 22:21:47 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365114107.35.0.327260381381.issue17615@psf.upfronthosting.co.za> Neil Hodgson added the comment: Looking at the assembler output from gcc 4.7 on Linux shows that it specialises the loop 9 times - once for each pair of kinds. This is why there was far less slow-down on Linux. Explicitly writing out the 9 loops is inelegant and would make accurate maintenance more difficult. There may be some way to use the preprocessor to do this cleanly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 00:26:10 2013 From: report at bugs.python.org (Julian Taylor) Date: Thu, 04 Apr 2013 22:26:10 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1365114370.8.0.361461694479.issue16754@psf.upfronthosting.co.za> Julian Taylor added the comment: I'm going by what says in configure: # SHLIB_SUFFIX is the extension of shared libraries The extension of shared libraries on macos is .dylib in most cases (e.g libtool based libraries and as mentioned python itself) Maybe its just a documentation/naming issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 00:32:29 2013 From: report at bugs.python.org (Chris Calloway) Date: Thu, 04 Apr 2013 22:32:29 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365114749.25.0.768475554871.issue15518@psf.upfronthosting.co.za> Changes by Chris Calloway : Removed file: http://bugs.python.org/file26635/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 00:40:49 2013 From: report at bugs.python.org (Julian Taylor) Date: Thu, 04 Apr 2013 22:40:49 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1365115249.45.0.435990854651.issue16754@psf.upfronthosting.co.za> Julian Taylor added the comment: just to clarify its not any issue in python, python is working fine with .so The issue is just that theses variables tends to be used by other applications to figure out information on the system (like shared library extension, see numpy.distutils) You certainly could argue that these applications are broken by even needing this information, but a proper naming of the variables could help reduce confusion and wrong code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 01:00:23 2013 From: report at bugs.python.org (Chris Calloway) Date: Thu, 04 Apr 2013 23:00:23 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365116423.19.0.279110411046.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: OK, I got to participate in my Python user group hack night this week where I actually got to work on my projects instead of spending all night helping newbies on their projects. I used the time to refactor all the previous patches for this issue on which I had previously been working into the attached issue-15518-1.patch (replacing previous patch of the same name). I believe this patch a) provides the necessary minimum test coverage for the report methods, b) addresses chris.jerdonek's and eli.bendersky concerns, and c) does a strict PEP8 clean-up of the pre-existing tests (without changing pre-existing code). If you like this patch, I'd be glad to refactor the pre-existing tests to a) put each pre-existing test in its own TestCase methods and b) clean-up the unmaintainable proliferation of repeated hard-coded strings in the pre-existing tests. Feedback appreciated. ---------- Added file: http://bugs.python.org/file29681/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 01:17:30 2013 From: report at bugs.python.org (Chris Calloway) Date: Thu, 04 Apr 2013 23:17:30 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365117450.49.0.309111647186.issue15518@psf.upfronthosting.co.za> Changes by Chris Calloway : Removed file: http://bugs.python.org/file29681/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 01:18:31 2013 From: report at bugs.python.org (Chris Calloway) Date: Thu, 04 Apr 2013 23:18:31 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365117511.92.0.224504581952.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: Replaced patch to fix a few under-informative test messages. ---------- Added file: http://bugs.python.org/file29682/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 03:15:02 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Apr 2013 01:15:02 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules Message-ID: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> New submission from Brett Cannon: To help with circular imports, IMPORT_FROM should be modified to check sys.modules if a getattr() check fails. http://mail.python.org/pipermail/python-dev/2013-April/125123.html ---------- components: Interpreter Core messages: 186059 nosy: brett.cannon, pje priority: normal severity: normal stage: test needed status: open title: Modify IMPORT_FROM to fallback on sys.modules type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 03:17:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Apr 2013 01:17:16 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines Message-ID: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> New submission from Brett Cannon: http://docs.python.org/devguide/patch.html should mention that What's New should also be considered for updating if a change is either significant or requires potential modification of existing code. ---------- components: Devguide messages: 186060 nosy: brett.cannon, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: Mention "What's New" in devguide's patch guidelines _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 03:31:21 2013 From: report at bugs.python.org (INADA Naoki) Date: Fri, 05 Apr 2013 01:31:21 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365125481.64.0.234018095362.issue17636@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- nosy: +naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 03:57:49 2013 From: report at bugs.python.org (Todd Rovito) Date: Fri, 05 Apr 2013 01:57:49 +0000 Subject: [issue14146] IDLE: source line in editor doesn't highlight when debugging In-Reply-To: <1330401708.67.0.511106941359.issue14146@psf.upfronthosting.co.za> Message-ID: <1365127069.47.0.122154112673.issue14146@psf.upfronthosting.co.za> Todd Rovito added the comment: I posted this message on tinter discuss email list: http://mail.python.org/pipermail/tkinter-discuss/2013-March/003415.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 04:35:28 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Apr 2013 02:35:28 +0000 Subject: [issue17483] Can not tell urlopen not to check the hostname for https connections. In-Reply-To: <1363715731.1.0.258453337852.issue17483@psf.upfronthosting.co.za> Message-ID: <3ZhlW31mPHzRNj@mail.python.org> Roundup Robot added the comment: New changeset fc39b8f0348d by Senthil Kumaran in branch '3.3': Issue #17483: 3.3 Branch - Remove unreachable code in urllib.request http://hg.python.org/cpython/rev/fc39b8f0348d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 05:44:21 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 05 Apr 2013 03:44:21 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365133461.74.0.969663481538.issue17636@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 08:14:09 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 05 Apr 2013 06:14:09 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365142449.03.0.61818265413.issue17636@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 09:06:09 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Apr 2013 07:06:09 +0000 Subject: [issue1387483] sys.path In-Reply-To: <1365093212.55.0.0497999086796.issue1387483@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I am not sure about what use cases could be broken by the above change, do you have examples? > Normal use cases of symbolic links have to do with linking entire folders, not individual files, and that behaviour would not be broken by such a hypothetical change, I think. For example: /tmp/ foo/ foo.py libfoo.py foo.py -> /tmp/foo/foo.py With foo.py containing "import libfoo". Now, calling /tmp/foo.py works because sys.path[0] == dirname(realpath("/tmp/foo.py")) == dirname("/tmp/foo/foo.py") == "/tmp/foo. If we change sys.path[0] to not dereference the symlink (that's how I understood your suggestion, maybe I got it wrong), it will now be /tmp, and importing libfoo will fail. That's AFAICT exacyly the problem reported by the OP on OS-X. ---------- title: sys.path[0] when executed thru a symbolic link -> sys.path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 09:09:43 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Apr 2013 07:09:43 +0000 Subject: [issue1387483] sys.path[0] when executed thru a symbolic link Message-ID: <1365145783.39.0.381912513546.issue1387483@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I've no clue what happened to the issue title (I just replied to the email, and the title changed)... ---------- title: sys.path -> sys.path[0] when executed thru a symbolic link _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 09:23:43 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Apr 2013 07:23:43 +0000 Subject: [issue6419] Broken test_kqueue.py on OpenBSD In-Reply-To: <1246742581.68.0.218952543803.issue6419@psf.upfronthosting.co.za> Message-ID: <1365146623.31.0.915661019815.issue6419@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: test_kqueue now passes on NetBSD (can't tell for OpenBSD, all buildbots are offline). I'm closing this, feel free to repon in case of problem. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 09:44:40 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Apr 2013 07:44:40 +0000 Subject: [issue17638] test_ssl failure Message-ID: <1365147880.88.0.698550208243.issue17638@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: test_ssl is failing on one the NetBSD buildbots: http://buildbot.python.org/all/builders/x86%20NetBSD%205.1.2%20%5BSB%5D%203.x/builds/1129/steps/test/logs/stdio """ ====================================================================== ERROR: test_options (test.test_ssl.ContextTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/3.x.snakebite-netbsd51-x86-1/build/Lib/test/test_ssl.py", line 87, in f return func(*args, **kwargs) File "/home/cpython/buildslave/3.x.snakebite-netbsd51-x86-1/build/Lib/test/test_ssl.py", line 420, in test_options ctx.options = (ctx.options & ~ssl.OP_NO_SSLv2) | ssl.OP_NO_TLSv1 ValueError: can't clear options before OpenSSL 0.9.8m """ Antoine, I think I saw commits from you some time ago to deal with this SSL version thing... ---------- components: Tests keywords: buildbot messages: 186066 nosy: neologix, pitrou priority: normal severity: normal status: open title: test_ssl failure type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 10:45:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 08:45:50 +0000 Subject: [issue17638] test_ssl failure In-Reply-To: <1365147880.88.0.698550208243.issue17638@psf.upfronthosting.co.za> Message-ID: <1365151550.52.0.442529463542.issue17638@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, that exception is raised when the OpenSSL version doesn't have the HAVE_SSL_CTX_CLEAR_OPTIONS macro, which appeared in 0.9.8m. But the OpenSSL version on that buildbot identifies itself as "OpenSSL 0.9.9-dev 09 May 2008", which is logically posterior to 0.9.8m. I don't know how to handle this in a non-hackish way, except by just ignoring the issue :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 11:03:16 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 09:03:16 +0000 Subject: [issue1387483] sys.path[0] when executed thru a symbolic link Message-ID: <1365152596.87.0.430187485154.issue1387483@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Thanks for your example. > That's AFAICT exacyly the problem reported by the OP on OS-X. You are right, I mis-read the original problem. IMHO, the example you quote is "unexpected". The purpose of symbolic links is to create a "virtual" image of a structure. a structure like you describe: /scripts/ foo.py -> /otherplace/foo.py contains only a foo.py in its apparent location (scripts). I would not expect the file to be able to import stuff from /otherplace unless that stuff were also present in /scripts In other words: symlinking individual files normally works like you are "pulling that file in", not "hopping into that file's real location". This behaviour is unexpected because I know of no other language tools that behave in this way: /code/ myfile.c -> /sources/myfile.c mylib.h -> /libs/mylib.h libmylib.so -> /libs/libmylib.so an "#include "mylib.h" in myfile.c would look for the file in /code and find it. a "cc myfile.c -lmylib" would find the libmylib.so in /code Since this is not the original problem described, I'll open up a separate defect report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 11:29:06 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 09:29:06 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path[0] Message-ID: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson: When .py files are assembled into a directory structure using direct symbolic links to the files, something odd happens to sys.path[0]. Consider this file structure: /pystuff/ foo.py -> /scripts/foo.py bar.py -> /libs/bar.py foo.py contains the line: "import bar" "python /pystuff/foo.py" will now fail, because when foo.py is run, sys.path[0] will contain "/scripts", rather than the expected "/pystuff". It would appear that the algorithm for finding sys.path[0] is: sys.path[0] = os.dirname(os.realpath(filename)). IMO, it should be: sys.path[0] = os.realpath(os.dirname(filename)). I say that this behaviour is unexpected, because symlinking to individual files normally has the semantics of "pulling that file in" rather than "hopping to that file's real dir". As an example, the following works C, and other languages too, I should imagine: /code/ myfile.c -> /sources/myfile.c mylib.h -> /libs/mylib.h libmylib.so -> /libs/libmylib.so an "#include "mylib.h" in myfile.c would look for the file in /code and find it. a "cc myfile.c -lmylib" would find the libmylib.so in /code This problem was observed on linux, when running hadoop script jobs. The hadoop code (cloudera CDH4) creates a symlink copy of your file structure, where each file is individually symlinked to an place in a file cache, where each file may sit in a different physical dir, like this: tmp1/ a.py -> /secret/filecache/0001/a.py b.py -> /secret/filecache/0002/b.py c.py -> /secret/filecache/0003/c.py Suddenly, importing b and c from a.py won't work. if a, b, and c were .h files, then "#include "b.h"" from a.h would work. ---------- components: Interpreter Core, Library (Lib) messages: 186069 nosy: kristjan.jonsson, ncoghlan, neologix priority: normal severity: normal status: open title: symlinking .py files creates unexpected sys.path[0] type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 11:29:45 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 09:29:45 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path[0] In-Reply-To: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> Message-ID: <1365154185.25.0.497474554565.issue17639@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: btw, this is the opposite issue to issue #1387483 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 11:30:13 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 09:30:13 +0000 Subject: [issue1387483] sys.path[0] when executed thru a symbolic link Message-ID: <1365154213.15.0.0209193855324.issue1387483@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Closign this again. Opened up a new issue: http://bugs.python.org/issue17639 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 12:11:26 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 05 Apr 2013 10:11:26 +0000 Subject: [issue17634] Win32: shutil.copy leaks file handles to child processes In-Reply-To: <1365092598.25.0.167628873092.issue17634@psf.upfronthosting.co.za> Message-ID: <1365156686.48.0.0507163441237.issue17634@psf.upfronthosting.co.za> Richard Oudkerk added the comment: This problem also affects processes started by multiprocessing (although it is fixed in http://hg.python.org/sandbox/sbt#spawn). As far as I am concerned O_NOINHERIT should really have been applied by default in Python 3. You only get inheritable fds on Windows if you use the msvcrt's spawn*() functions. But in Python 3 os.spawn*() is implemented on top of subprocess so the fds are never inherited (even if the underlying handles are). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 13:30:23 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 11:30:23 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365161423.56.0.647272469444.issue17636@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Like I mentioned on python-dev, it worries me a bit that this could be considered "unexpected", i.e. when there is a conflict between a legitimage attribute member of a module, and a submodule of the same name. Also, I wonder if this isn't a bigger change to the import mechanism, than simply: | Another would be | to always require an 'as' clause in this case, so that you would have | to write' | import .foo as foo which would possibly only require a change to the syntax. ---------- nosy: +kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 13:59:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Apr 2013 11:59:25 +0000 Subject: [issue17634] Win32: shutil.copy leaks file handles to child processes In-Reply-To: <1365156686.48.0.0507163441237.issue17634@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: See also the PEP 433 which proposes to disable file descriptor inherance by default. 2013/4/5 Richard Oudkerk : > > Richard Oudkerk added the comment: > > This problem also affects processes started by multiprocessing (although it is fixed in http://hg.python.org/sandbox/sbt#spawn). > > As far as I am concerned O_NOINHERIT should really have been applied by default in Python 3. You only get inheritable fds on Windows if you use the msvcrt's spawn*() functions. But in Python 3 os.spawn*() is implemented on top of subprocess so the fds are never inherited (even if the underlying handles are). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 14:13:29 2013 From: report at bugs.python.org (=?utf-8?q?Herv=C3=A9_Coatanhay?=) Date: Fri, 05 Apr 2013 12:13:29 +0000 Subject: [issue17453] logging.config.fileConfig error In-Reply-To: <1363592089.61.0.213350705624.issue17453@psf.upfronthosting.co.za> Message-ID: <1365164009.03.0.167136508524.issue17453@psf.upfronthosting.co.za> Herv? Coatanhay added the comment: Yes it does. I fixed my configuration generation and everything is running as expected. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 14:14:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Apr 2013 12:14:13 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path[0] In-Reply-To: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> Message-ID: <1365164053.25.0.110977231511.issue17639@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adding Guido & Ned, as my recollection is that some of the weirdness in the sys.path[0] symlink resolution was to placate the test suite on Mac OS X (at least, that was a cause of failures in the initial runpy module implementation until Guido tracked down the discrepancy in symlink resolution between direct script execution and runpy). How does the test suite react if you change the order of application to resolve symlinks only after dropping the file name from the path? ---------- nosy: +gvanrossum, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 14:22:10 2013 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 05 Apr 2013 12:22:10 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path[0] In-Reply-To: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> Message-ID: <1365164530.34.0.444130990996.issue17639@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 14:36:06 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Apr 2013 12:36:06 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365165366.53.0.588699184722.issue17636@psf.upfronthosting.co.za> Brett Cannon added the comment: It won't conflict with attributes. Only if the attribute does not exist on the module already will it fall back to sys.modules. If the import finished then any attribute created from the import will already be there and thus not be an issue. But to make sure this isn't a problem we can make sure there is a test in this instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 15:07:42 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 13:07:42 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365167262.93.0.0293704343025.issue17636@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: While I'm happy that this is being ackowledged as a problem, I'm not sure changing the "import x from y" semantics is necessarily a good idea. I mean, it is obvious to me that it means "import x, then getattr(x, "y")". I presume that is the meaning most people associate with it. Certainly, "y" can be any old module attribute. To change it to actually fall back to a submodule, well. I suppose if you could explain it roughly like "y = getattr(x, 'y', x.y)" then it would be ok. But I can think of contrived examples where this could break things: #a.py: from .b import util #b.py from . import a from .util import util Because of the circular import order, b.util will not exist as an attribute on b when a does its import. So a.util will end up being util instead of util.util as one might expect. I'm basically saying that it is possible that the fallback to submodule will occur, where the successful getattr would occur later and return something different than the submodule. Possible. But perhaps very much an edge case :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 15:52:22 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Apr 2013 13:52:22 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365169942.46.0.224993331328.issue17636@psf.upfronthosting.co.za> Brett Cannon added the comment: By declaring what the semantics will be to make the case even possible we are not breaking anything but making something possible. IOW it isn't even an edge case to me since there is no working case to compare against. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 15:55:00 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 05 Apr 2013 13:55:00 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path In-Reply-To: <1365164053.25.0.110977231511.issue17639@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > How does the test suite react if you change the order of application to resolve symlinks only after dropping the file name from the path? Note that this will break things, see e.g. http://bugs.python.org/issue1387483#msg186063 The only backward compatible way to handle this would be to add both directories to sys.path, hoping that there's no module with the same name in both directories. ---------- title: symlinking .py files creates unexpected sys.path[0] -> symlinking .py files creates unexpected sys.path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 16:11:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 14:11:00 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365171060.26.0.854896373975.issue17637@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is more the duty of the committer IMO. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 16:22:28 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 05 Apr 2013 14:22:28 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365171748.0.0.851810031633.issue17636@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 16:30:58 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Apr 2013 14:30:58 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365172258.28.0.449492156047.issue17637@psf.upfronthosting.co.za> Brett Cannon added the comment: Yes, but that doesn't mean it shouldn't be written down in the devguide (with appropriate note) that committers need to be thinking about this. Start good habits early. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 16:31:26 2013 From: report at bugs.python.org (Dmitry Sivachenko) Date: Fri, 05 Apr 2013 14:31:26 +0000 Subject: [issue17640] from distutils.util import byte_compile hangs Message-ID: <1365172286.35.0.207252264643.issue17640@psf.upfronthosting.co.za> New submission from Dmitry Sivachenko: The following problem exists in python3.3.0 and python3.3.1rc1. >From the command line it works: root at dhcp175-40-red:~ # python3 Python 3.3.1rc1 (default, Apr 5 2013, 18:03:56) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd10 Type "help", "copyright", "credits" or "license" for more information. >>> from distutils.util import byte_compile >>> >From script it hangs: root at dhcp175-40-red:~ # cat /tmp/comp.py from distutils.util import byte_compile files = [ '/usr/local/lib/python3.3/site-packages/yaml/__init__.py',] byte_compile(files, optimize=1, force=None, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=1) # python3 /tmp/comp.py --> Now it hangs forever, if I press Ctrl+D, I get: Traceback (most recent call last): File "/tmp/comp.py", line 1, in from distutils.util import byte_compile File "/usr/local/lib/python3.3/distutils/util.py", line 9, in import imp File "/usr/local/lib/python3.3/imp.py", line 28, in import tokenize File "/usr/local/lib/python3.3/tokenize.py", line 37, in __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding", AttributeError: 'module' object has no attribute '__all__' ---------- assignee: eric.araujo components: Distutils messages: 186084 nosy: Dmitry.Sivachenko, eric.araujo, tarek priority: normal severity: normal status: open title: from distutils.util import byte_compile hangs type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 17:07:33 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Apr 2013 15:07:33 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path In-Reply-To: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> Message-ID: <1365174453.5.0.990022129178.issue17639@psf.upfronthosting.co.za> Guido van Rossum added the comment: Do not "fix" this. It is an intentional feature. There is a common pattern where one or more Python scripts are collected in some "bin" directory (presumably on the user's $PATH) as symlinks into the directory where they really live (not on $PATH, nor on sys.path). The other files needed by the script(s) are in the latter directory, and so it needs to be on sys.path[0]. If you change the symlink resolution, sys.path[0] will point to the "bin" directory and the scripts won't be able to find the rest of their modules. While there are probably better patterns to solve the problem that this intends to solve, the pattern is commonly used and I do not want it to be broken. If you are using symlinks for other purposes, well, too bad. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 17:30:36 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Apr 2013 15:30:36 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path In-Reply-To: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> Message-ID: <1365175836.44.0.520000341581.issue17639@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'll add it to the list of docs updates for post-PEP 432 (similar to the import system in general finally getting reference docs in 3.3 following the migration to importlib, I hope to have improved import state initialisation docs for 3.4 if I successfully tame the interpreter initialisation code) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 17:30:49 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 15:30:49 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path In-Reply-To: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> Message-ID: <1365175849.52.0.305095733233.issue17639@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: 1) _I_ am not using symlinks this way. The hadoop scheduling processor is. This means that we cannot use Python for it withouth hacking the scripts for the special case. Presumably applications are not generally breaking when run in an artificial file tree populated with symlinked files into arbitrary real locations, but Python is. Only Python seems to care about the _real_ location of the file, as opposed to the apparent location. 2) This particular use case is quite unobvious, and goes against the spirit of symbolic links. They are meant to be transparent for applications. Consider e.g. the analogue to e.g. C header files. Only Python seems to care about the _real_ location of the file, as opposed to the apparent location. Effectively, Python is actively using the knowledge of these links as a sort of dynamic sys.path modifying tool. I agree that it is not good to break existing usage, however misguided it may be. But in that case, isn't it possible to disable this symlink dereference via e.g. an option? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 17:37:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 15:37:53 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365176273.8.0.572185421975.issue17637@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Then it should probably go in http://docs.python.org/devguide/committing.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 17:49:33 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Apr 2013 15:49:33 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path In-Reply-To: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> Message-ID: <1365176973.51.0.435854632954.issue17639@psf.upfronthosting.co.za> Nick Coghlan added the comment: Not currently, because interpreter startup is a mess already. Overriding sys.path[0] initialisation is on the list for 3.4 already, I'm just advising strongly against piling any more complexity on top of the current rickety structure until we do something about the foundation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 17:52:11 2013 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Apr 2013 15:52:11 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path In-Reply-To: <1365176973.51.0.435854632954.issue17639@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I'm sure there's some change that can be made to the scripts that solves this locally, without requiring any changes to Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 18:18:09 2013 From: report at bugs.python.org (Ethan Furman) Date: Fri, 05 Apr 2013 16:18:09 +0000 Subject: [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1365178689.39.0.368399698678.issue17576@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +stoneleaf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 18:35:12 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 16:35:12 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path In-Reply-To: <1365154146.05.0.401345898234.issue17639@psf.upfronthosting.co.za> Message-ID: <1365179712.89.0.730168312727.issue17639@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Yes, of course. But I still maintain that the failure of python to work with a linktree of .py files, where the destination position of said links is arbitrary, is rather unusual, and IMHO violates the principle of least surprise. In this case, the existence of the virtual linktree is apparently an implementation detail of the hadoop implementation, not something that we as hadoop users were supposed to know or care about. Exploiting the OS file system implementation detail of a symbolic link as a language import feature is an example of an unusual coupling indeed, in my opinion. Even import-guru Nick didn't seem to be aware of this feature. It's great that we plan at least to document this unix-only feature at some point. Cheers! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 18:40:01 2013 From: report at bugs.python.org (paul j3) Date: Fri, 05 Apr 2013 16:40:01 +0000 Subject: [issue13922] argparse handling multiple "--" in args improperly In-Reply-To: <1328132556.72.0.92385645061.issue13922@psf.upfronthosting.co.za> Message-ID: <1365180001.59.0.254709643516.issue13922@psf.upfronthosting.co.za> paul j3 added the comment: There are several problems with the patch provided in msg156315 This description: "Added patch so that only the first '--' is removed by an argparse.PARSE or argparse.REMAINDER argument." should read "Added patch so that only the first '--' is removed by arguments that are not argparse.PARSER or argparse.REMAINDER ." The test that adds a third subparser with a nargs='...' argument does not test this change. It exercises both nargs types that are not affected by the change in argparse.py. As such older versions of argparse pass this test. I thinking argparse.py change is correct (delete only the 1st '--'), though I'm not sure it addresses the concern of the original poster. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 19:23:41 2013 From: report at bugs.python.org (Phillip J. Eby) Date: Fri, 05 Apr 2013 17:23:41 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365167262.93.0.0293704343025.issue17636@psf.upfronthosting.co.za> Message-ID: Phillip J. Eby added the comment: On Fri, Apr 5, 2013 at 9:07 AM, Kristj?n Valur J?nsson wrote: > But I can think of contrived examples where this could break things: > #a.py: > from .b import util > > #b.py > from . import a > from .util import util > > Because of the circular import order, b.util will not exist as an attribute on b when a does its import. So a.util will end up being util instead of util.util as one might expect. Not quite. It will only do this if the '.b.util' module is *in sys.modules* at the time that a is being imported, which also means that .b.util has to be imported somewhere *before* .a, in order to end up with a stale value. As written, your example actually works correctly if .a is imported first, and fails with an ImportError if .b is imported first. In fact, this example is kind of useful for proving the change *correct*, not broken. At the very least, it shows that you'll have to be more inventive to come up with a breaking case. ;-) Consider that for any module x.y, x must be in sys.modules before x.y can. Therefore, any "from x import" taking place before x is fully loaded will either happen before x.y is fully loaded, during the load, or after it, and the following cases apply: 1. If it happens before, then it fails with an ImportError as is the case today. 2. If it happens during (i.e. there is a cycle with x.y rather than with just x), then the import returns the module. 3. If it happens after, then either the x.y attribute is bound to the submodule, or has been rebound to something else, or deleted. 4. If after and deleted, the import returns the module. 5. If after and rebound, the import returns the changed attribute (just like today) 6. If after and normally bound, the import returns the module (just like today) The only cases in which the behavior changes from today are cases 2 and 4, which would both fail today with an ImportError. Case 4 also doesn't make much sense, since 'import x.y' would still permit access to the module -- so it'd have to be an odd situation in which you didn't want 'from import' (and *only* from import) to fail. So let's consider case 2, which would have to be written something like: #a.py from .b import util #b.py from .util import util #b/util.py from .. import a def util(): pass #__main__.py import b So, import b leads to starting the load of b.util, which leads to importing a, which succeeds and sees the b.util module instead of the b.util:util function. But, because of the circularity, this will *also* happen if you import a first. So 'a' will *always* see b.util rather than b.util:util, unless you remove the circularity. If you remove the circularity, then 'a' will always see b.util:util as the value of util. So case 2 does not lead to a hard-to-debug ordering dependency, it leads to an immediately discoverable change in behavior the moment you start importing a from b.util. The tl;dr version of the above is that you will only receive a module instead of an attribute if the module that's about to be replaced just imported *you* during its initial loading, and if it does that, it'll do it no matter what order the imports occur in, making the problem occur immediately and consistently as soon as you introduce the circularity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 19:29:30 2013 From: report at bugs.python.org (Marten Lehmann) Date: Fri, 05 Apr 2013 17:29:30 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1365182970.8.0.69302881612.issue16480@psf.upfronthosting.co.za> Marten Lehmann added the comment: Which bug ID? Couldn't find it anywhere in the previous comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 19:31:19 2013 From: report at bugs.python.org (Phillip J. Eby) Date: Fri, 05 Apr 2013 17:31:19 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: Message-ID: Phillip J. Eby added the comment: Actually, after a little reflection, I can see that there are more complex conditions to analyze, if 'b' doesn't import 'b.util', but some other module imports b and sets b.util. But that's just freaking insane and whoever does that probably deserves whatever they get, especially since a later 'import b.util' would blow away the modified attribute. So, this note is just to satisfy myself that the change doesn't introduce any *new* weirdness unless you are in a case where the parent imports and replaces the child, and the child is involved in an import cycle. If the parent doesn't import the child but just assigns an attribute, it's already broken the minute somebody else imports the child, and the same thing applies if something else sets the attribute without importing the child first, and if it imports the child first, then the previous analysis (mostly) applies, but either way that code is broken and will have plenty of other ordering dependencies to debug on its own. ;-) (No wonder Nick said nobody wanted to touch this... the analysis alone is a killer. ;-) Luckily, it seems we're good to go unless somebody can find a case I missed.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 19:49:24 2013 From: report at bugs.python.org (Phillip J. Eby) Date: Fri, 05 Apr 2013 17:49:24 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: Message-ID: Phillip J. Eby added the comment: ...and I thought of *one* more way to trigger the changed behavior, which looks like: #b.py from .b import util import .a util = util.util #b/util.py def util(): pass (with the other files the same as before). I'm including it only for completeness' sake, because my original enumeration of cases ignored the possibility that 'a' could be doing the import *after* b.util is loaded and bound, but *before* it's rebound. However, it doesn't produce any new or problematic effects: it's essentially the same as if 'a' were imported from 'b.util'. Once again, regardless of the order in which imports happen, 'a' ends up with 'b.util' the moment the circularity is introduced, and it stays that way. It's also hard to argue that a case written this way isn't getting exactly what it *says* it wants. In fact, it looks like code that was deliberately written to *force* a to end up with the original b.util instead of the replaced one. ;-) Final (hopefully) conclusion: this change replaces the FAQ of "Don't use 'from-import' for circular imports" with the hopefully-less-FA'd Q of "when from-import is part of an import cycle, it works *exactly* like regular import, so you're going to get a submodule rather than an attribute. If you need the attribute instead, move the import so that it happens after the attribute is set up." (Which is exactly the same advice that would apply in a cycle with any other unitialized attribute, whether you were using from-import or not.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 19:54:41 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 05 Apr 2013 17:54:41 +0000 Subject: [issue17641] ssl module doc unification Message-ID: <1365184481.29.0.784588958426.issue17641@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': I noticed 2.X version of ssl module doc does not mention different socket methods (sendall(), accept(), etc) whereas the 3.X version does. Patch in attachment unifies the 2 docs. ---------- assignee: docs at python components: Documentation keywords: easy, needs review messages: 186097 nosy: docs at python, ezio.melotti, giampaolo.rodola, pitrou priority: normal severity: normal status: open title: ssl module doc unification versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 19:58:30 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 05 Apr 2013 17:58:30 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365184710.44.0.719741672153.issue17636@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Wow, Good analysis Phillip. So, we agree that the fallback still is a sensible fallback? Then everything is fine and I'll put my official +1 stamp of approval on this. Now... should we consider the current behavious to be a bug? 2.7 sure could do with some fixing :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 20:29:58 2013 From: report at bugs.python.org (Jeff Kaufman) Date: Fri, 05 Apr 2013 18:29:58 +0000 Subject: [issue2292] Missing *-unpacking generalizations In-Reply-To: <1205595680.3.0.859525264867.issue2292@psf.upfronthosting.co.za> Message-ID: <1365186598.06.0.342610962728.issue2292@psf.upfronthosting.co.za> Jeff Kaufman added the comment: What would it take to get this moving again? ---------- nosy: +Jeff.Kaufman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 21:03:07 2013 From: report at bugs.python.org (Tom Pinckney) Date: Fri, 05 Apr 2013 19:03:07 +0000 Subject: [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1365188587.6.0.248199776382.issue6696@psf.upfronthosting.co.za> Tom Pinckney added the comment: Updated based on Ezio's comments. ---------- Added file: http://bugs.python.org/file29683/patch3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 21:14:03 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Apr 2013 19:14:03 +0000 Subject: [issue2292] Missing *-unpacking generalizations In-Reply-To: <1205595680.3.0.859525264867.issue2292@psf.upfronthosting.co.za> Message-ID: <1365189243.01.0.00247905365855.issue2292@psf.upfronthosting.co.za> R. David Murray added the comment: Someone needs to write the PEP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 21:16:32 2013 From: report at bugs.python.org (Phillip J. Eby) Date: Fri, 05 Apr 2013 19:16:32 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365184710.44.0.719741672153.issue17636@psf.upfronthosting.co.za> Message-ID: Phillip J. Eby added the comment: I don't care much one way or the other about it being considered a bug in 2.x, but it might be worth considering a bug in 3.x. Either way, though, the language reference for "from import" should reflect the change, and "alternative implementations" should be informed of the update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 21:47:50 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Apr 2013 19:47:50 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365191270.09.0.140755987104.issue17636@psf.upfronthosting.co.za> Brett Cannon added the comment: It is not a bug but a change in semantics to accommodate a use-case so this will only be going into Python 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 22:02:28 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Apr 2013 20:02:28 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1365192148.73.0.346081843486.issue17343@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 on os.walk returning an iterator. The API is already a bit challenging for some and our experience with itertools.groupby() is that returning an inner iterator can be very confusing. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 22:03:31 2013 From: report at bugs.python.org (Alex Gaynor) Date: Fri, 05 Apr 2013 20:03:31 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1365192211.94.0.96209849393.issue17343@psf.upfronthosting.co.za> Alex Gaynor added the comment: Raymond: Is that for the wrong ticket, or was the message incorrect? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 23:02:29 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Apr 2013 21:02:29 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1365195749.83.0.346923055989.issue17343@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Alex, it was response to Terry's message: http://bugs.python.org/issue17343#msg183782 FWIW, I'm +1 on an iterator version of str.split(). I'm not sure yet that it would be worthwhile to propagate the idea to other string-like objects though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 23:07:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 21:07:17 +0000 Subject: [issue17641] ssl module doc unification In-Reply-To: <1365184481.29.0.784588958426.issue17641@psf.upfronthosting.co.za> Message-ID: <1365196037.73.0.607239019324.issue17641@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch seems to be missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 23:11:01 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 05 Apr 2013 21:11:01 +0000 Subject: [issue17641] ssl module doc unification In-Reply-To: <1365184481.29.0.784588958426.issue17641@psf.upfronthosting.co.za> Message-ID: <1365196261.94.0.241289862751.issue17641@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Shame on me and my scatterbrained head! =) ---------- keywords: +patch Added file: http://bugs.python.org/file29684/ssl-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 23:14:56 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 05 Apr 2013 21:14:56 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1365196496.71.0.827870079551.issue17620@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 23:16:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 21:16:23 +0000 Subject: [issue17641] ssl module doc unification In-Reply-To: <1365196261.94.0.241289862751.issue17641@psf.upfronthosting.co.za> Message-ID: <1365196576.3370.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Giampaolo Rodola' added the comment: > > Shame on me and my scatterbrained head! =) Thanks, looks fine to me! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 23:16:43 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 05 Apr 2013 21:16:43 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365196603.66.0.543987717259.issue17637@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 5 23:59:03 2013 From: report at bugs.python.org (paul j3) Date: Fri, 05 Apr 2013 21:59:03 +0000 Subject: [issue13922] argparse handling multiple "--" in args improperly In-Reply-To: <1328132556.72.0.92385645061.issue13922@psf.upfronthosting.co.za> Message-ID: <1365199143.92.0.947817397442.issue13922@psf.upfronthosting.co.za> paul j3 added the comment: There's another 'feature' to the patch proposed here. It only deletes the first '--' in the list of strings passed to '_get_values' for a particular action. parser = argparse.ArgumentParser() parser.add_argument('foo') parser.add_argument('bar', nargs='*') print(parser.parse_args('-- 1 -- 2 3 4'.split(' '))) # Namespace(bar=['2', '3', '4'], foo='1') '_get_values' first gets ('foo',['--','1']), then ('bar',['--','2','3','4']) print(parser.parse_args('-- -- 1 -- 2 -- 3 4'.split(' '))) # with this '1st only' change # Namespace(bar=['1', '2', '--', '3', '4'], foo='--') # without it, deleting all '--'; note foo is empty # Namespace(bar=['1', '2', '3', '4'], foo=[]) And to confuse things a bit more: print(parser.parse_args('1 -- 2 3 4'.split(' '))) # Namespace(bar=['2', '3', '4'], foo='1') passes ['1','--'] with 'foo' If 'bar' nargs='...', bar gets all of the '--' (with or without this patch). The handling of '--' is complex because it is used in one place to mean, 'everything else is an argument', effectively adding '-AA...' to the arg_strings_pattern. It also matches with the nargs_pattern (e.g. '(-*A-*)...'). And then it may or may not be removed in _get_values(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 01:15:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Apr 2013 23:15:48 +0000 Subject: [issue17469] Fix sys.getallocatedblocks() when running on valgrind In-Reply-To: <1363639508.69.0.910213848497.issue17469@psf.upfronthosting.co.za> Message-ID: <3ZjH2C4Wk1zSbH@mail.python.org> Roundup Robot added the comment: New changeset 2bf154ca43c6 by Antoine Pitrou in branch 'default': Issue #17469: Fix _Py_GetAllocatedBlocks() and sys.getallocatedblocks() when running on valgrind. http://hg.python.org/cpython/rev/2bf154ca43c6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 01:16:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 23:16:26 +0000 Subject: [issue17469] Fix sys.getallocatedblocks() when running on valgrind In-Reply-To: <1363639508.69.0.910213848497.issue17469@psf.upfronthosting.co.za> Message-ID: <1365203786.82.0.0731736199162.issue17469@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch committed, thank you! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 01:21:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 23:21:08 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation In-Reply-To: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> Message-ID: <1365204068.04.0.623867383222.issue16551@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch looks fine to me. Do you want to go ahead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 01:27:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 23:27:23 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1365204443.91.0.862968514254.issue16804@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch works ok here, but should there be a test too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 01:27:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 23:27:45 +0000 Subject: [issue15596] pickle: Faster serialization of Unicode strings In-Reply-To: <1344465522.38.0.375715302831.issue15596@psf.upfronthosting.co.za> Message-ID: <1365204465.93.0.391957204031.issue15596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ping? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 01:42:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 05 Apr 2013 23:42:19 +0000 Subject: [issue16102] uuid._netbios_getnode() is outdated In-Reply-To: <1349112809.97.0.499056156586.issue16102@psf.upfronthosting.co.za> Message-ID: <1365205339.84.0.874881635709.issue16102@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 02:24:45 2013 From: report at bugs.python.org (Andrew Gorcester) Date: Sat, 06 Apr 2013 00:24:45 +0000 Subject: [issue16432] Template strings documentation in Python 3 refers to % substitution in present tense In-Reply-To: <1352323704.72.0.0858754286751.issue16432@psf.upfronthosting.co.za> Message-ID: <1365207885.22.0.310215265944.issue16432@psf.upfronthosting.co.za> Changes by Andrew Gorcester : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 03:46:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Apr 2013 01:46:57 +0000 Subject: [issue17641] ssl module doc unification In-Reply-To: <1365184481.29.0.784588958426.issue17641@psf.upfronthosting.co.za> Message-ID: <3ZjLNb6F5SzSgQ@mail.python.org> Roundup Robot added the comment: New changeset 03c65fc349c0 by Giampaolo Rodola' in branch '2.7': #17641: 2.X / 3.X ssl doc unification http://hg.python.org/cpython/rev/03c65fc349c0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 03:47:22 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Apr 2013 01:47:22 +0000 Subject: [issue17641] ssl module doc unification In-Reply-To: <1365184481.29.0.784588958426.issue17641@psf.upfronthosting.co.za> Message-ID: <1365212842.97.0.252656703744.issue17641@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 04:16:48 2013 From: report at bugs.python.org (Edmond Burnett) Date: Sat, 06 Apr 2013 02:16:48 +0000 Subject: [issue17449] dev guide appears not to cover the benchmarking suite In-Reply-To: <1363579697.14.0.518781563777.issue17449@psf.upfronthosting.co.za> Message-ID: <1365214608.69.0.0410247457813.issue17449@psf.upfronthosting.co.za> Changes by Edmond Burnett : ---------- nosy: +edmond.burnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 04:23:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 06 Apr 2013 02:23:13 +0000 Subject: [issue17639] symlinking .py files creates unexpected sys.path In-Reply-To: <1365179712.89.0.730168312727.issue17639@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: The reason I haven't documented sys.path[0] initialisation is because I know I don't fully understand it. Path initialisation in general has a lot of historical quirks, particularly once symlinks are involved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 07:29:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Apr 2013 05:29:33 +0000 Subject: [issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench In-Reply-To: <1351880615.07.0.187029674279.issue16389@psf.upfronthosting.co.za> Message-ID: <1365226173.54.0.0554898171641.issue16389@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 08:06:25 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Apr 2013 06:06:25 +0000 Subject: [issue17642] IDLE add font resizing hot keys Message-ID: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Add the standard hot keys for resizing fonts (i.e. on a Mac, CMD-plus and CMD-minus). ---------- components: IDLE keywords: easy messages: 186118 nosy: rhettinger priority: normal severity: normal stage: needs patch status: open title: IDLE add font resizing hot keys type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 08:44:37 2013 From: report at bugs.python.org (paul j3) Date: Sat, 06 Apr 2013 06:44:37 +0000 Subject: [issue13922] argparse handling multiple "--" in args improperly In-Reply-To: <1328132556.72.0.92385645061.issue13922@psf.upfronthosting.co.za> Message-ID: <1365230677.66.0.13037488615.issue13922@psf.upfronthosting.co.za> paul j3 added the comment: I am working on an alternative solution that moves the '--' removal to the consume_positionals() method, and only does it if there is a corresponding '-' in the arg_strings_pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 09:06:45 2013 From: report at bugs.python.org (Edmond Burnett) Date: Sat, 06 Apr 2013 07:06:45 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1365232005.79.0.00608512761304.issue17642@psf.upfronthosting.co.za> Changes by Edmond Burnett : ---------- nosy: +edmond.burnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 11:07:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Apr 2013 09:07:51 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365239271.9.0.0953803364477.issue17629@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also the discussion at http://comments.gmane.org/gmane.comp.python.ideas/15640 . I agree with rejection. This is an implementation detail and different Python implementations (including future CPython versions) can have different internal string implementations. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 11:41:21 2013 From: report at bugs.python.org (Drekin) Date: Sat, 06 Apr 2013 09:41:21 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1365241281.86.0.874706705316.issue17620@psf.upfronthosting.co.za> Drekin added the comment: Sorry for typos. ? interactive console doesn't use sys.stdin for input, why? ? it uses sys.stdin.encoding, shouldn't it rather use sys.__stdin__.encoding if anything? ? input() and hence code.interact() uses sys.stdin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 12:21:46 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 06 Apr 2013 10:21:46 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1365243706.28.0.0713176098673.issue17620@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> pitrou nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 14:33:01 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 06 Apr 2013 12:33:01 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1365251581.49.0.378713945179.issue17642@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 14:54:57 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Apr 2013 12:54:57 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. Message-ID: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> New submission from Mark Dickinson: It would be nice to be able to access the callback of a weakref as an attribute on the weakref itself. For example: Python 3.4.0a0 (default:2bf154ca43c6+, Apr 6 2013, 13:31:29) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import weakref >>> x = {1, 2, 3} >>> ref = weakref.ref(x, lambda ref: print("done")) >>> ref.__callback__ at 0x1004f56d0> >>> del x done >>> ref.__callback__ # Returns None I encountered this while writing a tool to show graphs of Python objects and their references to each other: I wanted to be able to annotate each edge of the graph. For something like a function, it's easy to use introspection to compare the reference target with f.__code__, f.__annotations__, etc. For a weakref, I couldn't find an easy way to retrieve the callback (or even determine whether there *was* a callback associated to the weakref). One can do a "gc.get_referents" call and hope that if there's exactly one object returned it's the callback, but that won't work so well with weakref.ref subclasses. Patch attached: it has tests but no doc updates as yet. ---------- components: Interpreter Core files: weakref___callback__.patch keywords: patch messages: 186122 nosy: mark.dickinson priority: normal severity: normal stage: patch review status: open title: Expose weakref callback for introspection purposes. type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29685/weakref___callback__.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 15:00:32 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 06 Apr 2013 13:00:32 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365253232.49.0.293606675141.issue15518@psf.upfronthosting.co.za> Eli Bendersky added the comment: A lot of the code in the tests is devoted to building the tested directory tree and populating it ( _setUpDirectories and related functions). You keep building and deleting this tree for every running test. I think that a better idea would be to just create this tree somewhere in Lib/test (look at the directories under it - we can add a new one, like filecmpdata/) and then refer to it in the tests. This will remove a huge amount of code and should also make it easier to understand what exactly the contents of this tree are. For example then I can use other system Linux tools to explore the directory and figure out what I'd expect the tests to do. When test data is very small and contained, it makes sense to just create it while the test is running. But the patch has > 120 LOC for that with functions calling other functions. For someone not intimately familiar with the tests, it's hard to follow which files get created and their contents. Other comments: * Don't use external functions with 'self' to serve essentially as methods. Test classes can derive from some common class that provides such functionality. [not sure this will be relevant after the above refactoring] * If you do pretty much the same thing for every tearDown, also consider refactoring it into a base class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 15:43:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Apr 2013 13:43:10 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365255790.4.0.40965600999.issue17643@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sounds fine to me. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 15:48:17 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 06 Apr 2013 13:48:17 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365256097.79.0.52287835609.issue17643@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Instead of a getset, I think you just use a read-only T_OBJECT member. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 16:36:35 2013 From: report at bugs.python.org (Berker Peksag) Date: Sat, 06 Apr 2013 14:36:35 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1365258995.26.0.745616433275.issue13477@psf.upfronthosting.co.za> Changes by Berker Peksag : Added file: http://bugs.python.org/file29686/issue13477_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 16:36:50 2013 From: report at bugs.python.org (Berker Peksag) Date: Sat, 06 Apr 2013 14:36:50 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1365259010.32.0.790127900575.issue13477@psf.upfronthosting.co.za> Changes by Berker Peksag : Removed file: http://bugs.python.org/file29311/issue13477_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 16:39:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Apr 2013 14:39:27 +0000 Subject: [issue15596] pickle: Faster serialization of Unicode strings In-Reply-To: <1344465522.38.0.375715302831.issue15596@psf.upfronthosting.co.za> Message-ID: <1365259167.2.0.212869960626.issue15596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Since protocol 0 is essentially dead in Python 3, I would like to propose something simpler and safer: only optimize the binary protocols. If noone beats me to it, I'll adapt Victor's patch for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 16:43:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Apr 2013 14:43:56 +0000 Subject: [issue17625] IDLE regression -- Search and Replace Window doesn't automatically clear In-Reply-To: <1364988444.15.0.220238239818.issue17625@psf.upfronthosting.co.za> Message-ID: <3Zjgd80cqvzSyT@mail.python.org> Roundup Robot added the comment: New changeset 13e5664c5d19 by Benjamin Peterson in branch '3.2': close search and replace dialog after it is used (closes #17625) http://hg.python.org/cpython/rev/13e5664c5d19 New changeset 7746d238c4bb by Benjamin Peterson in branch '3.3': close search and replace dialog after it is used (closes #17625) http://hg.python.org/cpython/rev/7746d238c4bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 16:43:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Apr 2013 14:43:57 +0000 Subject: [issue17538] Document XML Vulnerabilties In-Reply-To: <1364179286.95.0.543859032346.issue17538@psf.upfronthosting.co.za> Message-ID: <3Zjgd86jcwzT20@mail.python.org> Roundup Robot added the comment: New changeset f45902f8c7d7 by Christian Heimes in branch '3.2': Issue 17538: Document XML vulnerabilties http://hg.python.org/cpython/rev/f45902f8c7d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 16:43:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Apr 2013 14:43:59 +0000 Subject: [issue17550] --enable-profiling does nothing (shell syntax bug in configure.ac) In-Reply-To: <1364299936.4.0.197182554792.issue17550@psf.upfronthosting.co.za> Message-ID: <3Zjgd966fkz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 2ab2a09901f9 by Georg Brandl in branch '3.3': fix variable reference to fix --enable-profiling (closes #17550) http://hg.python.org/cpython/rev/2ab2a09901f9 ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 16:46:26 2013 From: report at bugs.python.org (Anton Poldnev) Date: Sat, 06 Apr 2013 14:46:26 +0000 Subject: [issue17644] str.format() crashes Message-ID: <1365259586.34.0.498934812452.issue17644@psf.upfronthosting.co.za> New submission from Anton Poldnev: Windows interpreter immediately crashes on this command: >>> "{[{}]}".format({"{}": 5}) ---------- messages: 186130 nosy: poldnev priority: normal severity: normal status: open title: str.format() crashes type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 16:50:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 06 Apr 2013 14:50:29 +0000 Subject: [issue17644] str.format() crashes In-Reply-To: <1365259586.34.0.498934812452.issue17644@psf.upfronthosting.co.za> Message-ID: <1365259829.84.0.246111008555.issue17644@psf.upfronthosting.co.za> Ezio Melotti added the comment: Confirmed on Linux too. This only affects 3.3+, on 2.7/3.2 it returns '5'. ---------- components: +Interpreter Core, Unicode nosy: +eric.smith, ezio.melotti, haypo, serhiy.storchaka priority: normal -> high stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 17:04:57 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Apr 2013 15:04:57 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365260697.57.0.555037069324.issue17643@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah yes; that's easier. New patch including doc updates. ---------- Added file: http://bugs.python.org/file29687/weakref___callback__2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 17:21:54 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Apr 2013 15:21:54 +0000 Subject: [issue17538] Document XML Vulnerabilties In-Reply-To: <1364179286.95.0.543859032346.issue17538@psf.upfronthosting.co.za> Message-ID: <1365261714.83.0.370857471872.issue17538@psf.upfronthosting.co.za> ?ric Araujo added the comment: Christian: there are people strongly disagreeing with the description of minidom as ?lightweight?, could you edit the libary/xml.rst file you added to say ?minimal? instead? See c2ae1ed03853 and #11379 if you want more info. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 17:32:49 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Apr 2013 15:32:49 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1365262369.39.0.69242669143.issue16804@psf.upfronthosting.co.za> ?ric Araujo added the comment: It seems to me that -m site is not a guaranteed API but just a way to inspect/debug your installation/environment, so I wouldn?t add tests that make it looks like behavior is more defined than ?print stuff about site dirs?. I?d commit this simple fix as is (but then again, I?m responsible for the breakage :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 17:37:03 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 06 Apr 2013 15:37:03 +0000 Subject: [issue17645] assert fails in _Py_Mangle Message-ID: <1365262623.27.0.317962100513.issue17645@psf.upfronthosting.co.za> New submission from Armin Rigo: Run this example on a 32-bit machine with more than 2GB of addressable RAM (e.g. by default, more or less anything but Windows). On Python 2.7 it raises "SystemError: Negative size passed to PyString_FromStringAndSize". On a debug version, it causes an assert in _Py_Mangle() to trigger. ---------- files: mem2.py messages: 186135 nosy: arigo priority: normal severity: normal status: open title: assert fails in _Py_Mangle versions: Python 2.7 Added file: http://bugs.python.org/file29688/mem2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 17:38:41 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 06 Apr 2013 15:38:41 +0000 Subject: [issue17645] assert fails in _Py_Mangle In-Reply-To: <1365262623.27.0.317962100513.issue17645@psf.upfronthosting.co.za> Message-ID: <1365262721.99.0.452667198124.issue17645@psf.upfronthosting.co.za> Changes by Armin Rigo : ---------- components: +Interpreter Core type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 17:44:38 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 06 Apr 2013 15:44:38 +0000 Subject: [issue17645] assert fails in _Py_Mangle In-Reply-To: <1365262623.27.0.317962100513.issue17645@psf.upfronthosting.co.za> Message-ID: <1365263078.12.0.371001504913.issue17645@psf.upfronthosting.co.za> Armin Rigo added the comment: Modified the example to run in only 1+GB of RAM, so that it crashes also on 32-bit versions of the Python 2.7 interpreter in Windows (the most common around, I suppose). ---------- Added file: http://bugs.python.org/file29689/mem2x.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 18:41:06 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 06 Apr 2013 16:41:06 +0000 Subject: [issue17638] test_ssl failure In-Reply-To: <1365147880.88.0.698550208243.issue17638@psf.upfronthosting.co.za> Message-ID: <1365266466.3.0.947105247635.issue17638@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > I don't know how to handle this in a non-hackish way, except by just ignoring the issue :-) Sound fine to me :) ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 18:45:52 2013 From: report at bugs.python.org (Roger Serwy) Date: Sat, 06 Apr 2013 16:45:52 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1365266752.12.0.553541502546.issue17642@psf.upfronthosting.co.za> Roger Serwy added the comment: IdleX provides this with the ZoomFont.py extension. (See http://idlex.sourceforge.net/extensions.html#Misc) It is useful for showing code on a projector so that students can easily read the screen. The implementation in ZoomFont.py does not change the font size found in IDLE's configuration. Instead it queries the font size in the text widget and scales accordingly with a relative offset. IDLE needs a better way to broadcast font configuration changes. Right now, the Code Context extension uses polling every second to check for font changes. I bring this point up because properly incorporating font zooming may require refactoring some code. Incorporating Line Numbers, from #17535 would likely need to rely on this font size broadcasting as well. ---------- nosy: +roger.serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 18:48:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Apr 2013 16:48:13 +0000 Subject: [issue15596] pickle: Faster serialization of Unicode strings In-Reply-To: <1344465522.38.0.375715302831.issue15596@psf.upfronthosting.co.za> Message-ID: <1365266893.23.0.518953517646.issue15596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a new patch. Benchmark: ### fastpickle ### Min: 0.631457 -> 0.399104: 1.58x faster Avg: 0.631868 -> 0.399519: 1.58x faster Significant (t=701.85) Stddev: 0.00037 -> 0.00064: 1.7604x larger Timeline: http://tinyurl.com/c6n8h5g ---------- Added file: http://bugs.python.org/file29690/pickleutf8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 18:49:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Apr 2013 16:49:43 +0000 Subject: [issue15596] pickle: Faster serialization of Unicode strings In-Reply-To: <1344465522.38.0.375715302831.issue15596@psf.upfronthosting.co.za> Message-ID: <1365266983.4.0.00392119070713.issue15596@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 19:12:48 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 06 Apr 2013 17:12:48 +0000 Subject: [issue17644] str.format() crashes In-Reply-To: <1365259586.34.0.498934812452.issue17644@psf.upfronthosting.co.za> Message-ID: <1365268368.83.0.520863937175.issue17644@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here is a patch, which fixes the issue. This brings up rather subtle issues. For example you can have "{[{}]}" but not "{[{]}" as a format string. I wonder if having braces in the field name at all should be an error. ---------- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file29691/fix_format_spec.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 19:22:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Apr 2013 17:22:39 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1365268959.78.0.0578222180346.issue14010@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > - The tests with "range(1000000)" seems to duplicate those with recursion limit. Oh, I forgot to remove old tests when had moved them to special test class. > - zip_iter should would be simpler with a "goto error;" Indeed. Thank you. ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 19:23:44 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 06 Apr 2013 17:23:44 +0000 Subject: [issue17646] traceback.py has a lot of code duplication Message-ID: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> New submission from Martin Morrison: traceback.py contains a lot of code duplication, which makes it fragile in the face of changes (i.e. special cases) to the stack/traceback output (I am separately working on just such a change). The attached patch refactors the code to reduce to a single function for each bit of logic, wrapped by the various existing APIs. The new helper functions are refactored as generators so as not to create unnecessary transient lists (not that stacks usually get very big anyway). I've fully tested the replacement module, and it passes all the traceback tests in the standard suite. ---------- components: Library (Lib) files: traceback.diff keywords: patch messages: 186142 nosy: isoschiz priority: normal severity: normal status: open title: traceback.py has a lot of code duplication type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29692/traceback.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 20:14:30 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 06 Apr 2013 18:14:30 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1365272070.51.0.666109066779.issue17646@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 20:21:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Apr 2013 18:21:30 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <3ZjmS92FM9zPs8@mail.python.org> Roundup Robot added the comment: New changeset aaaf36026511 by Serhiy Storchaka in branch '3.3': Issue #14010: Fix a crash when iterating or deleting deeply nested filters http://hg.python.org/cpython/rev/aaaf36026511 New changeset 846bd418aee5 by Serhiy Storchaka in branch 'default': Issue #14010: Fix a crash when iterating or deleting deeply nested filters http://hg.python.org/cpython/rev/846bd418aee5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 20:56:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Apr 2013 18:56:39 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1365274599.32.0.284696023069.issue14010@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This patch didn't have my sign-off. Applying it was premature. It is a somewhat heavy handed fix that slows all the common cases at the expense of an exotic case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:04:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Apr 2013 19:04:58 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <3ZjnQK5Q6YzM1X@mail.python.org> Roundup Robot added the comment: New changeset d17d10c84d27 by Serhiy Storchaka in branch '2.7': Issue #14010: Fix a crash when iterating or deleting deeply nested filters http://hg.python.org/cpython/rev/d17d10c84d27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:07:15 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 06 Apr 2013 19:07:15 +0000 Subject: [issue17644] str.format() crashes In-Reply-To: <1365259586.34.0.498934812452.issue17644@psf.upfronthosting.co.za> Message-ID: <1365275235.39.0.0958725615227.issue17644@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a more comprehensive patch. It follows the PEP by allowing "{" and "}" inside "[]" in the field name. ---------- Added file: http://bugs.python.org/file29693/fix_format_spec.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:09:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Apr 2013 19:09:39 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1365275379.23.0.0907652261532.issue14010@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, shame on me. Do I have to immediately revert patches or wait for your post-commit review? ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:14:46 2013 From: report at bugs.python.org (Thomas Kluyver) Date: Sat, 06 Apr 2013 19:14:46 +0000 Subject: [issue11816] Refactor the dis module to provide better building blocks for bytecode analysis In-Reply-To: <1302394810.0.0.38146154248.issue11816@psf.upfronthosting.co.za> Message-ID: <1365275686.51.0.166875959213.issue11816@psf.upfronthosting.co.za> Thomas Kluyver added the comment: I've added docs and tests, and split the changes to test_peepholer into a separate patch. I haven't re-exposed details of the code object as attributes of Bytecode instances, because they're already available as e.g. bytecode.codeobj.co_names . I think it would be more confusing than useful to offer the same values in two places, though I'm open to discussion on this. I've re-organised the dis module docs a bit. I've put Bytecode at the top, as I think it's a more intuitive API than the functions, which have somewhat counter-intuitive names due to the module's history. ---------- Added file: http://bugs.python.org/file29694/dis_api3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:15:32 2013 From: report at bugs.python.org (Thomas Kluyver) Date: Sat, 06 Apr 2013 19:15:32 +0000 Subject: [issue11816] Refactor the dis module to provide better building blocks for bytecode analysis In-Reply-To: <1302394810.0.0.38146154248.issue11816@psf.upfronthosting.co.za> Message-ID: <1365275732.34.0.44256607039.issue11816@psf.upfronthosting.co.za> Changes by Thomas Kluyver : Added file: http://bugs.python.org/file29695/test_peepholer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:24:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Apr 2013 19:24:38 +0000 Subject: [issue17645] assert fails in _Py_Mangle In-Reply-To: <1365262623.27.0.317962100513.issue17645@psf.upfronthosting.co.za> Message-ID: <3Zjns13b72zQJx@mail.python.org> Roundup Robot added the comment: New changeset 72f0fd0c4d90 by Antoine Pitrou in branch '3.3': Issue #17645: convert an assert() into a proper exception in _Py_Mangle(). http://hg.python.org/cpython/rev/72f0fd0c4d90 New changeset 6e7c6c06f3ba by Antoine Pitrou in branch 'default': Issue #17645: convert an assert() into a proper exception in _Py_Mangle(). http://hg.python.org/cpython/rev/6e7c6c06f3ba New changeset 0e0a3df5b08d by Antoine Pitrou in branch '2.7': Issue #17645: convert an assert() into a proper exception in _Py_Mangle(). http://hg.python.org/cpython/rev/0e0a3df5b08d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:25:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Apr 2013 19:25:38 +0000 Subject: [issue17645] assert fails in _Py_Mangle In-Reply-To: <1365262623.27.0.317962100513.issue17645@psf.upfronthosting.co.za> Message-ID: <1365276338.28.0.332982593129.issue17645@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This should be fixed now, thank you! ---------- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:27:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Apr 2013 19:27:12 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365276432.22.0.806515358067.issue17643@psf.upfronthosting.co.za> Antoine Pitrou added the comment: "del x" will not be enough on non-refcounted implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:27:42 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 06 Apr 2013 19:27:42 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1365276462.19.0.290062507379.issue17646@psf.upfronthosting.co.za> Benjamin Peterson added the comment: How much does this overlap with #17491? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:31:09 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Apr 2013 19:31:09 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1365276669.14.0.024173901512.issue14010@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would appreciate it if you would please revert this patch. We need to search for a solution that isn't as fine grained (i.e. not doing increments, decrements, and tests on every single call to iter_next). Ideally, the checks can be confined to the iterator constructor and to dealloc. Or you could try to create some general purpose stack overflow protection that periodically makes sure there is enough stack remaining for C Python to function correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:31:19 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Apr 2013 19:31:19 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365276679.58.0.176239194166.issue17643@psf.upfronthosting.co.za> Mark Dickinson added the comment: True: I'm not sure what to do about that---there are other tests in that test module that also rely on del resulting in immediate cleanup. I'm not sure what other implementations are currently doing with this test module. I could mark the new test as cpython only, or add a gc.collect (but I'm not sure if the latter is enough, either). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:31:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Apr 2013 19:31:53 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365276713.34.0.352244210838.issue17643@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, then we can probably keep using the same style. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:42:47 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 06 Apr 2013 19:42:47 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1365277367.76.0.0186557585596.issue14010@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Or you could try to create some general purpose stack overflow > protection that periodically makes sure there is enough stack remaining > for C Python to function correctly. Isn't it exactly what Py_EnterRecursiveCall does? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:43:38 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 06 Apr 2013 19:43:38 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1365277367.76.0.0186557585596.issue14010@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: It has no notion of how big the C stack is. 2013/4/6 Amaury Forgeot d'Arc : > > Amaury Forgeot d'Arc added the comment: > >> Or you could try to create some general purpose stack overflow >> protection that periodically makes sure there is enough stack remaining >> for C Python to function correctly. > > Isn't it exactly what Py_EnterRecursiveCall does? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:54:30 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Apr 2013 19:54:30 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1365278070.17.0.719015007473.issue14010@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Isn't it exactly what Py_EnterRecursiveCall does? No, it isn't. Py_EnterRecursiveCall() counts calls and measures depth. It is sprinked all over the source code, everywhere a potentially recursive call could be made. Instead, it would be nice if the interpreter could monitor the actual stack size and take appropriate actions when it is running low on space. The would save us from putting in expensive fine grained checks throughout the source code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 21:58:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Apr 2013 19:58:41 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <3ZjpcJ59pgzQ7C@mail.python.org> Roundup Robot added the comment: New changeset e07e6d828150 by Serhiy Storchaka in branch '2.7': Revert a premature patch for issue #14010 (changeset d17d10c84d27). http://hg.python.org/cpython/rev/e07e6d828150 New changeset 7b75f0bd9a5e by Serhiy Storchaka in branch '3.3': Revert a premature patch for issue #14010 (changeset aaaf36026511). http://hg.python.org/cpython/rev/7b75f0bd9a5e New changeset 504eed5a82a3 by Serhiy Storchaka in branch 'default': Revert a premature patch for issue #14010 (changeset 846bd418aee5). http://hg.python.org/cpython/rev/504eed5a82a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:02:39 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Apr 2013 20:02:39 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1365278559.36.0.863333403552.issue17343@psf.upfronthosting.co.za> Raymond Hettinger added the comment: If someone wants whip-up a patch for str.iter_index(), I would be happy to review it. Be sure to add a test case to make sure that the results are non-overlapping: list('aaaa'.iter_index('aa')) == [0, 2] ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:03:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Apr 2013 20:03:42 +0000 Subject: [issue14010] deeply nested filter segfaults In-Reply-To: <1329235106.54.0.737183388066.issue14010@psf.upfronthosting.co.za> Message-ID: <1365278622.34.0.314481195046.issue14010@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I apologize for my negligence. ---------- stage: commit review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:03:52 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Apr 2013 20:03:52 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1365278632.54.0.764663877747.issue2771@psf.upfronthosting.co.za> Mark Dickinson added the comment: msg137617 message 137617 message #137617 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:04:20 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Apr 2013 20:04:20 +0000 Subject: [issue17644] str.format() crashes In-Reply-To: <1365259586.34.0.498934812452.issue17644@psf.upfronthosting.co.za> Message-ID: <1365278660.14.0.042347360501.issue17644@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I wonder if having braces in the field name at all should be an error. There's some discussion of this in issue #12014; e.g. msg137617. I'm not sure what conclusion was reached. Eric? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:37:56 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 06 Apr 2013 20:37:56 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1365280676.38.0.0929873124396.issue17633@psf.upfronthosting.co.za> Changes by Phil Connell : Removed file: http://bugs.python.org/file29679/zipimport_ns.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:39:03 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 06 Apr 2013 20:39:03 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1365280743.06.0.226318236773.issue17633@psf.upfronthosting.co.za> Changes by Phil Connell : Added file: http://bugs.python.org/file29679/zipimport_ns.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:40:40 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 06 Apr 2013 20:40:40 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1365280840.94.0.603873994212.issue17633@psf.upfronthosting.co.za> Phil Connell added the comment: Here's a test that fails without the patch and succeeds with the patch. ---------- Added file: http://bugs.python.org/file29696/test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:50:04 2013 From: report at bugs.python.org (Kristian) Date: Sat, 06 Apr 2013 20:50:04 +0000 Subject: [issue17135] imp doc should direct to importlib In-Reply-To: <1360080581.61.0.501686856177.issue17135@psf.upfronthosting.co.za> Message-ID: <1365281404.7.0.016500165375.issue17135@psf.upfronthosting.co.za> Kristian added the comment: Here is the patch for this bug... Enjoy! I would be happy to work on this further if there are any problems or questions! Thanks! ---------- keywords: +patch nosy: +ktran13 Added file: http://bugs.python.org/file29697/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 22:56:24 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 06 Apr 2013 20:56:24 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1365281784.97.0.35252982396.issue17646@psf.upfronthosting.co.za> Martin Morrison added the comment: I hadn't spotted that one! My refactor goes further (consolidates all duplicates, not just the tb ones), is implemented the way you suggested therein (print in terms of extract), and is "more efficient" in that it uses generators for all intermediate iterators. However, I'm happy to either attach my diff to that issue, refactor mine in terms of that one, or whatever you think is best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 23:17:30 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 06 Apr 2013 21:17:30 +0000 Subject: [issue12820] Tests for Lib/xml/dom/minicompat.py In-Reply-To: <1314071659.09.0.625804560965.issue12820@psf.upfronthosting.co.za> Message-ID: <1365283050.34.0.110933622669.issue12820@psf.upfronthosting.co.za> Phil Connell added the comment: I happened to spot this issue languishing, and the markups looked pretty straightforward, so I just went ahead and did them. Updated patch attached. ---------- nosy: +pconnell Added file: http://bugs.python.org/file29698/minicompat_tests_markedup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 6 23:19:39 2013 From: report at bugs.python.org (Caitlin Potter) Date: Sat, 06 Apr 2013 21:19:39 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows Message-ID: <1365283179.61.0.145925901601.issue17647@psf.upfronthosting.co.za> New submission from Caitlin Potter: In migrating from GNU autoconf/automake build systems to a python-based build system (Waf), I've been slightly annoyed that coloured text output from unit test programs is lost on the windows platform (the gtest framework uses ::SetConsoleTextAttribute on windows) Ideally, the coloured output from the test sets would be preserved so that problems could be easily identified and stand out (See attached image for demonstration of problem) This might be scoffed at as a minor problem because nobody uses SetConsoleTextAttribute anyways, and even if they do it would only affect the windows platform. But just the same, preserving coloured output on windows should be doable. I'd be happy to work on a patch for this myself, but I'm new to the python tree and am not completely sure where to find what I'm looking for. I think an if mswindows: clause wherever stdout.read() is would probably work, but I'm not sure where that would be. ---------- components: IO, Windows files: unit-tests.png messages: 186168 nosy: Caitlin.Potter priority: normal severity: normal status: open title: subprocess.communicate() should preserve colored output on Windows type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file29699/unit-tests.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 00:59:46 2013 From: report at bugs.python.org (Roy Smith) Date: Sat, 06 Apr 2013 22:59:46 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365289186.71.0.997584343328.issue17629@psf.upfronthosting.co.za> Roy Smith added the comment: I'm the guy who was searching for astral characters in msg18597. I should mention that while what I did was certainly inefficient, the database was so much slower that it didn't have any observable impact on the overall process time (a bit over 2 days to insert approximately 200 million rows) I see this has already been closed, but figured I should record my observation for the historical record. ---------- nosy: +roysmith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 01:01:18 2013 From: report at bugs.python.org (Roy Smith) Date: Sat, 06 Apr 2013 23:01:18 +0000 Subject: [issue17629] Expose string width to Python In-Reply-To: <1365026071.28.0.865581650366.issue17629@psf.upfronthosting.co.za> Message-ID: <1365289278.65.0.407360693981.issue17629@psf.upfronthosting.co.za> Roy Smith added the comment: Um, make that msg185972. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 01:18:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 06 Apr 2013 23:18:07 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1365290287.26.0.562898827584.issue17620@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: pitrou -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 01:45:16 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 06 Apr 2013 23:45:16 +0000 Subject: [issue17648] test_urllib2 convert doctests to unittest Message-ID: <1365291914.89.0.625576108544.issue17648@psf.upfronthosting.co.za> New submission from Senthil Kumaran: Sometime back during an IRC conversation we realized that converting test_urllib2 doctests to proper unittest may help in various ways. a) Improve coverage report (?) Know what is covered and not. b) Helps expand it further when new features are added. Here is patch which removes the old doctests and converts them to unittest. Reviews will be helpful. ---------- assignee: orsenthil files: remove_doctests.patch keywords: patch messages: 186171 nosy: eric.araujo, ezio.melotti, orsenthil, r.david.murray priority: normal severity: normal status: open title: test_urllib2 convert doctests to unittest versions: Python 3.4 Added file: http://bugs.python.org/file29700/remove_doctests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 03:25:12 2013 From: report at bugs.python.org (Julian Berman) Date: Sun, 07 Apr 2013 01:25:12 +0000 Subject: [issue15351] Add to unittest.TestCase support for using context managers In-Reply-To: <1342280032.27.0.345733068822.issue15351@psf.upfronthosting.co.za> Message-ID: <1365297912.53.0.860016542609.issue15351@psf.upfronthosting.co.za> Julian Berman added the comment: Now that we have contextlib.ExitStack, I think we should consider that here. I.e., I think ExitStack deserves a method that calls its __enter__ and __exit__, say .enter() and .exit(), and then the idiom for this wouldn't require anything on TestCase, it'd be: class TestStuff(TestCase): def setUp(self): self.stack = ExitStack() self.stack.enter_context(my_context_manager()) self.stack.enter_context(my_context_manager2()) self.stack.enter_context(my_context_manager3()) self.stack.enter() self.addCleanup(self.stack.exit) ---------- nosy: +Julian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 03:31:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Apr 2013 01:31:59 +0000 Subject: [issue16887] IDLE - tabify/untabify applied when clicking Cancel In-Reply-To: <1357592262.2.0.644397432764.issue16887@psf.upfronthosting.co.za> Message-ID: <3Zjy0q24gZzRZ5@mail.python.org> Roundup Robot added the comment: New changeset d7aa625147f7 by Roger Serwy in branch '2.7': #16887: IDLE now accepts Cancel in tabify/untabify dialog box. http://hg.python.org/cpython/rev/d7aa625147f7 New changeset 5451b82104f3 by Roger Serwy in branch '3.3': #16887: IDLE now accepts Cancel in tabify/untabify dialog box. http://hg.python.org/cpython/rev/5451b82104f3 New changeset 54f6d8c4dfaf by Roger Serwy in branch 'default': #16887: merge with 3.3. http://hg.python.org/cpython/rev/54f6d8c4dfaf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 03:33:08 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 07 Apr 2013 01:33:08 +0000 Subject: [issue16887] IDLE - tabify/untabify applied when clicking Cancel In-Reply-To: <1357592262.2.0.644397432764.issue16887@psf.upfronthosting.co.za> Message-ID: <1365298388.94.0.72873936753.issue16887@psf.upfronthosting.co.za> Roger Serwy added the comment: Closing the issue as fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 03:36:20 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 07 Apr 2013 01:36:20 +0000 Subject: [issue17238] IDLE: Enhance import statement completion In-Reply-To: <1361287971.25.0.643782901011.issue17238@psf.upfronthosting.co.za> Message-ID: <1365298580.43.0.554206280209.issue17238@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- nosy: +roger.serwy title: Enhance import statement completion -> IDLE: Enhance import statement completion _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 03:43:02 2013 From: report at bugs.python.org (Zbigniew Halas) Date: Sun, 07 Apr 2013 01:43:02 +0000 Subject: [issue17610] Qsort function misuse in typeobject.c In-Reply-To: <1364820542.51.0.192116883803.issue17610@psf.upfronthosting.co.za> Message-ID: <1365298982.96.0.334847452197.issue17610@psf.upfronthosting.co.za> Zbigniew Halas added the comment: Thank you for the fix, attaching a patch for 2.7. ---------- keywords: +patch Added file: http://bugs.python.org/file29701/python_2.7_fix_slot_sorting_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 03:46:48 2013 From: report at bugs.python.org (pfg) Date: Sun, 07 Apr 2013 01:46:48 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory Message-ID: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> New submission from pfg: This happens when I run configure for python 2.7.2 on FreeBSD ... cc -c -fno-strict-aliasing -O2 -fno-strict-aliasing -pipe -march=nocona -DNDEBUG -O2 -fno-strict-aliasing -pipe -march=nocona -I. -IInclude -I./../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 /usr/ports/lang/python27/work/Python-2.7.4/portbld.shared. ---------- messages: 186176 nosy: pfg priority: normal severity: normal status: open title: Python/Python-ast.c: No such file or directory type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 06:27:25 2013 From: report at bugs.python.org (Kyle Roberts) Date: Sun, 07 Apr 2013 04:27:25 +0000 Subject: [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1365308845.08.0.832474852428.issue15984@psf.upfronthosting.co.za> Kyle Roberts added the comment: I made a change to the documentation to reflect PyUnicode_FromObject()'s change in implementation details. Let me know if the wording is off or more information is needed. Thanks! ---------- keywords: +patch nosy: +kyle.roberts Added file: http://bugs.python.org/file29702/from_object.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 08:31:09 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 07 Apr 2013 06:31:09 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365316269.64.0.689785998013.issue17649@psf.upfronthosting.co.za> Ramchandra Apte added the comment: if the Python/Python-ast.c file does not exist in the Python source directory, try re-extracting it (if the file still doesn't exist then you probably have a corrupt compressed file) ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 09:05:39 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Apr 2013 07:05:39 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365318339.19.0.176611449832.issue17649@psf.upfronthosting.co.za> Ned Deily added the comment: Python-ast.c is a generated file. As released, a Python source tarball should contain an up-to-date version that does not need to be regenerated. However, if the timestamps of the source files are not preserved, the Makefile may think it is out of date and try to regenerate it. The regeneration step requires a working Python compiler so you may run into a bootstrap issue if there is none on the system. If you obtain the source using a Mercurial checkout, hg does not attempt to set timestamps on the source files so you are even more likely to run into problems in that case. Usually, the solution is to do a clean checkout or tarball extraction, then manually "touch" the files that Python-ast.c is built from: touch Include/Python-ast.h Python/Python-ast.c The newly-released Python 2.7.4 includes a "make touch" target in the Python Makefile just for this purpose, see Issue16004 and a number of other changes to help make this area more robust, for example, when building with a BUILDIR separate from SRCDIR. ---------- nosy: +ned.deily resolution: -> out of date stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 09:10:20 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Apr 2013 07:10:20 +0000 Subject: [issue17585] IDLE - regression with exit() and quit() In-Reply-To: <1364715900.07.0.37447718586.issue17585@psf.upfronthosting.co.za> Message-ID: <1365318620.18.0.273614225502.issue17585@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 09:23:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 07:23:22 +0000 Subject: [issue6649] idlelib/rpc.py missing exit status on exithook In-Reply-To: <1249489269.49.0.307291234061.issue6649@psf.upfronthosting.co.za> Message-ID: <1365319402.01.0.0248016285945.issue6649@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Congratulation with your first CPython commit, Roger! ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 09:30:10 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Apr 2013 07:30:10 +0000 Subject: [issue17626] set's __isub__ doesn't support non-sets. In-Reply-To: <1365010498.59.0.57626371366.issue17626@psf.upfronthosting.co.za> Message-ID: <1365319810.12.0.110305298364.issue17626@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Intentional and documented. "5.7. Set Types ? set, frozenset ... Note, the non-operator versions of union(), intersection(), difference(), and symmetric_difference(), issubset(), and issuperset() methods will accept any iterable as an argument. In contrast, their operator based counterparts require their arguments to be sets. ..." ---------- nosy: +terry.reedy resolution: -> invalid status: pending -> closed versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 09:46:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 07:46:02 +0000 Subject: [issue17585] IDLE - regression with exit() and quit() In-Reply-To: <1364715900.07.0.37447718586.issue17585@psf.upfronthosting.co.za> Message-ID: <1365320762.9.0.202176902289.issue17585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps PseudoInputFile.close() should call super().close() to set closed flag. Perhaps close() should be even implemented in PseudoFile. It's my fault in this regression. I deliberately have not implemented PseudoFile.close(), because I saw no sense in deliberate calling of sys.std*.close() and considered closing the window with unpremeditated closing of the standard stream is too dangerous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 10:24:16 2013 From: report at bugs.python.org (Armin Rigo) Date: Sun, 07 Apr 2013 08:24:16 +0000 Subject: [issue17645] assert fails in _Py_Mangle In-Reply-To: <1365262623.27.0.317962100513.issue17645@psf.upfronthosting.co.za> Message-ID: <1365323056.56.0.533820716714.issue17645@psf.upfronthosting.co.za> Armin Rigo added the comment: You may want to add a test. This might help notice that comparing an integer of type Py_ssize_t to check if it's greater than PY_SSIZE_T_MAX is bogus in C :-( ---------- resolution: fixed -> stage: committed/rejected -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 11:14:44 2013 From: report at bugs.python.org (Volodymyr Bezkostnyy) Date: Sun, 07 Apr 2013 09:14:44 +0000 Subject: [issue17570] Improve devguide Windows instructions In-Reply-To: <1364523214.84.0.368819983889.issue17570@psf.upfronthosting.co.za> Message-ID: <1365326084.59.0.553052559998.issue17570@psf.upfronthosting.co.za> Volodymyr Bezkostnyy added the comment: Deleted ./ before python.exe ---------- keywords: +patch nosy: +asvetlov, webwin Added file: http://bugs.python.org/file29703/issue17570.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:08:13 2013 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDRltC5INCi0LjRhdC+0L3QvtCy?=) Date: Sun, 07 Apr 2013 10:08:13 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS Message-ID: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> New submission from ?????? ???????: I found errno.EROFS in Lib/mailbox.py but didn't find exception correspond to this errno. Is it need to be created? ---------- messages: 186185 nosy: pitrou, ??????.??????? priority: normal severity: normal status: open title: There is no exception correspond to errno EROFS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:09:52 2013 From: report at bugs.python.org (Kostyantyn Leschenko) Date: Sun, 07 Apr 2013 10:09:52 +0000 Subject: [issue13249] argparse.ArgumentParser() lists arguments in the wrong order In-Reply-To: <1319394759.74.0.692830705102.issue13249@psf.upfronthosting.co.za> Message-ID: <1365329391.98.0.831820676077.issue13249@psf.upfronthosting.co.za> Kostyantyn Leschenko added the comment: I've updated patch to work with current trunk. ---------- nosy: +Kostyantyn.Leschenko, asvetlov versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file29704/Issue13249-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:11:54 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Apr 2013 10:11:54 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1360858057.09.0.617835061471.issue17206@psf.upfronthosting.co.za> Message-ID: <1365329514.93.0.633970274047.issue17206@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:30:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Apr 2013 10:30:50 +0000 Subject: [issue17645] assert fails in _Py_Mangle In-Reply-To: <1365262623.27.0.317962100513.issue17645@psf.upfronthosting.co.za> Message-ID: <1365330649.99.0.461267339242.issue17645@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The crash is very obscure, I don't think we want to bother with a unit test for that (it took 14 seconds to crash or pass here). > This might help notice that comparing an integer of type Py_ssize_t to > check if it's greater than PY_SSIZE_T_MAX is bogus in C The variables are of type size_t, not Py_ssize_t (which explains why the comparison works). ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:41:06 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Apr 2013 10:41:06 +0000 Subject: [issue1521051] Allow passing DocTestRunner and DocTestCase in doctest Message-ID: <1365331266.84.0.985822461531.issue1521051@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:41:23 2013 From: report at bugs.python.org (Volodymyr Antonevych) Date: Sun, 07 Apr 2013 10:41:23 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1365331283.03.0.793560731528.issue2756@psf.upfronthosting.co.za> Volodymyr Antonevych added the comment: Test urllib2 file ---------- nosy: +volodyaa Added file: http://bugs.python.org/file29705/1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:45:17 2013 From: report at bugs.python.org (Volodymyr Antonevych) Date: Sun, 07 Apr 2013 10:45:17 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1365331517.29.0.608444992741.issue2756@psf.upfronthosting.co.za> Volodymyr Antonevych added the comment: Test HTTP server ---------- Added file: http://bugs.python.org/file29706/s.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:46:01 2013 From: report at bugs.python.org (Volodymyr Bezkostnyy) Date: Sun, 07 Apr 2013 10:46:01 +0000 Subject: [issue6640] urlparse should parse mailto: URL headers as query parameters In-Reply-To: <1249346554.96.0.279967945769.issue6640@psf.upfronthosting.co.za> Message-ID: <1365331561.89.0.0878516078022.issue6640@psf.upfronthosting.co.za> Volodymyr Bezkostnyy added the comment: Tested on 3.4 urllib.parse.urlparse("mailto:foo at example.com?subject=hi") ParseResult(scheme='mailto', netloc='', path='foo at example.com', params='', query='subject=hi', fragment='') Work as expected. ---------- nosy: +asvetlov, webwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 12:54:16 2013 From: report at bugs.python.org (Volodymyr Antonevych) Date: Sun, 07 Apr 2013 10:54:16 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1365332056.82.0.560733757399.issue2756@psf.upfronthosting.co.za> Volodymyr Antonevych added the comment: Tested on 2.7. The same bug exists: 127.0.0.1 - - [07/Apr/2013 13:17:39] "POST / HTTP/1.1" 200 - ('content-length', '11') ('accept-encoding', 'identity') ('connection', 'close') ('user-agent', 'Python-urllib/2.7') ('host', '127.0.0.1:8000') ('content-type', 'application/x-www-form-urlencoded') Also, the workaround exists for that issue: instead of using request.add_header have to use request.add_unredirected_header for the second call. BTW, the same issue with 'Content-length' header. If use request.add_data the second time when the content length value leaves the same as for first request. See steps to reproduce in attachments. ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file29707/2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 13:00:51 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 07 Apr 2013 11:00:51 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1365332451.69.0.0202111929726.issue17343@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm guessing Terry wanted to say "os.listdir" instead of "os.walk". ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 13:04:00 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 07 Apr 2013 11:04:00 +0000 Subject: [issue17610] Qsort function misuse in typeobject.c In-Reply-To: <1364820542.51.0.192116883803.issue17610@psf.upfronthosting.co.za> Message-ID: <1365332640.47.0.97396024302.issue17610@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 13:06:26 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 07 Apr 2013 11:06:26 +0000 Subject: [issue17570] Improve devguide Windows instructions In-Reply-To: <1364523214.84.0.368819983889.issue17570@psf.upfronthosting.co.za> Message-ID: <1365332786.72.0.964345673453.issue17570@psf.upfronthosting.co.za> Georg Brandl added the comment: At least two of the changes in the patch are incorrect because they refer to the Mac OS X "python.exe". ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 13:09:35 2013 From: report at bugs.python.org (Evgen Koval) Date: Sun, 07 Apr 2013 11:09:35 +0000 Subject: [issue16658] Missing "return" in HTTPConnection.send() In-Reply-To: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> Message-ID: <1365332975.61.0.345467052917.issue16658@psf.upfronthosting.co.za> Evgen Koval added the comment: I reviewed and verified this patch, and it looks correct to me. ---------- nosy: +Evgen.Koval, asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 13:37:12 2013 From: report at bugs.python.org (Evgen Koval) Date: Sun, 07 Apr 2013 11:37:12 +0000 Subject: [issue900112] cgi.fieldStorage doesn't grok standards env. variables Message-ID: <1365334632.18.0.150837411093.issue900112@psf.upfronthosting.co.za> Evgen Koval added the comment: Patch for 3.3 is uploaded. ---------- nosy: +Evgen.Koval, asvetlov Added file: http://bugs.python.org/file29708/issue900112.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 13:49:25 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Apr 2013 11:49:25 +0000 Subject: [issue13249] argparse.ArgumentParser() lists arguments in the wrong order In-Reply-To: <1319394759.74.0.692830705102.issue13249@psf.upfronthosting.co.za> Message-ID: <1365335365.67.0.0495187607416.issue13249@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in 4712f9f8a90d, 5e5081cdc086, e4beda7cca2f. Thanks. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 13:58:17 2013 From: report at bugs.python.org (Yuriy Senko) Date: Sun, 07 Apr 2013 11:58:17 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1365335897.62.0.705380371474.issue13355@psf.upfronthosting.co.za> Yuriy Senko added the comment: Added validation of input data. Check whether low <= mode <= high. If low == high return low as a result. ---------- nosy: +Chaka_bum, asvetlov Added file: http://bugs.python.org/file29709/issue_13355.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 14:20:41 2013 From: report at bugs.python.org (Volodymyr Bezkostnyy) Date: Sun, 07 Apr 2013 12:20:41 +0000 Subject: [issue17570] Improve devguide Windows instructions In-Reply-To: <1364523214.84.0.368819983889.issue17570@psf.upfronthosting.co.za> Message-ID: <1365337241.75.0.384046373713.issue17570@psf.upfronthosting.co.za> Volodymyr Bezkostnyy added the comment: Revert changes for Mac OS X ---------- Added file: http://bugs.python.org/file29710/issue17570.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 14:31:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 12:31:09 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1365337869.29.0.836983806906.issue17221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Terry. Here is a new version of a patch for 3.4. New entries move, IDLE section resorted in a chronological order, duplicates removed, some minor things fixed. ---------- Added file: http://bugs.python.org/file29711/NEWS-3.4_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 14:32:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 12:32:30 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1365337950.7.0.41025525222.issue17221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And here is a patch for 3.3. ---------- Added file: http://bugs.python.org/file29712/NEWS-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 14:33:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 12:33:46 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1365338026.72.0.936317992455.issue17221@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 14:45:52 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 07 Apr 2013 12:45:52 +0000 Subject: [issue16895] Batch file to mimic 'make' on Windows In-Reply-To: <1357677821.21.0.151237367429.issue16895@psf.upfronthosting.co.za> Message-ID: <1365338752.27.0.647172851636.issue16895@psf.upfronthosting.co.za> Richard Oudkerk added the comment: You seem to end your subroutines (or whatever they are called) using "goto end" rather than "exit /b". Since popd follows the "end" label, does this mean that you get a popd after calling each subroutine? Is this intended and can it cause unmatched pushd/popd-s? (I am not familiar with writing batch files.) Also, I think 32 bit builds should be the default. Many people with 64 bit Windows are using Visual Studio Express which only has 32 bit support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 14:46:44 2013 From: report at bugs.python.org (Yuriy Senko) Date: Sun, 07 Apr 2013 12:46:44 +0000 Subject: [issue17502] unittest.mock: side_effect iterators ignore DEFAULT In-Reply-To: <1363835140.97.0.987850111396.issue17502@psf.upfronthosting.co.za> Message-ID: <1365338804.74.0.664686503873.issue17502@psf.upfronthosting.co.za> Yuriy Senko added the comment: Patch ported from http://code.google.com/p/mock/issues/attachmentText?id=190&aid=1900000000&name=mock.patch&token=6pDNkNBcNLDftg-PsUE8roPb6T4%3A1363712167613 ---------- keywords: +patch nosy: +Chaka_bum, asvetlov Added file: http://bugs.python.org/file29713/issue_17502.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 14:47:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 12:47:07 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1365338827.12.0.136299014105.issue17343@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be str.iter_indices() or even just str.indices()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:08:01 2013 From: report at bugs.python.org (Kostyantyn Leschenko) Date: Sun, 07 Apr 2013 13:08:01 +0000 Subject: [issue1521051] Allow passing DocTestRunner and DocTestCase in doctest Message-ID: <1365340081.95.0.291681091405.issue1521051@psf.upfronthosting.co.za> Kostyantyn Leschenko added the comment: I've updated patch to work with current trunk and added new params to doctest documentation. ---------- nosy: +Kostyantyn.Leschenko Added file: http://bugs.python.org/file29714/doctest-configuration-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:25:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 13:25:41 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation In-Reply-To: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> Message-ID: <1365341141.94.0.603956907363.issue16551@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In response to Alexandre's comment on Rietveld. Access to a local variable is faster than to a global one and the current implementation uses this for struct.pack. I just use same trick for struct.unpack. Here is a microbenchmark which demonstrate some effect of this optimization. I got 0.6491418619989417, 0.6947214259998873, and 0.5394902769985492 for optimized, non-optimized and advanced optimized functions. Of course, we can achieve even better effect if we will cache not only struct.pack, but struct.Struct(' _______________________________________ From report at bugs.python.org Sun Apr 7 15:31:33 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Apr 2013 13:31:33 +0000 Subject: [issue17552] socket.sendfile() In-Reply-To: <1364326073.47.0.699222209849.issue17552@psf.upfronthosting.co.za> Message-ID: <1365341493.21.0.201757416819.issue17552@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:33:38 2013 From: report at bugs.python.org (Andrey Tykhonov) Date: Sun, 07 Apr 2013 13:33:38 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365341618.17.0.720317739238.issue17650@psf.upfronthosting.co.za> Andrey Tykhonov added the comment: Also: errno.EXDEV in Lib/distutils/file_util.py errno.ENOTCONN in Lib/poplib.py errno.EINVAL in Lib/subprocess.py errno.ENOTCONN in Lib/smtpd.py, Lib/ssl.py, Lib/imaplib.py errno.EOPNOTSUPP, errno.ENOTSUP, errno.ENOTSUP, errno.ENODATA in Lib/shutil.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:42:24 2013 From: report at bugs.python.org (Andrey Tykhonov) Date: Sun, 07 Apr 2013 13:42:24 +0000 Subject: [issue17651] Errno checking replaced by concrete classes inherited from OSError Message-ID: <1365342144.92.0.760776925333.issue17651@psf.upfronthosting.co.za> Changes by Andrey Tykhonov : ---------- components: Library (Lib) nosy: asvetlov, atykhonov priority: normal severity: normal status: open title: Errno checking replaced by concrete classes inherited from OSError type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:43:07 2013 From: report at bugs.python.org (Andrey Tykhonov) Date: Sun, 07 Apr 2013 13:43:07 +0000 Subject: [issue17651] Errno checking replaced by concrete classes inherited from OSError Message-ID: <1365342187.25.0.0762584090021.issue17651@psf.upfronthosting.co.za> Changes by Andrey Tykhonov : ---------- keywords: +patch Added file: http://bugs.python.org/file29716/issue17651.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:43:50 2013 From: report at bugs.python.org (Andrey Tykhonov) Date: Sun, 07 Apr 2013 13:43:50 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365342230.97.0.969768313617.issue17650@psf.upfronthosting.co.za> Changes by Andrey Tykhonov : ---------- components: +Library (Lib) type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:44:45 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Apr 2013 13:44:45 +0000 Subject: [issue17502] unittest.mock: side_effect iterators ignore DEFAULT In-Reply-To: <1363835140.97.0.987850111396.issue17502@psf.upfronthosting.co.za> Message-ID: <1365342285.71.0.878210386966.issue17502@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:44:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Apr 2013 13:44:49 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365342289.51.0.356670472659.issue17650@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The rationale for not creating dedicated exception classes is that those errors are not common enough. Since the range of possible errno values is basically unbounded (each system can create their own system-specific errors), trying to cover them all is a losing battle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:46:08 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Apr 2013 13:46:08 +0000 Subject: [issue16705] Use concrete classes inherited from OSError instead of errno check In-Reply-To: <1355776299.81.0.3555135726.issue16705@psf.upfronthosting.co.za> Message-ID: <1365342368.36.0.936465787707.issue16705@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- dependencies: +Errno checking replaced by concrete classes inherited from OSError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:47:19 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Apr 2013 13:47:19 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365342439.85.0.90141584817.issue17650@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:53:14 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 07 Apr 2013 13:53:14 +0000 Subject: [issue16705] Use concrete classes inherited from OSError instead of errno check In-Reply-To: <1355776299.81.0.3555135726.issue16705@psf.upfronthosting.co.za> Message-ID: <1365342794.7.0.749841289714.issue16705@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- dependencies: +There is no exception correspond to errno EROFS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:53:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Apr 2013 13:53:57 +0000 Subject: [issue17610] Qsort function misuse in typeobject.c In-Reply-To: <1364820542.51.0.192116883803.issue17610@psf.upfronthosting.co.za> Message-ID: <3ZkGT03NZvzMdS@mail.python.org> Roundup Robot added the comment: New changeset eaff15532b3c by Benjamin Peterson in branch '2.7': list slotdefs in offset order rather than sorting them (closes #17610) http://hg.python.org/cpython/rev/eaff15532b3c ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 15:55:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Apr 2013 13:55:10 +0000 Subject: [issue17094] sys._current_frames() reports too many/wrong stack frames In-Reply-To: <1359668363.58.0.777154629349.issue17094@psf.upfronthosting.co.za> Message-ID: <1365342909.99.0.568088706875.issue17094@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > if a > thread ends up being created/destroyed, I think we can get a deadlock > when trying to acquire the head lock. I think it should be turned into > an open call if possible. How would you do that in a simple way? > Also, as noted by Stefan, shouldn't we also iterate over other interpreters? The problem is that, AFAIK, we don't know which thread states of the other interpreters should be kept alive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 16:36:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 14:36:36 +0000 Subject: [issue17644] str.format() crashes In-Reply-To: <1365259586.34.0.498934812452.issue17644@psf.upfronthosting.co.za> Message-ID: <1365345396.13.0.50647935348.issue17644@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The first patch looks better for me. It is simpler and I do not sure the thing is worth a complication. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 16:37:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 14:37:09 +0000 Subject: [issue17644] str.format() crashes In-Reply-To: <1365259586.34.0.498934812452.issue17644@psf.upfronthosting.co.za> Message-ID: <1365345429.11.0.27101871938.issue17644@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +3.3regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:05:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 15:05:00 +0000 Subject: [issue13477] tarfile module should have a command line In-Reply-To: <1322190665.85.0.356467902383.issue13477@psf.upfronthosting.co.za> Message-ID: <1365347100.28.0.341183116079.issue13477@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Then I propose to add an alternative tarfile command-line interface as Tools/scripts/tar.py for those who prefer a well-known and well-tested traditional interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:11:40 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Apr 2013 15:11:40 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1365347500.81.0.837082816463.issue17343@psf.upfronthosting.co.za> Terry J. Reedy added the comment: > I'm guessing Terry wanted to say "os.listdir" instead of "os.walk". yes, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:20:16 2013 From: report at bugs.python.org (Sijin Joseph) Date: Sun, 07 Apr 2013 15:20:16 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365348016.7.0.845452541914.issue17618@psf.upfronthosting.co.za> Sijin Joseph added the comment: Is anyone working on this? I'd like to include this in a CPython sprint @MIT on 4/13. ---------- nosy: +sijinjoseph _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:22:57 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Apr 2013 15:22:57 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1365348177.81.0.0064333240186.issue2953@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:24:25 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Apr 2013 15:24:25 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365348265.0.0.476351442068.issue17618@psf.upfronthosting.co.za> R. David Murray added the comment: Antoine is talking to Mercurial about relicensing, and I believe at this point it is just a matter of working out the mechanical details (that is, he has an agreement-in-principal from them). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:24:44 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Apr 2013 15:24:44 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1365348284.27.0.32830512458.issue1875@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:29:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Apr 2013 15:29:50 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365348590.73.0.539320617088.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The Mercurial authors have given their informal agreement for a relicensing. OTOH, they must still sign a contributor's agreement. The relicensing would allow us to use their pure Python implementation (in mercurial/pure/base85.py). OTOH, the C implementation (in mercurial/base85.c) is a ripoff of the git one, so we'd better rewrite our own. My current plan would be the following: - create a binascii.py and rename binascii.c to _binascii.c - add Mercurial's pure Python implementation to binascii.py - add a custom C implementation to _binascii.c - make sure the binascii test suite tests both implementations OTOH, if we don't get the Mercurial authors' contributor agreement, we can also re-write our own pure Python implementation. In any case, our implementation should IMHO be compatible with Mercurial's (i.e. produce identical outputs for the same inputs). ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:33:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 15:33:38 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365348818.66.0.525911226637.issue17615@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On big-endian platform we can use memcmp for 2:2 and 4:4 comparison. I do not sure it will be faster. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:41:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Apr 2013 15:41:01 +0000 Subject: [issue15596] pickle: Faster serialization of Unicode strings In-Reply-To: <1344465522.38.0.375715302831.issue15596@psf.upfronthosting.co.za> Message-ID: <3ZkJrY1cjPzQ8f@mail.python.org> Roundup Robot added the comment: New changeset 09a84091ae96 by Antoine Pitrou in branch 'default': Issue #15596: Faster pickling of unicode strings. http://hg.python.org/cpython/rev/09a84091ae96 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:50:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Apr 2013 15:50:10 +0000 Subject: [issue15596] pickle: Faster serialization of Unicode strings In-Reply-To: <1344465522.38.0.375715302831.issue15596@psf.upfronthosting.co.za> Message-ID: <1365349810.74.0.0282236861527.issue15596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've applied the review comments and committed the patch. Thank you! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:53:37 2013 From: report at bugs.python.org (Martin Morrison) Date: Sun, 07 Apr 2013 15:53:37 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365350017.52.0.558454305382.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: I wrote an implementation from scratch (based on the wikipedia article; I've not looked at any existing implementations) in pure Python in the attached diff. It includes tests. Feel free to use it as the pure Python implementation if desired, though I won't be offended if you just end up using the Mercurial one. :-) ---------- keywords: +patch nosy: +isoschiz Added file: http://bugs.python.org/file29717/issue17618.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 17:58:17 2013 From: report at bugs.python.org (Martin Morrison) Date: Sun, 07 Apr 2013 15:58:17 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365350297.57.0.0868944355661.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: (sorry for spam) Forgot to mention, I included an optional keyword argument to support the 'btoa' shortcut for sequences of space characters as described in the Wikipedia article. However, I'm unsure if any other implementation supports this, so might not be worth including it in our implementation. A better feature might be to support full btoa output, but the Wikipedia article doesn't have a complete enough specification, and I couldn't find (didn't really look for) one elsewhere. If no one uses it though, again. probably not worth including it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 18:09:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Apr 2013 16:09:22 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1365350297.57.0.0868944355661.issue17618@psf.upfronthosting.co.za> Message-ID: <1365350949.3373.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > Forgot to mention, I included an optional keyword argument to support > the 'btoa' shortcut for sequences of space characters as described in > the Wikipedia article. However, I'm unsure if any other implementation > supports this, so might not be worth including it in our > implementation. In this issue I would really like to aim for Mercurial/git-like behaviour: i.e. no special shortcuts, and no armoring ('<~' and '~>'). Also, the base85 alphabet used by Mercurial and git may be different, I haven't checked. (by the way, it seems "btoa" has been dead for a long time, I don't think it's useful as a reference here) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 18:15:44 2013 From: report at bugs.python.org (Martin Morrison) Date: Sun, 07 Apr 2013 16:15:44 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365351344.2.0.50471507458.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: Ok, having now looked at mercurial's implementation... it looks like they implemented the RFC1924 version, whereas my implementation is the Ascii85 version (and I verified it against, amongst others: http://www.tools4noobs.com/online_tools/ascii85_encode/ ). The Ascii85 version is what is used with PDF, and the default output format for the equivalent Ruby library, so seems useful to have. So I guess what might be desirable is to have both in the codebase? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 18:19:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Apr 2013 16:19:23 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1365351344.2.0.50471507458.issue17618@psf.upfronthosting.co.za> Message-ID: <1365351551.3373.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > The Ascii85 version is what is used with PDF, and the default output > format for the equivalent Ruby library, so seems useful to have. So I > guess what might be desirable is to have both in the codebase? Yes, it could be useful to have both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 18:21:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 16:21:25 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365351685.39.0.647892623296.issue17618@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 18:42:54 2013 From: report at bugs.python.org (Martin Morrison) Date: Sun, 07 Apr 2013 16:42:54 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365352974.84.0.20459854787.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: Ok, I'm not even sure that Mercurial follows RFC1924! That RFC is specifically for encoding IPv6 addresses, and mandates that the calculations be performed on a 128bit integer. The Mercurial implementation seems to follow the Ascii85 policy of taking each 4 bytes separately and doing 32bit arithmetic, but uses the lookup table from RFC1924, and is less lenient about spacing, and has no compression for sequences of zeroes. It therefore looks like Mercurial (and I guess Git) have their own, non-standard base64 encoding. The Web at large mostly has "standard" Ascii85 encoding/decoding described. RFC1924 itself has a Python implementation on Github: https://github.com/drkjam/netaddr/blob/rel-0.7.x/netaddr/ip/rfc1924.py So I'm not sure what you want to do. I would suggest a standard Ascii85 encoder is definitely useful, and provides feature parity with Ruby. If we want the standard library to be able to read/write Mercurial/Git base64 encoded files, then I guess that can be added too. If we think RFC1924 is useful/used, then the implementation in the netaddr lib looks right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 18:47:16 2013 From: report at bugs.python.org (Berker Peksag) Date: Sun, 07 Apr 2013 16:47:16 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support Message-ID: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> New submission from Berker Peksag: I saw a conversation about adding a @skip_on_windows decorator on #python-dev a couple of months ago. Attached a patch with a documentation update. (Added the participants of the conversation to nosy list.) ---------- components: Tests files: skip_on_windows.diff keywords: patch messages: 186226 nosy: berker.peksag, ezio.melotti, r.david.murray priority: normal severity: normal status: open title: Add skip_on_windows decorator to test.support versions: Python 3.4 Added file: http://bugs.python.org/file29718/skip_on_windows.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:11:29 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 07 Apr 2013 17:11:29 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365354689.96.0.207711198427.issue17650@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:12:22 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 07 Apr 2013 17:12:22 +0000 Subject: [issue17651] Errno checking replaced by concrete classes inherited from OSError Message-ID: <1365354742.46.0.363482089834.issue17651@psf.upfronthosting.co.za> New submission from Georg Brandl: Why not attach this to #16705 directly? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:16:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Apr 2013 17:16:59 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <3ZkLzG2kXKzQCN@mail.python.org> Roundup Robot added the comment: New changeset 3fad938e9d4e by Roger Serwy in branch '2.7': #1207589: Backwards-compatibility patch for right-click menu in IDLE. http://hg.python.org/cpython/rev/3fad938e9d4e New changeset c26ec5897c5a by Roger Serwy in branch '3.3': #1207589: Backwards-compatibility patch for right-click menu in IDLE. http://hg.python.org/cpython/rev/c26ec5897c5a New changeset 5219c1271156 by Roger Serwy in branch 'default': #1207589: merge with 3.3. http://hg.python.org/cpython/rev/5219c1271156 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:18:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 07 Apr 2013 17:18:29 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1365352974.84.0.20459854787.issue17618@psf.upfronthosting.co.za> Message-ID: <1365355096.3373.5.camel@localhost.localdomain> Antoine Pitrou added the comment: > So I'm not sure what you want to do. I would suggest a standard > Ascii85 encoder is definitely useful, and provides feature parity with > Ruby. If we want the standard library to be able to read/write > Mercurial/Git base64 encoded files, then I guess that can be added > too. If we think RFC1924 is useful/used, then the implementation in > the netaddr lib looks right. Agreed for both the Ascii85 encoder and the hg/git brand of base85 (which is used for "binary diffs", by the way). I don't think supporting RFC1924 is useful, though. (I think using "ascii85" and "base85" for those encodings, respectively, provides a nice way to distinguish them) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:30:33 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 07 Apr 2013 17:30:33 +0000 Subject: [issue17390] display python version on idle title bar In-Reply-To: <1362920194.83.0.464215113749.issue17390@psf.upfronthosting.co.za> Message-ID: <1365355833.9.0.133811762675.issue17390@psf.upfronthosting.co.za> Roger Serwy added the comment: Issue10747 is tangentially related. It is about adding the python version to the short cuts on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:31:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 17:31:57 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1365355917.61.0.50166510912.issue17628@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note that unicode_eq() always called after identity check and hash check. I.e. identity check in Victor's patch is redundant and unicode_eq() called only for strings which have the same hash. The probability to have the same first byte and be equal is a great. unicode_compare_eq() and unicode_eq() are designed for different purposes. They cannot be just merged. As the optimization for unicode_eq(), I would have suggested a checking of first machine words instead of first bytes, but this trick is too dirty. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:42:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Apr 2013 17:42:03 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <3ZkMXC11x2zR8c@mail.python.org> Roundup Robot added the comment: New changeset ae05d841bea1 by Roger Serwy in branch '2.7': #17613: Prevent traceback when removing syntax colorizer in IDLE. http://hg.python.org/cpython/rev/ae05d841bea1 New changeset 8b793a946acb by Roger Serwy in branch '3.3': #17613: Prevent traceback when removing syntax colorizer in IDLE. http://hg.python.org/cpython/rev/8b793a946acb New changeset b45675223885 by Roger Serwy in branch 'default': #17613: merge with 3.3. http://hg.python.org/cpython/rev/b45675223885 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:43:34 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 07 Apr 2013 17:43:34 +0000 Subject: [issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py In-Reply-To: <1364864115.36.0.547026592703.issue17613@psf.upfronthosting.co.za> Message-ID: <1365356614.27.0.756970586108.issue17613@psf.upfronthosting.co.za> Roger Serwy added the comment: Thank you everyone for your patience. I am closing this issue as fixed. ---------- assignee: -> roger.serwy resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 19:59:46 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 07 Apr 2013 17:59:46 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <1365283179.61.0.145925901601.issue17647@psf.upfronthosting.co.za> Message-ID: <1365357586.53.0.515670093341.issue17647@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I don't see how this is a subprocess problem, or could be fixed in subprocess. IIUC, SetConsoleTextAttribute() only has an effect if the output is connected to a console. But that is not the case if you redirect the output to a pipe (which is presumably what Waf does so it can capture the output). ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 20:21:18 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Apr 2013 18:21:18 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <1365283179.61.0.145925901601.issue17647@psf.upfronthosting.co.za> Message-ID: <1365358878.94.0.447769381847.issue17647@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, good, I thought that was probably the case but I don't know Windows enough to have been sure. Caitlin: if you can prove sbt and me wrong by writing a patch that works (without breaking anything else :), I think it would be considered. Certainly on unix if you write ANSI color codes to stdout and the reader doesn't strip them, they will be preserved and can be redisplayed, so being able to do something similar on Windows would be nice. I'm pretty sure there isn't any place stdout.read() is called, though. The stdout output from the originating process will be being read by a different process via stdin.read(). And as sbt pointed out, neither one of those will be a console. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 20:39:22 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 07 Apr 2013 18:39:22 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <1365358878.94.0.447769381847.issue17647@psf.upfronthosting.co.za> Message-ID: <5161BD57.6080407@gmail.com> Richard Oudkerk added the comment: On 07/04/2013 7:21pm, R. David Murray wrote: > Certainly on unix if you write ANSI color codes to stdout and the reader > doesn't strip them, they will be preserved and can be redisplayed, so > being able to do something similar on Windows would be nice. Although sensible unix programs capable of producing coloured text refuse to do so (by default) if output is a pipe rather than a tty. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 21:11:40 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 07 Apr 2013 19:11:40 +0000 Subject: [issue8523] shutil.rmtree and os.listdir cannot recover on error conditions In-Reply-To: <1272135463.46.0.698266589767.issue8523@psf.upfronthosting.co.za> Message-ID: <1365361900.29.0.385834339712.issue8523@psf.upfronthosting.co.za> R. David Murray added the comment: I think this patch looks good, but it needs a documentation update to go with it. Do you want to work on that, Andrew? It also seems as though there's no bug that it is practical to fix here, so I'm changing this to a pure enhancement request. If anyone disagrees with that, please describe what you think the appropriate bug fix is, and we can break the enhancement request out into a separate issue. ---------- stage: test needed -> patch review type: behavior -> enhancement versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 21:15:27 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 07 Apr 2013 19:15:27 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation In-Reply-To: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> Message-ID: <1365362127.5.0.0370956886956.issue16551@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: My point is I would prefer that we keep all optimizations to only the _pickle C module and keep the Python implementation as simple as possible. Also, I doubt the slight speedup shown by your microbenchmark will actually result in any significant benefits on the overall performance of pickle.py. Furthermore, we can't use CPython to measure the benefits of such optimization because CPython will always use _pickle over the Python implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 21:45:07 2013 From: report at bugs.python.org (pfg) Date: Sun, 07 Apr 2013 19:45:07 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365363907.34.0.291189812497.issue17649@psf.upfronthosting.co.za> pfg added the comment: I looked and the file exists: $ file Python/Python-ast.c Python/Python-ast.c: C source, ASCII text The file appears valid. I touched the files as suggested but I still I get the same error message when running "configure". FWIW, the Makefile.pre.in target exists but it doesn't seem useful because this happens just by running configure (when there is no Makefile). I should note that I am attempting to build within FreeBSD's ports tree (apparently out-of-tree) so maybe my environment setup is causing the trouble. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 21:57:07 2013 From: report at bugs.python.org (pfg) Date: Sun, 07 Apr 2013 19:57:07 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365364627.56.0.49688102156.issue17649@psf.upfronthosting.co.za> pfg added the comment: Correction: The problem does arise during the build process (not configure). Still specifying the touch target for the build or touching manually the files doesn't help :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:02:58 2013 From: report at bugs.python.org (Caitlin Potter) Date: Sun, 07 Apr 2013 20:02:58 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <5161BD57.6080407@gmail.com> Message-ID: Caitlin Potter added the comment: I'm not entirely positive that it would be doable, but looking at the subprocess code, it looks like we do have an open handle to the windows stdout buffer, including buffer attributes, so it should be possible to translate coloured attributes into ANSI codes, Whether this would or would not break anything else is a different story, of course. Obviously there are times where you wouldn't want ANSI color codes in the output, and I'm not sure how you could differentiate between a pipe to a terminal buffer, or a pipe to a file. Somewhat relevant, but perhaps not so much: The google test framework does actually test isatty() before using ANSI escape characters, however I've tested this same test program in a development environment, with colours preserved, which was a bit curious (the test I've put together is available at http://github.com/caitp/waftest, however it will break on a lot of systems, depending on the way pthread needs to be used) On Sun, Apr 7, 2013 at 2:39 PM, Richard Oudkerk wrote: > > Richard Oudkerk added the comment: > > On 07/04/2013 7:21pm, R. David Murray wrote: > > Certainly on unix if you write ANSI color codes to stdout and the reader > > doesn't strip them, they will be preserved and can be redisplayed, so > > being able to do something similar on Windows would be nice. > > Although sensible unix programs capable of producing coloured text > refuse to do so (by default) if output is a pipe rather than a tty. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:05:46 2013 From: report at bugs.python.org (Caitlin Potter) Date: Sun, 07 Apr 2013 20:05:46 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <1365283179.61.0.145925901601.issue17647@psf.upfronthosting.co.za> Message-ID: <1365365146.86.0.664368762701.issue17647@psf.upfronthosting.co.za> Caitlin Potter added the comment: > however I've tested this same test program in a > development environment, *unix* development environment (xterm, ubuntu 12.04), rather. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:09:01 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 07 Apr 2013 20:09:01 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1365365341.65.0.892643350963.issue10945@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:09:14 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 07 Apr 2013 20:09:14 +0000 Subject: [issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows In-Reply-To: <1295450896.02.0.86964827296.issue10945@psf.upfronthosting.co.za> Message-ID: <1365365354.62.0.659493244244.issue10945@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- title: bdist_wininst depends on MBCS codec, unavailable on non-Windows -> bdist_wininst depends on MBCS codec, unavailable on non-Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:09:51 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Apr 2013 20:09:51 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365365391.56.0.378527716844.issue17649@psf.upfronthosting.co.za> Ned Deily added the comment: I'm afraid it's not likely we'll be able to further resolve this issue without more specific information about exactly the steps you are using to try to build Python, including exactly what version or hg rev id (you say 2.7.2 but the path name says 2.7.4), any patches, exact ./configure parameters, which version of FreeBSD, etc. I can tell you that python-dev has a set of buildbots including some FreeBSD ones that seem to be able to build successfully, for example http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.1%20%5BSB%5D%202.7. I'm not sure how that compares to what you are trying to do by building "within FreeBSD's ports tree". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:38:59 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 07 Apr 2013 20:38:59 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: Message-ID: <5161D960.5060808@gmail.com> Richard Oudkerk added the comment: On 07/04/2013 9:02pm, Caitlin Potter wrote: > I'm not entirely positive that it would be doable, but looking at the > subprocess code, it looks like we do have an open handle to the windows > stdout buffer, including buffer attributes, so it should be possible to > translate coloured attributes into ANSI codes, The handle for stdout is just the readable end of a pipe. It is not a console, GetConsoleScreenBufferInfo() will not work with it, and there are no coloured attributes associated with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:40:55 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sun, 07 Apr 2013 20:40:55 +0000 Subject: [issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang In-Reply-To: <1309517198.04.0.392098349691.issue12463@psf.upfronthosting.co.za> Message-ID: <1365367255.11.0.131715417968.issue12463@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:43:57 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sun, 07 Apr 2013 20:43:57 +0000 Subject: [issue17653] fix typo in socketserver.rst Message-ID: <1365367437.59.0.735275083965.issue17653@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- assignee: docs at python components: Documentation files: fix.diff keywords: patch nosy: docs at python, tshepang priority: normal severity: normal status: open title: fix typo in socketserver.rst versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29719/fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 22:51:00 2013 From: report at bugs.python.org (Caitlin Potter) Date: Sun, 07 Apr 2013 20:51:00 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <5161D960.5060808@gmail.com> Message-ID: Caitlin Potter added the comment: Then perhaps nothing can be done from the python side of things, that's too bad. On Sun, Apr 7, 2013 at 4:38 PM, Richard Oudkerk wrote: > > Richard Oudkerk added the comment: > > On 07/04/2013 9:02pm, Caitlin Potter wrote: > > I'm not entirely positive that it would be doable, but looking at the > > subprocess code, it looks like we do have an open handle to the windows > > stdout buffer, including buffer attributes, so it should be possible to > > translate coloured attributes into ANSI codes, > > The handle for stdout is just the readable end of a pipe. It is not a > console, GetConsoleScreenBufferInfo() will not work with it, and there > are no coloured attributes associated with it. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 23:10:28 2013 From: report at bugs.python.org (pfg) Date: Sun, 07 Apr 2013 21:10:28 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365369028.25.0.380496354347.issue17649@psf.upfronthosting.co.za> pfg added the comment: Oops.. I am sorry I reported the wrong version, I am using python-2.7.4 just released SHA256 (python/Python-2.7.4.tar.xz) = b6626eb6d07d72351f251116ab14427fc934b5f24e6ebc751356a44a7d23b62d SIZE (python/Python-2.7.4.tar.xz) = 10250644 And I am running something similar to your buildbot: FreeBSD pcbsd-3938 9.1-STABLE FreeBSD 9.1-STABLE #9 r248799M: Wed Mar 27 15:23:28 COT 2013 pfg at pcbsd-3938:/sys/amd64/compile/DELL amd64 I am afraid the issue is caused by the ports tree environment: it does some nasty workarounds to avoid building some components. Let's just close this issue, I will investigate locally and if I find something wrong in the release I will let you know, Thanks for your help! ---------- status: open -> closed Added file: http://bugs.python.org/file29720/configure-log.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 23:34:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 21:34:52 +0000 Subject: [issue15596] pickle: Faster serialization of Unicode strings In-Reply-To: <1365349810.74.0.0282236861527.issue15596@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Hi Antoine, I prefer your patch. Great job! 2013/4/7 Antoine Pitrou : > > Antoine Pitrou added the comment: > > I've applied the review comments and committed the patch. Thank you! > > ---------- > resolution: -> fixed > stage: patch review -> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 23:36:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 21:36:05 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1365370565.74.0.518737800206.issue16061@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is an updated patch. Some comments added (I will be grateful for help in the improvement of these comments), an implementation moved to stringlib (a new file Objects/stringlib/replace.h added). unicode_2.patch optimizes only too special case and I consider this is not worth the effort. str_replace_1char*.patch cover a wider area and designed to be faster than 3.2 and 3.3 in most cases and not to be significant slower in corner cases. ---------- Added file: http://bugs.python.org/file29721/str_replace_1char_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 23:47:14 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 21:47:14 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1365371234.72.0.0261210379913.issue16061@psf.upfronthosting.co.za> STINNER Victor added the comment: str_replace_1char_2.patch looks good to me. Just one nit: please add a reference to this issue in the comment (in replace.h). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 7 23:58:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 21:58:49 +0000 Subject: [issue15092] Using enum PyUnicode_Kind In-Reply-To: <1339924867.59.0.117831113894.issue15092@psf.upfronthosting.co.za> Message-ID: <1365371929.57.0.225533576491.issue15092@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.3 has been released. I'm not sure that we can change the type of PyUnicode_Kind because of the stable API. By the way, I already tried to write a similar patch (use enum). I expected better performances, but it did not change anything. Can we close this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 00:05:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 22:05:29 +0000 Subject: [issue13126] find() slower than rfind() In-Reply-To: <1318016796.03.0.16031959225.issue13126@psf.upfronthosting.co.za> Message-ID: <1365372329.44.0.102305287698.issue13126@psf.upfronthosting.co.za> STINNER Victor added the comment: I still see a difference between find and rfind, even if the different is low (11%). $ ./python -m timeit -s 's="ABC"*33; a=((s+"D")*500+s+"E"); b=s+"E"' 'a.find(b)' 10000 loops, best of 3: 93.6 usec per loop $ ./python -m timeit -s 's="ABC"*33; a=("E"+s+("D"+s)*500); b="E"+s' 'a.rfind(b)' 10000 loops, best of 3: 84.3 usec per loop Patched Python: $ ./python -m timeit -s 's="ABC"*33; a=((s+"D")*500+s+"E"); b=s+"E"' 'a.find(b)' 10000 loops, best of 3: 84.7 usec per loop $ ./python -m timeit -s 's="ABC"*33; a=("E"+s+("D"+s)*500); b="E"+s' 'a.rfind(b)' 10000 loops, best of 3: 84.5 usec per loop I'm unable to explain why GCC (4.7 in my case) produces faster code with the patch, but the patch is simple and does not make the code (much) harder to understand. So Antoine, please go ahead and apply it. ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 00:19:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 07 Apr 2013 22:19:36 +0000 Subject: [issue15092] Using enum PyUnicode_Kind In-Reply-To: <1339924867.59.0.117831113894.issue15092@psf.upfronthosting.co.za> Message-ID: <1365373176.98.0.268052394149.issue15092@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 00:24:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 22:24:35 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365373475.84.0.844451207328.issue17615@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch specializing unicode_compare() for each combinaison of (kind1, kind2), to avoid the expensive PyUnicode_READ() macro (2 if). On Linux using GCC -O3 (GCC 4.7), there is no difference since GCC already specialize the loops. It may help other compilers. ---------- keywords: +patch resolution: fixed -> Added file: http://bugs.python.org/file29722/specialize_compare.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 00:27:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Apr 2013 22:27:13 +0000 Subject: [issue13126] find() slower than rfind() In-Reply-To: <1318016796.03.0.16031959225.issue13126@psf.upfronthosting.co.za> Message-ID: <3ZkTsD3HyPzRqb@mail.python.org> Roundup Robot added the comment: New changeset c5e2ea9e3aa7 by Victor Stinner in branch 'default': Close #13126: "Simplify" FASTSEARCH() code to help the compiler to emit more http://hg.python.org/cpython/rev/c5e2ea9e3aa7 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 01:10:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 23:10:18 +0000 Subject: [issue10401] Globals / builtins cache In-Reply-To: <1289597080.96.0.9732660757.issue10401@psf.upfronthosting.co.za> Message-ID: <1365376218.13.0.448834930255.issue10401@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 01:12:20 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 23:12:20 +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: <1365376340.94.0.968182061901.issue16286@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Optimize a==b and a!=b for bytes and str -> Use hash if available to optimize a==b and a!=b for bytes and str _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 01:18:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 23:18:12 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365376692.03.0.440833482429.issue16427@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 01:25:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 07 Apr 2013 23:25:45 +0000 Subject: [issue14757] INCA: Inline Caching meets Quickening in Python 3.3 In-Reply-To: <1336498675.39.0.776636251166.issue14757@psf.upfronthosting.co.za> Message-ID: <1365377145.0.0.467673642175.issue14757@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 01:39:42 2013 From: report at bugs.python.org (Todd Rovito) Date: Sun, 07 Apr 2013 23:39:42 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1365377982.53.0.886504528061.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: Very strange but I noticed the right click menu is not working on Mac OS X. Before and after Roger's latest backwards_compat.patch. I must be losing my mind but I thought this was working on OS X. The right click activation I am trying is control-click and I am running 10.8.3. Should I file a separate bug report for this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 01:58:12 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 07 Apr 2013 23:58:12 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1365379092.79.0.568781592639.issue1207589@psf.upfronthosting.co.za> Roger Serwy added the comment: Please do open a separate issue. We'll resolve it there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 02:05:29 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 08 Apr 2013 00:05:29 +0000 Subject: [issue1207589] IDLE: Right Click Context Menu Message-ID: <1365379529.92.0.2760786984.issue1207589@psf.upfronthosting.co.za> Todd Rovito added the comment: No problem I will open a separate issue. Hopefully it is a mistake on my end and I have something dorked up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 02:14:56 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 08 Apr 2013 00:14:56 +0000 Subject: [issue17654] IDLE: Right click menu not working on OS X Message-ID: <1365380096.1.0.0254781694905.issue17654@psf.upfronthosting.co.za> New submission from Todd Rovito: IDLE's new right click menu doesn't seem to be working on Mac OS X. I am running OS X 10.8.3 with TK version 8.5.9 (which I think is what OS X 10.8.3 ships with). The right click activation I am trying is control-click. ---------- components: IDLE messages: 186257 nosy: Todd.Rovito, ned.deily, roger.serwy priority: normal severity: normal status: open title: IDLE: Right click menu not working on OS X type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 02:51:46 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Apr 2013 00:51:46 +0000 Subject: [issue17654] IDLE: Right click menu not working on OS X In-Reply-To: <1365380096.1.0.0254781694905.issue17654@psf.upfronthosting.co.za> Message-ID: <1365382306.63.0.670647131469.issue17654@psf.upfronthosting.co.za> Ned Deily added the comment: It works OK as long as you are running Python from a framework build (--enable-framework). There are various OS X customizations in IDLE that are currently triggered by the runningAsOSXApp() function in idlelib/macosxSupport.py. One of the customizations is to add the event binding for (in idle lib/EditorWindow.py). Restricting the customizations to framework builds is not useful nor correct and there are some other questionable customizations assumptions made in that module. I'll work up a patch. In the meantime, you can easily workaround it for testing by patching runningAsOSXApp to always return True. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 02:54:28 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Apr 2013 00:54:28 +0000 Subject: [issue17654] IDLE only customizes correctly for OS X when using framework build In-Reply-To: <1365380096.1.0.0254781694905.issue17654@psf.upfronthosting.co.za> Message-ID: <1365382468.27.0.966046310606.issue17654@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> ned.deily stage: -> needs patch title: IDLE: Right click menu not working on OS X -> IDLE only customizes correctly for OS X when using framework build versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 03:00:15 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 01:00:15 +0000 Subject: [issue17655] Use writev() function in the io module Message-ID: <1365382815.42.0.538101348018.issue17655@psf.upfronthosting.co.za> New submission from STINNER Victor: Since issue #12268 has been fixed, it looks like it became easier to modify the io to use the writev() function when available. For example, if FileIO.writelines() uses writev(), it can be used by TextIOWrapper.write() through BufferedWriter. The _io.TextIOWrapper.write() method stores encoded chunks of text into a list. It can calls buffer.writlines(pending) instead of buffer.write(b''.join(pending)). I expect less Python function calls and less system calls, and so better performances because both are expensive (especially I/O syscalls). See also issue #15723. I don't know if/how readv() can be used to optimize I/O performances. ---------- components: IO messages: 186259 nosy: gregory.p.smith, haypo, pitrou priority: normal severity: normal status: open title: Use writev() function in the io module type: performance versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 03:01:10 2013 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 08 Apr 2013 01:01:10 +0000 Subject: [issue17655] Use writev() function in the io module In-Reply-To: <1365382815.42.0.538101348018.issue17655@psf.upfronthosting.co.za> Message-ID: <1365382870.76.0.876818692939.issue17655@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 03:02:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 01:02:33 +0000 Subject: [issue17655] Use writev() function in the io module In-Reply-To: <1365382815.42.0.538101348018.issue17655@psf.upfronthosting.co.za> Message-ID: <1365382953.33.0.606544225403.issue17655@psf.upfronthosting.co.za> STINNER Victor added the comment: http://mail.python.org/pipermail/python-dev/2012-August/121396.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 03:02:43 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 01:02:43 +0000 Subject: [issue17655] Use writev() function in the io module In-Reply-To: <1365382815.42.0.538101348018.issue17655@psf.upfronthosting.co.za> Message-ID: <1365382963.4.0.611819514249.issue17655@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- Removed message: http://bugs.python.org/msg186260 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 03:02:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 01:02:48 +0000 Subject: [issue17655] Use writev() function in the io module In-Reply-To: <1365382815.42.0.538101348018.issue17655@psf.upfronthosting.co.za> Message-ID: <1365382968.46.0.437966683081.issue17655@psf.upfronthosting.co.za> STINNER Victor added the comment: Read also http://mail.python.org/pipermail/python-dev/2012-August/121396.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 04:12:49 2013 From: report at bugs.python.org (Roger Serwy) Date: Mon, 08 Apr 2013 02:12:49 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365387169.72.0.886274182539.issue17511@psf.upfronthosting.co.za> Roger Serwy added the comment: Update for what I wrote in msg185101: The behavior introduced in #13052 which kept the replace dialog open has been reverted by #17625. There ought to be consistency across the different find/replace dialogs. The replace dialog closes when clicking "close" or "replace all" if there are replacements to be made. Otherwise, clicking "find" in the replace dialog keeps it open. Other editors, such as Geany, Eclipse, Window's Notepad, and Wordpad, keep their find dialogs open when clicking "Find (Next)". Some of those programs still have a "find next" menu item. I am in support of letting the find dialog remain open, and possibly relabeling the button to say "find next" instead. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 04:57:32 2013 From: report at bugs.python.org (Sarah) Date: Mon, 08 Apr 2013 02:57:32 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365389852.13.0.340784793309.issue17511@psf.upfronthosting.co.za> Sarah added the comment: This should allow the 'find' window to stay open. It also circumvents an issue in Windows, wherein highlighted text did not show while the 'find' window was open. The found text should now show as highlighted for any OS (as far as I know; please test). When the find window is closed, the cursor/highlighting is released. ---------- nosy: +Sarah Added file: http://bugs.python.org/file29723/issue17511_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 05:20:59 2013 From: report at bugs.python.org (Vhati) Date: Mon, 08 Apr 2013 03:20:59 +0000 Subject: [issue17656] Python 2.7.4 Breaks ZipFile Extraction Message-ID: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> New submission from Vhati: Python 2.7.4 fails while extracting zip files when 'member' is a unicode path. --- Traceback (most recent call last): ... my_zip.extract(item, tmp_folder_path) File "D:\Apps\Python274\lib\zipfile.py", line 1024, in extract return self._extract_member(member, path, pwd) File "D:\Apps\Python274\lib\zipfile.py", line 1057, in _extract_member arcname = arcname.translate(table) TypeError: character mapping must return integer, None or unicode --- 2.7.3 had no problems because the call to translate() is new. The following, copied from ZipFile.py, will recreate the error. -- import string illegal = ':<>|"?*' table = string.maketrans(illegal, '_' * len(illegal)) arcname = "hi" arcname = arcname.translate(table) # ascii strings are fine arcname = u"hi" arcname = arcname.translate(table) # unicode fails # Traceback (most recent call last): # File "", line 1, in # TypeError: character mapping must return integer, None or unicode --- I tried using unicode literals for the illegal string and maketrans underscore arg, but that didn't work. Suggestions? Here's a link to the doc for translate(). http://docs.python.org/2/library/stdtypes.html#str.translate ---------- components: Unicode messages: 186264 nosy: Vhati, ezio.melotti priority: normal severity: normal status: open title: Python 2.7.4 Breaks ZipFile Extraction type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 05:37:23 2013 From: report at bugs.python.org (Vhati) Date: Mon, 08 Apr 2013 03:37:23 +0000 Subject: [issue17656] Python 2.7.4 Breaks ZipFile Extraction In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365392243.99.0.948144148761.issue17656@psf.upfronthosting.co.za> Vhati added the comment: Apparently namelist() can return either ascii or unicode strings for its members, depending on the archive. Obviously this'd apply to literal unicode strings as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 05:37:34 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 08 Apr 2013 03:37:34 +0000 Subject: [issue17657] IDLE: about dialog should report the full version of TK Message-ID: <1365392254.45.0.513038915285.issue17657@psf.upfronthosting.co.za> New submission from Todd Rovito: The IDLE about dialog does not report the full version of TK. For instance it will report "8.5" and not report the last minor version number such as "8.5.9". On the Mac OS X this is problematic (but it could be a problem on other platforms) because Apple ships their own version of TK which is known to be buggy. For bug reporting purposes IDLE should report the full version of TK which could help diagnose bugs. ---------- components: IDLE messages: 186266 nosy: Todd.Rovito priority: normal severity: normal status: open title: IDLE: about dialog should report the full version of TK type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 05:42:28 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 08 Apr 2013 03:42:28 +0000 Subject: [issue17657] IDLE: about dialog should report the full version of TK In-Reply-To: <1365392254.45.0.513038915285.issue17657@psf.upfronthosting.co.za> Message-ID: <1365392548.76.0.103632495217.issue17657@psf.upfronthosting.co.za> Todd Rovito added the comment: Attached is a patch the works for both Python 3.4 and Python 2.7. I have tested this patch on OS X and Windows. The code actually came from macosxSupport.py function tkVersionWarning. ---------- keywords: +patch Added file: http://bugs.python.org/file29724/17657IDLEAboutDialogReportFullVersionOfTK.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 05:43:07 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 08 Apr 2013 03:43:07 +0000 Subject: [issue17657] IDLE: about dialog should report the full version of TK In-Reply-To: <1365392254.45.0.513038915285.issue17657@psf.upfronthosting.co.za> Message-ID: <1365392587.53.0.540206960316.issue17657@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +ned.deily, roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 05:51:55 2013 From: report at bugs.python.org (Patrick Poitras) Date: Mon, 08 Apr 2013 03:51:55 +0000 Subject: [issue17658] pythonw.exe crashes on opening IDLE Message-ID: <1365393115.5.0.931092283515.issue17658@psf.upfronthosting.co.za> New submission from Patrick Poitras: I just installed Python 3.3.1, and tried to open IDLE, which failed to come up, giving only the classic pythonw.exe has stopped responding. Will post dumps. ---------- components: IDLE, Windows files: WER1B0A.tmp.WERInternalMetadata.xml messages: 186268 nosy: Acebulf priority: normal severity: normal status: open title: pythonw.exe crashes on opening IDLE type: crash versions: Python 3.3 Added file: http://bugs.python.org/file29725/WER1B0A.tmp.WERInternalMetadata.xml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 05:52:18 2013 From: report at bugs.python.org (Patrick Poitras) Date: Mon, 08 Apr 2013 03:52:18 +0000 Subject: [issue17658] pythonw.exe crashes on opening IDLE In-Reply-To: <1365393115.5.0.931092283515.issue17658@psf.upfronthosting.co.za> Message-ID: <1365393138.1.0.916215967308.issue17658@psf.upfronthosting.co.za> Changes by Patrick Poitras : Added file: http://bugs.python.org/file29726/WER5D77.tmp.appcompat.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 05:52:38 2013 From: report at bugs.python.org (Patrick Poitras) Date: Mon, 08 Apr 2013 03:52:38 +0000 Subject: [issue17658] pythonw.exe crashes on opening IDLE In-Reply-To: <1365393115.5.0.931092283515.issue17658@psf.upfronthosting.co.za> Message-ID: <1365393158.31.0.698520545071.issue17658@psf.upfronthosting.co.za> Changes by Patrick Poitras : Added file: http://bugs.python.org/file29727/WER5EA0.tmp.mdmp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 06:02:30 2013 From: report at bugs.python.org (Patrick Poitras) Date: Mon, 08 Apr 2013 04:02:30 +0000 Subject: [issue17658] pythonw.exe crashes on opening IDLE In-Reply-To: <1365393115.5.0.931092283515.issue17658@psf.upfronthosting.co.za> Message-ID: <1365393750.31.0.128418194093.issue17658@psf.upfronthosting.co.za> Patrick Poitras added the comment: So I tried to open Python33\python.exe and it's trying to load codecs from Python 2.7 which I think has to be the cause of the problem. When it raises CodecRegistryError, the 2.7 syntax is wrong for 3.3 and causes a SyntaxError. Fatal Python error: Py_Initialize: unable to load system file codec File "C:\Python27\Lib\encodings\__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 06:06:52 2013 From: report at bugs.python.org (Demian Brecht) Date: Mon, 08 Apr 2013 04:06:52 +0000 Subject: [issue16942] urllib still doesn't support persistent connections In-Reply-To: <1357978376.78.0.27832756308.issue16942@psf.upfronthosting.co.za> Message-ID: <1365394012.81.0.0783565019617.issue16942@psf.upfronthosting.co.za> Demian Brecht added the comment: Just noticed there was a typo in the link in my previous post. It should be directing to issue# 16901. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 06:07:41 2013 From: report at bugs.python.org (Roger Serwy) Date: Mon, 08 Apr 2013 04:07:41 +0000 Subject: [issue17657] IDLE: about dialog should report the full version of TK In-Reply-To: <1365392254.45.0.513038915285.issue17657@psf.upfronthosting.co.za> Message-ID: <1365394061.14.0.279002853666.issue17657@psf.upfronthosting.co.za> Roger Serwy added the comment: LGTM. The patch works on Arch Linux, returning 8.5.13 which is what I have installed. ---------- stage: -> patch review type: behavior -> enhancement versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 06:19:56 2013 From: report at bugs.python.org (Todd Rovito) Date: Mon, 08 Apr 2013 04:19:56 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365394796.13.0.951714888141.issue17511@psf.upfronthosting.co.za> Todd Rovito added the comment: "I am in support of letting the find dialog remain open, and possibly relabeling the button to say "find next" instead." +1 from me, it drives me nuts to have the dialog close every time a single world is found. I like the find dialog box open then I just escape when I want it closed. In addition Sarah's patch works well on Mac OS X and Windows. It is fascinating that Sarah found a way to make the high-lighting work even on Windows, I wonder if we could use this technique to fix the debugging problem? As of today I have not heard anything the TK folks since I filed that bug report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 06:40:49 2013 From: report at bugs.python.org (Vhati) Date: Mon, 08 Apr 2013 04:40:49 +0000 Subject: [issue17656] Python 2.7.4 Breaks ZipFile Extraction In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365396049.75.0.123747713092.issue17656@psf.upfronthosting.co.za> Vhati added the comment: Oops, passing a unicode literal to extract()'s member arg wouldn't be sufficient. The extract() method quietly converts strings to ZipInfo objects via getinfo(member_string). Then _extract_member() takes the filename attribute of that ZipInfo object, which causes problems when when THAT is unicode. So I guess this bug only applies to archives with unicode member paths. Attached is one such file to aid in troubleshooting. ---------- Added file: http://bugs.python.org/file29728/Kestrel Cruiser.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 06:45:56 2013 From: report at bugs.python.org (Neil Hodgson) Date: Mon, 08 Apr 2013 04:45:56 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365396356.82.0.502814042831.issue17615@psf.upfronthosting.co.za> Neil Hodgson added the comment: The patch fixes the performance regression on Windows. The 1:1 case is better than either 3.2.4 or 3.3.1 downloads from python.org. Other cases are close to 3.2.4, losing at most around 2%. Measurements from 32-bit builds: ## Download 3.2.4 3.2.4 (default, Apr 6 2013, 20:07:44) [MSC v.1500 32 bit (Intel)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']148 [0.9251519691803254, 0.9228673224604178, 0.9270485054253375] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']148 [0.9088621585998959, 0.916762355170341, 0.9102371386441703] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']148 [0.9071172334674893, 0.9079409638903551, 0.9188950414432817] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']152 [0.9154984634528134, 0.9211241439998155, 0.9235272150680487] ## Download 3.3.1 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 20:25:12) [MSC v.1600 32 bit (Intel)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']84 [1.107935584141198, 1.080932736716823, 1.079060304542709] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']156 [1.2201494661996297, 1.2355558101814896, 1.217881936863404] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']156 [1.1195841384034795, 1.1172607155695182, 1.1198056163882537] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']276 [1.2389038306958007, 1.2207520679720822, 1.2370782093260395] ## Local build of 3.3.0 before patch 3.3.0 (default, Apr 8 2013, 14:06:26) [MSC v.1600 32 bit (Intel)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']84 [1.0824058797164942, 1.0680695468818941, 1.0685949457606005] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']156 [1.2159871472901957, 1.2169558514728118, 1.209515728255596] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']156 [1.1111012521191492, 1.1091369450081352, 1.1049337539784823] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']276 [1.2080548119585544, 1.2094420187054578, 1.2138603997013906] ## Local build of 3.3.0 after patch 3.3.0 (default, Apr 8 2013, 14:23:45) [MSC v.1600 32 bit (Intel)] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']84 [0.8673423724763649, 0.8545937643117921, 0.8289229288053079] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']156 [0.9235338524209049, 0.9305998385376584, 0.9229137839304098] a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/?']156 [0.891971842253179, 0.8971224280694345, 0.9036679059885344] a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']276 [0.9310441918446486, 0.9431070566588904, 0.9355432690779342] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 06:46:01 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 08 Apr 2013 04:46:01 +0000 Subject: [issue17656] Python 2.7.4 Breaks ZipFile Extraction In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365396361.23.0.456037893061.issue17656@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It appears that this is a consequence of the changes in issue 6972, in particular change 4d1948689ee1. ---------- nosy: +Arfrever, amaury.forgeotdarc, benjamin.peterson, catalin.iacob, georg.brandl, gregory.p.smith, larry, loewis, ned.deily, python-dev, r.david.murray, schmir, serhiy.storchaka, twb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 06:59:13 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 08 Apr 2013 04:59:13 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365397153.51.0.125683211768.issue17656@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- title: Python 2.7.4 Breaks ZipFile Extraction -> Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 07:23:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Apr 2013 05:23:25 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365398605.09.0.360238069457.issue17511@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Every other editor I can remember does 'find next'. The current closing annoys me. Also, I prefer wrapping around to the top when the last item is found, rather than having to switch to find [x]up. Windows help does this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 07:29:05 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Apr 2013 05:29:05 +0000 Subject: [issue17657] IDLE: about dialog should report the full version of TK In-Reply-To: <1365392254.45.0.513038915285.issue17657@psf.upfronthosting.co.za> Message-ID: <1365398945.79.0.180411537802.issue17657@psf.upfronthosting.co.za> Terry J. Reedy added the comment: At some point, I would like us to review the whole 'about' dialog, but this should be done now. It even simplifies the code. I will test and apply this week if Roger doesn't. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 07:39:29 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Apr 2013 05:39:29 +0000 Subject: [issue17657] IDLE: about dialog should report the full version of TK In-Reply-To: <1365392254.45.0.513038915285.issue17657@psf.upfronthosting.co.za> Message-ID: <1365399569.74.0.709503275915.issue17657@psf.upfronthosting.co.za> Ned Deily added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 07:49:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 05:49:06 +0000 Subject: [issue17484] add tests for getpass In-Reply-To: <1363731601.11.0.00161818926238.issue17484@psf.upfronthosting.co.za> Message-ID: <3Zkgg53YMszRTm@mail.python.org> Roundup Robot added the comment: New changeset 4059ef685754 by R David Murray in branch 'default': #17484: add tests for getpass. http://hg.python.org/cpython/rev/4059ef685754 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 10:48:03 2013 From: report at bugs.python.org (=?utf-8?q?Izidor_Matu=C5=A1ov?=) Date: Mon, 08 Apr 2013 08:48:03 +0000 Subject: [issue17659] First weekday Message-ID: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> New submission from Izidor Matu?ov: There is no way how to figure out the first weekday: Does a week start with Monday or Saturday? (Or any other day?) According to documentation, module locale doesn't provide this information. Module calendar uses European convention (Monday is the first weekday). Purpose of this issue is to have a way how to return first weekday (Monday, Sunday, etc) Known workarounds: * http://blogs.gnome.org/patrys/2008/09/29/how-to-determine-the-first-day-of-week/ * https://github.com/projecthamster/hamster/blob/master/src/hamster/lib/stuff.py#L153 * http://stackoverflow.com/questions/4265697/how-to-determine-the-first-day-of-week-in-python ---------- components: Library (Lib) messages: 186280 nosy: IzidorMatusov priority: normal severity: normal status: open title: First weekday type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 11:09:05 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 08 Apr 2013 09:09:05 +0000 Subject: [issue17655] Use writev() function in the io module In-Reply-To: <1365382815.42.0.538101348018.issue17655@psf.upfronthosting.co.za> Message-ID: <1365412145.68.0.678795212657.issue17655@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I somehow doubt that the gain is worth the trouble, vectored disk I/O is not as interesting as vectored read/writes to a NIC. Actually, a quick search returned this link: http://www.mail-archive.com/dev at httpd.apache.org/msg23763.html Running the benchmark written by the Apache guys: $ rm -f writev.out; sync; sleep 5; ./test writev: 1s526601. copy+write: 1s323405. Doesn't really surprise me. So I'm -1, since it's unlikely to yield any improvement, and will greatly complicate the code. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 11:57:32 2013 From: report at bugs.python.org (Michael Foord) Date: Mon, 08 Apr 2013 09:57:32 +0000 Subject: [issue17502] unittest.mock: side_effect iterators ignore DEFAULT In-Reply-To: <1363835140.97.0.987850111396.issue17502@psf.upfronthosting.co.za> Message-ID: <1365415052.57.0.840270846781.issue17502@psf.upfronthosting.co.za> Michael Foord added the comment: This was committed without NEWS entry or documentation update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 11:58:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 09:58:20 +0000 Subject: [issue17655] Use writev() function in the io module In-Reply-To: <1365382815.42.0.538101348018.issue17655@psf.upfronthosting.co.za> Message-ID: <1365415100.46.0.973575746398.issue17655@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Charles-Fran?ois, it probably won't make a difference in practice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:02:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 10:02:38 +0000 Subject: [issue17484] add tests for getpass In-Reply-To: <1363731601.11.0.00161818926238.issue17484@psf.upfronthosting.co.za> Message-ID: <1365415358.12.0.0324355694569.issue17484@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Did you forget to add test_getpass.py? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:03:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Apr 2013 10:03:01 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365415381.95.0.481340252804.issue17656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, it's my fault. Here is a patch (with test) which fixes this regression in 2.7. This is 2.7 only issue, in Python 3 arcnames always are unicode. Please test on Windows. ---------- components: +Library (Lib) keywords: +patch priority: normal -> high stage: -> patch review type: crash -> behavior versions: -Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29729/zipfile_extract_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:07:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 10:07:12 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1357234686.56.0.503079428281.issue16853@psf.upfronthosting.co.za> Message-ID: <1365415632.41.0.887010278709.issue16853@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If this goes inside the select module, it could probably help issue #17552 (add socket.sendfile()) a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:13:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Apr 2013 10:13:13 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365415993.13.0.212976319405.issue16427@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27950/fast_str_hash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:13:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Apr 2013 10:13:28 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365416008.94.0.174925143461.issue16427@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27947/fast_hash_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:19:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 10:19:18 +0000 Subject: [issue17502] unittest.mock: side_effect iterators ignore DEFAULT In-Reply-To: <1363835140.97.0.987850111396.issue17502@psf.upfronthosting.co.za> Message-ID: <3Zknfs2VbHzQ4v@mail.python.org> Roundup Robot added the comment: New changeset 4d8e9c5ba651 by Andrew Svetlov in branch '3.3': Add NEWS entry for #17502: Process DEFAULT values in mock side_effect that returns iterator. http://hg.python.org/cpython/rev/4d8e9c5ba651 New changeset f82fb8813407 by Andrew Svetlov in branch 'default': Add NEWS entry for #17502: Process DEFAULT values in mock side_effect that returns iterator. http://hg.python.org/cpython/rev/f82fb8813407 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:20:08 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Apr 2013 10:20:08 +0000 Subject: [issue17502] unittest.mock: side_effect iterators ignore DEFAULT In-Reply-To: <1363835140.97.0.987850111396.issue17502@psf.upfronthosting.co.za> Message-ID: <1365416408.42.0.149530431964.issue17502@psf.upfronthosting.co.za> Andrew Svetlov added the comment: NEWS updated, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:24:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Apr 2013 10:24:48 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365416688.08.0.843890855363.issue17615@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can use a single switch instead nested switches: switch ((kind1 << 3) + kind2) { case (PyUnicode_1BYTE_KIND << 3) + PyUnicode_1BYTE_KIND: { int cmp = memcmp(data1, data2, len); ... } case (PyUnicode_1BYTE_KIND << 3) + PyUnicode_2BYTE_KIND: COMPARE(Py_UCS1, Py_UCS2); break; ... } I don't know if there is any effect. ---------- components: +Interpreter Core stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:48:10 2013 From: report at bugs.python.org (Michael Foord) Date: Mon, 08 Apr 2013 10:48:10 +0000 Subject: [issue17660] mock.patch could whitelist builtins to not need create=True Message-ID: <1365418089.99.0.0976801798706.issue17660@psf.upfronthosting.co.za> New submission from Michael Foord: When patching builtin names (e.g. open) in a specific namespace you need to specify "create=True" or patch will refuse to create a name that doesn't exist. patch could whitelist the builtin names, when the patch target is a module object, to not require the "create=True". ---------- assignee: michael.foord components: Library (Lib) keywords: easy messages: 186290 nosy: michael.foord priority: normal severity: normal stage: needs patch status: open title: mock.patch could whitelist builtins to not need create=True type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 12:52:24 2013 From: report at bugs.python.org (Kushal Das) Date: Mon, 08 Apr 2013 10:52:24 +0000 Subject: [issue17660] mock.patch could whitelist builtins to not need create=True In-Reply-To: <1365418089.99.0.0976801798706.issue17660@psf.upfronthosting.co.za> Message-ID: <1365418344.77.0.533678124063.issue17660@psf.upfronthosting.co.za> Kushal Das added the comment: Working on this. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 14:32:38 2013 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 08 Apr 2013 12:32:38 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr Message-ID: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> New submission from Thomas Wouters: The documentation of '%r' in http://docs.python.org/2/library/stdtypes.html#string-formatting-operations links to the wrong repr, the module (http://docs.python.org/2/library/repr.html#module-repr) instead of the builtin function (http://docs.python.org/2/library/functions.html#func-repr). ---------- assignee: docs at python components: Documentation keywords: easy messages: 186292 nosy: docs at python, twouters priority: normal severity: normal status: open title: documentation of '%r' links to the wrong repr versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 14:35:10 2013 From: report at bugs.python.org (Neil Hodgson) Date: Mon, 08 Apr 2013 12:35:10 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365424510.41.0.216179309626.issue17615@psf.upfronthosting.co.za> Neil Hodgson added the comment: A quick rewrite showed the single level case slightly faster (1%) on average but its less readable/maintainable. Perhaps taking a systematic approach to naming would allow Py_UCS1 to be deduced from PyUnicode_1BYTE_KIND and so avoid repeating the information in the case selector and macro invocation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 14:46:50 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Apr 2013 12:46:50 +0000 Subject: [issue17484] add tests for getpass In-Reply-To: <1363731601.11.0.00161818926238.issue17484@psf.upfronthosting.co.za> Message-ID: <1365425210.65.0.638955423914.issue17484@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed I did. That's what I get for staging it one day and committing it the next...I forgot I hadn't done the add command. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 14:48:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 12:48:19 +0000 Subject: [issue17484] add tests for getpass In-Reply-To: <1363731601.11.0.00161818926238.issue17484@psf.upfronthosting.co.za> Message-ID: <3Zkryq18F6zRYB@mail.python.org> Roundup Robot added the comment: New changeset 113ff45c3f11 by R David Murray in branch 'default': #17484: Actually add the getpass tests this time. http://hg.python.org/cpython/rev/113ff45c3f11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 14:49:14 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Apr 2013 12:49:14 +0000 Subject: [issue17484] add tests for getpass In-Reply-To: <1363731601.11.0.00161818926238.issue17484@psf.upfronthosting.co.za> Message-ID: <1365425354.49.0.896358274606.issue17484@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Thomas. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 14:54:09 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Apr 2013 12:54:09 +0000 Subject: [issue17659] First weekday In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1365425649.82.0.390361842025.issue17659@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 14:55:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 12:55:18 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1365416688.08.0.843890855363.issue17615@psf.upfronthosting.co.za> Message-ID: <1156284897.35220081.1365425712599.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > You can use a single switch instead nested switches: > > switch ((kind1 << 3) + kind2) { > case (PyUnicode_1BYTE_KIND << 3) + PyUnicode_1BYTE_KIND: { > int cmp = memcmp(data1, data2, len); > ... > } Please let's not add this kind of optifuscation unless it has a large positive effect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 14:57:17 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Mon, 08 Apr 2013 12:57:17 +0000 Subject: [issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4 Message-ID: <1365425837.0.0.73403835622.issue17662@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: When building extension modules of Python 2.7.4 through Modules/Setup.dist, the socketmodule gets built badly, as it also needs to be compiled with timemodule.c (see the attached patch). This was caused by commit 8ec39bfd1f01, which introduced usage of _PyTime_floattime() without fixing Setup.dist (note, that this is ok when compiling through setup.py, as it has: exts.append( Extension('_socket', ['socketmodule.c', 'timemodule.c'], ---------- components: Build files: python-2.7.4-properly-compile-socketmodule-by-Setupdist.patch keywords: patch messages: 186298 nosy: bkabrda priority: normal severity: normal status: open title: socketmodule raises on import when compiled using Setup.dist on 2.7.4 type: crash versions: Python 2.7 Added file: http://bugs.python.org/file29730/python-2.7.4-properly-compile-socketmodule-by-Setupdist.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 15:06:45 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 08 Apr 2013 13:06:45 +0000 Subject: [issue17658] pythonw.exe crashes on opening IDLE In-Reply-To: <1365393115.5.0.931092283515.issue17658@psf.upfronthosting.co.za> Message-ID: <1365426405.85.0.670833384502.issue17658@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Hum, do you have any environment variable that refer to Python27? In a terminal window (cmd.exe), try the following command: set | findstr /i python ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 15:25:17 2013 From: report at bugs.python.org (z06steve) Date: Mon, 08 Apr 2013 13:25:17 +0000 Subject: [issue17663] re.sub not replacing all Message-ID: <1365427517.11.0.8190689371.issue17663@psf.upfronthosting.co.za> New submission from z06steve: fails to replace last occurrence of string v_wofstgvw, reproduced in 3.2.3, 3.2.4 and 3.3.1 a=''' -------------------------------------------------------------------------------- -- V_INT_CTRC_ENTRY_DATE -------------------------------------------------------------------------------- REPLACE VIEW V_WOFSTGVW.V_INT_CTRC_ENTRY_DATE AS LOCKING ROW FOR ACCESS SELECT D.DY DY, D.DW_CRRT_FL CURRENT_FLAG, D.MTH CURRENT_MTH, (CAST(D.DY AS DATE) - EXTRACT(DAY FROM (CAST( D.DY AS DATE)))+1) CURRENT_MTH_BEG_DT, ADD_MONTHS ((CAST(D.DY AS DATE) - EXTRACT(DAY FROM (CAST( D.DY AS DATE)))+1) , 1) - 1 CURRENT_MTH_END_DT, D.WOFC_MTH_END_FLG CURRENT_MTH_END_FLG, D.WOFC_QTR_END_FLG CURRENT_QTR_END_FL, D.YR CURRENT_YEAR, ((D.YR||'01/01')(DATE)) CURRENT_YEAR_BEG_DT , ((D.YR||'12/31')(DATE)) CURRENT_YEAR_END_DT , D.WOFC_YR_END_FLG CURRENT_YEAR_END_FL, D.HDAY_FLG HOLIDAY_FLG, CAST(ADD_MONTHS (CASE WOFC_MTH_END_FLG WHEN 'Y' THEN WOFCO_FRST_DY_MTH ELSE WOFCO_BEGIN_MTH_DT END, -1)AS CHAR(7)) PREV_REP_MTH, ADD_MONTHS (CASE WOFC_MTH_END_FLG WHEN 'Y' THEN WOFCO_FRST_DY_MTH ELSE WOFCO_BEGIN_MTH_DT END, -1 ) PREV_REP_MTH_BEG_DT, ADD_MONTHS (CASE WOFC_MTH_END_FLG WHEN 'Y' THEN D.DY ELSE D.WOFCO_MTH_END_DT END, -1 ) PREV_REP_MTH_END_DT , D.PREV_MTH PRIOR_MTH, PSETM.PRIOR_SET_CURRENT_MTH, PSETM.PRIOR_SET_CURRENT_MTH_BGN_DT, PSETM.PRIOR_SET_CURRENT_MTH_END_DT, PREPSETM.PRIOR_SET_REP_MTH, PREPSETM.PRIOR_SET_REP_MTH_BGN_DT, PREPSETM.PRIOR_SET_REP_MTH_END_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN MTH ELSE PREV_MTH END REP_MTH, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN WOFCO_FRST_DY_MTH ELSE WOFCO_BEGIN_MTH_DT END REP_MTH_BEG_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN D.DY ELSE D.WOFCO_MTH_END_DT END REP_MTH_END_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN ADD_MONTHS (D.WOFCO_FRST_DY_MTH, 12 ) ELSE ADD_MONTHS (D.WOFCO_BEGIN_MTH_DT, 12) END REP_MTH_NEXT_YEAR_BEG_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN ADD_MONTHS (D.DY, 12) ELSE D.WOFCO_MTH_NXT_YR_DT END REP_MTH_NEXT_YEAR_END_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN D.YR ELSE SUBSTR (PREV_MTH, 1, 4) END REP_YEAR, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN (CAST((CAST(D.YR AS DATE FORMAT 'YYYY')||'/01/01') AS DATE FORMAT 'YYYY/MM/DD')) ELSE (CAST((SUBSTR (PREV_MTH, 1, 4) || '/01/01')AS DATE FORMAT 'YYYY/MM/DD' )) END REP_YEAR_BEG_DT, CASE WOFC_MTH_END_FLG WHEN 'Y' THEN (CAST((CAST(D.YR AS DATE FORMAT 'YYYY' )||'/12/31') AS DATE FORMAT 'YYYY/MM/DD')) ELSE (CAST((SUBSTR (PREV_MTH, 1, 4) || '/12/31') AS DATE FORMAT 'YYYY/MM/DD' )) END REP_YEAR_END_DT, D.SET_MTH SET_CURRENT_MTH, D.SET_BEGIN_MTH_DT SET_CURRENT_MTH_BGN_DT, D.SET_MTH_END_DT SET_CURRENT_MTH_END_DT, D.SET_YR SET_CURRENT_YEAR, D1.SET_CURRENT_BEG_DT SET_CURRENT_YEAR_BEG_DT, D2.SET_CURRENT_END_DT SET_CURRENT_YEAR_END_DT, D.SET_MTH_END_FLG SET_MTH_END_FLAG, D.SET_QTR_END_FLG SET_QTR_END_FLAG, CASE D.SET_MTH_END_FLG WHEN 'Y' THEN (CAST (D.SET_BEGIN_MTH_DT AS CHAR(7))) ELSE (CAST (SET_MTH_BEG_PREV_DT AS CHAR (7))) END SET_REP_MTH, CASE D.SET_MTH_END_FLG WHEN 'Y' THEN D.SET_BEGIN_MTH_DT ELSE SET_MTH_BEG_PREV_DT END SET_REP_MTH_BEG_DT, CASE D.SET_MTH_END_FLG WHEN 'Y' THEN D.SET_MTH_END_DT ELSE SET_MTH_END_PREV_DT END SET_REP_MTH_END_DT, SUBSTR (CASE D.SET_MTH_END_FLG WHEN 'Y' THEN (CAST (D.SET_BEGIN_MTH_DT AS CHAR(7))) ELSE (CAST (SET_MTH_BEG_PREV_DT AS CHAR(7))) END, 1, 4)SET_REP_YEAR , RD1.SET_RPT_YEAR_BEG_DT SET_RPT_YEAR_BEG_DT, SYB.SET_RPT_YEAR_END_DT, D.SET_YR_END_FLG SET_YEAR_END_FLAG FROM V_WOFSTGVW.D_DT D LEFT OUTER JOIN (SELECT D.SET_YR, MIN (D.SET_BEGIN_YR_DT) SET_CURRENT_BEG_DT FROM V_WOFSTGVW.D_DT D WHERE (CAST (D.SET_BEGIN_YR_DT AS CHAR(4))) = D.SET_YR GROUP BY D.SET_YR) D1 ON D1.SET_YR = D.SET_YR LEFT OUTER JOIN (SELECT D_SET_CURR_END.SET_YR, D_SET_CURR_END.DY SET_CURRENT_END_DT FROM V_WOFSTGVW.D_DT D_SET_CURR_END WHERE D_SET_CURR_END.SET_YR_END_FLG = 'Y') D2 ON D2.SET_YR = D.SET_YR LEFT OUTER JOIN (SELECT CASE WOFC_MTH_END_FLG WHEN 'Y' THEN D.YR ELSE SUBSTR (D.PREV_MTH, 1, 4) END SET_RPT_YR, MIN (D.SET_BEGIN_YR_DT) SET_RPT_YEAR_BEG_DT FROM V_WOFSTGVW.D_DT D WHERE D.PREV_MTH IS NOT NULL AND SET_BEGIN_YR_DT IS NOT NULL GROUP BY CASE WOFC_MTH_END_FLG WHEN 'Y' THEN D.YR ELSE SUBSTR (D.PREV_MTH, 1, 4) END) RD1 ON RD1.SET_RPT_YR = (CASE D.SET_MTH_END_FLG WHEN 'Y' THEN (CAST(D.SET_BEGIN_MTH_DT AS CHAR(4))) ELSE (CAST (D.SET_MTH_BEG_PREV_DT AS CHAR(4))) END ) LEFT OUTER JOIN (SELECT D.SET_MTH, MIN (D.SET_MTH_END_DT) SET_RPT_YEAR_END_DT FROM V_WOFSTGVW.D_DT D WHERE D.SET_MTH = CASE D.SET_MTH_END_FLG WHEN 'Y' THEN (CAST(D.SET_BEGIN_MTH_DT AS CHAR(4))) ELSE (CAST (SET_MTH_BEG_PREV_DT AS CHAR(4))) END GROUP BY D.SET_MTH) SYB ON ( SYB.SET_MTH = CASE WOFC_MTH_END_FLG WHEN 'Y' THEN D.YR ELSE SUBSTR (D.PREV_MTH, 1, 4) END || '/12' ) LEFT OUTER JOIN (SELECT DISTINCT D.SET_MTH_END_FLG SET_MTH_END_FLAG, D.SET_MTH PRIOR_SET_CURRENT_MTH, D.SET_BEGIN_MTH_DT PRIOR_SET_CURRENT_MTH_BGN_DT, D.SET_MTH_END_DT PRIOR_SET_CURRENT_MTH_END_DT FROM V_WOFSTGVW.D_DT D) PSETM ON PSETM.PRIOR_SET_CURRENT_MTH = (CAST (ADD_MONTHS (D.SET_BEGIN_MTH_DT, -1) AS CHAR(7))) AND PSETM.SET_MTH_END_FLAG = D.SET_MTH_END_FLG LEFT OUTER JOIN (SELECT DISTINCT D.SET_MTH_END_FLG SET_MTH_END_FLAG, D.SET_MTH PRIOR_SET_REP_MTH, D.SET_BEGIN_MTH_DT PRIOR_SET_REP_MTH_BGN_DT, D.SET_MTH_END_DT PRIOR_SET_REP_MTH_END_DT FROM V_WOFSTGVW.D_DT D) PREPSETM ON PREPSETM.PRIOR_SET_REP_MTH = (CAST (ADD_MONTHS (CASE D.SET_MTH_END_FLG WHEN 'Y' THEN D.SET_BEGIN_MTH_DT ELSE SET_MTH_BEG_PREV_DT END, -1 ) AS CHAR(7)) ) AND PREPSETM.SET_MTH_END_FLAG = D.SET_MTH_END_FLG WHERE V_WOFSTGVW.D.DY <> DATE '9999-12-31';''' re.sub('v_wofstgvw','d_dscteve', a, re.MULTILINE, re.IGNORECASE) ---------- components: Regular Expressions messages: 186300 nosy: ezio.melotti, mrabarnett, z06steve priority: normal severity: normal status: open title: re.sub not replacing all versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 15:26:19 2013 From: report at bugs.python.org (Kushal Das) Date: Mon, 08 Apr 2013 13:26:19 +0000 Subject: [issue17660] mock.patch could whitelist builtins to not need create=True In-Reply-To: <1365418089.99.0.0976801798706.issue17660@psf.upfronthosting.co.za> Message-ID: <1365427579.45.0.911560221961.issue17660@psf.upfronthosting.co.za> Kushal Das added the comment: Initial patchset along with documentation and tests update. ---------- keywords: +patch Added file: http://bugs.python.org/file29731/issue17660.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 15:36:01 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Apr 2013 13:36:01 +0000 Subject: [issue17663] re.sub not replacing all In-Reply-To: <1365427517.11.0.8190689371.issue17663@psf.upfronthosting.co.za> Message-ID: <1365428161.45.0.606058027284.issue17663@psf.upfronthosting.co.za> R. David Murray added the comment: The fourth argument to re.sub is the replacement count. You've passed it a flag. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 16:56:45 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Apr 2013 14:56:45 +0000 Subject: [issue17552] create_server In-Reply-To: <1364326073.47.0.699222209849.issue17552@psf.upfronthosting.co.za> Message-ID: <1365433005.06.0.723364300312.issue17552@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- title: socket.sendfile() -> create_server _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 16:57:11 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Apr 2013 14:57:11 +0000 Subject: [issue17552] socket.sendfile() In-Reply-To: <1364326073.47.0.699222209849.issue17552@psf.upfronthosting.co.za> Message-ID: <1365433031.56.0.00532249207075.issue17552@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- title: create_server -> socket.sendfile() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:10:06 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Apr 2013 15:10:06 +0000 Subject: [issue17651] Errno checking replaced by concrete classes inherited from OSError In-Reply-To: <1365354742.46.0.363482089834.issue17651@psf.upfronthosting.co.za> Message-ID: <1365433806.69.0.90105995436.issue17651@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I've asked atykhonov for that because we have two sets: 1. Can be done with current exception classes 2. errno values doesn't have concrete OSError inherited exception and we have to make decision: add new exceptions or use errno check. This issue don't require external changes and can be closed quickly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:13:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Apr 2013 15:13:16 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation In-Reply-To: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> Message-ID: <1365433996.94.0.331853819492.issue16551@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is an updated patch which get rid of trick with attribute caching. Globals used instead. Also added some minor style changes (dropped redundant semicolons and wrapped too long lines). ---------- Added file: http://bugs.python.org/file29732/pickle_cleanup_globals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:14:11 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Apr 2013 15:14:11 +0000 Subject: [issue17552] socket.sendfile() In-Reply-To: <1364326073.47.0.699222209849.issue17552@psf.upfronthosting.co.za> Message-ID: <1365434051.67.0.551798615728.issue17552@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: New patch in attachment includes a new 'offset' parameter, new tests and also update file offset on return or in case of error so that file.tell() can be used to tell how many bytes were transmitted at any time. This way we'll avoid using a custom exception. In summary, the API looks like this. Transfer ok: >>> file = open('somefile', 'rb') >>> s = socket.socket() >>> sock.sendfile(file) (True, None) >>> file.tell() 20000000 >>> ...and in case sendfile() could not be used internally because file was not a regular file: >>> file = io.BytesIO(b'x' * 1*1024*1024) >>> sock.sendfile(file) (False, UnsupportedOperation('fileno',)) >>> file.tell() 20000000 >>> I still haven't looked into TransmitFile on Windows as I have to figure out how to compile Python 3.4 on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:15:13 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Apr 2013 15:15:13 +0000 Subject: [issue17552] socket.sendfile() In-Reply-To: <1364326073.47.0.699222209849.issue17552@psf.upfronthosting.co.za> Message-ID: <1365434113.96.0.3490543062.issue17552@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : Added file: http://bugs.python.org/file29733/socket-sendfile2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:18:26 2013 From: report at bugs.python.org (Patrick Poitras) Date: Mon, 08 Apr 2013 15:18:26 +0000 Subject: [issue17658] pythonw.exe crashes on opening IDLE In-Reply-To: <1365393115.5.0.931092283515.issue17658@psf.upfronthosting.co.za> Message-ID: <1365434306.68.0.87098647547.issue17658@psf.upfronthosting.co.za> Patrick Poitras added the comment: It returns this: C:\Users\Acebulf>set | findstr /i python Path=C:\Python27\Lib\site-packages\PyQt4;C:\Program Files (x86)\NVIDIA Corporati on\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windo ws\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Microsoft SQL Server\1 10\Tools\Binn\;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\;C:\Program Files\In tel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Python27\ PYTHONPATH=C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:21:23 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Apr 2013 15:21:23 +0000 Subject: [issue17552] socket.sendfile() In-Reply-To: <1364326073.47.0.699222209849.issue17552@psf.upfronthosting.co.za> Message-ID: <1365434483.75.0.380020057081.issue17552@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file29733/socket-sendfile2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:21:38 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Apr 2013 15:21:38 +0000 Subject: [issue17552] socket.sendfile() In-Reply-To: <1364326073.47.0.699222209849.issue17552@psf.upfronthosting.co.za> Message-ID: <1365434498.72.0.0974668929862.issue17552@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : Added file: http://bugs.python.org/file29734/socket-sendfile2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:25:01 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 15:25:01 +0000 Subject: [issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4 In-Reply-To: <1365425837.0.0.73403835622.issue17662@psf.upfronthosting.co.za> Message-ID: <1365434701.34.0.995968942297.issue17662@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:26:54 2013 From: report at bugs.python.org (Sarah) Date: Mon, 08 Apr 2013 15:26:54 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365434814.04.0.167786401764.issue17511@psf.upfronthosting.co.za> Sarah added the comment: This changes the button's text from "Find" to "Find Again", as per Todd Rovito and Terry J. Reedy's suggestion. ---------- Added file: http://bugs.python.org/file29735/issue17511_FindAgain.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:27:38 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Apr 2013 15:27:38 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365434858.57.0.632702099227.issue17650@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry for reopening. Do you really sure that ENOTCONN and EINVAL doesn't worth to have separate sublasses? The same question about Not Supported family. I don't force to make new exception classes, just like to figure out the status quo. If we decide to keep in stone our exceptions hierarchy for OSError's ? that's ok. If list is open ? let's discuss ---------- nosy: +georg.brandl status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:28:32 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 08 Apr 2013 15:28:32 +0000 Subject: [issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4 In-Reply-To: <1365425837.0.0.73403835622.issue17662@psf.upfronthosting.co.za> Message-ID: <1365434912.86.0.922539449665.issue17662@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: This is my fault, I admit to not being an expert in non-windows builds. I've no idea how Modules/Setup.dist works but the patch looks reasonable and if it works, then all is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:36:00 2013 From: report at bugs.python.org (Paul Wiseman) Date: Mon, 08 Apr 2013 15:36:00 +0000 Subject: [issue17664] ssl.SSLError has errno value of None Message-ID: <1365435360.08.0.632289322267.issue17664@psf.upfronthosting.co.za> New submission from Paul Wiseman: I was using py2.7.3 and was getting None back for the errno attribute for an ssl.SSLError('The read operation timed out'). I noticed in the 2.7.4 release notes that it sounds like there was a fix for this: Issue #12065: connect_ex() on an SSL socket now returns the original errno when the socket's timeout expires (it used to return None). I've just tested in py2.7.4 and I'm still getting None back for the errno attribute. I'm using this code to produce the error: import requests def __init__(self, exception): # First extract the real underlying exception exception = exception.args[0] # This should be ssl.SSLError super(requests.exceptions.ConnectionError, self).__init__(exception) self.strerror = exception.strerror self.errno = exception.errno requests.exceptions.ConnectionError.__init__ = __init__ timeout_val = 0.2 while True: try: print requests.get("https://google.com", timeout=timeout_val) except requests.exceptions.SSLError as err: print err.strerror print err.errno break except Exception as err: print "Got %s: %s" % (err.__class__.__name__, err) timeout_val /= 2 ---------- messages: 186310 nosy: Paul.Wiseman priority: normal severity: normal status: open title: ssl.SSLError has errno value of None type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:38:45 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 08 Apr 2013 15:38:45 +0000 Subject: [issue17570] Improve devguide Windows instructions In-Reply-To: <1364523214.84.0.368819983889.issue17570@psf.upfronthosting.co.za> Message-ID: <1365435525.18.0.0166242370322.issue17570@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, but you cannot just rewrite ./python.exe to just python.exe At least in http://docs.python.org/devguide/buildbots you have to make probably three sections: 1. for linux users to use just ./python 2. for Mac ./python.exe 3. for Windows /PCBuild/python.exe or python_d.exe (IIRC) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:39:16 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 08 Apr 2013 15:39:16 +0000 Subject: [issue17658] pythonw.exe crashes on opening IDLE In-Reply-To: <1365393115.5.0.931092283515.issue17658@psf.upfronthosting.co.za> Message-ID: <1365435556.06.0.50774561985.issue17658@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please remove the PYTHONPATH environment variable. I don't know how it came here, but it's certainly not needed: these directories are computed at runtime when the python27 interpreter starts; it can only do harm when another interpreter is installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 17:58:15 2013 From: report at bugs.python.org (pfg) Date: Mon, 08 Apr 2013 15:58:15 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365436695.63.0.432825910386.issue17649@psf.upfronthosting.co.za> pfg added the comment: The problem is Makefile.pre.in was changed in a way that stops out-of-tree builds. The following patch by Markus Von Appen fixes it. ---------- status: closed -> open Added file: http://bugs.python.org/file29736/patch-Makefile.pre.in _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 18:00:44 2013 From: report at bugs.python.org (Sarah) Date: Mon, 08 Apr 2013 16:00:44 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365436844.81.0.991093882499.issue17511@psf.upfronthosting.co.za> Sarah added the comment: Terry- There should be a checkbutton option labeled 'Wrap Around'. This is instantiated on lines 7 and 105-111 of SearchDialogBase.py Admittedly, it is standard practice to have a 'find' function wrap around. I suppose we could have the dialog start up with the 'Wrap around' box checked. Thoughts? Note: If we're going to make a change to the 'wrap around' settings, I think we should start a new issue. Wrap around really isn't related to the 'find box closing' issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 18:04:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 16:04:01 +0000 Subject: [issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4 In-Reply-To: <1365425837.0.0.73403835622.issue17662@psf.upfronthosting.co.za> Message-ID: <3ZkxJc5Lk8zSvR@mail.python.org> Roundup Robot added the comment: New changeset bad85e4e6b7f by Kristjan Valur Jonsson in branch '2.7': Issue #17662: fix socketmodule compilation with Setup.dist. http://hg.python.org/cpython/rev/bad85e4e6b7f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 18:04:05 2013 From: report at bugs.python.org (pfg) Date: Mon, 08 Apr 2013 16:04:05 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365437045.31.0.164325630904.issue17649@psf.upfronthosting.co.za> Changes by pfg : Removed file: http://bugs.python.org/file29736/patch-Makefile.pre.in _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 18:04:41 2013 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 08 Apr 2013 16:04:41 +0000 Subject: [issue17662] socketmodule raises on import when compiled using Setup.dist on 2.7.4 In-Reply-To: <1365425837.0.0.73403835622.issue17662@psf.upfronthosting.co.za> Message-ID: <1365437081.21.0.51408040499.issue17662@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 18:05:46 2013 From: report at bugs.python.org (pfg) Date: Mon, 08 Apr 2013 16:05:46 +0000 Subject: [issue17649] Python/Python-ast.c: No such file or directory In-Reply-To: <1365299208.3.0.0356664357916.issue17649@psf.upfronthosting.co.za> Message-ID: <1365437146.87.0.275402171312.issue17649@psf.upfronthosting.co.za> pfg added the comment: Ruslan Makhmatkhanov provided this (more complete) patch. ---------- Added file: http://bugs.python.org/file29737/patch-Makefile.pre.in _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 18:59:08 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 08 Apr 2013 16:59:08 +0000 Subject: [issue17589] Make documentation about macros in C API explicit about rvalue vs statement In-Reply-To: <1364758755.79.0.998719447408.issue17589@psf.upfronthosting.co.za> Message-ID: <1365440348.91.0.352715526148.issue17589@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: There are some extension modules (pytables) that do return Py_INREF(x), x; and Py_RETURN_NONE is also defined with a comma expression. Oh, and Cython: #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 19:08:53 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 08 Apr 2013 17:08:53 +0000 Subject: [issue16895] Batch file to mimic 'make' on Windows In-Reply-To: <1365338752.27.0.647172851636.issue16895@psf.upfronthosting.co.za> Message-ID: Zachary Ware added the comment: > You seem to end your subroutines (or whatever they are called) using "goto end" rather than "exit /b". Since popd follows the "end" label, does this mean that you get a popd after calling each subroutine? Yes. > Is this intended and can it cause unmatched pushd/popd-s? It is intended and it can, but so far I haven't run into any trouble with it. However, I have realized that I haven't done any testing with some pushd's already on the stack... I'll do some more looking into that, and may have to implement either some form of callback labels or counting pushd's to properly popd. > (I am not familiar with writing batch files.) > > Also, I think 32 bit builds should be the default. Many people with 64 bit Windows are using Visual Studio Express which only has 32 bit support. Fair point. I suppose I had been assuming that the error message from not finding the proper vcvars*.bat file would be an indication to pass '--without-64-bit' to configure.bat, but it is much nicer to just fall back to 32 bit. Also, it would be nice to just implode from the start if there is no compiler available. Next version of the patch will do both of these things in configure.bat; quit with an error message if %VS100COMNTOOLS% is not defined, and check for the existence of %VS100COMNTOOLS%\..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat before setting %PY_PLATFORM% to x64. Thanks for the comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 19:10:52 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Apr 2013 17:10:52 +0000 Subject: [issue17589] Make documentation about macros in C API explicit about rvalue vs statement In-Reply-To: <1364758755.79.0.998719447408.issue17589@psf.upfronthosting.co.za> Message-ID: <1365441052.65.0.487196331631.issue17589@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 19:19:38 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Apr 2013 17:19:38 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365441578.68.0.256465717145.issue17511@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'Find Next' is the actual (and standard) suggestion. It s a trivial change given that you identified the place to make it . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 19:46:27 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 08 Apr 2013 17:46:27 +0000 Subject: [issue17665] convert to idiomatic unittest code Message-ID: <1365443187.46.0.933041957834.issue17665@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- components: Tests files: diff nosy: tshepang priority: normal severity: normal status: open title: convert to idiomatic unittest code versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29738/diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 19:55:12 2013 From: report at bugs.python.org (Peter) Date: Mon, 08 Apr 2013 17:55:12 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header Message-ID: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> New submission from Peter: Regression in Python 3.3.0 to 3.3.1, tested under Mac OS X 10.8 and CentOS Linux 64bit. The same regression also present in going from Python 2.7.3 from 2.7.4, does that need a separate issue filed? Consider this VALID GZIP file, human link: https://github.com/biopython/biopython/blob/master/Tests/GenBank/cor6_6.gb.bgz Binary link, only a small file: https://raw.github.com/biopython/biopython/master/Tests/GenBank/cor6_6.gb.bgz This is compressed using a GZIP variant called BGZF which uses multiple blocks and records additional tags in the header, for background see: http://blastedbio.blogspot.com/2011/11/bgzf-blocked-bigger-better-gzip.html $ curl -O https://raw.github.com/biopython/biopython/master/Tests/GenBank/cor6_6.gb.bgz $ cat cor6_6.gb.bgz | gunzip | wc 320 1183 14967 Now for the bug, expected behaviour: $ python3.2 Python 3.2 (r32:88445, Feb 28 2011, 17:04:33) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import gzip >>> handle = gzip.open("cor6_6.gb.bgz", "rb") >>> data = handle.read() >>> handle.close() >>> len(data) 14967 >>> quit() Broken behaviour: $ python3.3 Python 3.3.1 (default, Apr 8 2013, 17:54:08) [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.57))] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import gzip >>> handle = gzip.open("cor6_6.gb.bgz", "rb") >>> data = handle.read() Traceback (most recent call last): File "", line 1, in File "/Users/pjcock/lib/python3.3/gzip.py", line 359, in read while self._read(readsize): File "/Users/pjcock/lib/python3.3/gzip.py", line 432, in _read if not self._read_gzip_header(): File "/Users/pjcock/lib/python3.3/gzip.py", line 305, in _read_gzip_header self._read_exact(struct.unpack(" _______________________________________ From report at bugs.python.org Mon Apr 8 20:10:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 18:10:10 +0000 Subject: [issue17664] ssl.SSLError has errno value of None In-Reply-To: <1365435360.08.0.632289322267.issue17664@psf.upfronthosting.co.za> Message-ID: <1365444610.9.0.403402508763.issue17664@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The issue you mention is unrelated. connect_ex() returns an error code, it doesn't raise an exception. As for the errno attribute being None, this is because most SSLErrors don't correspond to a single OS error. And in the case you mention ("the read operation timed out"), it isn't an OS error at all: it's simply a select() call timing out. ---------- nosy: +pitrou resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 20:10:34 2013 From: report at bugs.python.org (Anselm Kruis) Date: Mon, 08 Apr 2013 18:10:34 +0000 Subject: [issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll Message-ID: <1365444634.63.0.621793850181.issue17667@psf.upfronthosting.co.za> New submission from Anselm Kruis: Version: 2.7.4 (and any prior 2.7-version. not tested with 3.x) Compiler: VS 2008 Professional If I compile Python using the batch > PCbuild\build_pgo.bat -2 Visual Studio fails to correctly collect profile information for the project "python27.dll". As a result, no real optimisation takes place. The command "build_pgo.bat -2" runs the full test suite (..\lib\test\regrtest.py) to collect profile data. Experiments show, that several test cases (i.e. test_os and test_subprocess) break the collection of profile data. Probably the failure is related to the creation of sub-processes. I consider it a Visual Studio bug. To work around this issue I created a list of good test cases and patched build_pgo.bat to run only the tests from this list. ---------- components: Build, Windows files: build_pgo-2.patch keywords: patch messages: 186322 nosy: akruis priority: normal severity: normal status: open title: Windows: build with "build_pgo.bat -2" fails to optimize python.dll type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file29739/build_pgo-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 20:12:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 18:12:37 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365444757.1.0.298195524421.issue17666@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 20:17:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 18:17:07 +0000 Subject: [issue17660] mock.patch could whitelist builtins to not need create=True In-Reply-To: <1365418089.99.0.0976801798706.issue17660@psf.upfronthosting.co.za> Message-ID: <1365445027.26.0.656421690963.issue17660@psf.upfronthosting.co.za> Antoine Pitrou added the comment: To be honest this proposal sounds like a quirk more than a feature to me. If you only special-case builtins, people will have to remember that special case and it will make the API more complicated. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 20:18:58 2013 From: report at bugs.python.org (Tomasz J. Kotarba) Date: Mon, 08 Apr 2013 18:18:58 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern Message-ID: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> New submission from Tomasz J. Kotarba: Tested in 2.7 but possibly affects the other versions as well. A real life example (note the first character '>' being lost): >>> import re >>> re.split(r'^>(.*)$', '>Homo sapiens catenin (cadherin-associated)') produces: ['', 'Homo sapiens catenin (cadherin-associated)', ''] Expected (and IMHO most useful) behaviour would be for it to return: ['', '>Homo sapiens catenin (cadherin-associated)', ''] or (IMHO much less useful as one can already get this one just by adding external grouping parentheses and it is ): ['', '>Homo sapiens catenin (cadherin-associated)', 'Homo sapiens catenin (cadherin-associated)', ''] Not sure whether it can be changed in such a mature and widely used module without breaking compatibility but just adding a new optional parameter for deciding how re.split() deals with patterns containing grouping parentheses and making it default to the current behaviour would be very helpful. Best Regards ---------- components: Regular Expressions messages: 186324 nosy: ezio.melotti, mrabarnett, triquetra011 priority: normal severity: normal status: open title: re.split loses characters matching ungrouped parts of a pattern type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 20:28:30 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Apr 2013 18:28:30 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365445710.35.0.83214306612.issue17511@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I took a look at both the 'Search' and 'Replace' dialogs and both already have wrap-around present as the default: '[x] Wrap around'. Sorry for not checking earlier. Having the find window stay open will make it much easier to visually check all the options.* The Edit menu has 3 find entries Find ... Cntl+F Find again Cntl+G Find selection Cntl+H I think these menu items should lead to a 'Find' dialog, not a 'Search' dialog. I find the name switch confusing. Both 'find' and 'find_replace' search the text (and both dialogs use SearchDialogBase). That would be a trivial change to add to the patch if everyone agrees. Otherwise it can be a separate issue. Re-considering whether we still need those 3 entries after this patch would be a separate follow-up issue. * For automated tests, is the Idle code currently organized in such a way that we can code the following without actually running Idle or showing anything on the screen: create an edit widget or window with some text, create an associated dialog box, set and unset text and options in the box, call an 'action' function, and then check in the edit window that the 'correct' text is highlighted and that the cursor is where it 'should' be? (This of course requires exact specification of 'correct' and 'should'.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 20:32:16 2013 From: report at bugs.python.org (Vhati) Date: Mon, 08 Apr 2013 18:32:16 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365445936.32.0.286151429276.issue17656@psf.upfronthosting.co.za> Vhati added the comment: The 2013-04-08 patch worked on Windows XP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 20:35:22 2013 From: report at bugs.python.org (Sarah) Date: Mon, 08 Apr 2013 18:35:22 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365446122.52.0.567624382404.issue17511@psf.upfronthosting.co.za> Sarah added the comment: 'Find Again' switched to 'Find Next' ---------- Added file: http://bugs.python.org/file29740/issue_17511_FindNext.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 20:55:39 2013 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 08 Apr 2013 18:55:39 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365447339.19.0.437034739467.issue17668@psf.upfronthosting.co.za> Matthew Barnett added the comment: It's not a bug. The documentation says """Split string by the occurrences of pattern. If capturing parentheses are used in pattern, then the text of all groups in the pattern are also returned as part of the resulting list.""" You're splitting on r'^>(.*)$', but not capturing the '>', therefore it's excluded. If you want the '>' included, then put it inside the capture group too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:13:32 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Apr 2013 19:13:32 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365448412.49.0.489291161172.issue17668@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report, but as Matt said it doesn't look like there is any bug here. The behavior you report is what the docs say it is, and it seems to me that your "most useful" suggestion would discard the information about the group match, making specifying groups in the separator pointless. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:20:16 2013 From: report at bugs.python.org (Tomasz J. Kotarba) Date: Mon, 08 Apr 2013 19:20:16 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365448816.39.0.516111117379.issue17668@psf.upfronthosting.co.za> Tomasz J. Kotarba added the comment: Hi Matthew, Thanks for such a quick reply. I know I can get the > by putting it in grouping parentheses. That's not the issue here. The documentation you quoted says that it splits the string by the occurrences _OF_PATTERN_ and that texts of all groups are _ALSO_ returned as _PART_ of the resulting list. It does not say anywhere (nor does it even suggest that) that parts of the pattern not grouped with parentheses are REMOVED. That said, I did not report this issue to split hairs (I would rather split strings with regular expressions ;)) and perform liguistic analysis of the current documentation (which is not set in stone and has been changed before). I did that because I spotted an issue which slightly limits usefulness of re.split() and suggested a potential improvement which would solve the problem and make re.split() even better than it already is. Whether the powers that be do something with this and improve re.split() is of course not my decision. Cheers, T ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:20:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 19:20:25 +0000 Subject: [issue17512] backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin In-Reply-To: <1363906583.54.0.309011739776.issue17512@psf.upfronthosting.co.za> Message-ID: <3Zl1gD2fKgzSFV@mail.python.org> Roundup Robot added the comment: New changeset be3b4aa2ad28 by doko in branch '2.7': - Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h http://hg.python.org/cpython/rev/be3b4aa2ad28 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:20:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 19:20:25 +0000 Subject: [issue13150] Most of Python's startup time is sysconfig In-Reply-To: <1318302178.08.0.514256961817.issue13150@psf.upfronthosting.co.za> Message-ID: <3Zl1gF1QZNzSCQ@mail.python.org> Roundup Robot added the comment: New changeset be3b4aa2ad28 by doko in branch '2.7': - Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h http://hg.python.org/cpython/rev/be3b4aa2ad28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:25:14 2013 From: report at bugs.python.org (Tomasz J. Kotarba) Date: Mon, 08 Apr 2013 19:25:14 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365449114.27.0.413756536696.issue17668@psf.upfronthosting.co.za> Tomasz J. Kotarba added the comment: Hi R. David Murray, Thanks for your reply. I just explained in my previous message to Matthew that documentation does actually support my view (i.e. it is an issue according to the documentation). Re. the issue you mentioned (discarding information concerning group matching) that (plus maintaining the compatibility with legacy code) is why I suggested adding a new optional argument to re.split. Apropos discrading information, the current behaviour results in discarding information about parts of the string not enclosed in grouping parentheses. Cheers, T ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:27:27 2013 From: report at bugs.python.org (Tomasz J. Kotarba) Date: Mon, 08 Apr 2013 19:27:27 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365449247.61.0.516740660034.issue17668@psf.upfronthosting.co.za> Tomasz J. Kotarba added the comment: Marking as open till I get your response. I hope you reconsider. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:27:34 2013 From: report at bugs.python.org (Matthias Klose) Date: Mon, 08 Apr 2013 19:27:34 +0000 Subject: [issue15194] libffi-3.0.11 update In-Reply-To: <1340723218.62.0.173444932066.issue15194@psf.upfronthosting.co.za> Message-ID: <1365449254.63.0.805204350701.issue15194@psf.upfronthosting.co.za> Matthias Klose added the comment: 3.0.13 is now in 2.7.4, 3.2.4, 3.3.1 and the trunk. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:28:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Apr 2013 19:28:00 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365449280.07.0.91776327014.issue17666@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh-oh-h, it's my fault. Thank you, Peter, for your report and the proposed fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:28:22 2013 From: report at bugs.python.org (Matthias Klose) Date: Mon, 08 Apr 2013 19:28:22 +0000 Subject: [issue17477] update the bsddb module do build with db 5.x versions In-Reply-To: <1363671295.4.0.641867038298.issue17477@psf.upfronthosting.co.za> Message-ID: <1365449302.7.0.914666046665.issue17477@psf.upfronthosting.co.za> Matthias Klose added the comment: was released with 2.7.4. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:30:05 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Apr 2013 19:30:05 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365449405.02.0.092198512202.issue17668@psf.upfronthosting.co.za> R. David Murray added the comment: >>> re.split('-', 'abc-def-jlk') ['abc', 'def', 'jlk'] >>> re.split('(-)', 'abc-def-jlk') ['abc', '-', 'def', '-', 'jlk'] Does that make it a bit clearer? Maybe we need an actual example in the docs. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:39:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 19:39:38 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <3Zl25Q00qjzQhr@mail.python.org> Roundup Robot added the comment: New changeset 29f0836c0456 by Serhiy Storchaka in branch '2.7': Close #17666: Fix reading gzip files with an extra field. http://hg.python.org/cpython/rev/29f0836c0456 New changeset f78d2605f452 by Serhiy Storchaka in branch '3.3': Close #17666: Fix reading gzip files with an extra field. http://hg.python.org/cpython/rev/f78d2605f452 New changeset cd5e3adc6fc1 by Serhiy Storchaka in branch 'default': Close #17666: Fix reading gzip files with an extra field. http://hg.python.org/cpython/rev/cd5e3adc6fc1 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:47:29 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 19:47:29 +0000 Subject: [issue17655] Use writev() function in the io module In-Reply-To: <1365382815.42.0.538101348018.issue17655@psf.upfronthosting.co.za> Message-ID: <1365450449.78.0.577764282148.issue17655@psf.upfronthosting.co.za> STINNER Victor added the comment: I get similar Fedora 18 (Linux kernel 3.8.1), ext4 filesystem: $ rm -f writev.out; sync; sleep 5; ./copy_write copy+write: 1s576530. $ rm -f writev.out; sync; sleep 5; ./writev writev: 1s686619. I agree to close the issue. At least this issue can be used later is someone else ask why Python is not using writev() ;-) ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:52:20 2013 From: report at bugs.python.org (Tomasz J. Kotarba) Date: Mon, 08 Apr 2013 19:52:20 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365450740.12.0.256695691055.issue17668@psf.upfronthosting.co.za> Tomasz J. Kotarba added the comment: I agree that introducing an example like that plus making some slight changes in wording would be a welcome change to the docs to clearly explain the current behaviour. Still, I maintain it would be useful to give users the option I described to allow them decide what output they get (i.e. also get texts matching the whole pattern and/or those matching the pattern and groups (e.g. pattern returned as kind of "group 0")). As I said though, I realise that it is not for me to decide so I am just suggesting it to the powers that be. Cheers, T ---------- components: -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 21:53:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 19:53:26 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <3Zl2PK1yZXzQFR@mail.python.org> Roundup Robot added the comment: New changeset cc74062c28a6 by Victor Stinner in branch 'default': Issue #17615: Expand expensive PyUnicode_READ() macro in unicode_compare(): http://hg.python.org/cpython/rev/cc74062c28a6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 22:05:43 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Apr 2013 20:05:43 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365451543.92.0.249845024872.issue17668@psf.upfronthosting.co.za> R. David Murray added the comment: As you pointed out, you can already get that behavior by enclosing the entire split expression in a group. I don't see that there is any functionality missing here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 22:29:19 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 08 Apr 2013 20:29:19 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365452959.73.0.693346353508.issue17650@psf.upfronthosting.co.za> Georg Brandl added the comment: Antoine will have to decide on this, but IMO now that we released the PEP 3151 set in Python 3.3, we should not continue adding new builtin exceptions in every release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 22:35:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 20:35:02 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <3Zl3KK39wHzQKH@mail.python.org> Roundup Robot added the comment: New changeset db4a1a3d1f90 by Victor Stinner in branch 'default': Issue #17615: Add tests comparing Unicode strings of different kinds http://hg.python.org/cpython/rev/db4a1a3d1f90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 22:42:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 20:42:11 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365453731.47.0.137422415994.issue17650@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A bit in detail: - ENOTCONN is a programming error, so there's no use actually catching it (you should fix the bug instead when you encounter it) - EINVAL could be a candidate, but unfortunately it would clash quite nastily with ValueError and lead to confusion; therefore I think it's better not wrapping it ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:02:08 2013 From: report at bugs.python.org (Michael Foord) Date: Mon, 08 Apr 2013 21:02:08 +0000 Subject: [issue17660] mock.patch could whitelist builtins to not need create=True In-Reply-To: <1365418089.99.0.0976801798706.issue17660@psf.upfronthosting.co.za> Message-ID: <1365454928.32.0.984990886232.issue17660@psf.upfronthosting.co.za> Michael Foord added the comment: I don't think that's a particular issue. In general you only need to use "create=True" if a name is *not* available in a namespace. Builtin names are odd in that you can use them in a namespace even though they don't exist there - so you have to *remember* to use "create=True" even though the name *is* available. So this issue is about fixing that quirk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:06:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Apr 2013 21:06:06 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <3Zl41B280KzRNT@mail.python.org> Roundup Robot added the comment: New changeset d3185be3e8d7 by Victor Stinner in branch 'default': Issue #17615: Comparing two Unicode strings now uses wmemcmp() when possible http://hg.python.org/cpython/rev/d3185be3e8d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:16:45 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 21:16:45 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365455805.95.0.579588638423.issue17615@psf.upfronthosting.co.za> STINNER Victor added the comment: Neil.Hodgson wrote: "The patch fixes the performance regression on Windows. The 1:1 case is better than either 3.2.4 or 3.3.1 downloads from python.org. Other cases are close to 3.2.4, losing at most around 2%." Nice, but make sure that your are using the same compiler with the same options (ex: make sure that you are compiling in Release mode). Neil.Hodgson wrote: "Perhaps taking a systematic approach to naming would allow Py_UCS1 to be deduced from PyUnicode_1BYTE_KIND and so avoid repeating the information in the case selector and macro invocation." I don't know how to do that in C. Anyway, I prefer to have a more explicit call to a "simple" macro than magic implicit arguments. Optimizations sometimes make the code harder to read (a good example: the whole PEP 393)... -- I wrote specialized functions to compare strings for each combination of Unicode kinds, and I added a fast path using wmemcmp() when possible. I don't see other speedup. On Linux, Comparing astral strings in Python 3.4 is now 3 times faster than Python 3.2 and 3.3. I achieved my goal, I can close the issue :-D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:16:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 21:16:52 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365455812.57.0.981893379672.issue17615@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:22:16 2013 From: report at bugs.python.org (Paul Wiseman) Date: Mon, 08 Apr 2013 21:22:16 +0000 Subject: [issue17664] ssl.SSLError has errno value of None In-Reply-To: <1365435360.08.0.632289322267.issue17664@psf.upfronthosting.co.za> Message-ID: <1365456136.29.0.31765277289.issue17664@psf.upfronthosting.co.za> Paul Wiseman added the comment: Ah ok, thanks for clearing that up. I thought there'd have been a socket.error with ETIMEDOUT raised as the underlying exception, similar to if it times out during the non-ssl part of the request ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:50:56 2013 From: report at bugs.python.org (Federico Schwindt) Date: Mon, 08 Apr 2013 21:50:56 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1306354802.94.0.44002539476.issue12181@psf.upfronthosting.co.za> Message-ID: <1365457856.21.0.27372180844.issue12181@psf.upfronthosting.co.za> Federico Schwindt added the comment: New version hopefully good and ready for inclusion. Please note that the tests are still broken and need to be addressed (bignum and sys.maxsize passed to ident and data respectively). Thanks. ---------- Added file: http://bugs.python.org/file29741/patch-Modules_selectmodule_c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:51:03 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 21:51:03 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365457863.66.0.949208847683.issue16427@psf.upfronthosting.co.za> STINNER Victor added the comment: fast_hash_3.patch is a litte bit (6%) slower for Unicode string shorter than 10 characters, but much faster for string equal or longer than 100 characters (up to 10x faster). I used the str type and disabled its cache ("_PyUnicode_HASH(self) = x;" in unicode_hash()) to run my benchmark. Summary??????? | ??original | ???????patched ---------------+------------+--------------- Length 1?????? | 231 ns (*) | ??244 ns (+6%) Length 3?????? | 238 ns (*) | ??253 ns (+6%) Length 10????? | 254 ns (*) | ????????251 ns Length 20????? | 280 ns (*) | ??256 ns (-8%) Length 100???? | 528 ns (*) | ?321 ns (-39%) Length 10 ** 4 | ?32 us (*) | 9.49 us (-70%) Length 10 ** 8 | 329 ms (*) | ?104 ms (-68%) ---------------+------------+--------------- Total????????? | 329 ms (*) | ?104 ms (-68%) ---------- Added file: http://bugs.python.org/file29742/bench_hash.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:51:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 21:51:18 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365457878.13.0.307949015462.issue16427@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file29743/bench_hash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 8 23:59:22 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Apr 2013 21:59:22 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365458362.68.0.477506303462.issue16427@psf.upfronthosting.co.za> STINNER Victor added the comment: Does anyone know if fast_hash_3.patch may reduce the quality of the hash function? (May the patched hash function produce more collisions? The "Avalanche effect" thing.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 00:49:14 2013 From: report at bugs.python.org (Frank Hamand) Date: Mon, 08 Apr 2013 22:49:14 +0000 Subject: [issue17669] Segfault caused by Message-ID: <1365461354.47.0.82208645723.issue17669@psf.upfronthosting.co.za> Changes by Frank Hamand : ---------- components: Interpreter Core, Windows nosy: fhamand priority: normal severity: normal status: open title: Segfault caused by type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 00:55:26 2013 From: report at bugs.python.org (Frank Hamand) Date: Mon, 08 Apr 2013 22:55:26 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from Message-ID: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> New submission from Frank Hamand: I've found a very strange bug in python 3.3 It's taken me around an hour just to narrow it down to a small case where it happens. I cannot for the life of me figure out the exact cause. It seems to have something to do with "yield from". I've attached a case which reproduces this. Run python3.3 test.py, it should segfault on linux, "stopped responding" on windows. Tested with OS: Linux Debian-60-squeeze-32-minimal 2.6.32-5-686-bigmem PY: Python 3.3.1rc1 (default, Mar 30 2013, 21:44:39) OS: Windows 7 64 bit PY: Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 NOTES: If you get rid of "import logging" in generators.py, it only crashes if there's no __pycache__ ---------- title: Segfault caused by -> Segfault caused by weird combination of imports and yield from Added file: http://bugs.python.org/file29744/segfault.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 00:59:10 2013 From: report at bugs.python.org (Frank Hamand) Date: Mon, 08 Apr 2013 22:59:10 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from In-Reply-To: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> Message-ID: <1365461950.51.0.580496559991.issue17669@psf.upfronthosting.co.za> Frank Hamand added the comment: The file contents so people dont have to download the zip: generators.py: --------------------------- def subgen(): yield def other_gen(self): move = yield from subgen() game.py: --------------------------- class Game(object): def __init__(self): self.gen = self.first_gen() next(self.gen) def first_gen(self): while True: from generators import \ other_gen yield from other_gen(self) test.py: --------------------------- from game import Game Game() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 01:05:48 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Apr 2013 23:05:48 +0000 Subject: [issue17626] set's __isub__ doesn't support non-sets. In-Reply-To: <1365010498.59.0.57626371366.issue17626@psf.upfronthosting.co.za> Message-ID: <1365462348.48.0.429498704329.issue17626@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Confirmed. This is by design. Guido has long lamented that the += operator for lists would accept any iterable. This led to a number of surprises: s= ['hello']; s += 'world' # Oops! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 01:06:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 23:06:33 +0000 Subject: [issue17626] set's __isub__ doesn't support non-sets. In-Reply-To: <1365010498.59.0.57626371366.issue17626@psf.upfronthosting.co.za> Message-ID: <1365462393.99.0.825908502286.issue17626@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I actually like that list.__iadd__ accepts any iterable, it's a rather nice piece of duck-typing. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 01:24:34 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 08 Apr 2013 23:24:34 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from In-Reply-To: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> Message-ID: <1365463474.32.0.221984191281.issue17669@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 01:26:31 2013 From: report at bugs.python.org (=?utf-8?q?Alfredo_Solano_Mart=C3=ADnez?=) Date: Mon, 08 Apr 2013 23:26:31 +0000 Subject: [issue17670] expandabs() weirdness Message-ID: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> New submission from Alfredo Solano Mart?nez: I stumbled upon this by chance. Is the following behaviour by design? >>> s = 'a\tb' >>> s.expandtabs(1) == s.expandtabs(2) True In fact: >>> s.expandtabs(1) 'a b' # 1 space >>> s.expandtabs(2) 'a b' # 1 space >>> s.expandtabs(3) 'a b' # 2 spaces >>> s.expandtabs(4) 'a b' # 3 spaces It seems to be an off-by-one difference from 2 onwards. Tested with python versions 2.7.4, 3.2.4 and 3.3.1 on a Linux x86_64 machine. ---------- components: Library (Lib) messages: 186358 nosy: asolano priority: normal severity: normal status: open title: expandabs() weirdness type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 01:32:07 2013 From: report at bugs.python.org (Neil Hodgson) Date: Mon, 08 Apr 2013 23:32:07 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365463927.73.0.415275494068.issue17615@psf.upfronthosting.co.za> Neil Hodgson added the comment: Including the wmemcmp patch did not improve the times on MSC v.1600 32 bit - if anything, the performance was a little slower for the test I used: a=['C:/Users/Neil/Documents/?','C:/Users/Neil/Documents/?']156 specialised: [0.9125948707773204, 0.8990815272107868, 0.9055365478250721] wmemcmp: [0.9287715478844594, 0.926606017373151, 0.9155132192031097] Looking at the assembler, there is a real call to wmemcmp which adds some time and wmemcmp does not seem to be optimized compared to a simple loop. However, the use of memcmp for 1:1 is a big win. Replacing the memcmp with COMPARE(Py_UCS1, Py_UCS1) shows memcmp is 45% faster on 100 character strings. memcmp doesn't generate a real call: instead there is an inline unrolled (4 bytes per iteration) loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 01:55:32 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 08 Apr 2013 23:55:32 +0000 Subject: [issue17671] io.BufferedRWPair can use uninitialized members Message-ID: <1365465332.23.0.700317324795.issue17671@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc: This segfaults on all Python versions: io.BufferedRWPair.__new__(io.BufferedRWPair).read() The various "_forward_call" methods should check that the reader and writer objects are correctly initialized. Not NULL, at the very least. ---------- components: IO messages: 186360 nosy: amaury.forgeotdarc, pitrou priority: normal severity: normal status: open title: io.BufferedRWPair can use uninitialized members type: crash versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 02:13:56 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 09 Apr 2013 00:13:56 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365466436.14.0.328864026294.issue15518@psf.upfronthosting.co.za> Changes by Chris Calloway : Removed file: http://bugs.python.org/file29682/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 02:19:49 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 09 Apr 2013 00:19:49 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365466789.05.0.907220566462.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: The attached file test_filecmp_layouts.rst documents the directory and file layouts for complete test coverage of filecmp.dircmp report methods to aid in review discussion of patch. ---------- Added file: http://bugs.python.org/file29745/test_filecmp_layouts.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 02:21:59 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 09 Apr 2013 00:21:59 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365466919.65.0.0580531293569.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: The attached file test_filecmp_reports.rst documents the reports generated by filecmp.dircmp test methods if the directory and file layouts in test_filecmp_layouts.rst are followed to aid in review discussion of patch. ---------- Added file: http://bugs.python.org/file29746/test_filecmp_reports.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 02:49:53 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Apr 2013 00:49:53 +0000 Subject: [issue17670] expandtabs() weirdness In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1365468593.3.0.74100049937.issue17670@psf.upfronthosting.co.za> Ned Deily added the comment: Yes, the behavior is by design. I think you are misunderstanding how exandtabs() works. The "tabsize" argument indicates the number of columns each tab position occupies. So, with a tabsize of 4, the tab positions occur every four columns; the tab positions are where the characters immediately following the tab character start. Perhaps this example will make the behavior clearer: >>> '1\t2'.expandtabs(4) '1 2' >>> '12\t3'.expandtabs(4) '12 3' >>> '123\t4'.expandtabs(4) '123 4' ---------- nosy: +ned.deily resolution: -> works for me stage: -> committed/rejected status: open -> closed title: expandabs() weirdness -> expandtabs() weirdness _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 03:05:15 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 09 Apr 2013 01:05:15 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365469515.26.0.990186381229.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: The attached patch issue-15518-1.patch replaces previous patch proposals for this issue. The patch implements the suggestion to factor code common to report TestCase classes into a common base class BaseReportTestCase. Apologies for not having that in the previous patch. Concerning the major point of msg186123, I had anticipated that there would need to be some discussion concerning the complexity of test data layouts and expected reports. So I have attached two visual aids to facilitate review and feedback. I made many such graphs when tracing the minimal path for complete test coverage and found them useful. test_filecmp_layouts.rst details the directory and file layouts minimally necessary to provide complete test coverage for the report methods in filecmp.dircmp. The layouts are shown in pretty-printed os.walk format. test_filecmp_reports.rst details the reports which result from those layouts when all filecmp.dircmp report methods are exercised against them. The reports are shown as rendered by printing. Both visual aids are laid out as tables, with TestCase names as column headers, and test_ method names within those TestCases as row headers. Both visual aids identify identical cells by an index number in the bottom right hand corner of each cell for cells that are duplicated. The layouts table identifies six common directory and file layouts that would be necessary within a proposed filecmpdata directory. I had created these layouts in setUp methods in order to follow the pre-existing style of the test script. I agree that doing so added to the test code complexity. I agree with the suggestion to instead put the layouts in a filecmpdata directory. Before I revise the patch to do that, however, I just want in understood that there are six layouts minimally necessary in the proposed filecmpdata. Placing the layouts in a filecmpdata directory will eliminate the need for a tearDown method in BaseReportTestCase. Placing layouts in a filecmpdata directory will faciliate the revision of the pre-existing TestCases in the script, as they use similar layouts currently created in setUp methods and modified in test_ methods. ---------- Added file: http://bugs.python.org/file29747/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 03:27:24 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Apr 2013 01:27:24 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from In-Reply-To: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> Message-ID: <1365470844.88.0.591242802043.issue17669@psf.upfronthosting.co.za> R. David Murray added the comment: The crashing version has 'import logging' at the top of generators.py. I did not experience a crash when it was absent even if there was no __pycache__. It also doesn't crash if the import is moved out of the body of first_gen. FAULTHANDLER doesn't fair too well on this one, no real surprise :) Fatal Python error: Segmentation fault Current thread 0xb75856c0: zsh: segmentation fault PYTHONFAULTHANDLER=true ../python test.py ---------- nosy: +brett.cannon, eric.snow, pitrou, r.david.murray, vinay.sajip versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 04:00:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Apr 2013 02:00:20 +0000 Subject: [issue17657] IDLE: about dialog should report the full version of TK In-Reply-To: <1365392254.45.0.513038915285.issue17657@psf.upfronthosting.co.za> Message-ID: <3ZlBXg6FJMzN4q@mail.python.org> Roundup Robot added the comment: New changeset 9b6de25c6054 by Roger Serwy in branch '2.7': #17657: Show full Tk version in IDLE's about dialog. http://hg.python.org/cpython/rev/9b6de25c6054 New changeset 769699f0a760 by Roger Serwy in branch '3.3': #17657: Show full Tk version in IDLE's about dialog. http://hg.python.org/cpython/rev/769699f0a760 New changeset 50164abbfc98 by Roger Serwy in branch 'default': #17657: merge with 3.3. http://hg.python.org/cpython/rev/50164abbfc98 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 04:06:06 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Apr 2013 02:06:06 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365473166.22.0.446502275464.issue16427@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 04:09:28 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 09 Apr 2013 02:09:28 +0000 Subject: [issue17589] Make documentation about macros in C API explicit about rvalue vs statement In-Reply-To: <1364758755.79.0.998719447408.issue17589@psf.upfronthosting.co.za> Message-ID: <1365473368.19.0.268179976466.issue17589@psf.upfronthosting.co.za> Larry Hastings added the comment: Amaury: I'd appreciate it if you'd bring those examples up on bug 17206. If we're going to change the semantics of Py_INCREF I'd prefer we did it with our eyes wide open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 04:12:54 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 09 Apr 2013 02:12:54 +0000 Subject: [issue17657] IDLE: about dialog should report the full version of TK In-Reply-To: <1365392254.45.0.513038915285.issue17657@psf.upfronthosting.co.za> Message-ID: <1365473574.77.0.0310135590864.issue17657@psf.upfronthosting.co.za> Roger Serwy added the comment: Let's discuss improving the about dialog on idle-dev or in a new issue. Thanks for the patch, Todd! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 04:15:15 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 09 Apr 2013 02:15:15 +0000 Subject: [issue17589] Make documentation about macros in C API explicit about rvalue vs statement In-Reply-To: <1364758755.79.0.998719447408.issue17589@psf.upfronthosting.co.za> Message-ID: <1365473715.63.0.831379237333.issue17589@psf.upfronthosting.co.za> Larry Hastings added the comment: Oh, and, yes, it's true that Py_RETURN_NONE currently takes advantage of Py_INCREF being an rvalue, and changing Py_INCREF to a statement would break the existing implementation. But Py_RETURN_NONE itself is of necessity a statement. We would simply change Py_RETURN_NONE's implementation to multiple statements, probably with the do { ... } while(0) trick, so it worked again. I'd be shocked if that change broke any existing code. So that's no big deal. Having external code that depends on Py_INCREF being an rvalue is my concern, and what I hoped you'd bring up on bug #17206. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 06:15:54 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 09 Apr 2013 04:15:54 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from In-Reply-To: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> Message-ID: <1365480954.61.0.371090198127.issue17669@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is the patch. I'll have to think about whether there's a self-contained way to test this. ---------- assignee: -> benjamin.peterson keywords: +patch Added file: http://bugs.python.org/file29748/gen_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 06:20:52 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 09 Apr 2013 04:20:52 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365481252.99.0.695562617739.issue15518@psf.upfronthosting.co.za> Changes by Chris Calloway : Removed file: http://bugs.python.org/file29747/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 06:22:13 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 09 Apr 2013 04:22:13 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365481333.64.0.96829370769.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: Fix calls to BaseReportTestCase methods in subclasses. Not an override so don't need super(). ---------- Added file: http://bugs.python.org/file29749/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 06:45:38 2013 From: report at bugs.python.org (Hiroaki Kawai) Date: Tue, 09 Apr 2013 04:45:38 +0000 Subject: [issue17672] ssl clean shutdown Message-ID: <1365482738.48.0.840321565435.issue17672@psf.upfronthosting.co.za> New submission from Hiroaki Kawai: When using ssl module, I sometimes get unexpected error. The observed error varies in different situations. After the investigation, I found the reason was that ssl shutdown was not performed and sometimes RST was sent over the network instead of FIN. I created a patch against 2.7 branch. ---------- components: Library (Lib) files: python27.patch keywords: patch messages: 186372 nosy: Hiroaki.Kawai priority: normal severity: normal status: open title: ssl clean shutdown type: behavior 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/file29750/python27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 06:46:11 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 09 Apr 2013 04:46:11 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365482771.01.0.224847063617.issue17511@psf.upfronthosting.co.za> Roger Serwy added the comment: I tried the patch against 2.7 and it appears to work, but might introduce another interface problem. The search dialog opens up as a modal window which disallows the user from changing the text. This may or may not be desirable. The technique of using the "hit" tag for highlighting the search results depends on this modal behavior, otherwise one can edit the text and "spread" the hit tag around. If you comment out the "grab_set" in Lib/idlelib/SearchDialogBase.py and then disable the colorizer in the editor window by pressing Ctrl+/ then you can spread the hit tag. (You can also disable the colorizer by saving to a file without a .py or .pyw extension). Should the Search Dialog be modal? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 06:48:14 2013 From: report at bugs.python.org (Hiroaki Kawai) Date: Tue, 09 Apr 2013 04:48:14 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <1365482738.48.0.840321565435.issue17672@psf.upfronthosting.co.za> Message-ID: <1365482894.36.0.966346920038.issue17672@psf.upfronthosting.co.za> Changes by Hiroaki Kawai : ---------- title: ssl clean shutdown -> ssl unclean shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 06:59:52 2013 From: report at bugs.python.org (Tomasz J. Kotarba) Date: Tue, 09 Apr 2013 04:59:52 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365483592.59.0.797946847488.issue17668@psf.upfronthosting.co.za> Tomasz J. Kotarba added the comment: Hi, I can still see one piece of functionality I have mentioned missing. Using my first example, even when one uses '^(>(.*))$' one cannot get ['', '>Homo sapiens catenin (cadherin-associated)', ''] as one will get a four-element list and need to deal with the third element of the returned list (i.e. the match for a group). Having a parameter I have described before which allows for getting the output similar to what one gets for groups but for the whole pattern (and only that) would be very convenient for some scenarios (like when writing a procedure which processes texts using different (and unknown at the time of writing the procedure) regex patterns which uses a variable number of groups but also the pattern as a whole (also for performing the split operation)). Of course it can be worked around using many different approaches but still, as I said at start, I believe it would be useful (and would not break compatibility). Another possible solution (i.e. different than the one I suggested at start) would be to have a parameter to tell re.split to ignore the groups (or, going even further, to select which groups to ignore). Anyway, I am not the developer of this module so if you feel it would be too much of a bother to add such a parameter just for the sake of convenience then, by all means, please feel free to disregard my comments and just close this report. Cheers, T P.S. It is very late so I can only hope I have been sane enough to properly / clearly express my thoughts. Apologies if not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 07:24:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Apr 2013 05:24:27 +0000 Subject: [issue17648] test_urllib2 convert doctests to unittest In-Reply-To: <1365291914.89.0.625576108544.issue17648@psf.upfronthosting.co.za> Message-ID: <3ZlH4B5QjfzRdr@mail.python.org> Roundup Robot added the comment: New changeset eb632aafff57 by Senthil Kumaran in branch 'default': #17648 - Clean up test_urllib2.py. Converted doctests to unittest for http://hg.python.org/cpython/rev/eb632aafff57 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 07:26:38 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Apr 2013 05:26:38 +0000 Subject: [issue17648] test_urllib2 convert doctests to unittest In-Reply-To: <1365291914.89.0.625576108544.issue17648@psf.upfronthosting.co.za> Message-ID: <1365485198.51.0.131985571458.issue17648@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I have pushed the changes since they are restricted to test files. If there are review comments, I shall do make the changes. I shall consider to to make 3.3 tests close to default branch ones so that fixes can be backported. (Leaving the bug open for that). ---------- resolution: -> fixed stage: -> committed/rejected type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 07:34:52 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Apr 2013 05:34:52 +0000 Subject: [issue6640] urlparse should parse mailto: URL headers as query parameters In-Reply-To: <1249346554.96.0.279967945769.issue6640@psf.upfronthosting.co.za> Message-ID: <1365485692.51.0.338566365773.issue6640@psf.upfronthosting.co.za> Senthil Kumaran added the comment: RFC3986 bears the weightage since urlparse aims to satisfy that. As per that, mailto should return the url as path, and current urlparse behaves properly. $ ./python.exe Python 3.4.0a0 (default:50164abbfc98+, Apr 8 2013, 22:19:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import urllib.parse >>> urllib.parse.urlparse("mailto:foo at example.com?subject=hi") ParseResult(scheme='mailto', netloc='', path='foo at example.com', params='', query='subject=hi', fragment='') >>> So, I am closing this bug as won't fix. ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 07:35:01 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Apr 2013 05:35:01 +0000 Subject: [issue6640] urlparse should parse mailto: URL headers as query parameters In-Reply-To: <1249346554.96.0.279967945769.issue6640@psf.upfronthosting.co.za> Message-ID: <1365485701.29.0.660845480079.issue6640@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: fixed -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 07:47:31 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 05:47:31 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1365457856.21.0.27372180844.issue12181@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > New version hopefully good and ready for inclusion. Looks good to me. Since I assume you tested your patch on OpenBSD, to me it's ready for commit. I won't be able to do it myself before two weeks though, so if someone beats me to it, go ahead! > Please note that the tests are still broken and need to be addressed (bignum and sys.maxsize passed to ident and data respectively). If you could fill a separate issue for that, it would be great. BTW, there are other OpenBSD-specific issues on the report, and we don't have that many contributors (AFAICT noone): so if you can have a look at them, that would be great (especially since our OpenBSD buildbots have all been down for some time now). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:07:26 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 06:07:26 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1306354802.94.0.44002539476.issue12181@psf.upfronthosting.co.za> Message-ID: <1365487646.63.0.833039133285.issue12181@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:12:18 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 09 Apr 2013 06:12:18 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365487938.37.0.89116732179.issue17661@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for catching this; Sphinx? lookup is confusing sometimes. Using `.repr` or something similar will fix it. ---------- nosy: +eric.araujo, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:14:12 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 09 Apr 2013 06:14:12 +0000 Subject: [issue17659] First weekday In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1365488052.08.0.415818243225.issue17659@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m not sure I understand the request. Is it that you want to know if you should e.g. display a calendar with Monday or Sunday in the first column depending on the user country? It looks like this could belong in the locale or calendar module, if there is a clear 1:1 mapping of locale to first week day (the links you gave seem to indicate that there is one). I think a new API should allow people to pass the locale explicitly: for example, I may want to read something in English, but having the Monday as first weekday makes calendars much easier to understand for me. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:14:45 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 09 Apr 2013 06:14:45 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365488085.97.0.949993181955.issue17661@psf.upfronthosting.co.za> Georg Brandl added the comment: It just highlights the mistake we made calling a builtin module the same name as a builtin function :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:16:23 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Apr 2013 06:16:23 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365488183.09.0.505372321221.issue17511@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The modal versus non-modal issue, plus the Windows hi-lite issue, may partly explain the current design. It is actually quite usable once understood. The problem is that the current sparse doc does not adequately explain the intention - use ^F once to set the key and find it once, use ^G to find again. It might help if the Find box itself had a reminder. "Use to find the text again after this box closes." I suspect I read and understood the use of ^G once (years ago) and just forgot it due to disuse. I do not think we should change the current design without more thought and discussion*. The current behavior is intended and not a bug. I suspect that there are people who have learned it and use it as is. For Notepad++ on Windows, the model search window goes somewhat transparent when one shifts focus to the edit window by clicking on it. However, one must either do this or click [close] on the dialog in order to edit. One can 'find next' either by clicking the Find Next button *or* (when the dialog is closed) by hitting the key bound to find-next. Having to explicitly close the window to edit is a trade-off. It makes it easier to find - find- find without editing. It makes it a bit harder to actually edit after find (an extra action). The one search thing I do constantly in Notepad++ that is more painful is finding all occurrences in the current file. Find in Files defaults to *.py in the current directory, so one has to replace '*' with the current file name. There should be a Find All button in the Find box (like Notepad++) or a Current File button in the Find in Files box. *Another issue: The addition of Cut Copy Paste to the *top* of the right-click context menu for the Find in Files *Output* window is a nuisance. It makes it much harder to jump to the file and line of each entry as one now has to slide the mouse much further to get to the 'Go to file/line' entry. I think this should be changed. My point for this issue is that changing features requires thinking about more than just one behavior or use in isolation. ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:21:24 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Apr 2013 06:21:24 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365488484.52.0.485966076314.issue17668@psf.upfronthosting.co.za> R. David Murray added the comment: Only group the stuff you want to see in the result: >>> re.split(r'(^>.*$)', '>Homo sapiens catenin (cadherin-associated)') ['', '>Homo sapiens catenin (cadherin-associated)', ''] >>> re.split(r'^(>.*)$', '>Homo sapiens catenin (cadherin-associated)') ['', '>Homo sapiens catenin (cadherin-associated)', ''] If you are using grouping to get alternatives, you can use a non-capturing group: >>> re.split(r'(ca(?:t|d))', '>Homo sapiens catenin (cadherin-associated)') ['>Homo sapiens ', 'cat', 'enin (', 'cad', 'herin-associated)'] (By the way, I'm a bit confused as to what exactly you are splitting in your original example, since you seem to be matching the whole string, and only if it is the whole string. On the other hand, regular expressions regularly confuse me... :) I indeed do not think it is worth complicating the interface to handle the unusual case of accepting and applying unknown regexes. The one change I could see as a possibility would be to allow all of the groups matched by the split regex to appear as a single sublist. But I'm not the maintainer of this module either :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:27:01 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Apr 2013 06:27:01 +0000 Subject: [issue17659] First weekday In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1365488821.28.0.982050325008.issue17659@psf.upfronthosting.co.za> R. David Murray added the comment: I believe the request is exactly a function in the locale module to expose the locale-dependent calendar-week-start-day information based on the algorithm in the linked articles. As for being able to pass in the locale, that's a general problem with the current locale API, and probably should be fixed as part of a general API enhancement, rather than special casing this one new function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:39:28 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Tue, 09 Apr 2013 06:39:28 +0000 Subject: [issue17487] wave.Wave_read.getparams should be more user friendly In-Reply-To: <1363726749.83.0.981836859976.issue17487@psf.upfronthosting.co.za> Message-ID: <1365489568.69.0.902847217131.issue17487@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hello. I received the confirmation for my CLA, could you commit the patch? Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 08:42:04 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 09 Apr 2013 06:42:04 +0000 Subject: [issue17206] Py_XDECREF() expands its argument multiple times In-Reply-To: <1360858057.09.0.617835061471.issue17206@psf.upfronthosting.co.za> Message-ID: <1365489724.29.0.756364385094.issue17206@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: As I wrote in issue17589, there are some extension modules (pytables) that which assume that Py_INCREF is an expression: return Py_INCREF(x), x; and Py_RETURN_NONE is also defined with a comma expression. Oh, and Cython: #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 09:08:43 2013 From: report at bugs.python.org (paul j3) Date: Tue, 09 Apr 2013 07:08:43 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1365491323.44.0.501518162998.issue9253@psf.upfronthosting.co.za> paul j3 added the comment: I think this problem arises from a change made in http://bugs.python.org/issue10424 Changeset to default (i.e. development) is http://hg.python.org/cpython/rev/cab204a79e09 Near the end of _parse_known_args it removes a: if positionals: self.error(_('too few arguments')) with a scan for required options that have not been seen. Ordinary positionals are required. But a SubParsersAction is not required. So we no longer get a warning. http://bugs.python.org/issue12776 changed this block of code as well. Notice the 2.7 and 3.2 branches have this 'too few arguments' error, but the default does not. The default value for Action.required is False. In _get_positional_kwargs(), a positional's required is set based on nargs (e.g. '+' is required, '*' not). But add_subparsers() does not use this, so its 'required' ends up False. This fudge seems to do the trick: parser = ArgumentParser(prog='test') subparsers = parser.add_subparsers() subparsers.required = True subparsers.dest = 'command' subparser = subparsers.add_parser("foo", help="run foo") parser.parse_args() producing an error message: usage: test [-h] {foo} ... test: error: the following arguments are required: command subparsers.dest is set so the error message can give this positional a name. I'll try to write a patch to do something similar in argparse itself. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 09:15:58 2013 From: report at bugs.python.org (Federico Schwindt) Date: Tue, 09 Apr 2013 07:15:58 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1306354802.94.0.44002539476.issue12181@psf.upfronthosting.co.za> Message-ID: <1365491758.87.0.565166925768.issue12181@psf.upfronthosting.co.za> Federico Schwindt added the comment: >> Please note that the tests are still broken and need to be addressed (bignum and sys.maxsize passed to ident and data respectively). > > If you could fill a separate issue for that, it would be great. I will but once this is committed. It'd make things easier. > BTW, there are other OpenBSD-specific issues on the report, and we > don't have that many contributors (AFAICT noone): so if you can have a > look at them, that would be great (especially since our OpenBSD > buildbots have all been down for some time now). On this report or you mean in general? I don't mind looking if time permits. Why are the OpenBSD buildbots down? Can we do anything about it? Having a buildbot slave up will definitely help here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 10:54:17 2013 From: report at bugs.python.org (=?utf-8?q?Alfredo_Solano_Mart=C3=ADnez?=) Date: Tue, 09 Apr 2013 08:54:17 +0000 Subject: [issue17670] expandtabs() weirdness In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1365497657.98.0.497271640466.issue17670@psf.upfronthosting.co.za> Alfredo Solano Mart?nez added the comment: It does, thank you. Maybe hat example could be added to the docuentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 11:38:15 2013 From: report at bugs.python.org (Peter) Date: Tue, 09 Apr 2013 09:38:15 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365500295.27.0.778185948918.issue17666@psf.upfronthosting.co.za> Peter added the comment: Reopening: The same regression issue affects Python 3.2.4 as well, so if the fix could be committed to that branch as well that would be great. Long term, I infer that there are no GZIP files in the test suite which use the GZIP header to store metadata (otherwise this bug would have been caught earlier). Should that be raised as a separate issue? I can prepare a very small test file if you like and attach it here. ---------- status: closed -> open versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 12:04:42 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 10:04:42 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1306354802.94.0.44002539476.issue12181@psf.upfronthosting.co.za> Message-ID: <1365501882.3.0.603967094028.issue12181@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: >> If you could fill a separate issue for that, it would be great. > > I will but once this is committed. It'd make things easier. No problem. >> BTW, there are other OpenBSD-specific issues on the report, and we >> don't have that many contributors (AFAICT noone): so if you can have a >> look at them, that would be great (especially since our OpenBSD >> buildbots have all been down for some time now). > > On this report or you mean in general? typo: s/on the report/on the tracker. > I don't mind looking if time permits. That would be great (I try to fix NetBSD/OpenBSD issues myself, but since I don't have any installed machines with those OSes it's obviously much more complicated). > Why are the OpenBSD buildbots down? Can we do anything about it? > Having a buildbot slave up will definitely help here. All the OpenBSD buildbots we have are provided by SnakeByte, and they're all offline: http://buildbot.python.org/all/builders Maybe Trent has more info. ---------- nosy: +trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 12:19:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 10:19:58 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile Message-ID: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> New submission from Antoine Pitrou: It is sometimes useful to create a temporary file as a copy of an existing file (especially e.g. in tests, when you want to mutate the temp file but not the original). I would suggest adding a `copy_from` argument to TemporaryFile and NamedTemporaryFile, which is either the path to an existing file or a file-like object. Then the contents of that source file are copied to the tempfile before it is yielded. ---------- components: Library (Lib) messages: 186392 nosy: ncoghlan, pitrou priority: normal severity: normal status: open title: add `copy_from` argument to temporaryfile type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 12:25:22 2013 From: report at bugs.python.org (Federico Schwindt) Date: Tue, 09 Apr 2013 10:25:22 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1306354802.94.0.44002539476.issue12181@psf.upfronthosting.co.za> Message-ID: <1365503122.58.0.307881005542.issue12181@psf.upfronthosting.co.za> Federico Schwindt added the comment: This patch was made against 2.7.4. I've checked 3.3.1 and it obviously doesn't work as PyInt* are gone. I'll update the patch later today so it can be used everywhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 13:41:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 11:41:40 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365507700.88.0.666656639664.issue17666@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Adding Georg for 3.2. ---------- nosy: +georg.brandl, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 13:52:39 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Apr 2013 11:52:39 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365508359.07.0.946222536144.issue17666@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes resolution: fixed -> stage: committed/rejected -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 13:54:00 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Apr 2013 11:54:00 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365508440.13.0.193730478672.issue17656@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:01:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Apr 2013 13:01:25 +0000 Subject: [issue17648] test_urllib2 convert doctests to unittest In-Reply-To: <1365291914.89.0.625576108544.issue17648@psf.upfronthosting.co.za> Message-ID: <3ZlTCT0rvRzRbm@mail.python.org> Roundup Robot added the comment: New changeset 5c9b36969abc by Senthil Kumaran in branch '3.3': #17648 - convert test_urllib2.py doctests to unittests http://hg.python.org/cpython/rev/5c9b36969abc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:03:30 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Apr 2013 13:03:30 +0000 Subject: [issue17648] test_urllib2 convert doctests to unittest In-Reply-To: <1365291914.89.0.625576108544.issue17648@psf.upfronthosting.co.za> Message-ID: <1365512610.88.0.16368804736.issue17648@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Changed in active branches (3.3 and default). ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:03:45 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Apr 2013 13:03:45 +0000 Subject: [issue17648] test_urllib2 convert doctests to unittest In-Reply-To: <1365291914.89.0.625576108544.issue17648@psf.upfronthosting.co.za> Message-ID: <1365512625.02.0.70114702458.issue17648@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:04:51 2013 From: report at bugs.python.org (gjwebber) Date: Tue, 09 Apr 2013 13:04:51 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" Message-ID: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> New submission from gjwebber: Running on Windows XP 32-bit. Uninstalled Python 2.7, installed Python 3.3. I asked a question on stack overflow, detailing the problem and supplying example code and Traceback here: http://stackoverflow.com/questions/15900366/all-example-concurrent-futures-code-is-failing-with-brokenprocesspool More info on request if required. ---------- components: Library (Lib), Windows messages: 186397 nosy: gjwebber priority: normal severity: normal status: open title: All examples for concurrent.futures fail with "BrokenProcessPool" type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:11:23 2013 From: report at bugs.python.org (gjwebber) Date: Tue, 09 Apr 2013 13:11:23 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" In-Reply-To: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> Message-ID: <1365513083.25.0.900526389521.issue17674@psf.upfronthosting.co.za> gjwebber added the comment: Forgot to mention, the posted code works for another SO user on Debian and OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:15:20 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 13:15:20 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <1365482738.48.0.840321565435.issue17672@psf.upfronthosting.co.za> Message-ID: <1365513320.5.0.976104549842.issue17672@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think your patch is right: - calling unwrap() already shuts down the SSL layer; this is the right way to do it and is documented as such: "Performs the SSL shutdown handshake, which removes the TLS layer from the underlying socket, and returns the underlying socket object" - shutdown() right now isn't blocking; if you add a call to SSL shutdown, it can either block or fail with EAGAIN or similar, which is something people won't expect - close() should simply close the file descriptor, like on a regular socket (if you call socket.close(), it won't shutdown the TCP connection, especially if there's another file descriptor referencing the same connection) As for Modules/_ssl.c, the case where SSL_shutdown() returns 0 is already handled: if (err == 0) { /* Don't loop endlessly; instead preserve legacy behaviour of trying SSL_shutdown() only twice. This looks necessary for OpenSSL < 0.9.8m */ if (++zeros > 1) break; /* Shutdown was sent, now try receiving */ self->shutdown_seen_zero = 1; continue; } ... so I don't think anything more is necessary. So I think things are fine right now and your patch shouldn't be applied. ---------- nosy: +pitrou stage: -> patch review versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:16:10 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 09 Apr 2013 13:16:10 +0000 Subject: [issue17675] show addresses in socket.__repr__ Message-ID: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': This is useful, for example, when running tests as "python3 -Wa" and you bump into: ResourceWarning: unclosed With this we'd get: If desirable, I will add some tests. ---------- components: Library (Lib) files: socket-repr.patch keywords: patch messages: 186400 nosy: giampaolo.rodola priority: normal severity: normal status: open title: show addresses in socket.__repr__ versions: Python 3.4 Added file: http://bugs.python.org/file29751/socket-repr.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:17:08 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 09 Apr 2013 13:17:08 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <1365513428.48.0.333221759511.issue17675@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:25:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 13:25:24 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" In-Reply-To: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> Message-ID: <1365513924.58.0.303946082042.issue17674@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is not the example code. The example code uses a main() function which is guarded by a "if" block: if __name__ == '__main__': main() See http://docs.python.org/2/library/multiprocessing.html#windows for explanations. Also, perhaps the concurrent.futures docs could point to that paragraph. ---------- assignee: -> docs at python components: +Documentation -Library (Lib), Windows nosy: +docs at python, pitrou type: crash -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:28:48 2013 From: report at bugs.python.org (Alex Waite) Date: Tue, 09 Apr 2013 13:28:48 +0000 Subject: [issue17676] spwd uses -1 for empty attributes Message-ID: <1365514128.27.0.523273104192.issue17676@psf.upfronthosting.co.za> New submission from Alex Waite: spwd uses -1 rather than '' for empty attributes. This is different from the behaviour in the pwd module, and makes it more difficult to generate a new, valid shadow entry. In my opinion, simply doing a ':'.join(str(val) for val in rec) should result in a valid entry. With pwd this is currently possible. Not so with spwd. pwd: import pwd rec = pwd.getpwnam('alex') print ':'.join(str(val) for val in rec) spwd: import spwd rec = spwd.getspnam('alex') shdw = '' for idx, val in enumerate(recs_shdw): if idx != 0: shdw += ':' if val != -1: shdw += str(val) print shdw ---------- messages: 186402 nosy: Alexqw priority: normal severity: normal status: open title: spwd uses -1 for empty attributes type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:34:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 13:34:33 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365514473.29.0.657560354102.issue16427@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the quality of the hash function is clearly reduced: >>> hash("abcdefgh") & 0xff 206 >>> hash("abcdefgi") & 0xff 206 >>> hash("abcdefgj") & 0xff 206 >>> hash("abxxxxxx") & 0xff 206 >>> hash("aaaaaa11") & 0xff 206 >>> hash("aaaaaa12") & 0xff 206 Now to know if that may produce slowdowns in some situations... (dicts and sets have a sophisticated probing algorithm which takes into account the whole hash value, not the masked one). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:36:58 2013 From: report at bugs.python.org (Bruce Frederiksen) Date: Tue, 09 Apr 2013 13:36:58 +0000 Subject: [issue17677] Invitation to connect on LinkedIn Message-ID: <476079342.24940169.1365514616076.JavaMail.app@ela4-app0134.prod> New submission from Bruce Frederiksen: LinkedIn ------------ Python, I'd like to add you to my professional network on LinkedIn. - Bruce Bruce Frederiksen Information Technology and Services Professional Tampa/St. Petersburg, Florida Area Confirm that you know Bruce Frederiksen: https://www.linkedin.com/e/-3qcne3-hfb45911-6b/isd/12316860876/7QjJbS4a/?hs=false&tok=0GlQRpsV-Mh5I1 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-3qcne3-hfb45911-6b/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I4080988955_1/?hs=false&tok=3s-0HjjjGMh5I1 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. ---------- messages: 186404 nosy: dangyogi priority: normal severity: normal status: open title: Invitation to connect on LinkedIn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:38:05 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 13:38:05 +0000 Subject: [issue17677] Invitation to connect on LinkedIn In-Reply-To: <476079342.24940169.1365514616076.JavaMail.app@ela4-app0134.prod> Message-ID: <1365514685.31.0.151544948532.issue17677@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:40:02 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 13:40:02 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1365514473.29.0.657560354102.issue16427@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > (dicts and sets have a sophisticated probing algorithm which takes into account the whole hash value, not the masked one). Correct, so your specific example should not be a problem since the whole hash value is different for the 6 hash values. > Now to know if that may produce slowdowns in some situations... pybench and perf.py can be used to measure performances of the patch. The speedup may not be detected, but a slowdown would be detected at least. 2013/4/9 Antoine Pitrou : > > Antoine Pitrou added the comment: > > Well, the quality of the hash function is clearly reduced: > >>>> hash("abcdefgh") & 0xff > 206 >>>> hash("abcdefgi") & 0xff > 206 >>>> hash("abcdefgj") & 0xff > 206 >>>> hash("abxxxxxx") & 0xff > 206 >>>> hash("aaaaaa11") & 0xff > 206 >>>> hash("aaaaaa12") & 0xff > 206 > > > Now to know if that may produce slowdowns in some situations... (dicts and sets have a sophisticated probing algorithm which takes into account the whole hash value, not the masked one). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:40:04 2013 From: report at bugs.python.org (Wei-Cheng Pan) Date: Tue, 09 Apr 2013 13:40:04 +0000 Subject: [issue17678] DeprecationWarning fix on cookiejar module since Python 3.3 Message-ID: <1365514804.83.0.671647327236.issue17678@psf.upfronthosting.co.za> Changes by Wei-Cheng Pan : ---------- components: Library (Lib) files: cookiejar_fix_deprecated_method_calls.patch keywords: patch nosy: Wei-Cheng.Pan priority: normal severity: normal status: open title: DeprecationWarning fix on cookiejar module since Python 3.3 versions: Python 3.3 Added file: http://bugs.python.org/file29752/cookiejar_fix_deprecated_method_calls.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:42:57 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 13:42:57 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365514977.15.0.996768791386.issue16427@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Note that the patch uses type punning through a union: while GCC allows this, it's not allowed by ANSI (although since we're using a char [], it's somewhat a grey area). An aggresive compiler could optimiza the read/write away. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:46:40 2013 From: report at bugs.python.org (Wei-Cheng Pan) Date: Tue, 09 Apr 2013 13:46:40 +0000 Subject: [issue17678] DeprecationWarning fix on cookiejar module since Python 3.3 Message-ID: <1365515200.65.0.899678265622.issue17678@psf.upfronthosting.co.za> New submission from Wei-Cheng Pan: Please ignore previous typo patch. This is the correct version ---------- Added file: http://bugs.python.org/file29753/cookiejar_fix_deprecated_method_calls.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:46:49 2013 From: report at bugs.python.org (Wei-Cheng Pan) Date: Tue, 09 Apr 2013 13:46:49 +0000 Subject: [issue17678] DeprecationWarning fix on cookiejar module since Python 3.3 In-Reply-To: <1365515200.65.0.899678265622.issue17678@psf.upfronthosting.co.za> Message-ID: <1365515209.13.0.115404889584.issue17678@psf.upfronthosting.co.za> Changes by Wei-Cheng Pan : Removed file: http://bugs.python.org/file29752/cookiejar_fix_deprecated_method_calls.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:51:48 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Tue, 09 Apr 2013 13:51:48 +0000 Subject: [issue17679] sysconfig generation uses some env variables multiple times Message-ID: <1365515508.55.0.936246153534.issue17679@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: When compiling Python 3.3.1, I noticed that some variables like LDFLAGS or CFLAGS in sysconfig have some flags multiple times. (Which BTW breaks distutils.tests.{test_sysconfig_compiler_vars,test_sysconfig_module}) This is caused by interpretation of Makefile in sysconfig._parse_makefile(), which seems to evaluate the variables in Makefile - but some variables in Makefile are formed by expanding env variables multiple times, e.g.: PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS) CONFIGURE_LDFLAGS= @LDFLAGS@ so when doing the build from scratch with configure & make, PY_LDFLAGS gets the content of LDFLAGS twice (as far as I remember autotools...), CFLAGS gets expanded like 5 times at least. I think that this is not the correct behaviour, but not sure, maybe I'm doing something wrong. Thanks. ---------- components: Build messages: 186408 nosy: bkabrda priority: normal severity: normal status: open title: sysconfig generation uses some env variables multiple times type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:52:18 2013 From: report at bugs.python.org (gjwebber) Date: Tue, 09 Apr 2013 13:52:18 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" In-Reply-To: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> Message-ID: <1365515538.66.0.305303461736.issue17674@psf.upfronthosting.co.za> gjwebber added the comment: As mentioned in the previously linked post, I copy-pasted the example code shown here: http://docs.python.org/dev/library/concurrent.futures.html#processpoolexecutor-example Which resulted in exactly the same error as the 'more simple' example I provided. There is no mention of anything Windows specific on the documentation page, or any hints as to why this may not be working. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:59:08 2013 From: report at bugs.python.org (Roman Rader) Date: Tue, 09 Apr 2013 13:59:08 +0000 Subject: [issue17680] self is lost if methods are callable objects Message-ID: <1365515948.78.0.259986619224.issue17680@psf.upfronthosting.co.za> New submission from Roman Rader: Some strange behavior is observed while method in object substitutes with callable object. For example: ------------------------------------- class Meth(object): def __call__(*args, **kwargs): print (args, kwargs) class X(object): def some_method(*args, **kwargs): print (args, kwargs) x = X() x.some_method(1) X.some_method = Meth() x.some_method(1) ------------------------------------- Output (<__main__.X object at 0xb72d408c>, 1) {} (<__main__.Meth object at 0xb72d40cc>, 1) {} ------------------------------------- So, second call lost caller object ("self"). I suppose second output should be (<__main__.Meth object ...>, <__main__.X object ...>, 1) {} Tested in Python 2.7 and Python 3.3. ---------- components: Interpreter Core messages: 186410 nosy: Roman.Rader priority: normal severity: normal status: open title: self is lost if methods are callable objects versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 15:59:45 2013 From: report at bugs.python.org (gjwebber) Date: Tue, 09 Apr 2013 13:59:45 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" In-Reply-To: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> Message-ID: <1365515985.35.0.134296368755.issue17674@psf.upfronthosting.co.za> gjwebber added the comment: Just ran the example code linked here again for my own sanity: http://docs.python.org/dev/library/concurrent.futures.html#processpoolexecutor-example Exactly the same thing happened. Here is the Traceback: Traceback (most recent call last): File "", line 420, in run_nodebug File "", line 28, in File "", line 24, in main File "C:\Python33\lib\concurrent\futures\_base.py", line 546, in result_iterator yield future.result() File "C:\Python33\lib\concurrent\futures\_base.py", line 399, in result return self.__get_result() File "C:\Python33\lib\concurrent\futures\_base.py", line 351, in __get_result raise self._exception concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:03:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Apr 2013 14:03:13 +0000 Subject: [issue17680] self is lost if methods are callable objects In-Reply-To: <1365515948.78.0.259986619224.issue17680@psf.upfronthosting.co.za> Message-ID: <1365516193.95.0.250563684956.issue17680@psf.upfronthosting.co.za> Christian Heimes added the comment: Your callable object has to implement the descriptor protocol. Otherwise the object isn't wrapped in a method object. http://docs.python.org/2/howto/descriptor.html Please ask on the Python user list if you still need more information. ---------- nosy: +christian.heimes resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:11:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Apr 2013 14:11:17 +0000 Subject: [issue17678] DeprecationWarning fix on cookiejar module since Python 3.3 In-Reply-To: <1365515200.65.0.899678265622.issue17678@psf.upfronthosting.co.za> Message-ID: <3ZlVm41BkTzSHp@mail.python.org> Roundup Robot added the comment: New changeset b3d5621511db by Senthil Kumaran in branch '3.3': #17678: Fix DeprecationWarning in the http/cookiejar.py by changing the usage http://hg.python.org/cpython/rev/b3d5621511db New changeset 79387f3bcc92 by Senthil Kumaran in branch 'default': #17678: Remove the use of a deprecated method http/cookiejar.py. Changing the http://hg.python.org/cpython/rev/79387f3bcc92 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:15:56 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Apr 2013 14:15:56 +0000 Subject: [issue17678] DeprecationWarning fix on cookiejar module since Python 3.3 In-Reply-To: <1365515200.65.0.899678265622.issue17678@psf.upfronthosting.co.za> Message-ID: <1365516956.14.0.681176656105.issue17678@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for the patch. Realized that is_third_party method does not have test coverage. Hence this was not detected by our test runs. Increasing the coverage may be a TODO. ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:36:14 2013 From: report at bugs.python.org (Hiroaki Kawai) Date: Tue, 09 Apr 2013 14:36:14 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <1365513320.5.0.976104549842.issue17672@psf.upfronthosting.co.za> Message-ID: Hiroaki Kawai added the comment: Please run the test so that you'll see the problem. 2013/4/9 Antoine Pitrou > > Antoine Pitrou added the comment: > > I don't think your patch is right: > > - calling unwrap() already shuts down the SSL layer; this is the right way > to do it and is documented as such: "Performs the SSL shutdown handshake, > which removes the TLS layer from the underlying socket, and returns the > underlying socket object" > > - shutdown() right now isn't blocking; if you add a call to SSL shutdown, > it can either block or fail with EAGAIN or similar, which is something > people won't expect > > - close() should simply close the file descriptor, like on a regular > socket (if you call socket.close(), it won't shutdown the TCP connection, > especially if there's another file descriptor referencing the same > connection) > > As for Modules/_ssl.c, the case where SSL_shutdown() returns 0 is already > handled: > > if (err == 0) { > /* Don't loop endlessly; instead preserve legacy > behaviour of trying SSL_shutdown() only twice. > This looks necessary for OpenSSL < 0.9.8m */ > if (++zeros > 1) > break; > /* Shutdown was sent, now try receiving */ > self->shutdown_seen_zero = 1; > continue; > } > > ... so I don't think anything more is necessary. > > So I think things are fine right now and your patch shouldn't be applied. > > ---------- > nosy: +pitrou > stage: -> patch review > versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:44:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Apr 2013 14:44:47 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365518687.02.0.0344842803044.issue17666@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The committed patch contains a simple test for gzip file with an extra field. When we add the feature to create gzip files with an extra field, this test can be extended. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:45:15 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 14:45:15 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <1365482738.48.0.840321565435.issue17672@psf.upfronthosting.co.za> Message-ID: <1365518715.46.0.665562383233.issue17672@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > sometimes RST was sent over the network instead of FIN Your client sends data, but the server never reads it: when a TCP socket is closed while there's still data in the input socket buffer, a RST is sent instead of a FIN. That's normal behaviour. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:53:03 2013 From: report at bugs.python.org (Hiroaki Kawai) Date: Tue, 09 Apr 2013 14:53:03 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <1365518715.46.0.665562383233.issue17672@psf.upfronthosting.co.za> Message-ID: Hiroaki Kawai added the comment: Client gets an exception in reading the socket, not in writing. Please run the test code and see what happens. 2013/4/9 Charles-Fran?ois Natali > > Charles-Fran?ois Natali added the comment: > > > sometimes RST was sent over the network instead of FIN > > Your client sends data, but the server never reads it: when a TCP socket > is closed while there's still data in the input socket buffer, a RST is > sent instead of a FIN. That's normal behaviour. > > ---------- > nosy: +neologix > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:57:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 14:57:55 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" In-Reply-To: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> Message-ID: <1365519475.45.0.921350299926.issue17674@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, can someone else confirm the issue on Windows? ---------- nosy: +brian.curtin, sbt, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:58:17 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 14:58:17 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > Client gets an exception in reading the socket, not in writing. Please run > the test code and see what happens. Of course it gets ECONNRESET on subsequent recv(), that's how TCP works. Just make your handler read from the socket and it won't happen anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 16:59:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 14:59:40 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1365514977.15.0.996768791386.issue16427@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Note that the patch uses type punning through a union What is the standard and portable way to cast an array of bytes to size_t? 2013/4/9 Charles-Fran?ois Natali : > > Charles-Fran?ois Natali added the comment: > > Note that the patch uses type punning through a union: while GCC allows this, it's not allowed by ANSI (although since we're using a char [], it's somewhat a grey area). An aggresive compiler could optimiza the read/write away. > > ---------- > nosy: +neologix > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:01:09 2013 From: report at bugs.python.org (Brian Curtin) Date: Tue, 09 Apr 2013 15:01:09 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" In-Reply-To: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> Message-ID: <1365519669.22.0.550866807171.issue17674@psf.upfronthosting.co.za> Brian Curtin added the comment: The example code works for me on 3.3.0 on Windows 8. I'd have to find a VM to try out XP like gjwebber - will look later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:03:01 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Apr 2013 15:03:01 +0000 Subject: [issue17681] Work with an extra field of gzip files Message-ID: <1365519781.38.0.309194725625.issue17681@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Gzip files can contains an extra field and some applications use this for extending gzip format. The current GzipFile implementation ignores this field on input and doesn't allow to create a new file with an extra field. I propose to save an extra field data on reading as a GzipFile attribute and add new parameter for GzipFile constructor for creating new file with an extra field. ---------- components: Library (Lib) messages: 186423 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Work with an extra field of gzip files type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:05:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 15:05:28 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <1365482738.48.0.840321565435.issue17672@psf.upfronthosting.co.za> Message-ID: <1365519928.95.0.936605033412.issue17672@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Client gets an exception in reading the socket, not in writing. Yes, it does, and the exception bears the error code SSL_ERROR_EOF (8), which is expected here. The question is: why would you expect reading *not* to raise an exception while the remote end of the connection has been closed? TCPStreamHandler will only keep the connection alive as long as the handle() method is running, the connection is disposed of afterwards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:05:38 2013 From: report at bugs.python.org (Hiroaki Kawai) Date: Tue, 09 Apr 2013 15:05:38 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: Message-ID: Hiroaki Kawai added the comment: As an interface of ssl socket, server does not have to read, just write some data. The client side should be able to read the bytes that ther server sent. The problem is that client will sometimes raise an unexpected SSLError in reading the ssl socket because server side does not shutdown the ssl session cleanly. 2013/4/9 Charles-Fran?ois Natali > > Charles-Fran?ois Natali added the comment: > > > Client gets an exception in reading the socket, not in writing. Please > run > > the test code and see what happens. > > Of course it gets ECONNRESET on subsequent recv(), that's how TCP works. > > Just make your handler read from the socket and it won't happen anymore. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:10:21 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 15:10:21 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > As an interface of ssl socket, server does not have to read, just write > some data. > The client side should be able to read the bytes that ther server sent. The > problem is that client will sometimes raise an unexpected SSLError in > reading the ssl socket because server side does not shutdown the ssl > session cleanly. Once again, that's not how TCP works. If your server doesn't read data that the client sent it, a RST will be sent when the server closes its end. Please do read the TCP spec, or use google: http://cs.baylor.edu/~donahoo/practical/CSockets/TCPRST.pdf I suggest closing this issue... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:13:21 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 15:13:21 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: Message-ID: <485153595.38437081.1365520395027.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > As an interface of ssl socket, server does not have to read, just > write > some data. > The client side should be able to read the bytes that ther server > sent. Please re-read your own code. The server does: + def handle(self): + self.wfile.write("123") and the client does: + s.recv(3) So, yes, the client is able to read the 3 bytes that the server sent. It's only when you are trying to read an additional byte that an exception is raised, because the TCP connection has been closed by the server. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:20:55 2013 From: report at bugs.python.org (Hiroaki Kawai) Date: Tue, 09 Apr 2013 15:20:55 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <1365519928.95.0.936605033412.issue17672@psf.upfronthosting.co.za> Message-ID: Hiroaki Kawai added the comment: The error looks like : SSLError(8, '_ssl.c:1363: EOF occurred in violation of protocol') But why we see "in violation of protocol" here? 2013/4/10 Antoine Pitrou > > Antoine Pitrou added the comment: > > > Client gets an exception in reading the socket, not in writing. > > Yes, it does, and the exception bears the error code SSL_ERROR_EOF (8), > which is expected here. > > The question is: why would you expect reading *not* to raise an exception > while the remote end of the connection has been closed? TCPStreamHandler > will only keep the connection alive as long as the handle() method is > running, the connection is disposed of afterwards. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:27:16 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 09 Apr 2013 15:27:16 +0000 Subject: [issue17536] update browser list with additional browser names In-Reply-To: <1364146928.84.0.219994349931.issue17536@psf.upfronthosting.co.za> Message-ID: <1365521236.12.0.996445880448.issue17536@psf.upfronthosting.co.za> Matthias Klose added the comment: in http://mail.python.org/pipermail/python-dev/2013-April/125205.html Guido made the suggestion: """ But perhaps we could change the focus for 2.7 development a bit: instead of fixing bugs (or bickering about whether something is a bug fix or a new feature) we could limit changes to ensuring that it works on newer platforms. """ so I'll wait some more days ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:31:05 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 09 Apr 2013 15:31:05 +0000 Subject: [issue17682] _io is missing in Setup.dist in 2.7.x Message-ID: <1365521465.61.0.848599040327.issue17682@psf.upfronthosting.co.za> New submission from Matthias Klose: _io is missing in Setup.dist in 2.7.x. just adding it, copied the file list from the setup.py, leaving it commented out. ---------- components: Build messages: 186430 nosy: doko priority: normal severity: normal status: open title: _io is missing in Setup.dist in 2.7.x versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:32:40 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 09 Apr 2013 15:32:40 +0000 Subject: [issue17536] update browser list with additional browser names In-Reply-To: <1364146928.84.0.219994349931.issue17536@psf.upfronthosting.co.za> Message-ID: <1365521560.31.0.132091156496.issue17536@psf.upfronthosting.co.za> Matthias Klose added the comment: consider that chrome is your only browser installed, then the module should work as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:34:34 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Apr 2013 15:34:34 +0000 Subject: [issue17536] update browser list with additional browser names In-Reply-To: <1364146928.84.0.219994349931.issue17536@psf.upfronthosting.co.za> Message-ID: <1365521674.5.0.165777883226.issue17536@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Doko: I am not strongly against the 2.7 patch. Given the last point you made providing the context from BDFL and also some of Eric's points, going ahead with your 2.7 patch seems OK to me. So +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:34:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Apr 2013 15:34:53 +0000 Subject: [issue17682] _io is missing in Setup.dist in 2.7.x In-Reply-To: <1365521465.61.0.848599040327.issue17682@psf.upfronthosting.co.za> Message-ID: <3ZlXcX3ZQWzSSQ@mail.python.org> Roundup Robot added the comment: New changeset 075bbf701d0b by doko in branch '2.7': - Issue #17682: Add the _io module to Modules/Setup.dist (commented out). http://hg.python.org/cpython/rev/075bbf701d0b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:36:44 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 09 Apr 2013 15:36:44 +0000 Subject: [issue17682] _io is missing in Setup.dist in 2.7.x In-Reply-To: <1365521465.61.0.848599040327.issue17682@psf.upfronthosting.co.za> Message-ID: <1365521804.68.0.33279197683.issue17682@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:44:31 2013 From: report at bugs.python.org (Hiroaki Kawai) Date: Tue, 09 Apr 2013 15:44:31 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: Message-ID: Hiroaki Kawai added the comment: Ah, sorry I understood now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:44:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 15:44:41 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: Message-ID: <815471122.38534237.1365522275563.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > The error looks like : SSLError(8, '_ssl.c:1363: EOF occurred in > violation > of protocol') > But why we see "in violation of protocol" here? Because the SSL layer wasn't shutdown cleanly: the TCP connection was closed while the SSL layer was still active. You have three solutions around this: - you can call unwrap() for a clean SSL shutdown (the server has to call unwrap() too). - you can use suppress_ragged_eofs=True with wrap_socket() - you can simply avoid reading past the server's data, which will solve the problem altogether ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 17:49:12 2013 From: report at bugs.python.org (Sarah) Date: Tue, 09 Apr 2013 15:49:12 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365522552.24.0.00929050610873.issue17511@psf.upfronthosting.co.za> Sarah added the comment: I agree that discussion is a good idea. Personally, though, I don't want to make the user hit ^F once to set the key and use ^G to find it again. It works well and, for a more advanced user, is great, but it adds to what a user must learn to get up and running in Python and doesn't conform to general conventions. I started using Python 6 months ago, and it took me a while to realize how 'find' worked in IDLE. For a beginner's IDE, I'd really like to see all of the features accessible through the GUI, and have those features conform to currently accepted standards. I'm certainly not saying there isn't a better way to do this. I'd love to have a conversation on what that might be. NOTE: This patch makes 'find' function's functionality consistent with the 'find' function in the 'Replace' menu. If we find a better way to implement the find function, we should extend that functionality to the 'Replace' menu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 18:03:53 2013 From: report at bugs.python.org (Hiroaki Kawai) Date: Tue, 09 Apr 2013 16:03:53 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <815471122.38534237.1365522275563.JavaMail.root@zimbra10-e2.priv.proxad.net> Message-ID: Hiroaki Kawai added the comment: I think creating an ssl socket from existing socket from an instance generated by library routine, and replace that socket with ssl socket is very common usage. Injecting wrap_socket is very easy. But injecting unwrap call is not easy. In python 2.6, I got a plain socket.error of "connection reset" (not SSLError) in client side in such situation without unwrap in server side. The same code does not raise exception in python 2.7, which I don't know why... Any way, reading the data in server side will solve the problem, thanks. 2013/4/10 Antoine Pitrou > > Antoine Pitrou added the comment: > > > The error looks like : SSLError(8, '_ssl.c:1363: EOF occurred in > > violation > > of protocol') > > But why we see "in violation of protocol" here? > > Because the SSL layer wasn't shutdown cleanly: the TCP connection was > closed while the SSL layer was still active. You have three solutions > around this: > > - you can call unwrap() for a clean SSL shutdown (the server has to call > unwrap() too). > > - you can use suppress_ragged_eofs=True with wrap_socket() > > - you can simply avoid reading past the server's data, which will > solve the problem altogether > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 18:15:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 16:15:29 +0000 Subject: [issue17672] ssl unclean shutdown In-Reply-To: <1365482738.48.0.840321565435.issue17672@psf.upfronthosting.co.za> Message-ID: <1365524129.51.0.743246386659.issue17672@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, closing the issue then. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 18:23:16 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Apr 2013 16:23:16 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365524596.94.0.137332823413.issue16427@psf.upfronthosting.co.za> Gregory P. Smith added the comment: > > Note that the patch uses type punning through a union > > What is the standard and portable way to cast an array of bytes to size_t? I'd expect just casting the pointer type before dereferencing: unsigned char *p; ... hash = (multiplier * hash) ^ *((Py_uhash_t *)p); (don't use size_t, use Py_uhash_t) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 18:34:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 16:34:17 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <1365525257.14.0.579792581345.issue17675@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This sounds ok to me. It will indeed make things clearer in tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 18:36:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 16:36:54 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365525414.23.0.946370058553.issue16427@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > pybench and perf.py can be used to measure performances of the patch. > The speedup may not be detected, but a slowdown would be detected at > least. The slowdown would only occur for specific, well-chosen patterns. Also it may make DoS attacks easier. (remember the reason we randomized hashes is so that it's hard for attackers to find collisions) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 18:51:46 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 16:51:46 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1365524596.94.0.137332823413.issue16427@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I'd expect just casting the pointer type before dereferencing: > > unsigned char *p; > ... > hash = (multiplier * hash) ^ *((Py_uhash_t *)p); > > (don't use size_t, use Py_uhash_t) Is p guaranteed to be size_t aligned? If not, unaligned access can segfault (e.g. on Sparc IIRC). > Also it may make DoS attacks easier. Indeed. And the increase in collision you demonstrated in your previous message worries me (both security and performance wise). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 19:02:58 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 17:02:58 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > Is p guaranteed to be size_t aligned? > If not, unaligned access can segfault (e.g. on Sparc IIRC). Apparently yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 21:01:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 19:01:10 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365534070.14.0.218903274453.issue17656@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps this would deserve a 2.7.5? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 21:01:11 2013 From: report at bugs.python.org (Martin Morrison) Date: Tue, 09 Apr 2013 19:01:11 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365534071.44.0.0148841306848.issue17636@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 21:29:28 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Apr 2013 19:29:28 +0000 Subject: [issue17566] Make importlib.abc.Loader.module_repr optional In-Reply-To: <1364486422.93.0.992071692104.issue17566@psf.upfronthosting.co.za> Message-ID: <1365535768.02.0.721731205198.issue17566@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: +Library (Lib) -Documentation title: Document that importlib.abc.Loader.module_repr is abstract and thus needed by various other ABCs -> Make importlib.abc.Loader.module_repr optional versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 21:36:41 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 09 Apr 2013 19:36:41 +0000 Subject: [issue17650] There is no exception correspond to errno EROFS In-Reply-To: <1365329293.45.0.99632836105.issue17650@psf.upfronthosting.co.za> Message-ID: <1365536201.94.0.945988441048.issue17650@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ok. Antoine's comment is clean. Let's close the issue. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 22:17:04 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 09 Apr 2013 20:17:04 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" In-Reply-To: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> Message-ID: <1365538624.06.0.122440946277.issue17674@psf.upfronthosting.co.za> Richard Oudkerk added the comment: @gjwebber: How exactly are you running the program to get that traceback? The following lines make it look like you are doing something non-standard (as opposed to just saving the file and running it from the command line): File "", line 420, in run_nodebug File "", line 28, in File "", line 24, in main ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 22:27:17 2013 From: report at bugs.python.org (Wade) Date: Tue, 09 Apr 2013 20:27:17 +0000 Subject: [issue8106] SSL session management In-Reply-To: <1268184052.67.0.269640299758.issue8106@psf.upfronthosting.co.za> Message-ID: <1365539237.77.0.193350153663.issue8106@psf.upfronthosting.co.za> Changes by Wade : ---------- nosy: +WadeC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 22:39:38 2013 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Apr 2013 20:39:38 +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: <1365539978.91.0.184713835103.issue7511@psf.upfronthosting.co.za> Steve Dower added the comment: I've added a patch that replaces query_vcvarsall() with an implementation that does not try and use the batch file. Instead, the functionality of the batch file (effectively, reading the base path from the registry and appending constants) is reproduced in Python code. (There is a second patch for 2.7, since winreg/_winreg is different between the two.) There is no reason to expect that the installation layout of VC9 and VC10 will change at this stage, though future updates may be required for new versions (though I've already added the mapping for VC11 - not that we're building Python with that one yet). I have left find_vcvarsall() in there, even though it is no longer used, in case other tools are monkeypatching to work around the existing issue. ---------- Added file: http://bugs.python.org/file29754/msvccompiler9_33.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 22:40:10 2013 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Apr 2013 20:40:10 +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: <1365540010.17.0.757810666943.issue7511@psf.upfronthosting.co.za> Steve Dower added the comment: Adding patch for 2.7. ---------- Added file: http://bugs.python.org/file29755/msvccompiler9_27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 22:48:43 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 09 Apr 2013 20:48:43 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from In-Reply-To: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> Message-ID: <1365540523.85.0.410775921401.issue17669@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 23:03:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Apr 2013 21:03:49 +0000 Subject: [issue17093] Make importlib.abc more inheritance-friendly In-Reply-To: <1359666401.55.0.375165619272.issue17093@psf.upfronthosting.co.za> Message-ID: <3Zlgw43vMWz7LkD@mail.python.org> Roundup Robot added the comment: New changeset 8e733e30edf6 by Brett Cannon in branch 'default': Issue #17093,17566,17567: Methods from classes in importlib.abc now raise/return http://hg.python.org/cpython/rev/8e733e30edf6 New changeset 7e91dc7221d5 by Brett Cannon in branch 'default': What's new entry for issue #17093 http://hg.python.org/cpython/rev/7e91dc7221d5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 23:04:15 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Apr 2013 21:04:15 +0000 Subject: [issue17093] Make importlib.abc more inheritance-friendly In-Reply-To: <1359666401.55.0.375165619272.issue17093@psf.upfronthosting.co.za> Message-ID: <1365541455.78.0.998249663436.issue17093@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 Tue Apr 9 23:05:22 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Apr 2013 21:05:22 +0000 Subject: [issue17566] Make importlib.abc.Loader.module_repr optional In-Reply-To: <1364486422.93.0.992071692104.issue17566@psf.upfronthosting.co.za> Message-ID: <1365541522.56.0.955068471543.issue17566@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed by http://hg.python.org/cpython/rev/8e733e30edf6 by raising NotImplementedError and relying on the fact that ModuleType.__repr__() swallows any exception. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 23:05:53 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Apr 2013 21:05:53 +0000 Subject: [issue17567] Clarify importlib.abc.PathEntryFinder.find_loader() docs In-Reply-To: <1364486651.54.0.521676412907.issue17567@psf.upfronthosting.co.za> Message-ID: <1365541553.68.0.170473131335.issue17567@psf.upfronthosting.co.za> Brett Cannon added the comment: Covered by http://hg.python.org/cpython/rev/8e733e30edf6 ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 23:40:15 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 09 Apr 2013 21:40:15 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <1365543615.62.0.508455723165.issue17675@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: +1 from me. Any info that can help debugging is a good thing (calling getsockname() on an non-connected socket will raise an error that will get cacthed, but there's not much we can do about it). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 23:47:32 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 21:47:32 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <1365544052.57.0.301424035429.issue17675@psf.upfronthosting.co.za> STINNER Victor added the comment: +1 for the idea, +1 for the need of tests. About the patch: you may use a try/except for getsockname(), and another for getpeername(). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 23:53:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Apr 2013 21:53:40 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <3Zlj1b5PcdzT1t@mail.python.org> Roundup Robot added the comment: New changeset b3168643677b by Victor Stinner in branch 'default': Issue #17615: On Windows (VS2010), Performances of wmemcmp() to compare Unicode http://hg.python.org/cpython/rev/b3168643677b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 9 23:57:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 21:57:09 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365544629.84.0.46547354358.issue17615@psf.upfronthosting.co.za> STINNER Victor added the comment: "Including the wmemcmp patch did not improve the times on MSC v.1600 32 bit - if anything, the performance was a little slower for the test I used:" I tested my patch on Windows before the commit and I saw similar performances with and without wmemcmp(). I checked again and you are true: performances are *a little bit* worse using wmemcmp(). "Looking at the assembler, there is a real call to wmemcmp which adds some time and wmemcmp does not seem to be optimized compared to a simple loop." You should be true. I reverted the patch for 16-bit wchar_t to use a dummy loop instead. 16-bit wchar_t can only be found on Windows, isn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:01:17 2013 From: report at bugs.python.org (Tom Pinckney) Date: Tue, 09 Apr 2013 22:01:17 +0000 Subject: [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1365544877.2.0.80522114952.issue6696@psf.upfronthosting.co.za> Tom Pinckney added the comment: Another update based on comments. Removed links to cProfile.py and _lsof.c. ---------- Added file: http://bugs.python.org/file29756/patch4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:05:04 2013 From: report at bugs.python.org (Test User Deily) Date: Tue, 09 Apr 2013 22:05:04 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1365545104.56.0.401671718767.issue2771@psf.upfronthosting.co.za> Test User Deily added the comment: testing ---------- nosy: +testusernad -ezio.melotti, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:13:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 22:13:49 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1365545629.67.0.753493852507.issue17628@psf.upfronthosting.co.za> STINNER Victor added the comment: Because most people agree that checking first and/or last byte/character is not a good idea (may be slower), here is a new patch removing code checking first/last byte or character in bytes_richcompare() and unicode_eq(). It removes the usage of the "register" keyword, I read that modern compilers generate worse code when this keyword is used. Register allocators of modern compilers known better than you which variables should use a register. ---------- Added file: http://bugs.python.org/file29757/dont_compare_first_last.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:15:51 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 22:15:51 +0000 Subject: [issue16850] Add "e" mode to open(): close-and-exec (O_CLOEXEC) / O_NOINHERIT In-Reply-To: <1357226606.72.0.774782752961.issue16850@psf.upfronthosting.co.za> Message-ID: <1365545751.35.0.511974519818.issue16850@psf.upfronthosting.co.za> STINNER Victor added the comment: The PEP 433 and its issue #17036 replaces this issue, they are more generic. ---------- resolution: -> fixed status: open -> closed superseder: -> Implementation of the PEP 433: Easier suppression of file descriptor inheritance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:17:40 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 22:17:40 +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: <1365545860.19.0.370216290004.issue16286@psf.upfronthosting.co.za> STINNER Victor added the comment: "I will benchmark the overhead of memcmp() on short strings. We may check the first and last characters before calling memcmp() to limit the overhead of calling a function." I created the issue #17628 for this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:19:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 22:19:26 +0000 Subject: [issue16153] PyUnicode_FromFormatV() must fail if the format string is invalid In-Reply-To: <1349560581.01.0.621984773801.issue16153@psf.upfronthosting.co.za> Message-ID: <1365545966.21.0.731804422244.issue16153@psf.upfronthosting.co.za> STINNER Victor added the comment: Barry wrote on python-dev mailing list: "If it's documented to behave that way, why would you still consider it a bug? The current behavior is clearly intentional, the function is working as intended, and there may be code out there that depends on this documented functionality, or at least, it won't be prepared to handle the new exception." http://mail.python.org/pipermail/python-dev/2012-October/122122.html So I'm closing the issue. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:20:46 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 09 Apr 2013 22:20:46 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365546046.84.0.938959116798.issue17615@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'd like to propose a code size reduction. If kind1 < kind2, swap(kind1, kind2) and swap(data1, data2). Set a variable swapped to 1 (not swapped) or -1 (swapped); then return either swapped or -swapped when a difference is found. With that, the actual comparison could be sure that kind2 <= kind1, so if kind1 is UCS1, the inner switch can go away. If kind1 is UCS2, kind1 could only be UCS1 or UCS2. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:22:36 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 22:22:36 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365546156.91.0.543947067438.issue17615@psf.upfronthosting.co.za> STINNER Victor added the comment: "I'd like to propose a code size reduction. If kind1 < kind2, swap(kind1, kind2) and swap(data1, data2)." Yeah, I hesitated to implement this, but I forgot it later. Would you like to work on such change? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:24:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 09 Apr 2013 22:24:10 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365545629.67.0.753493852507.issue17628@psf.upfronthosting.co.za> Message-ID: <1365546232.3899.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > Because most people agree that checking first and/or last > byte/character is not a good idea (may be slower), here is a new patch > removing code checking first/last byte or character in > bytes_richcompare() and unicode_eq(). You misunderstood. Checking the first byte is ok, it's checking the last byte which can misfire. > It removes the usage of the "register" keyword, I read that modern > compilers generate worse code when this keyword is used. Register > allocators of modern compilers known better than you which variables > should use a register. I think you should open a separate issue to remove all instances of the "register" keyword in the code base. It has become useless, any modern compiler will allocate registers by itself, happily ignoring any "register" hint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:27:20 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Apr 2013 22:27:20 +0000 Subject: [issue17677] Invitation to connect on LinkedIn Message-ID: <1365546440.71.0.883515736819.issue17677@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- Removed message: http://bugs.python.org/msg186404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:27:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Apr 2013 22:27:38 +0000 Subject: [issue14439] Easier error diagnosis when bootstrapping the runpy module in main In-Reply-To: <1333021264.73.0.818171662104.issue14439@psf.upfronthosting.co.za> Message-ID: <3Zljmn70Pkz7Lk3@mail.python.org> Roundup Robot added the comment: New changeset 39b9b05c3085 by Victor Stinner in branch 'default': Close #14439: Python now prints the traceback on runpy failure at startup. http://hg.python.org/cpython/rev/39b9b05c3085 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:27:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Apr 2013 22:27:59 +0000 Subject: [issue14439] Easier error diagnosis when bootstrapping the runpy module in main In-Reply-To: <1333021264.73.0.818171662104.issue14439@psf.upfronthosting.co.za> Message-ID: <1365546479.42.0.847926514368.issue14439@psf.upfronthosting.co.za> STINNER Victor added the comment: Testing the patch manually is simple: add anything wrong in runpy.py and run "python -m base64". Output: --- Could not import runpy module --- Output with the patch: --- Could not import runpy module Traceback (most recent call last): File "/home/haypo/prog/python/default/Lib/runpy.py", line 264, in x NameError: name 'x' is not defined --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:28:54 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Apr 2013 22:28:54 +0000 Subject: [issue17677] spam Message-ID: <1365546534.88.0.499719432303.issue17677@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -dangyogi title: Invitation to connect on LinkedIn -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:35:03 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Apr 2013 22:35:03 +0000 Subject: [issue17679] sysconfig generation uses some env variables multiple times In-Reply-To: <1365515508.55.0.936246153534.issue17679@psf.upfronthosting.co.za> Message-ID: <1365546903.44.0.351937231738.issue17679@psf.upfronthosting.co.za> Ned Deily added the comment: There definitely are configurations where some values do get duplicated in CFLAGS and LDFLAGS. In my experience this is generally harmless for builds but, as you point out, it can break tests that expect particular values. It would be nice to clean this up. ---------- nosy: +ned.deily stage: -> needs patch versions: +Python 3.3 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:35:40 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Apr 2013 22:35:40 +0000 Subject: [issue17679] sysconfig generation uses some env variables multiple times In-Reply-To: <1365515508.55.0.936246153534.issue17679@psf.upfronthosting.co.za> Message-ID: <1365546940.37.0.625992721698.issue17679@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:41:43 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 09 Apr 2013 22:41:43 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365547303.2.0.584974860472.issue15518@psf.upfronthosting.co.za> Changes by Chris Calloway : Removed file: http://bugs.python.org/file29749/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 00:49:11 2013 From: report at bugs.python.org (Chris Calloway) Date: Tue, 09 Apr 2013 22:49:11 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365547751.44.0.334628956307.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: I replaced issue-15518-1.patch. I believe it now addresses all the concerns expressed thus far. If reviewed favorably, I will extend it to clean-up the pre-existing tests to address the concerns noted about them, especially since the filecmpdata directory added by this patch contains the information necessary to test the rest of the filecmp module rather than resorting to creating temp directories and files. It seems less than ideal to me to have the test script use a mixed model for accessing test data (both temp and filecmpdata directories). But that's not my call. ---------- Added file: http://bugs.python.org/file29758/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 01:05:58 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Apr 2013 23:05:58 +0000 Subject: [issue17670] expandtabs() weirdness In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1365548758.09.0.828521068976.issue17670@psf.upfronthosting.co.za> Ned Deily added the comment: That's a good point. Here's a patch for the documentation with a simplified example: >>> '01\t456\t89'.expandtabs(4) '01 456 89' What do others think: is an example useful and, if so, this example? ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +patch nosy: +docs at python resolution: works for me -> stage: committed/rejected -> patch review status: closed -> open type: behavior -> versions: +Python 3.4 Added file: http://bugs.python.org/file29759/issue17670_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 01:15:45 2013 From: report at bugs.python.org (Meador Inge) Date: Tue, 09 Apr 2013 23:15:45 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1365549345.37.0.111524543109.issue16804@psf.upfronthosting.co.za> Meador Inge added the comment: I will go ahead and commit the patch as is. Thanks for the review y'all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 02:29:39 2013 From: report at bugs.python.org (Neil Hodgson) Date: Wed, 10 Apr 2013 00:29:39 +0000 Subject: [issue17615] String comparison performance regression In-Reply-To: <1364894063.07.0.761589052415.issue17615@psf.upfronthosting.co.za> Message-ID: <1365553779.36.0.108821698136.issue17615@psf.upfronthosting.co.za> Neil Hodgson added the comment: Windows is the only widely used OS that has a 16-bit wchar_t. I can't recall what OS/2 did but Python doesn't support OS/2 any more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 02:33:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Apr 2013 00:33:27 +0000 Subject: [issue17671] io.BufferedRWPair can use uninitialized members In-Reply-To: <1365465332.23.0.700317324795.issue17671@psf.upfronthosting.co.za> Message-ID: <1365554007.42.0.694743676413.issue17671@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 02:36:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Apr 2013 00:36:06 +0000 Subject: [issue17651] Errno checking replaced by concrete classes inherited from OSError In-Reply-To: <1365354742.46.0.363482089834.issue17651@psf.upfronthosting.co.za> Message-ID: <1365554166.76.0.779155414871.issue17651@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 03:02:50 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 Apr 2013 01:02:50 +0000 Subject: [issue17683] socket.getsockname() inconsistent return type with AF_UNIX Message-ID: <1365555770.86.0.711874075927.issue17683@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': (bytes vs. string) >>> import socket >>> s = socket.socket(socket.AF_UNIX) >>> s.getsockname() b'' >>> s.bind(('/tmp/temp')) >>> s.getsockname() '/tmp/temp' >>> ---------- messages: 186472 nosy: giampaolo.rodola, pitrou priority: normal severity: normal status: open title: socket.getsockname() inconsistent return type with AF_UNIX versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 03:08:30 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 Apr 2013 01:08:30 +0000 Subject: [issue17683] socket.getsockname() inconsistent return type with AF_UNIX In-Reply-To: <1365555770.86.0.711874075927.issue17683@psf.upfronthosting.co.za> Message-ID: <1365556110.92.0.155789042775.issue17683@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file29760/issue17683.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 03:24:20 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Apr 2013 01:24:20 +0000 Subject: [issue17358] imp.load_module() leads to the improper caching of the 'file' argument In-Reply-To: <1362511985.74.0.511214026015.issue17358@psf.upfronthosting.co.za> Message-ID: <1365557060.29.0.836555558942.issue17358@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 03:34:39 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 Apr 2013 01:34:39 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <1365557679.49.0.836443553364.issue17675@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : Added file: http://bugs.python.org/file29761/socket-repr2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 05:10:29 2013 From: report at bugs.python.org (Jeff Ramnani) Date: Wed, 10 Apr 2013 03:10:29 +0000 Subject: [issue17684] Skip tests in test_socket like testFDPassSeparate on OS X Message-ID: <1365563429.51.0.176752850468.issue17684@psf.upfronthosting.co.za> New submission from Jeff Ramnani: The changeset for subtests in #16997 cause some tests in test_socket to fail on OS X. Specifically, they cause some tests that were marked as expected failures to be run and be marked as failures. I'm experiencing the same test failures as the OS X Mountain Lion buildbot. `Here's an example build failure (Build 1058). http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.x/builds/1058`_ Per issue #12958 I believe these tests should be skipped on OS X. I'm attaching a patch which skips the offending tests on OS X. ---------- components: Tests files: skip-fd-socket-tests-osx.patch keywords: patch messages: 186474 nosy: jramnani priority: normal severity: normal status: open title: Skip tests in test_socket like testFDPassSeparate on OS X type: behavior versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29762/skip-fd-socket-tests-osx.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 05:21:34 2013 From: report at bugs.python.org (Kyle Roberts) Date: Wed, 10 Apr 2013 03:21:34 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365564094.08.0.278906847393.issue17661@psf.upfronthosting.co.za> Kyle Roberts added the comment: Adding a '.' to the beginning (i.e. `.repr`) creates a link to repr.html#repr.repr. This made more sense after perusing Sphinx's documentation: "If you prefix the name with a dot, this order is reversed. For example, in the documentation of Python?s codecs module, :py:func:`open` always refers to the built-in function, while :py:func:`.open` refers to codecs.open()." I'm not sure what other options I can try after looking at the reST documentation. It seems like our best bet would be if we could define a priority for same-name functions when two definitions are discovered. I didn't see a way to do this in Sphinx/reST so I'm not sure how to move forward with this. I'm assuming we don't want to link directly to the correct url if it can be avoided. Also, I noticed http://docs.python.org/2/library/repr.html#module-repr links to the wrong repr() a few times where it mentions the "built-in" function. ---------- nosy: +kyle.roberts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 07:32:11 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 10 Apr 2013 05:32:11 +0000 Subject: [issue17684] Skip tests in test_socket like testFDPassSeparate on OS X In-Reply-To: <1365563429.51.0.176752850468.issue17684@psf.upfronthosting.co.za> Message-ID: <1365571931.39.0.203697855372.issue17684@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I'm making Antoine nosy since he's the author of the "faulty" changeset. Richard, IIRC, you said somewhere that FD passing failures on OS X could be made to work by passing a FD at a time, or something like that. What do you think of those faiilures? ---------- nosy: +neologix, pitrou, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 07:44:13 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 10 Apr 2013 05:44:13 +0000 Subject: [issue17683] socket.getsockname() inconsistent return type with AF_UNIX In-Reply-To: <1365555770.86.0.711874075927.issue17683@psf.upfronthosting.co.za> Message-ID: <1365572653.56.0.370330610692.issue17683@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > Here's a patch. Your patch returns an empty string in case of Linux abstract namespace: this is wrong, because even though the first char in sun_path is NIL, the path is non-null, there can be other non-NIL char following. Example (the output returns a str because it's a Python 2.6 version): >>> import socket >>> s = socket.socket(socket.AF_UNIX) >>> s.bind(b'\x00hello') >>> s.getsockname() '\x00hello' That's why it returns bytes. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 08:33:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Apr 2013 06:33:13 +0000 Subject: [issue17683] socket.getsockname() inconsistent return type with AF_UNIX In-Reply-To: <1365555770.86.0.711874075927.issue17683@psf.upfronthosting.co.za> Message-ID: <1365575593.39.0.49315307085.issue17683@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, couldn't we simply return a string in that case? We just have to be more careful than in the patch :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 08:34:47 2013 From: report at bugs.python.org (gjwebber) Date: Wed, 10 Apr 2013 06:34:47 +0000 Subject: [issue17674] All examples for concurrent.futures fail with "BrokenProcessPool" In-Reply-To: <1365512691.79.0.330331294917.issue17674@psf.upfronthosting.co.za> Message-ID: <1365575687.18.0.95327784603.issue17674@psf.upfronthosting.co.za> gjwebber added the comment: Damn, this was my screw up. It was a combination of two things that threw me off: 1. I was running my (saved) code un-gaurded, but was getting the same error as with the example code. I thought the problem was elsewhere. 2. As it was just example code, I was copy-pasting it into my IDE and running it. This caused the slightly weird looking Traceback that Richard Oudkerk pointed out and the same error message. After saving and running the standard example, everything worked as expected. After this, I added the 'main' guard to my code and that fixed the problem there. Sorry about that, looks like there's no problem after all. Tested at home on Win 7 and on my works machine (XP Pro). Regards, Gareth ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 09:01:19 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 10 Apr 2013 07:01:19 +0000 Subject: [issue17683] socket.getsockname() inconsistent return type with AF_UNIX In-Reply-To: <1365575593.39.0.49315307085.issue17683@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Well, couldn't we simply return a string in that case? We just have to be more careful than in the patch :-) Probably, provided that: - s.bind().getsockname() == - it doesn't break existing code :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 09:42:41 2013 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Apr 2013 07:42:41 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1365579761.24.0.58028292093.issue16427@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Note that the patch uses type punning through a union: while GCC allows > this, it's not allowed by ANSI. I believe it's legal under C99 + TC3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 10:47:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Apr 2013 08:47:45 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365583665.58.0.551978234923.issue17661@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > It just highlights the mistake we made calling a builtin module the > same name as a builtin function :) But shouldn't the highlighting be handled by Pygments? ;) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 10:59:07 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Wed, 10 Apr 2013 08:59:07 +0000 Subject: [issue17679] sysconfig generation uses some env variables multiple times In-Reply-To: <1365515508.55.0.936246153534.issue17679@psf.upfronthosting.co.za> Message-ID: <1365584347.22.0.592916935944.issue17679@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: I'm attaching a patch that I'm currently using to solve this. It works, but it's a bit aggressive - in the sense that it only adds a string to the sysconfig variable iff this string is not a substring of current variable value. So it may corrupt some values, e.g. it wouldn't add "python" to variable if that variable already had "/usr/lib/python". But it seems to get all the values just fine for me. ---------- keywords: +patch Added file: http://bugs.python.org/file29763/00178-dont-duplicate-flags-in-sysconfig.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 11:56:17 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 10 Apr 2013 09:56:17 +0000 Subject: [issue17684] Skip tests in test_socket like testFDPassSeparate on OS X In-Reply-To: <1365571931.39.0.203697855372.issue17684@psf.upfronthosting.co.za> Message-ID: <5165373B.9030206@gmail.com> Richard Oudkerk added the comment: On 10/04/2013 6:32am, Charles-Fran?ois Natali wrote: > Richard, IIRC, you said somewhere that FD passing failures on OS X > could be made to work by passing a FD at a time, or something like > that. What do you think of those faiilures? I think sending one *array* at a time works as well. These two failures send two arrays, so they are expected. (Also, the sending process should wait for some sort of notification that the receiving process has received the fds before continuing: closing the socket prematurely causes problems.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 12:07:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Apr 2013 10:07:48 +0000 Subject: [issue17684] Skip tests in test_socket like testFDPassSeparate on OS X In-Reply-To: <1365563429.51.0.176752850468.issue17684@psf.upfronthosting.co.za> Message-ID: <1365588468.56.0.39487886476.issue17684@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, it has been decided that @expectedFailure would only work when applied to the test methods run by unittest. In that light, the patch is a correct solution to the issue. (I don't think expected failures are a very useful concept myself :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 14:19:09 2013 From: report at bugs.python.org (Edd) Date: Wed, 10 Apr 2013 12:19:09 +0000 Subject: [issue17685] Frozenset literal? Message-ID: <1365596349.2.0.253732187508.issue17685@psf.upfronthosting.co.za> New submission from Edd: Hi, I am willing to bet that this has been discussed before, but I don't see any related bugs. I have been using Python for a while now as a prototyping language for scientific applications. Most recently I have been using it for prototype program analyses. In this kind of work you are usually transcribing pseudo-code, defined in terms of sets, vectors and mappings into Python syntax. Inevitably, you need to store sets of sets, or you need to do some other operation that requires a hashable data structure. As a result, I never use sets. I usually resort to using frozensets, which are hashable, yet the syntax for creating these is very verbose: frozenset([e1, e2, ...]) To counter this, I usually use the following hack: fs = frozenset then frozensets can be instantiated like this: fs([e1, e2, ...]) But this is not ideal. I can't help wondering why there is not a frozenset literal. I see that the mutable set recently got a literal, but why not frozenset? Cheers! ---------- components: Interpreter Core messages: 186486 nosy: vext01 priority: normal severity: normal status: open title: Frozenset literal? type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 14:35:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Apr 2013 12:35:03 +0000 Subject: [issue17683] socket.getsockname() inconsistent return type with AF_UNIX In-Reply-To: <1365555770.86.0.711874075927.issue17683@psf.upfronthosting.co.za> Message-ID: <1365597303.26.0.976738342621.issue17683@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Apparently the current code is a result of Guido's changeset 980308fbda29 which changed normal Unix sockets to use unicode objects, but Linux abstract namespace sockets to use bytes objects. I don't know if a lot of thought was given to the issue in that changeset; I would favour using PyUnicode_DecodeFSDefaultAndSize for Linux abstract namespace sockets too. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 14:55:57 2013 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 10 Apr 2013 12:55:57 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1365598557.7.0.677363603952.issue15518@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks, looks much better now. I left a couple of small comments in the code review. Other than that, it makes sense to me to update the existing tests to follow this scheme as well. Thanks! On a related note, since you've obviously studied the filecmp module's operation to a great depth, your input on http://bugs.python.org/issue15430 would be appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:08:28 2013 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Apr 2013 13:08:28 +0000 Subject: [issue17685] Frozenset literal? In-Reply-To: <1365596349.2.0.253732187508.issue17685@psf.upfronthosting.co.za> Message-ID: <1365599308.16.0.178398003664.issue17685@psf.upfronthosting.co.za> Mark Dickinson added the comment: See the (inconclusive) python-ideas thread starting here: http://mail.python.org/pipermail/python-ideas/2013-February/019205.html I'm going to close this issue: the python-ideas mailing list is better suited for this kind of open-ended discussions (though it would be fine to re-open an issue with a specific, detailed proposal for a change---one that a patch could reasonably be written for). You could resurrect that python-ideas thread, or start a new one, if you want to renew the discussion. ---------- nosy: +mark.dickinson resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:11:14 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 10 Apr 2013 13:11:14 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365599474.04.0.769520132044.issue17656@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes; I won't have time for a few days, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:11:35 2013 From: report at bugs.python.org (Masato HASHIMOTO) Date: Wed, 10 Apr 2013 13:11:35 +0000 Subject: [issue17686] Doc using/unix broken link (http://linuxmafia.com/) Message-ID: <1365599495.88.0.846759502226.issue17686@psf.upfronthosting.co.za> New submission from Masato HASHIMOTO: In Doc/using/unix.rst, the following link is broken: 31: http://linuxmafia.com/pub/linux/suse-linux-internals/chapter35.html (See also for OpenSuse users) ---------- assignee: docs at python components: Documentation messages: 186491 nosy: docs at python, hashimo priority: normal severity: normal status: open title: Doc using/unix broken link (http://linuxmafia.com/) versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:13:13 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 10 Apr 2013 13:13:13 +0000 Subject: [issue17685] Frozenset literal? In-Reply-To: <1365596349.2.0.253732187508.issue17685@psf.upfronthosting.co.za> Message-ID: <1365599593.95.0.164868402914.issue17685@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:16:53 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Apr 2013 13:16:53 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365599813.77.0.630789254155.issue17666@psf.upfronthosting.co.za> Georg Brandl added the comment: Serhiy, do you want to fix this also in 3.2? I'll roll a brown-paper-bag release of 3.2 and 3.3 together with 2.7.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:16:59 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Apr 2013 13:16:59 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365599819.19.0.901072506226.issue17656@psf.upfronthosting.co.za> Georg Brandl added the comment: I guess I will join with 3.2 and 3.3 for #17666. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:18:52 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Apr 2013 13:18:52 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365599932.32.0.835908624669.issue17656@psf.upfronthosting.co.za> Ned Deily added the comment: Perhaps we should hold off for a week or two to see if any other critical problems show up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:50:04 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Apr 2013 13:50:04 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <3Zm6F72PWMzS91@mail.python.org> Roundup Robot added the comment: New changeset 1410b7790de6 by Giampaolo Rodola' in branch 'default': Fix issue #17675: make socket repr() provide local and remote addresses (if any). http://hg.python.org/cpython/rev/1410b7790de6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 15:50:57 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 Apr 2013 13:50:57 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <1365601857.53.0.979868541584.issue17675@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- assignee: -> giampaolo.rodola resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:04:01 2013 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Apr 2013 14:04:01 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365602641.22.0.890488991206.issue17656@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, although the new releases will get the standard rc period anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:37:00 2013 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Apr 2013 14:37:00 +0000 Subject: [issue17683] socket.getsockname() inconsistent return type with AF_UNIX In-Reply-To: <1365555770.86.0.711874075927.issue17683@psf.upfronthosting.co.za> Message-ID: <1365604620.57.0.915237336879.issue17683@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sorry, I don't think I have anything to add. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:37:26 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 14:37:26 +0000 Subject: [issue17430] missed peephole optimization In-Reply-To: <1363372721.86.0.440516031889.issue17430@psf.upfronthosting.co.za> Message-ID: <1365604646.98.0.265303688465.issue17430@psf.upfronthosting.co.za> Ezio Melotti added the comment: ISTM that we were trying to moving towards an AST optimizer and away from the peephole, so I'm not sure it's a good idea to add more optimization to it. #11549 has patches about the AST optimizer. ---------- nosy: +benjamin.peterson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:38:12 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 14:38:12 +0000 Subject: [issue17607] missed peephole optimization (unnecessary jump at end of function after yield) In-Reply-To: <1364791551.27.0.510465438261.issue17607@psf.upfronthosting.co.za> Message-ID: <1365604692.2.0.362561982053.issue17607@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:40:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 14:40:15 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1365604815.58.0.477391234688.issue17620@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:50:35 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 10 Apr 2013 14:50:35 +0000 Subject: [issue17683] socket.getsockname() inconsistent return type with AF_UNIX In-Reply-To: <1365555770.86.0.711874075927.issue17683@psf.upfronthosting.co.za> Message-ID: <1365605435.0.0.901053540486.issue17683@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Note that if we pass bytes to bind(), getsockname() will return str anyway: >>> s = socket.socket(socket.AF_UNIX) >>> s.bind(b'hello') >>> s.getsockname() 'hello' That said, it seems more consistent to me to return str also in case of abstract namespace. As per: http://blog.eduardofleury.com/archives/2007/09/13 ...one is supposed to set only the first byte to null, and the rest of the path is supposed to be a 'plain' string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:51:15 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 10 Apr 2013 14:51:15 +0000 Subject: [issue17654] IDLE only customizes correctly for OS X when using framework build In-Reply-To: <1365380096.1.0.0254781694905.issue17654@psf.upfronthosting.co.za> Message-ID: <1365605475.65.0.0505605628561.issue17654@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The trigger for the customizations is probably too specific. The primary reason for a having a check that's more specific than 'if sys.platform == "darwin"' is to avoid using the customizations when someone uses an X11 build of Tk and I didn't know (and still don't) a way to check for a "native" Tk port. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:54:23 2013 From: report at bugs.python.org (Andreas Kloeckner) Date: Wed, 10 Apr 2013 14:54:23 +0000 Subject: [issue17687] Undeclared symbol in _struct.c Message-ID: <1365605663.05.0.5813211378.issue17687@psf.upfronthosting.co.za> New submission from Andreas Kloeckner: This line in the "_struct" module references a "PyStructType" that isn't declared anywhere. This is only apparent when the file is compiled without -DNDEBUG. http://hg.python.org/cpython/file/1410b7790de6/Modules/_struct.c#l43 ---------- components: Extension Modules messages: 186501 nosy: inducer priority: normal severity: normal status: open title: Undeclared symbol in _struct.c type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 16:59:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Apr 2013 14:59:35 +0000 Subject: [issue17635] Doc of multiprocessing.connection mentions answerChallenge instead of answer_challenge In-Reply-To: <1365093833.89.0.404146948486.issue17635@psf.upfronthosting.co.za> Message-ID: <3Zm7nL1kVVzSfC@mail.python.org> Roundup Robot added the comment: New changeset 54532684dbed by Ezio Melotti in branch '2.7': #17635: fix wrong function name in multiprocessing docs. http://hg.python.org/cpython/rev/54532684dbed ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:01:26 2013 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Apr 2013 15:01:26 +0000 Subject: [issue17687] Undeclared symbol in _struct.c In-Reply-To: <1365605663.05.0.5813211378.issue17687@psf.upfronthosting.co.za> Message-ID: <1365606086.23.0.775763910392.issue17687@psf.upfronthosting.co.za> Mark Dickinson added the comment: Isn't it declared on line 12? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:01:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Apr 2013 15:01:34 +0000 Subject: [issue17635] Doc of multiprocessing.connection mentions answerChallenge instead of answer_challenge In-Reply-To: <1365093833.89.0.404146948486.issue17635@psf.upfronthosting.co.za> Message-ID: <3Zm7qd32P0zSgx@mail.python.org> Roundup Robot added the comment: New changeset 5d39d459b90d by Ezio Melotti in branch '3.3': #17635: fix wrong function name in multiprocessing docs. http://hg.python.org/cpython/rev/5d39d459b90d New changeset 1a935e932152 by Ezio Melotti in branch 'default': #17635: merge with 3.3. http://hg.python.org/cpython/rev/1a935e932152 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:02:09 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 15:02:09 +0000 Subject: [issue17635] Doc of multiprocessing.connection mentions answerChallenge instead of answer_challenge In-Reply-To: <1365093833.89.0.404146948486.issue17635@psf.upfronthosting.co.za> Message-ID: <1365606129.46.0.404707036351.issue17635@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 versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:13:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 15:13:17 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365606797.31.0.0610427077365.issue17637@psf.upfronthosting.co.za> Ezio Melotti added the comment: The "What's new" is already mentioned briefly in http://docs.python.org/devguide/committing.html#news-entries. Would it be enough to rephrase that part and clarify that committers are expected to update it? Another option is to add a new item to make patchcheck (and to http://docs.python.org/devguide/committing.html#patch-checklist), but I'm not sure it's worth doing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:25:09 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 15:25:09 +0000 Subject: [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1365607509.83.0.28181054599.issue15964@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left a review. To test it you could try to reproduce the steps described in the first message and see what happens. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:33:56 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 10 Apr 2013 15:33:56 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365608036.41.0.88895136543.issue17661@psf.upfronthosting.co.za> ?ric Araujo added the comment: You can always use a ref role instead of func. func tries to find a module, class or function in the global Sphinx index, but ref lets you link to one specific target (see the table at the top of library/functions.rst for an example). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:40:01 2013 From: report at bugs.python.org (Tomasz J. Kotarba) Date: Wed, 10 Apr 2013 15:40:01 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365608401.6.0.750162601334.issue17668@psf.upfronthosting.co.za> Tomasz J. Kotarba added the comment: The example I gave was the simplest possible to illustrate my point but yes, you are correct, I often match the whole string as I do recursive matches. I do use non-capturing groups but they would not solve the problem I talked about. Anyway, I had solved my problem before I reported this issue so I would be all right with whatever the outcome of this discussion was but I am glad we have managed to contribute to improving the docs. Thanks and nice talking to you :)! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:41:40 2013 From: report at bugs.python.org (Andreas Kloeckner) Date: Wed, 10 Apr 2013 15:41:40 +0000 Subject: [issue17687] Undeclared symbol in _struct.c In-Reply-To: <1365605663.05.0.5813211378.issue17687@psf.upfronthosting.co.za> Message-ID: <1365608500.73.0.642726292722.issue17687@psf.upfronthosting.co.za> Andreas Kloeckner added the comment: Whoops. I'm an idiot. Forget I said anything. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:41:44 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 15:41:44 +0000 Subject: [issue17641] ssl module doc unification In-Reply-To: <1365184481.29.0.784588958426.issue17641@psf.upfronthosting.co.za> Message-ID: <1365608504.17.0.64713753188.issue17641@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:44:36 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 15:44:36 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1365608676.21.0.397725366792.issue2771@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti -testusernad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:47:29 2013 From: report at bugs.python.org (Andreas Kloeckner) Date: Wed, 10 Apr 2013 15:47:29 +0000 Subject: [issue17687] Undeclared symbol in _struct.c In-Reply-To: <1365605663.05.0.5813211378.issue17687@psf.upfronthosting.co.za> Message-ID: <1365608849.86.0.262152394011.issue17687@psf.upfronthosting.co.za> Andreas Kloeckner added the comment: (Forgot to say: sorry.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 17:53:04 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Apr 2013 15:53:04 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365609184.74.0.191950303892.issue17637@psf.upfronthosting.co.za> Brett Cannon added the comment: Yep, I think expanding that would be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:01:18 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Apr 2013 16:01:18 +0000 Subject: [issue17687] Undeclared symbol in _struct.c In-Reply-To: <1365605663.05.0.5813211378.issue17687@psf.upfronthosting.co.za> Message-ID: <1365609678.48.0.372601772434.issue17687@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:22:19 2013 From: report at bugs.python.org (=?utf-8?q?Daniel_M=C3=BCllner?=) Date: Wed, 10 Apr 2013 16:22:19 +0000 Subject: [issue17688] Wrong signature for richcmpfunc in documentation Message-ID: <1365610939.69.0.214227746512.issue17688@psf.upfronthosting.co.za> New submission from Daniel M?llner: The C API documentation has a code snippet with a sample implementation of a rich comparison function here: http://docs.python.org/3.3/extending/newtypes.html#object-comparison The function is declared as static int newdatatype_richcmp(PyObject *obj1, PyObject *obj2, int op) but I believe that it should be static PyObject * newdatatype_richcmp(PyObject *obj1, PyObject *obj2, int op) ---------- assignee: docs at python components: Documentation messages: 186513 nosy: docs at python, muellner priority: normal severity: normal status: open title: Wrong signature for richcmpfunc in documentation versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:31:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Apr 2013 16:31:56 +0000 Subject: [issue17487] wave.Wave_read.getparams should be more user friendly In-Reply-To: <1363726749.83.0.981836859976.issue17487@psf.upfronthosting.co.za> Message-ID: <3Zm9qv55GxzRg0@mail.python.org> Roundup Robot added the comment: New changeset 340a12c18b7f by R David Murray in branch 'default': #17487: wave.getparams now returns a namedtuple. http://hg.python.org/cpython/rev/340a12c18b7f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:33:03 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Apr 2013 16:33:03 +0000 Subject: [issue17487] wave.Wave_read.getparams should be more user friendly In-Reply-To: <1363726749.83.0.981836859976.issue17487@psf.upfronthosting.co.za> Message-ID: <1365611583.3.0.635129330304.issue17487@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Claudiu. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:35:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Apr 2013 16:35:43 +0000 Subject: [issue12820] Tests for Lib/xml/dom/minicompat.py In-Reply-To: <1314071659.09.0.625804560965.issue12820@psf.upfronthosting.co.za> Message-ID: <3Zm9wG3vK0zRmD@mail.python.org> Roundup Robot added the comment: New changeset 172f825d7fc9 by Ezio Melotti in branch '3.3': #12820: add tests for the xml.dom.minicompat module. Patch by John Chandler and Phil Connell. http://hg.python.org/cpython/rev/172f825d7fc9 New changeset f675083b2894 by Ezio Melotti in branch 'default': #12820: merge with 3.3. http://hg.python.org/cpython/rev/f675083b2894 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:36:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 16:36:40 +0000 Subject: [issue12820] Tests for Lib/xml/dom/minicompat.py In-Reply-To: <1314071659.09.0.625804560965.issue12820@psf.upfronthosting.co.za> Message-ID: <1365611800.08.0.643496039433.issue12820@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patches! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: behavior -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:44:24 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Apr 2013 16:44:24 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365612264.88.0.409227986919.issue17656@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:44:44 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 16:44:44 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support In-Reply-To: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> Message-ID: <1365612284.43.0.279675673471.issue17652@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +brian.curtin stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:44:44 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Apr 2013 16:44:44 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365612284.9.0.000307581455358.issue17666@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +benjamin.peterson, larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:46:48 2013 From: report at bugs.python.org (Brian Curtin) Date: Wed, 10 Apr 2013 16:46:48 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support In-Reply-To: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> Message-ID: <1365612408.96.0.16254378979.issue17652@psf.upfronthosting.co.za> Brian Curtin added the comment: Could you also propose places in the test to use this? If we're going to add it, we should use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:52:49 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 16:52:49 +0000 Subject: [issue17663] re.sub not replacing all In-Reply-To: <1365427517.11.0.8190689371.issue17663@psf.upfronthosting.co.za> Message-ID: <1365612769.19.0.046683853152.issue17663@psf.upfronthosting.co.za> Ezio Melotti added the comment: See #11957. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 18:53:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 16:53:10 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1365612790.56.0.34371461438.issue11957@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: -> enhancement versions: +Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 19:06:37 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 17:06:37 +0000 Subject: [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1365613597.55.0.486548536696.issue6696@psf.upfronthosting.co.za> Ezio Melotti added the comment: Last patch LGTM (except a couple of minor whitespace issues). Tom, can you sign the contributor agreement (http://www.python.org/psf/contrib/contrib-form/)? ---------- stage: patch review -> commit review versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 19:15:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Apr 2013 17:15:46 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365614146.72.0.599856627119.issue17637@psf.upfronthosting.co.za> Ezio Melotti added the comment: Patch attached. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file29764/issue17637.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 19:34:46 2013 From: report at bugs.python.org (jed.ludlow) Date: Wed, 10 Apr 2013 17:34:46 +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: <1365615286.6.0.464736161848.issue13276@psf.upfronthosting.co.za> jed.ludlow added the comment: I can confirm that the approach suggested in msg148674 resolves this issue for Python 2.7.3 (32-bit Python running on 64-bit Windows 7). For a standard 2.7.3 install, simply replacing wininst-9.0.exe in the command sub-directory of distutils with the patched build of that executable resolved the issue. ---------- nosy: +jed.ludlow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 19:56:22 2013 From: report at bugs.python.org (Kyle Roberts) Date: Wed, 10 Apr 2013 17:56:22 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365616582.35.0.075905738169.issue17661@psf.upfronthosting.co.za> Kyle Roberts added the comment: Ah that's the type of thing I was looking for, thanks ?ric. I saw the underscored reference in functions.rst last night but figured it was just a local file link. I'll have a patch available later today. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 20:04:53 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 10 Apr 2013 18:04:53 +0000 Subject: [issue17666] Extra gzip headers breaks _read_gzip_header In-Reply-To: <1365443712.06.0.547975068624.issue17666@psf.upfronthosting.co.za> Message-ID: <1365617093.09.0.22362149107.issue17666@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 20:14:52 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Apr 2013 18:14:52 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365617692.37.0.935409189203.issue17637@psf.upfronthosting.co.za> Brett Cannon added the comment: "significative" -> "significant" I would also toss in something like "or not backwards-compatible" so people know they should mention anything that will require code change to stay backwards-compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 20:40:49 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Apr 2013 18:40:49 +0000 Subject: [issue17689] Fix test discovery for test_tarfile.py Message-ID: <1365619249.38.0.463638779993.issue17689@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch for test_tarfile.py discovery. There are a couple of inheritance issues resolved; CommonReadTest (and its children, MiscReadTest and StreamReadTest) are changed simply to avoid running the tests in CommonReadTest on their own--they pass, but are unnecessary. LongnameTest and WriteTestBase cause failures when run on their own, so they no longer inherit from unittest.TestCase. test_main() has been replaced by setUpModule, some skip decorators, and tearDownModule. HardlinkTest and LinkEmulationTest are given skipUnless and skipIf decorators, respectively, instead of simply being appended to 'tests' or not. This does change the test count; on my machine it adds the 4 tests skipped in LinkEmulationTest, raising the total from 307 to 311. gzip, bz2, and lzma setup has been moved into setUpModule, and each group of those tests now has a new dummy base class with a skip decorator. This will also change test counts on machines that don't have gzip, bz2, or lzma available. tearDownModule replaces the finally clause at the end of test_main(). A simpler patch would just convert test_main into load_tests and add a tearDownModule function to replace the finally clause of test_main(), but I believe this slightly more invasive approach is more correct and should simplify future maintenance of the module. Thanks, Zach ---------- components: Tests files: test_tarfile_discovery.diff keywords: patch messages: 186525 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_tarfile.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29765/test_tarfile_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 20:58:07 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Apr 2013 18:58:07 +0000 Subject: [issue17690] Fix test discovery for test_time.py Message-ID: <1365620287.02.0.897864401648.issue17690@psf.upfronthosting.co.za> New submission from Zachary Ware: Just inheritance issues in this one. The patch removes _BaseYearTest as its only use was as a unittest.TestCase subclass to inherit from, which caused the discovery issues. ---------- components: Tests files: test_time_discovery.diff keywords: patch messages: 186526 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_time.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29766/test_time_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 21:19:05 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Apr 2013 19:19:05 +0000 Subject: [issue17691] Fix test discovery for test_univnewlines.py Message-ID: <1365621545.24.0.445008426691.issue17691@psf.upfronthosting.co.za> New submission from Zachary Ware: Inheritance issues again. This one has some magic in test_main to create the C and Python tests programmatically which I felt was best left alone, so the patch simply converts test_main into a load_tests which ignores its arguments. ---------- components: Tests files: test_univnewlines_discovery.diff keywords: patch messages: 186527 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_univnewlines.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29767/test_univnewlines_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 21:29:08 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Apr 2013 19:29:08 +0000 Subject: [issue17692] Fix test discovery for test_sqlite.py Message-ID: <1365622148.84.0.335603443253.issue17692@psf.upfronthosting.co.za> New submission from Zachary Ware: test_sqlite.py simply imports and runs tests from sqlite3.test, the patch converts test_main to load_tests to do the same. ---------- components: Tests files: test_sqlite_discovery.diff keywords: patch messages: 186528 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_sqlite.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29768/test_sqlite_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 22:11:31 2013 From: report at bugs.python.org (Giacomo Alzetta) Date: Wed, 10 Apr 2013 20:11:31 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365624691.88.0.873583105828.issue16273@psf.upfronthosting.co.za> Giacomo Alzetta added the comment: I can't find any mention of this behaviour in python3's documentation, nor any reference to ftell(). Is it only well hidden or was it deleted by accident? ---------- nosy: +bakuriu status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 23:01:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Apr 2013 21:01:45 +0000 Subject: [issue17669] Segfault caused by weird combination of imports and yield from In-Reply-To: <1365461726.69.0.844789226325.issue17669@psf.upfronthosting.co.za> Message-ID: <3ZmHqF0W6fzPl4@mail.python.org> Roundup Robot added the comment: New changeset 35cb75b9d653 by Benjamin Peterson in branch '3.3': don't run frame if it has no stack (closes #17669) http://hg.python.org/cpython/rev/35cb75b9d653 New changeset 0b2d4089180c by Benjamin Peterson in branch 'default': merge 3.3 (#17669) http://hg.python.org/cpython/rev/0b2d4089180c ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 23:14:49 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Apr 2013 21:14:49 +0000 Subject: [issue16968] Fix test discovery for test_concurrent_futures.py In-Reply-To: <1358201974.23.0.0352259739582.issue16968@psf.upfronthosting.co.za> Message-ID: <1365628489.18.0.341275182007.issue16968@psf.upfronthosting.co.za> Zachary Ware added the comment: Ping. Version 4 still applies cleanly, and with issue16935 fixed, it works properly. The fix for test_socket is looking like it could use the ReapedSuite from this patch, so would anyone mind looking at this one again and committing if it's qualified? Thanks, Zach ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 10 23:31:10 2013 From: report at bugs.python.org (paul j3) Date: Wed, 10 Apr 2013 21:31:10 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1365629470.32.0.811576633203.issue9253@psf.upfronthosting.co.za> paul j3 added the comment: Further observations: parser.add_subparsers() accepts a 'dest' keyword arg, but not a 'required' one. Default of 'dest' is SUPPRESS, so the name does not appear in the Namespace. Changing it to something like 'command' will produce an entry, e.g. Namespace(command=foo, ...). Is this a problem? Assuming we have a clean way of assigning a name to 'subparsers', what should it be? 'command', '{cmd}', '{foo,bar,baz}' (like in the usage line)? This name also could be used when telling the user the subparser choice is invalid (parser._check_value). This issue exposes a problem with '_get_action_name()'. This function gets a name from the action's option_strings, metavar or dest. If it can't get a string, it returns None. ArgumentError pays attention to whether this action name is a string or None, and adjusts its message accordingly. But the new replacement for the 'too few arguments' error message does a ', '.join([action names]), which chokes if one of those names is None. There is a mutually_exclusive_groups test that also uses this 'join'. This bug should be fixed regardless of what is done with subparsers error messages. So the issues are: - making 'subparsers' a required argument - choosing or generating an appropriate name for 'subparsers' - passing this name to the error message (via _get_action_name?) - correcting the handling of action names when they are unknown (None). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 00:03:15 2013 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 10 Apr 2013 22:03:15 +0000 Subject: [issue1208304] urllib2's urlopen() method causes a memory leak Message-ID: <1365631395.92.0.510813818246.issue1208304@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 00:20:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Apr 2013 22:20:09 +0000 Subject: [issue17086] backport cross-build patches to the 2.7 branch In-Reply-To: <1359587420.86.0.11365762234.issue17086@psf.upfronthosting.co.za> Message-ID: <3ZmKYh2q0czSJJ@mail.python.org> Roundup Robot added the comment: New changeset 87331820569a by doko in branch '2.7': - Issue #17086: Search the include and library directories provided by the http://hg.python.org/cpython/rev/87331820569a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 00:24:47 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 10 Apr 2013 22:24:47 +0000 Subject: [issue17086] backport cross-build patches to the 2.7 branch In-Reply-To: <1359587420.86.0.11365762234.issue17086@psf.upfronthosting.co.za> Message-ID: <1365632687.57.0.547997501145.issue17086@psf.upfronthosting.co.za> Matthias Klose added the comment: the call to add_gcc_paths() wasn't backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 01:27:37 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 Apr 2013 23:27:37 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <1365636457.27.0.872313425557.issue16163@psf.upfronthosting.co.za> Berker Peksag added the comment: Is there a chance to get this into 3.3.2? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 01:50:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Apr 2013 23:50:55 +0000 Subject: [issue17693] Use _PyUnicodeWriter API for CJK decoders Message-ID: <1365637855.94.0.450867352057.issue17693@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch modify CJK decoders to use the _PyUnicodeWriter API. It adds a new _PyUnicodeWriter_WriteChar() function. Performances are not optimal: the overallocation is not well controlled. I will try to adjust it later (if this patch is accepted). ---------- components: Unicode files: cjkcodecs_writer.patch keywords: patch messages: 186536 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal status: open title: Use _PyUnicodeWriter API for CJK decoders versions: Python 3.4 Added file: http://bugs.python.org/file29769/cjkcodecs_writer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 01:53:21 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Apr 2013 23:53:21 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation Message-ID: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> New submission from STINNER Victor: The _PyUnicodeWriter API is used in many functions to create Unicode strings, especially decoders. Performances are not optimal: it is not possible to specify the minimum length of the buffer if the overallocation is disabled. It may help #17693 for example. ---------- messages: 186537 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 03:42:19 2013 From: report at bugs.python.org (Tom Pinckney) Date: Thu, 11 Apr 2013 01:42:19 +0000 Subject: [issue6696] Profile objects should be documented In-Reply-To: <1365613597.55.0.486548536696.issue6696@psf.upfronthosting.co.za> Message-ID: <5C076541-CBC3-47C2-81CF-C54096242DDB@gmail.com> Tom Pinckney added the comment: Great! Just signed the contributor agreement. On Apr 10, 2013, at 1:06 PM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Last patch LGTM (except a couple of minor whitespace issues). > Tom, can you sign the contributor agreement (http://www.python.org/psf/contrib/contrib-form/)? > > ---------- > stage: patch review -> commit review > versions: -Python 3.2 > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 05:14:55 2013 From: report at bugs.python.org (Kazuhiro Yoshida) Date: Thu, 11 Apr 2013 03:14:55 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1365650095.91.0.718509923747.issue8109@psf.upfronthosting.co.za> Kazuhiro Yoshida added the comment: I am trying to use SSLContext.set_servername_callback in my program but when a callback is set, it seems that connecting to the server without providing a server name causes a segmentation fault. (e.g. 'openssl s_client -connect localhost:443 -servername foo' is OK but 'openssl s_client -connect localhost:443' crashes the server. A simple test that causes the same error is included in the patch.) My expectation was to get None as the second argument of the callback in such cases so I modified Modules/_ssl.c (as in the patch) to make it behave as I expected. The modification seems to work fine as far as I've tested, but I'd appreciate if an official fix is available. ---------- nosy: +kyoshida Added file: http://bugs.python.org/file29770/issue-8109.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 05:35:07 2013 From: report at bugs.python.org (Kyle Roberts) Date: Thu, 11 Apr 2013 03:35:07 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365651307.38.0.550515708411.issue17661@psf.upfronthosting.co.za> Kyle Roberts added the comment: So the :ref: keyword helps and creates a link, but it has the unfortunate side effect of adding different markup and style. I've attached two images to illustrate the differences. I couldn't find a way in the Sphinx or reST documentation to force it to style like a :func:, and my searches didn't come up with much either. Does anyone know of a way to style a :ref: just like a :func:? The code I used to create the fixed link is: :ref:`repr() ` ---------- Added file: http://bugs.python.org/file29771/diff_style_example.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 05:35:20 2013 From: report at bugs.python.org (Kyle Roberts) Date: Thu, 11 Apr 2013 03:35:20 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365651320.25.0.421209808284.issue17661@psf.upfronthosting.co.za> Changes by Kyle Roberts : Added file: http://bugs.python.org/file29772/diff_style_markup.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 05:50:27 2013 From: report at bugs.python.org (Daniel Black) Date: Thu, 11 Apr 2013 03:50:27 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1365652227.39.0.609052305551.issue8109@psf.upfronthosting.co.za> Daniel Black added the comment: nice patch. Thanks for finding the bug. I like the solution with test case. Just needs a small enhancement of documention to ensure other users expect this behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 05:54:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Apr 2013 03:54:34 +0000 Subject: [issue5609] Create Unit Tests for nturl2path module In-Reply-To: <1238434174.72.0.622903214477.issue5609@psf.upfronthosting.co.za> Message-ID: <3ZmSzY4qlCzSqV@mail.python.org> Roundup Robot added the comment: New changeset 5f8fe382f9db by Senthil Kumaran in branch '3.3': #5609 - test_urllib coverage for url2pathname and pathname2url. Patch http://hg.python.org/cpython/rev/5f8fe382f9db New changeset 7b3f1c6a67d9 by Senthil Kumaran in branch 'default': merge from 3.3 http://hg.python.org/cpython/rev/7b3f1c6a67d9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 05:57:10 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 11 Apr 2013 03:57:10 +0000 Subject: [issue5609] Create Unit Tests for nturl2path module In-Reply-To: <1238434174.72.0.622903214477.issue5609@psf.upfronthosting.co.za> Message-ID: <1365652630.53.0.101208327665.issue5609@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 06:23:31 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Apr 2013 04:23:31 +0000 Subject: [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1365654211.22.0.805022885279.issue15964@psf.upfronthosting.co.za> Roger Serwy added the comment: Attached is the updated patch to include Ezio's review. Thanks Ezio! ---------- Added file: http://bugs.python.org/file29773/patch_2and3_rev1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 06:26:00 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Apr 2013 04:26:00 +0000 Subject: [issue17670] expandtabs() weirdness In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1365654360.82.0.0724367097585.issue17670@psf.upfronthosting.co.za> Roger Serwy added the comment: LGTM. ---------- nosy: +roger.serwy stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 06:32:44 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Apr 2013 04:32:44 +0000 Subject: [issue17585] IDLE - regression with exit() and quit() In-Reply-To: <1364715900.07.0.37447718586.issue17585@psf.upfronthosting.co.za> Message-ID: <1365654764.62.0.163930920149.issue17585@psf.upfronthosting.co.za> Roger Serwy added the comment: Serhiy, don't worry. There's still plenty of broken found in IDLE. Antoine, may I modify site.py with site_reversion.patch? If not, then I can include a workaround in IDLE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 06:46:58 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 11 Apr 2013 04:46:58 +0000 Subject: [issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work In-Reply-To: <1336252501.23.0.54042826511.issue14735@psf.upfronthosting.co.za> Message-ID: <1365655618.33.0.940652238559.issue14735@psf.upfronthosting.co.za> Roger Serwy added the comment: Attached is a refreshed patch for tip. Supporting Ctrl+Z and Enter on Windows would be problematic as I discussed earlier. We could introduce a timer to make sure Enter is pressed within a short window after Ctrl+Z. If someone wants to make a patch for that, I'll gladly review it. In the meantime, changing the docs to reflect the actual behavior of IDLE would be simpler. ---------- stage: -> patch review type: behavior -> enhancement versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file29774/ctrl_z_doc_rev1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 07:59:08 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Apr 2013 05:59:08 +0000 Subject: [issue17695] _sysconfigdata broken with universal builds on OSX Message-ID: <1365659948.17.0.458530957334.issue17695@psf.upfronthosting.co.za> New submission from Ronald Oussoren: The _sysconfig module contains the definitions for sysconfig.get_config_var and is created during python's build. The definitions in _sysconfig.py for #define macros redefined in pymacconfig.h are wrong when building a universal build of Python (fat binaries) on OSX. In particular the definitions for the various SIZEOF_ definitions are wrong and are the values for the default architecture of the build machine instead of reflecting the architecture for the code that is actually executing. ---------- messages: 186547 nosy: ronaldoussoren priority: normal severity: normal status: open title: _sysconfigdata broken with universal builds on OSX type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 08:29:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 06:29:14 +0000 Subject: [issue17585] IDLE - regression with exit() and quit() In-Reply-To: <1364715900.07.0.37447718586.issue17585@psf.upfronthosting.co.za> Message-ID: <1365661754.04.0.396031413782.issue17585@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, fixing site.py is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 09:08:20 2013 From: report at bugs.python.org (Ulrich Eckhardt) Date: Thu, 11 Apr 2013 07:08:20 +0000 Subject: [issue17696] lookup fails for renamed functions Message-ID: <1365664100.2.0.310972176949.issue17696@psf.upfronthosting.co.za> New submission from Ulrich Eckhardt: When you rename a test function, you can't explicitly specify it on the commandline any more. During normal test runs, it is automatically discovered though. The error is that the old name was not found, even though the new name was specified. The attached example changes the name attached to the function (its __name__ attribute) for demonstration. The same problem occurs if you auto-generate test functions and attach them to the class, using post-processing or a metaclass. The cases all have in common that the name in the class' dict is not the same as the function's __name__, so cls.foo.__name__ is not "foo". See http://mail.python.org/pipermail/python-list/2013-April/644863.html for the initial discussion on the mailinglist. While I only tested Python 2.7 there, it also fails for 3.2 and 3.3. ---------- components: Tests files: name_mod.py messages: 186549 nosy: eckhardt priority: normal severity: normal status: open title: lookup fails for renamed functions type: behavior versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file29775/name_mod.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 11:27:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 09:27:26 +0000 Subject: [issue1208304] urllib2's urlopen() method causes a memory leak Message-ID: <1365672446.29.0.101382927999.issue1208304@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The entire description of this issue is bogus. Reference cycles are not a bug, since Python has a cyclic garbage collector. Closing as invalid. ---------- nosy: +pitrou resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 11:29:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 09:29:09 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365672549.1.0.436332558141.issue16273@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Giacomo, which behaviour are you talking about? FWIW, there is no such tell() issue in Python 3 and it doesn't use ftell(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 11:52:24 2013 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 11 Apr 2013 09:52:24 +0000 Subject: [issue1208304] urllib2's urlopen() method causes a memory leak Message-ID: <1365673944.65.0.033361470699.issue1208304@psf.upfronthosting.co.za> Ralf Schmitt added the comment: I'd consider reference cycles a bug especially if they prevent filedescriptors from being closed. please read the comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 11:56:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 09:56:36 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1365674196.94.0.957957114218.issue17620@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > ? interactive console doesn't use sys.stdin for input, why? Modules/main.c calls PyRun_AnyFileFlags(stdin, "", ...). At this point, sys.stdin *is* the same as C stdin by construction, so I'm not sure how you came to encounter the issue. However, it's also true that if you later redirect sys.stdin, it will be ignored and the original C stdin (as passed to PyRun_InteractiveLoopFlags) will continue to be used. On the other hand, the input() implementation has dedicated logic to find out whether sys.stdin is the same as C stdin. (by the way, the issue should also apply to 2.7) > ? it uses sys.stdin.encoding, shouldn't it rather use sys.__stdin__.encoding if anything? Assuming the previous bug gets fixed, then no :-) ---------- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 12:02:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 10:02:43 +0000 Subject: [issue17430] missed peephole optimization In-Reply-To: <1363372721.86.0.440516031889.issue17430@psf.upfronthosting.co.za> Message-ID: <1365674563.1.0.220350441574.issue17430@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The migration to an AST optimizer is a bit of a pie-in-the-sky project. Functionally, it doesn't have many benefits since the scope of legal static optimizations in Python is very narrow (due to the dynamic nature of the language). Therefore, the main benefit it would bring would be (presumably) easier maintenance. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 12:06:45 2013 From: report at bugs.python.org (Kazuhiro Yoshida) Date: Thu, 11 Apr 2013 10:06:45 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1365674805.44.0.41433310793.issue8109@psf.upfronthosting.co.za> Kazuhiro Yoshida added the comment: Thanks for a comment. I've made a version that adds a line to the document. ---------- Added file: http://bugs.python.org/file29776/issue-8109.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 14:39:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 12:39:18 +0000 Subject: [issue1208304] urllib2's urlopen() method causes a memory leak Message-ID: <1365683958.93.0.0641042907783.issue1208304@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I see no file descriptor leak myself: >>> f = urllib2.urlopen("http://www.google.com") >>> f.fileno() 3 >>> os.fstat(3) posix.stat_result(st_mode=49663, st_ino=5045244, st_dev=7L, st_nlink=1, st_uid=1000, st_gid=1000, st_size=0, st_atime=0, st_mtime=0, st_ctime=0) >>> del f >>> os.fstat(3) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor Ditto with Python 3: >>> f = urllib.request.urlopen("http://www.google.com") >>> f.fileno() 3 >>> os.fstat(3) posix.stat_result(st_mode=49663, st_ino=5071469, st_dev=7, st_nlink=1, st_uid=1000, st_gid=1000, st_size=0, st_atime=0, st_mtime=0, st_ctime=0) >>> del f >>> os.fstat(3) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor Furthermore, you can use the `with` statement to ensure timely disposal of system resources: >>> f = urllib.request.urlopen("http://www.google.com") >>> with f: f.fileno() ... 3 >>> os.fstat(3) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 14:53:14 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Apr 2013 12:53:14 +0000 Subject: [issue17696] lookup fails for renamed functions In-Reply-To: <1365664100.2.0.310972176949.issue17696@psf.upfronthosting.co.za> Message-ID: <1365684794.27.0.954575664656.issue17696@psf.upfronthosting.co.za> R. David Murray added the comment: Well, actually, the old name *is* found, it is the new name that is not found in the class dict when unittest goes to actually run the test. This is a duplicate of issue 14971. I thought I had applied that patch, but obviously I haven't, and neither did Michael. I will fix that. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> (unittest) loadTestsFromName does not work on method with a decorator _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 14:53:35 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Apr 2013 12:53:35 +0000 Subject: [issue14971] (unittest) loadTestsFromName does not work on method with a decorator In-Reply-To: <1338490939.51.0.536223048687.issue14971@psf.upfronthosting.co.za> Message-ID: <1365684815.44.0.272727880277.issue14971@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +eckhardt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 14:58:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Apr 2013 12:58:38 +0000 Subject: [issue14971] (unittest) loadTestsFromName does not work on method with a decorator In-Reply-To: <1338490939.51.0.536223048687.issue14971@psf.upfronthosting.co.za> Message-ID: <3Zmj3L1VNSzSH9@mail.python.org> Roundup Robot added the comment: New changeset b17bcfadd7f3 by R David Murray in branch '3.3': #14971: Use class method name, not function.__name__, during unittest discovery. http://hg.python.org/cpython/rev/b17bcfadd7f3 New changeset 659c89275be2 by R David Murray in branch 'default': Merge #14971: Use class method name, not function.__name__, during unittest discovery. http://hg.python.org/cpython/rev/659c89275be2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 15:00:48 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Apr 2013 13:00:48 +0000 Subject: [issue14971] (unittest) loadTestsFromName does not work on method with a decorator In-Reply-To: <1338490939.51.0.536223048687.issue14971@psf.upfronthosting.co.za> Message-ID: <1365685248.96.0.64080835828.issue14971@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed in Python3. The 2.7 unittest code is different enough that it is not immediately obvious how to make the equivalent fix (given that it has been a while since I looked at this logic). If someone wants to work out the equivalent 2.7 patch, I will apply it. ---------- assignee: michael.foord -> stage: -> needs patch versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 15:24:20 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 11 Apr 2013 13:24:20 +0000 Subject: [issue1208304] urllib2's urlopen() method causes a memory leak Message-ID: <1365686660.12.0.999638370127.issue1208304@psf.upfronthosting.co.za> Mark Lawrence added the comment: Where did file descriptors come into it, surely this is all about memory leaks? In any case it's hardly a show stopper as there are at least three references above to the problem line of code and three workarounds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 16:39:21 2013 From: report at bugs.python.org (Arthur Darcet) Date: Thu, 11 Apr 2013 14:39:21 +0000 Subject: [issue6818] remove/delete method for zipfile/tarfile objects In-Reply-To: <1251866532.69.0.504306670253.issue6818@psf.upfronthosting.co.za> Message-ID: <1365691161.11.0.299898192474.issue6818@psf.upfronthosting.co.za> Changes by Arthur Darcet : ---------- nosy: +Arthur.Darcet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 17:07:39 2013 From: report at bugs.python.org (Don Allen) Date: Thu, 11 Apr 2013 15:07:39 +0000 Subject: [issue17697] Incorrect stacktrace from pdb Message-ID: <1365692859.49.0.652230897549.issue17697@psf.upfronthosting.co.za> New submission from Don Allen: Give the attached file execute permission and run it. At the first breakpoint, the backtrace will be correct. Continue. At the second breakpoint, a backtrace will show the foo('first call') on the stack when, in fact, the call came from foo('second call'), as verified by the printed message. I am running this on an up-to-date 64-bit Arch Linux system. Python 3.3.1. ---------- components: Library (Lib) files: python_bug.py messages: 186561 nosy: donaldcallen priority: normal severity: normal status: open title: Incorrect stacktrace from pdb type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file29777/python_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 17:18:50 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Apr 2013 15:18:50 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365693530.25.0.46586426013.issue17637@psf.upfronthosting.co.za> Ezio Melotti added the comment: Patch updated. ---------- assignee: -> ezio.melotti stage: patch review -> commit review type: -> enhancement Added file: http://bugs.python.org/file29778/issue17637-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 17:43:36 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 11 Apr 2013 15:43:36 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365695016.63.0.378115709666.issue17637@psf.upfronthosting.co.za> Brett Cannon added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 17:48:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Apr 2013 15:48:03 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <3Zmmpq2J5kzSd0@mail.python.org> Roundup Robot added the comment: New changeset 849b2fd4b06a by Ezio Melotti in branch 'default': #17637: mention "What's New" updating guidelines in the devguide. http://hg.python.org/devguide/rev/849b2fd4b06a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 17:50:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Apr 2013 15:50:22 +0000 Subject: [issue17637] Mention "What's New" in devguide's patch guidelines In-Reply-To: <1365124636.23.0.37694009358.issue17637@psf.upfronthosting.co.za> Message-ID: <1365695422.2.0.676435041332.issue17637@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 Thu Apr 11 18:03:28 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Apr 2013 16:03:28 +0000 Subject: [issue17651] Errno checking replaced by concrete classes inherited from OSError In-Reply-To: <1365354742.46.0.363482089834.issue17651@psf.upfronthosting.co.za> Message-ID: <1365696208.69.0.371506805586.issue17651@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Looks like the patch is out-of-date and tests doesn't pass. Would you push updated version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 18:21:03 2013 From: report at bugs.python.org (Andrey Tykhonov) Date: Thu, 11 Apr 2013 16:21:03 +0000 Subject: [issue17651] Errno checking replaced by concrete classes inherited from OSError In-Reply-To: <1365354742.46.0.363482089834.issue17651@psf.upfronthosting.co.za> Message-ID: <1365697263.17.0.642163886749.issue17651@psf.upfronthosting.co.za> Andrey Tykhonov added the comment: Sure! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 18:42:06 2013 From: report at bugs.python.org (Giacomo Alzetta) Date: Thu, 11 Apr 2013 16:42:06 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365698526.81.0.739159737447.issue16273@psf.upfronthosting.co.za> Giacomo Alzetta added the comment: I can reproduce a similar behaviour, but instead of negative values I obtain huge values(which may as well be a "negative" unsigned converted to a python int). See this stackoverflow question: http://stackoverflow.com/questions/15934950/python-file-tell-giving-strange-numbers If it doesn't use ftell() then this might mean that there is a new bug in the current implementation? I can reproduce the results of the questioner, on a windows7 machine with python3.3.0, with the following code: with open('C:/Users/Giacomo/test', 'wb') as f: f.write(b'hello\r\n\r\n-data1:blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\r\n\r\n\r\n-data2:blah blah blah blah blah blah blah blah blah blah blah\r\n-data3: Empty\r\n\r\n-data4: Empty') with open('C:/Users/Giacomo/test', 'rt') as f: for line in iter(f.readline, ''): print(f.tell()) Which outputs: 7 9 18446744073709551714 99 101 164 179 181 194 As I explained in my answer I thought the 1844... was due to the "ftell() bug", but if that's not it I'm at a loss. Could you explain this results with the current implementation? By the way: it seems to be a python3.3 bug, since python3.2.3 is not affected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 19:31:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Apr 2013 17:31:00 +0000 Subject: [issue17690] Fix test discovery for test_time.py In-Reply-To: <1365620287.02.0.897864401648.issue17690@psf.upfronthosting.co.za> Message-ID: <3Zmq5c0c6bzRPk@mail.python.org> Roundup Robot added the comment: New changeset 20efcabcd5c0 by Ezio Melotti in branch '3.3': #17690: test_time now works with unittest test discovery. Patch by Zachary Ware. http://hg.python.org/cpython/rev/20efcabcd5c0 New changeset 6cc56e21a74d by Ezio Melotti in branch 'default': #17690: merge with 3.3. http://hg.python.org/cpython/rev/6cc56e21a74d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 19:31:33 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Apr 2013 17:31:33 +0000 Subject: [issue17690] Fix test discovery for test_time.py In-Reply-To: <1365620287.02.0.897864401648.issue17690@psf.upfronthosting.co.za> Message-ID: <1365701493.85.0.959125838754.issue17690@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 19:42:59 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 11 Apr 2013 17:42:59 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365702179.18.0.234922780043.issue16273@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Giacomo, that's not related to the 2.7 problem. In Python 3, the result of f.tell() is not a file position, but a special value that tells the decoder to pick up when you seek(). ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 19:53:26 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Apr 2013 17:53:26 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1365702806.78.0.0945919736415.issue13355@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:16:05 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Apr 2013 18:16:05 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1365704165.32.0.597052274539.issue13355@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Test for the issue_13355.patch is incorrect, please fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:16:14 2013 From: report at bugs.python.org (Michael Bevilacqua-Linn) Date: Thu, 11 Apr 2013 18:16:14 +0000 Subject: [issue17698] Setting allow_reuse_address in BaseHTTPServer has no effect. Message-ID: <1365704174.76.0.0610300427152.issue17698@psf.upfronthosting.co.za> New submission from Michael Bevilacqua-Linn: Hello, In BaseHTTPServer line 104 is the following: allow_reuse_address = 1 # Seems to make sense in testing environment This appears to attempt to set SO_REUSEADDR, but it doesn't actually do anything since the attribute that needs to be set to true is actually on the superclass (TCPServer). A tad misleading when reading the code trying to figure out how to set SO_REUSEADDR. ---------- components: Library (Lib) messages: 186572 nosy: Michael.Bevilacqua-Linn priority: normal severity: normal status: open title: Setting allow_reuse_address in BaseHTTPServer has no effect. type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:29:41 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Apr 2013 18:29:41 +0000 Subject: [issue17698] Setting allow_reuse_address in BaseHTTPServer has no effect. In-Reply-To: <1365704174.76.0.0610300427152.issue17698@psf.upfronthosting.co.za> Message-ID: <1365704981.19.0.425802739837.issue17698@psf.upfronthosting.co.za> R. David Murray added the comment: Unless I'm misunderstanding something, that assignment is doing exactly what it intends to do, and is documented as being a supported API in TCPServer: changing the value of that class attribute to a true value for the BaseHTTPServer class. (In particular, server_bind calls TCPServer.server_bind, passing it self.) Can you explain more about what behavior you are seeing as the bug? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:32:42 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Apr 2013 18:32:42 +0000 Subject: [issue900112] cgi.fieldStorage doesn't grok standards env. variables Message-ID: <1365705162.48.0.845831621823.issue900112@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I've found the stable link to CGI 1.1 spec at http://tools.ietf.org/html/draft-robinson-www-interface-00 Links to spec from the issue looks like broken. Please, can you describe why we need to convert, say, HTTP_USER_AGENT to user-agent? I see in the spec: Environment variables with names beginning with "HTTP_" contain header data read from the client, if the protocol used was HTTP. The HTTP header name is converted to upper case, has all occurrences of "-" replaced with "_" and has "HTTP_" prepended to give the environment variable name. Why we need the reverse varname translation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:37:41 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 11 Apr 2013 18:37:41 +0000 Subject: [issue900112] cgi.fieldStorage doesn't grok standards env. variables Message-ID: <1365705461.64.0.866928077291.issue900112@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Incidentally I was looking at this bug in the morning and it looks like this one is on the edge. Looks like we may not need the functionality as provided by the patch. The existing headers are set in "FieldStorage" for use within the FieldStorage class. We do not need to get the headers out from environ variable and set in the FieldStorage headers. That is because we can already send the headers if we want as headers and environ are set by the users when Initializing FieldStorage object. So, I am really not sure of the utility value of the patch and gravitating towards closing this as Invalid. I am extremely sorry that this bug has been open for such a long time. But it also shows that not many have felt the need for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:40:26 2013 From: report at bugs.python.org (Drekin) Date: Thu, 11 Apr 2013 18:40:26 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1365705626.34.0.0495013679355.issue17620@psf.upfronthosting.co.za> Drekin added the comment: I encountered it when I changed sys.stdin at runtime (I thought it was a supported feature) to affect the interactive console, see http://bugs.python.org/issue1602 . ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:43:43 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Apr 2013 18:43:43 +0000 Subject: [issue1521051] Allow passing DocTestRunner and DocTestCase in doctest Message-ID: <1365705823.14.0.00338327946169.issue1521051@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I like the patch but please add tests also. We need to put new behavior in stone :) Take a look on comments to the patch also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:49:20 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Apr 2013 18:49:20 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <3Zmrqz3MJ6zRkM@mail.python.org> Roundup Robot added the comment: New changeset 4ae6095b4638 by Antoine Pitrou in branch 'default': Fix a crash when setting a servername callback on a SSL server socket and the client doesn't send a server name. http://hg.python.org/cpython/rev/4ae6095b4638 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:49:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 18:49:53 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1365706193.74.0.544491716713.issue8109@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you for finding this! The patch is now committed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:54:41 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Apr 2013 18:54:41 +0000 Subject: [issue17689] Fix test discovery for test_tarfile.py In-Reply-To: <1365619249.38.0.463638779993.issue17689@psf.upfronthosting.co.za> Message-ID: <1365706481.59.0.454808594021.issue17689@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file29779/test_tarfile_discovery.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 20:56:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 18:56:48 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1365706608.12.0.427992025433.issue17620@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I guess it would need a new API (PyRun_Stdio()?) to run the interactive loop from sys.stdin, rather than from a fixed FILE*. ---------- stage: -> needs patch type: behavior -> enhancement versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:01:12 2013 From: report at bugs.python.org (Ian Kelly) Date: Thu, 11 Apr 2013 19:01:12 +0000 Subject: [issue17697] Incorrect stacktrace from pdb In-Reply-To: <1365692859.49.0.652230897549.issue17697@psf.upfronthosting.co.za> Message-ID: <1365706872.79.0.287064489384.issue17697@psf.upfronthosting.co.za> Ian Kelly added the comment: The bug also occurs using 32-bit Python 3.3.1 on Windows 7. ---------- nosy: +ikelly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:11:15 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Thu, 11 Apr 2013 19:11:15 +0000 Subject: [issue17665] convert to idiomatic unittest code Message-ID: <1365707475.85.0.459385192448.issue17665@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : Removed file: http://bugs.python.org/file29738/diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:11:30 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Thu, 11 Apr 2013 19:11:30 +0000 Subject: [issue17665] convert to idiomatic unittest code Message-ID: <1365707490.13.0.459874411777.issue17665@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : Added file: http://bugs.python.org/file29780/diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:27:04 2013 From: report at bugs.python.org (Michael Bevilacqua-Linn) Date: Thu, 11 Apr 2013 19:27:04 +0000 Subject: [issue17698] Setting allow_reuse_address in BaseHTTPServer has no effect. In-Reply-To: <1365704174.76.0.0610300427152.issue17698@psf.upfronthosting.co.za> Message-ID: <1365708424.57.0.191510003927.issue17698@psf.upfronthosting.co.za> Michael Bevilacqua-Linn added the comment: Ack yes you're right, there was a bug in my test case... Sorry about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:32:02 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Apr 2013 19:32:02 +0000 Subject: [issue17698] Setting allow_reuse_address in BaseHTTPServer has no effect. In-Reply-To: <1365704174.76.0.0610300427152.issue17698@psf.upfronthosting.co.za> Message-ID: <1365708722.83.0.728436683643.issue17698@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:39:06 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Apr 2013 19:39:06 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error In-Reply-To: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> Message-ID: <1365709146.63.0.557595970415.issue16482@psf.upfronthosting.co.za> Ned Deily added the comment: See also Issue17697. Xavier, would you be willing to submit a patch with a test? ---------- nosy: +ned.deily stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:39:22 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Apr 2013 19:39:22 +0000 Subject: [issue17697] Incorrect stacktrace from pdb In-Reply-To: <1365692859.49.0.652230897549.issue17697@psf.upfronthosting.co.za> Message-ID: <1365709162.42.0.0532037226118.issue17697@psf.upfronthosting.co.za> Ned Deily added the comment: On python-list, Robert Kern used "where" to demonstrate the problem: $ python pdbbug.py first call --Return-- > /Users/rkern/scratch/pdbbug.py(4)foo()->None -> pdb.set_trace() (Pdb) where /Users/rkern/scratch/pdbbug.py(5)() -> foo('first call') > /Users/rkern/scratch/pdbbug.py(4)foo()->None -> pdb.set_trace() (Pdb) c second call --Return-- > /Users/rkern/scratch/pdbbug.py(4)foo()->None -> pdb.set_trace() (Pdb) where /Users/rkern/scratch/pdbbug.py(5)() -> foo('first call') > /Users/rkern/scratch/pdbbug.py(4)foo()->None -> pdb.set_trace() (Pdb) Searching other open pdb issues, applying the suggested fix from Issue16482 seems to correct the problem here. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:40:16 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 11 Apr 2013 19:40:16 +0000 Subject: [issue17697] Incorrect stacktrace from pdb In-Reply-To: <1365692859.49.0.652230897549.issue17697@psf.upfronthosting.co.za> Message-ID: <1365709216.56.0.0106310605445.issue17697@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 21:53:36 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Apr 2013 19:53:36 +0000 Subject: [issue17369] Message.get_filename produces exception if the RFC2231 encoding is ill-formed In-Reply-To: <1362608740.33.0.297004510938.issue17369@psf.upfronthosting.co.za> Message-ID: <1365710016.15.0.615208197534.issue17369@psf.upfronthosting.co.za> R. David Murray added the comment: It turns out the new header parsing code also missed this error recovery. Or, rather, it recovers from it by completely ignoring the parameter with the bad syntax. I haven't worked out a solution that does more useful error recovery yet, but I'm posting an updated patch with tests for the new parser and something that may (or may not!) be heading in the direction of a fix, in case anyone else wants to work on it before I get back to it. ---------- Added file: http://bugs.python.org/file29781/rfc2231_issue17369_in_progress.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:07:07 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Apr 2013 20:07:07 +0000 Subject: [issue16658] Missing "return" in HTTPConnection.send() In-Reply-To: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> Message-ID: <1365710827.04.0.860118945332.issue16658@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM, will commit if no objects. Let's leave encoding problems for upcoming issue. Please file new one if needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:13:16 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Apr 2013 20:13:16 +0000 Subject: [issue17693] Use _PyUnicodeWriter API for CJK decoders In-Reply-To: <1365637855.94.0.450867352057.issue17693@psf.upfronthosting.co.za> Message-ID: <3Zmthq5xQ1zSWg@mail.python.org> Roundup Robot added the comment: New changeset bcecf3910162 by Victor Stinner in branch 'default': Close #17693: Rewrite CJK decoders to use the _PyUnicodeWriter API instead of http://hg.python.org/cpython/rev/bcecf3910162 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:29:24 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Apr 2013 20:29:24 +0000 Subject: [issue17699] Fix test_getpass on Windows Message-ID: <1365712164.55.0.847820152156.issue17699@psf.upfronthosting.co.za> New submission from Zachary Ware: (Copied the nosy list from issue17484) The new test module fails on Windows due to the lack of termios and pwd modules. Here's a patch that fixes things. I suspect the skip condition on UnixGetpassTest could be changed to check 'termios' rather than os.name, but I can't test that currently. Thanks, Zach ---------- components: Tests files: test_getpass_windows_fix.diff keywords: patch messages: 186588 nosy: Thomas Fenzl, pitrou, r.david.murray, zach.ware priority: normal severity: normal status: open title: Fix test_getpass on Windows type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file29782/test_getpass_windows_fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:36:53 2013 From: report at bugs.python.org (Ismail Donmez) Date: Thu, 11 Apr 2013 20:36:53 +0000 Subject: [issue4630] IDLE: add cursor noblink option In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1365712613.05.0.968148700038.issue4630@psf.upfronthosting.co.za> Ismail Donmez added the comment: Time to say ping here. This patch is still would be useful for Python. ---------- nosy: +cartman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:40:16 2013 From: report at bugs.python.org (Giacomo Alzetta) Date: Thu, 11 Apr 2013 20:40:16 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365712816.74.0.518295520775.issue16273@psf.upfronthosting.co.za> Giacomo Alzetta added the comment: The documentation for python 3.3.1 states, at http://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files, states: f.tell() returns an integer giving the file object?s current position in the file, **measured in bytes from the beginning of the file**. And regarding files opened in text mode the only statement is: In text files (those opened without a b in the mode string), only seeks relative to the beginning of the file are allowed (the exception being seeking to the very file end with seek(0, 2)). Even though in the io module it is documented that it may not be the number of bytes. I think the former documentation should be changed, since it's simply wrong. Sorry for the disturb, but in the beginning I thought it was related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:41:00 2013 From: report at bugs.python.org (Brian Curtin) Date: Thu, 11 Apr 2013 20:41:00 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365712860.82.0.49354691759.issue16273@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:41:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Apr 2013 20:41:22 +0000 Subject: [issue13056] test_multibytecodec.py:TestStreamWriter is skipped after PEP393 In-Reply-To: <1317260300.62.0.299015504355.issue13056@psf.upfronthosting.co.za> Message-ID: <3ZmvKF4YT4zSTm@mail.python.org> Roundup Robot added the comment: New changeset 78cd09d2f908 by Victor Stinner in branch 'default': Issue #13056: Reenable test_multibytecodec.Test_StreamWriter tests http://hg.python.org/cpython/rev/78cd09d2f908 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:45:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Apr 2013 20:45:48 +0000 Subject: [issue13056] test_multibytecodec.py:TestStreamWriter is skipped after PEP393 In-Reply-To: <1317260300.62.0.299015504355.issue13056@psf.upfronthosting.co.za> Message-ID: <1365713148.29.0.446427790921.issue13056@psf.upfronthosting.co.za> STINNER Victor added the comment: CJK decoders use the new Unicode API since the changeset bcecf3910162. "I think these tests have no sense after PEP393. They tests that StreamWriter works with non-BMP characters broken inside surrogate pair. I.e. c.write(s[:i]); c.write(s[i:]) always is same as c.write(s), even if i breaks s inside a surrogate pair. This case is impossible after PEP393." I reenabled tests, but I simplified them to remove parts related to surrogate pairs. Tests are shorter than before, but it's better than no test at all. Can I close the issue or someone wants to improve these tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:52:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 20:52:24 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1365713544.8.0.314654375644.issue6743@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Closing as per Ezio's suggestion on #python-dev. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:57:01 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Apr 2013 20:57:01 +0000 Subject: [issue6743] Add function compatible with print to pprint module In-Reply-To: <1250778066.89.0.880851114314.issue6743@psf.upfronthosting.co.za> Message-ID: <1365713821.38.0.818161495609.issue6743@psf.upfronthosting.co.za> Ezio Melotti added the comment: To clarify, the request seems reasonable to me, but the use cases are somewhat limited and it's not obvious what the best implementation should be. Given that others are -1 on this, I suggested to close it rather than leaving it open and languishing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 22:58:25 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 11 Apr 2013 20:58:25 +0000 Subject: [issue13056] test_multibytecodec.py:TestStreamWriter is skipped after PEP393 In-Reply-To: <1317260300.62.0.299015504355.issue13056@psf.upfronthosting.co.za> Message-ID: <1365713905.1.0.0527327245581.issue13056@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 23:05:24 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Apr 2013 21:05:24 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <1365714324.91.0.480806088059.issue17675@psf.upfronthosting.co.za> Zachary Ware added the comment: The new tests fail on Windows, see for example http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/1763/steps/test/logs/stdio It can be fixed on Windows by moving the `s.bind(('127.0.0.1', 0))` line above the `self.assertIn('laddr', repr(s))` line, though since the test is currently passing on the Unix buildbots, I don't know if the change would break them. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 23:47:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Apr 2013 21:47:55 +0000 Subject: [issue17699] Fix test_getpass on Windows In-Reply-To: <1365712164.55.0.847820152156.issue17699@psf.upfronthosting.co.za> Message-ID: <3Zmwp25DRmzSq2@mail.python.org> Roundup Robot added the comment: New changeset c84a5e5f73c3 by R David Murray in branch 'default': #17699: Fix the new getpass test failures on windows. http://hg.python.org/cpython/rev/c84a5e5f73c3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 23:48:48 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Apr 2013 21:48:48 +0000 Subject: [issue17699] Fix test_getpass on Windows In-Reply-To: <1365712164.55.0.847820152156.issue17699@psf.upfronthosting.co.za> Message-ID: <1365716928.83.0.69843528101.issue17699@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks Zachary. I forgot to check the buildbots after I pushed that patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 23:56:22 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Apr 2013 21:56:22 +0000 Subject: [issue17699] Fix test_getpass on Windows In-Reply-To: <1365712164.55.0.847820152156.issue17699@psf.upfronthosting.co.za> Message-ID: <1365717382.06.0.116521302762.issue17699@psf.upfronthosting.co.za> R. David Murray added the comment: I'm going to close this because the windows buildbots currently aren't building, and I'll forget to close it if I wait for them. I trust you'll reopen it if it doesn't actually fix the problem for some reason :) ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 11 23:57:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Apr 2013 21:57:29 +0000 Subject: [issue16658] Missing "return" in HTTPConnection.send() In-Reply-To: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> Message-ID: <1365717449.23.0.636216216901.issue16658@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +orsenthil versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 00:34:50 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 11 Apr 2013 22:34:50 +0000 Subject: [issue17700] Update Curses HOWTO for 3.4 Message-ID: <1365719687.97.0.644773548697.issue17700@psf.upfronthosting.co.za> New submission from A.M. Kuchling: Here's a patch updating the Curses HOWTO for 3.4 that can be applied to the default branch. Changes: * curses.wrapper.wrapper is now just curses.wrapper * Mention window.encoding and its effect on Unicode. * Describe getkey() as well as getch() * Improve some examples. * Use 4-space indentation. * Add links to urwid, an alternate UI library. * Various edits & rewording. ---------- assignee: docs at python components: Documentation files: update-curses-howto.txt messages: 186599 nosy: akuchling, docs at python priority: normal severity: normal stage: patch review status: open title: Update Curses HOWTO for 3.4 type: enhancement Added file: http://bugs.python.org/file29783/update-curses-howto.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 01:08:24 2013 From: report at bugs.python.org (Trent Nelson) Date: Thu, 11 Apr 2013 23:08:24 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1365501882.3.0.603967094028.issue12181@psf.upfronthosting.co.za> Message-ID: <20130411230820.GA33303@snakebite.org> Trent Nelson added the comment: On Tue, Apr 09, 2013 at 03:04:42AM -0700, Charles-Fran?ois Natali wrote: > > Why are the OpenBSD buildbots down? Can we do anything about it? > > Having a buildbot slave up will definitely help here. > > All the OpenBSD buildbots we have are provided by SnakeByte, and > they're all offline: http://buildbot.python.org/all/builders Maybe > Trent has more info. Oh dear, hadn't noticed that. Should be fixed now. Trent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 02:06:03 2013 From: report at bugs.python.org (David Wolever) Date: Fri, 12 Apr 2013 00:06:03 +0000 Subject: [issue17701] Improving strftime documentation Message-ID: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> New submission from David Wolever: The current strftime documentation isn't very helpful. It doesn't have examples, and the ordering is unhelpful. I've also moved some format-specific notes into the notes below the format-string-table, because the format string table is what 98%* of people care about. TODO before this can be merged: - Clean up note order - Check that it works with the Python 3 docs *: based on a sample size of 1 ---------- assignee: docs at python components: Documentation files: strftime-docs.diff keywords: needs review, patch messages: 186601 nosy: docs at python, wolever priority: normal severity: normal status: open title: Improving strftime documentation type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file29784/strftime-docs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 02:08:09 2013 From: report at bugs.python.org (Alex Gaynor) Date: Fri, 12 Apr 2013 00:08:09 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365725289.81.0.805280079556.issue17701@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 02:24:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 00:24:18 +0000 Subject: [issue17585] IDLE - regression with exit() and quit() In-Reply-To: <1364715900.07.0.37447718586.issue17585@psf.upfronthosting.co.za> Message-ID: <3Zn0GT37BrzSZT@mail.python.org> Roundup Robot added the comment: New changeset 99e363e67844 by Roger Serwy in branch '2.7': #17585: Fixed IDLE regression. Now closes when using exit() or quit(). http://hg.python.org/cpython/rev/99e363e67844 New changeset d3c67e2fc68c by Roger Serwy in branch '3.3': #17585: Fixed IDLE regression. Now closes when using exit() or quit(). http://hg.python.org/cpython/rev/d3c67e2fc68c New changeset 82451c88b3c0 by Roger Serwy in branch 'default': #17585: merge with 3.3. http://hg.python.org/cpython/rev/82451c88b3c0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 02:29:42 2013 From: report at bugs.python.org (Roger Serwy) Date: Fri, 12 Apr 2013 00:29:42 +0000 Subject: [issue17585] IDLE - regression with exit() and quit() In-Reply-To: <1364715900.07.0.37447718586.issue17585@psf.upfronthosting.co.za> Message-ID: <1365726582.35.0.9362280663.issue17585@psf.upfronthosting.co.za> Roger Serwy added the comment: Thanks, Antoine. I am closing this issue as fixed. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 02:36:11 2013 From: report at bugs.python.org (Robert Tasarz) Date: Fri, 12 Apr 2013 00:36:11 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception Message-ID: <1365726971.44.0.005141093776.issue17702@psf.upfronthosting.co.za> New submission from Robert Tasarz: Minimal example: >>> import os >>> somekey = 'random' >>> try: ... os.environ[somekey] ... except KeyError as e: ... print(repr(e)) ... somekey == e.args[0] ... KeyError(b'random',) False Tested in Python 3.3.1 on Debian ---------- components: Extension Modules messages: 186604 nosy: Robert.Tasarz priority: normal severity: normal status: open title: os.environ converts key type from string to bytes in KeyError exception versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 02:37:32 2013 From: report at bugs.python.org (Robert Tasarz) Date: Fri, 12 Apr 2013 00:37:32 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception In-Reply-To: <1365726971.44.0.005141093776.issue17702@psf.upfronthosting.co.za> Message-ID: <1365727052.93.0.119346684479.issue17702@psf.upfronthosting.co.za> Changes by Robert Tasarz : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 03:30:05 2013 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Apr 2013 01:30:05 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception In-Reply-To: <1365726971.44.0.005141093776.issue17702@psf.upfronthosting.co.za> Message-ID: <1365730205.05.0.115363274456.issue17702@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 05:38:03 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Apr 2013 03:38:03 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365737883.03.0.0757957405403.issue17701@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch, looks good. I?d put the versionadded block at the end of the note rather than the beginning, to match usual conventions. ---------- nosy: +eric.araujo stage: -> patch review versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 05:45:18 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Apr 2013 03:45:18 +0000 Subject: [issue17700] Update Curses HOWTO for 3.4 In-Reply-To: <1365719687.97.0.644773548697.issue17700@psf.upfronthosting.co.za> Message-ID: <1365738318.31.0.0246695491255.issue17700@psf.upfronthosting.co.za> ?ric Araujo added the comment: Do the changes (e.g. curses.wrapper new name) not apply to 3.3? ---------- nosy: +eric.araujo versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 06:22:13 2013 From: report at bugs.python.org (David Wolever) Date: Fri, 12 Apr 2013 04:22:13 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365740533.34.0.0470440698671.issue17701@psf.upfronthosting.co.za> Changes by David Wolever : Added file: http://bugs.python.org/file29785/strftime-docs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 06:24:17 2013 From: report at bugs.python.org (David Wolever) Date: Fri, 12 Apr 2013 04:24:17 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365740657.7.0.937677648658.issue17701@psf.upfronthosting.co.za> David Wolever added the comment: Ah, yes ? thanks ?ric. I've fiddled with the wording on the %f note a bit so it makes more sense along with the versionadded, and removed the versionadded text, which is basically identical to the note and description. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 07:30:42 2013 From: report at bugs.python.org (Roger Serwy) Date: Fri, 12 Apr 2013 05:30:42 +0000 Subject: [issue14146] IDLE: source line in editor doesn't highlight when debugging In-Reply-To: <1330401708.67.0.511106941359.issue14146@psf.upfronthosting.co.za> Message-ID: <1365744642.69.0.672805228839.issue14146@psf.upfronthosting.co.za> Roger Serwy added the comment: Todd, thank you for being proactive with the Tcl/Tk community. Hopefully they will offer a fix in their next version. In the meanwhile, here's a patch that works around the problem on Windows. The purpose of getting the highlight configuration at each FocusOut event is in case the current theme changes. ---------- keywords: +patch stage: -> patch review versions: +Python 2.7 -Python 3.2 Added file: http://bugs.python.org/file29786/win_highlighting.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 07:50:19 2013 From: report at bugs.python.org (Roger Serwy) Date: Fri, 12 Apr 2013 05:50:19 +0000 Subject: [issue17511] Idle find function closes after each find operation In-Reply-To: <1363902452.43.0.911749750934.issue17511@psf.upfronthosting.co.za> Message-ID: <1365745819.16.0.904251407436.issue17511@psf.upfronthosting.co.za> Roger Serwy added the comment: I submitted a patch to #14146 that would work around the selection highlighting issue on Windows. It is based on Sarah's idea of replacing the "sel" tags with a tag that remains visible. There are a lot of ideas floating here about improving the search dialog. Maybe we should take the discussion to idle-dev? In order to avoid rapidly expanding the issue, I suggest that we limit this issue to the find window remaining open with a "Find Next" button. Does that sound reasonable? ---------- dependencies: +IDLE: source line in editor doesn't highlight when debugging _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 07:51:25 2013 From: report at bugs.python.org (Roger Serwy) Date: Fri, 12 Apr 2013 05:51:25 +0000 Subject: [issue14146] IDLE: source line in editor doesn't highlight when debugging In-Reply-To: <1330401708.67.0.511106941359.issue14146@psf.upfronthosting.co.za> Message-ID: <1365745885.79.0.444255258665.issue14146@psf.upfronthosting.co.za> Roger Serwy added the comment: I forgot to mention that the idea for replacing the "sel" tags is based on an idea from Sarah's patch from #17511. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 07:56:52 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 05:56:52 +0000 Subject: [issue4630] IDLE: add cursor noblink option In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1365746212.21.0.594371361772.issue4630@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 08:08:35 2013 From: report at bugs.python.org (Roger Serwy) Date: Fri, 12 Apr 2013 06:08:35 +0000 Subject: [issue4630] IDLE: add cursor noblink option In-Reply-To: <1228982754.08.0.523311497339.issue4630@psf.upfronthosting.co.za> Message-ID: <1365746915.74.0.623591271703.issue4630@psf.upfronthosting.co.za> Roger Serwy added the comment: Attached is an updated version of the patch against the latest 2.7 code. ---------- nosy: +roger.serwy Added file: http://bugs.python.org/file29787/issue4630_refreshed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 08:23:07 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Apr 2013 06:23:07 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception In-Reply-To: <1365726971.44.0.005141093776.issue17702@psf.upfronthosting.co.za> Message-ID: <1365747787.59.0.672650833043.issue17702@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it is not that it is converting it in the exception, it is that it is converting it in order to do the lookup. It is an interesting question whether or not its value in the exception should be considered a bug. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 09:42:07 2013 From: report at bugs.python.org (=?utf-8?q?Tadas_Barzd=C5=BEius?=) Date: Fri, 12 Apr 2013 07:42:07 +0000 Subject: [issue13405] Add DTrace probes In-Reply-To: <1321299726.66.0.343368151185.issue13405@psf.upfronthosting.co.za> Message-ID: <1365752527.68.0.618609747778.issue13405@psf.upfronthosting.co.za> Changes by Tadas Barzd?ius : ---------- nosy: +Tadas.Barzd?ius _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 10:43:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Apr 2013 08:43:35 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception In-Reply-To: <1365726971.44.0.005141093776.issue17702@psf.upfronthosting.co.za> Message-ID: <1365756215.9.0.938347478303.issue17702@psf.upfronthosting.co.za> STINNER Victor added the comment: "It is an interesting question whether or not its value in the exception should be considered a bug." I consider it as a bug because it is very surprising to have a different key on the error. Attached patch fixes the issue. ---------- keywords: +patch versions: +Python 3.4 Added file: http://bugs.python.org/file29788/os_environ_keyerror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 11:50:47 2013 From: report at bugs.python.org (Federico Schwindt) Date: Fri, 12 Apr 2013 09:50:47 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1306354802.94.0.44002539476.issue12181@psf.upfronthosting.co.za> Message-ID: <1365760247.89.0.368203495185.issue12181@psf.upfronthosting.co.za> Federico Schwindt added the comment: Here's a slightly modified version of the patch that should work with python 2 and 3. ---------- Added file: http://bugs.python.org/file29789/openbsd-kqueue-001.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 12:35:24 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Fri, 12 Apr 2013 10:35:24 +0000 Subject: [issue1298835] Add a vendor-packages directory for system-supplied modules Message-ID: <1365762924.29.0.489507418705.issue1298835@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: I'm strongly +1 on this one. I package Python RPMs for Fedora and I know what mess can come out of installing through both RPM and easy_install/pip. In Fedora, both Perl and Ruby use vendor specific dirs for installing RPM packaged modules and site specific dirs for installation via cpan/rubygems. Since I'm also Ruby maintainer, I was able to watch how the confusion of Ruby developers disappeared after we introduced this approach in Fedora 17 (and rubygems stopped uninstalling RPM gems, which was always causing unsatisfied dependency problems). So I think Python should also go this way and provide a configuration option to use vendor-packages. Please note, that Debian packagers have been patching their Python package downstream for quite some time, introducing "dist-packages" into their installation. I think that they didn't experience any significant problems so far, which pretty much proves that this is feasible (and also their patches could probably serve as a base for patch for cPython). ---------- nosy: +bkabrda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 13:11:01 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Apr 2013 11:11:01 +0000 Subject: [issue900112] cgi.fieldStorage doesn't grok standards env. variables Message-ID: <1365765061.03.0.975935191245.issue900112@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree with Sentil ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 13:13:12 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 12 Apr 2013 11:13:12 +0000 Subject: [issue16853] add a Selector to the select module In-Reply-To: <1365415632.41.0.887010278709.issue16853@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > If this goes inside the select module, it could probably help issue #17552 (add socket.sendfile()) a bit. Yes, that's exactly the idea. See also the attached patches for telnetlib and multiprocessing (there would probably be other candidates like subprocess, etc). I guess we can merge this when tulip goes in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 13:14:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 11:14:34 +0000 Subject: [issue17692] Fix test discovery for test_sqlite.py In-Reply-To: <1365622148.84.0.335603443253.issue17692@psf.upfronthosting.co.za> Message-ID: <3ZnGhn4xp4z7LkT@mail.python.org> Roundup Robot added the comment: New changeset 71c4234eb39f by Ezio Melotti in branch '3.3': #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware. http://hg.python.org/cpython/rev/71c4234eb39f New changeset 4c73d4785829 by Ezio Melotti in branch 'default': #17692: merge with 3.3. http://hg.python.org/cpython/rev/4c73d4785829 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 13:16:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Apr 2013 11:16:17 +0000 Subject: [issue17692] Fix test discovery for test_sqlite.py In-Reply-To: <1365622148.84.0.335603443253.issue17692@psf.upfronthosting.co.za> Message-ID: <1365765377.97.0.403775398797.issue17692@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:03:42 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Apr 2013 13:03:42 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception In-Reply-To: <1365726971.44.0.005141093776.issue17702@psf.upfronthosting.co.za> Message-ID: <1365771822.48.0.58266180559.issue17702@psf.upfronthosting.co.za> R. David Murray added the comment: Sounds fine to me. Is there a reason you are not using 'with assertRaises' in the test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:09:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 13:09:31 +0000 Subject: [issue17688] Wrong signature for richcmpfunc in documentation In-Reply-To: <1365610939.69.0.214227746512.issue17688@psf.upfronthosting.co.za> Message-ID: <3ZnKFQ65gGzRMC@mail.python.org> Roundup Robot added the comment: New changeset a263d40d1724 by Andrew Svetlov in branch '3.3': #17688: fix declaration for richcmp example in the docs. http://hg.python.org/cpython/rev/a263d40d1724 New changeset 4c996682d086 by Andrew Svetlov in branch 'default': #17688: fix declaration for richcmp example in the docs. http://hg.python.org/cpython/rev/4c996682d086 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:10:01 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Apr 2013 13:10:01 +0000 Subject: [issue17688] Wrong signature for richcmpfunc in documentation In-Reply-To: <1365610939.69.0.214227746512.issue17688@psf.upfronthosting.co.za> Message-ID: <1365772201.39.0.930084223775.issue17688@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:25:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 13:25:57 +0000 Subject: [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <3ZnKcN5SG6zNwL@mail.python.org> Roundup Robot added the comment: New changeset cd785c9d26c2 by Ezio Melotti in branch '3.3': #6696: add documentation for the Profile objects, and improve profile/cProfile docs. Patch by Tom Pinckney. http://hg.python.org/cpython/rev/cd785c9d26c2 New changeset 81dabc1feb52 by Ezio Melotti in branch 'default': #6696: merge with 3.3. http://hg.python.org/cpython/rev/81dabc1feb52 New changeset b57245574717 by Ezio Melotti in branch '2.7': #6696: add documentation for the Profile objects, and improve profile/cProfile docs. Patch by Tom Pinckney. http://hg.python.org/cpython/rev/b57245574717 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:26:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Apr 2013 13:26:55 +0000 Subject: [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1365773215.93.0.0690287258496.issue6696@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: eric.araujo -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:31:45 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Apr 2013 13:31:45 +0000 Subject: [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1365773505.2.0.615989327984.issue6696@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Cool! Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:36:23 2013 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Apr 2013 13:36:23 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception In-Reply-To: <1365771822.48.0.58266180559.issue17702@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Is there a reason you are not using 'with assertRaises' in the test? The test is not testing the exception class, but the first argument of the exception. How do you test that using assertRaises()? Especially to check "err.args[0] is missing". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:43:12 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 12 Apr 2013 13:43:12 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 Message-ID: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> New submission from Marc-Andre Lemburg: A user reported a segfault when using our mxURL extension with Python 2.7.4. Previous Python versions do not show this behavior, so it's new in Python 2.7.4. The extension uses an Py_AtExit() function to clean up among other things a reference to a dictionary from another module. The dictionary deallocation then causes the segfault: $ gdb /usr/local/bin/python2.7 GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/local/bin/python2.7...done. (gdb) r Starting program: /usr/local/bin/python2.7 [Thread debugging using libthread_db enabled] Python 2.7.4 (default, Apr 8 2013, 15:51:19) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mx.URL >>> import sys >>> sys.exit() Program received signal SIGSEGV, Segmentation fault. 0x08091201 in dict_dealloc (mp=0xb7b2813c) at Objects/dictobject.c:1005 1005 Py_TRASHCAN_SAFE_BEGIN(mp) (gdb) bt #0 0x08091201 in dict_dealloc (mp=0xb7b2813c) at Objects/dictobject.c:1005 #1 0xb7875928 in mxURLModule_Cleanup () at mx/URL/mxURL/mxURL.c:2789 #2 0x0810553f in call_ll_exitfuncs () at Python/pythonrun.c:1763 #3 Py_Finalize () at Python/pythonrun.c:554 #4 0x08104bac in Py_Exit () at Python/pythonrun.c:1772 #5 handle_system_exit () at Python/pythonrun.c:1146 #6 0x0810517d in PyErr_PrintEx (set_sys_last_vars=) at Python/pythonrun.c:1156 #7 0x081058dd in PyRun_InteractiveOneFlags (fp=0xb7f8b420, filename=0x815f9c0 "", flags=0xbffffc4c) at Python/pythonrun.c:855 #8 0x08105a68 in PyRun_InteractiveLoopFlags (fp=0xb7f8b420, filename=0x815f9c0 "", flags=0xbffffc4c) at Python/pythonrun.c:772 #9 0x081062f2 in PyRun_AnyFileExFlags (fp=0xb7f8b420, filename=0x815f9c0 "", closeit=0, flags=0xbffffc4c) at Python/pythonrun.c:741 #10 0x0805bb59 in Py_Main (argc=1, argv=0xbffffd34) at Modules/main.c:640 #11 0x0805abeb in main (argc=1, argv=0xbffffd34) at ./Modules/python.c:23 (gdb) ---------- assignee: pitrou components: Interpreter Core messages: 186627 nosy: lemburg, pitrou priority: normal severity: normal status: open title: Trash can mechanism segfault during interpreter finalization in Python 2.7.4 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:45:37 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 12 Apr 2013 13:45:37 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1365774337.76.0.849848106249.issue17703@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: After a closer look at recent checkins, I found this checking for the trash can mechanism: 5a2ef447b80d (ticket #13992). This appears to be the cause: 1.20 #define Py_TRASHCAN_SAFE_BEGIN(op) \ 1.21 - if (_PyTrash_delete_nesting < PyTrash_UNWIND_LEVEL) { \ 1.22 - ++_PyTrash_delete_nesting; 1.23 - /* The body of the deallocator is here. */ 1.24 + do { \ 1.25 + PyThreadState *_tstate = PyThreadState_GET(); \ 1.26 + if (_tstate->trash_delete_nesting < PyTrash_UNWIND_LEVEL) { \ 1.27 + ++_tstate->trash_delete_nesting; 1.28 + /* The body of the deallocator is here. */ At the time the Py_AtExit functions are called, the thread state is NULL, so the if (_tstate->...) segfaults. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 15:47:32 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 12 Apr 2013 13:47:32 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1365774452.85.0.598992977226.issue17703@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I think a solution to the problem would be to check _tstate for NULL and only use it if it is non-NULL - without threads you don't need to keep track of them ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 16:00:40 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 12 Apr 2013 14:00:40 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1365775240.24.0.903789691624.issue17703@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > At the time the Py_AtExit functions are called, the thread state is NULL I'd say this is the root cause. It's a bad thing to call Py_DECREF without a thread state. Was it the case in previous versions? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 16:01:57 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 12 Apr 2013 14:01:57 +0000 Subject: [issue16658] Missing "return" in HTTPConnection.send() In-Reply-To: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> Message-ID: <1365775317.31.0.633292599572.issue16658@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Andrew - Please go ahead with commit. I reviewed the patch and it looks good to me as well. It is a bug so it should be backported. Thanks for the patch and a good test, Jeff Knupp. Agree with your reasoning / lack of documentation on send behavior w.r.t to encoding, Please open a new ticket for that. ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 16:03:10 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 12 Apr 2013 14:03:10 +0000 Subject: [issue900112] cgi.fieldStorage doesn't grok standards env. variables Message-ID: <1365775390.92.0.717710620251.issue900112@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I am closing this as an Invalid issue. Please bring to discussion at python-dev if someone disagrees. Thank you! ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 16:07:57 2013 From: report at bugs.python.org (Kyle Roberts) Date: Fri, 12 Apr 2013 14:07:57 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1365775677.85.0.411792636738.issue17673@psf.upfronthosting.co.za> Kyle Roberts added the comment: I'm working on a patch for this. ---------- nosy: +kyle.roberts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 16:09:38 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Apr 2013 14:09:38 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception In-Reply-To: <1365726971.44.0.005141093776.issue17702@psf.upfronthosting.co.za> Message-ID: <1365775778.35.0.582838152028.issue17702@psf.upfronthosting.co.za> R. David Murray added the comment: with self.assertRaises(KeyError) as cm: os.environ[missing] self.assertEqual(cm.excecption.args[0], missing) (I don't know why assertRaises returns itself rather than just returning the exception in the with, but that's the API). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 16:19:28 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Apr 2013 14:19:28 +0000 Subject: [issue17700] Update Curses HOWTO for 3.4 In-Reply-To: <1365719687.97.0.644773548697.issue17700@psf.upfronthosting.co.za> Message-ID: <1365776368.58.0.00330521998532.issue17700@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Updated version of the patch: * Correct the errors reported in the review. * Restore 3-space indents. * Mention the LINES and COLS variables. * Add more links to the final section. I believe everything in the howto also applies to 3.3; it would be fine if you want to apply it to the 3.3 branch as well. ---------- Added file: http://bugs.python.org/file29790/update-curses-howto.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 16:23:24 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 12 Apr 2013 14:23:24 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365775240.24.0.903789691624.issue17703@psf.upfronthosting.co.za> Message-ID: <516818D1.6000409@egenix.com> Marc-Andre Lemburg added the comment: On 12.04.2013 16:00, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > >> At the time the Py_AtExit functions are called, the thread state is NULL > > I'd say this is the root cause. It's a bad thing to call Py_DECREF without a thread state. > Was it the case in previous versions? The extension has been using this ever since it was written many years ago and without any problems in all Python versions up, but not including 2.7.4. It's the only way to do module cleanup in Python 2.x. So far, we've only seen the problem for dictionaries that are DECREFed. I know that things may go wrong when DECREF'ing objects this late in the finalization process, but still expect Python to handle errors gracefully without segfaulting, as it has been the case for all previous Python versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 16:57:16 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 12 Apr 2013 14:57:16 +0000 Subject: [issue17697] Incorrect stacktrace from pdb In-Reply-To: <1365692859.49.0.652230897549.issue17697@psf.upfronthosting.co.za> Message-ID: <1365778636.39.0.206430125413.issue17697@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The call to set_trace() installs a local trace function on all the frames of the stack, including on the oldest frame, i.e. the module level frame. This causes the invocation of frame_settrace() in frameobject.c and the module frame f_lineno is evaluated by PyCode_Addr2Line() (this happens only on the first call to set_trace() since the module frame local trace is never removed). Next, the 'continue' command sets the global trace function to None and removes the local trace function of all the frames of the stack, *except* the module frame (see set_continue() in bdb.py). On printing the stack with the 'where' command, the bdb get_stack() function invokes frame_getlineno() that calls PyFrame_GetLineNumber() that assumes that the module frame f_lineno is correct since it has a local trace function. But as the global trace function has been set to None by the 'continue' command, f_lineno is not updated by the interpreter tracing code when running the module level frame. Hence the problem. The root cause is that PyFrame_GetLineNumber assumes incorrectly that when a frame has a local trace function, its f_lineno is correct. Issue 7238 and issue 17277 are also related to this issue. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:02:51 2013 From: report at bugs.python.org (Tom Vaughan) Date: Fri, 12 Apr 2013 15:02:51 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1365778971.63.0.51523446816.issue16309@psf.upfronthosting.co.za> Tom Vaughan added the comment: PATHONPATH=/tmp: will also be interpreted as "/tmp" and ".". Do the patches also address this case? PYTHONPATH=:/tmp and PYTHONPATH=/foo::/bar are also problematic. ---------- nosy: +tvaughan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:10:26 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Apr 2013 15:10:26 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1365779426.14.0.995534462578.issue16309@psf.upfronthosting.co.za> R. David Murray added the comment: It may be problematic, but it is also consistent with the way the shell works in general. (Try the same things with PATH.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:15:44 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Apr 2013 15:15:44 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1365779744.36.0.679245871292.issue16309@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. Although that argues that the original behavior was in fact correct. At least, the behavior of bash and zsh for me is that PATH= foo finds foo if it is in the local directory, contradicting the claim made in the original post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:20:09 2013 From: report at bugs.python.org (Marco Buttu) Date: Fri, 12 Apr 2013 15:20:09 +0000 Subject: [issue17704] ImportError: No module named '_curses' Message-ID: <1365780009.75.0.902696843023.issue17704@psf.upfronthosting.co.za> New submission from Marco Buttu: Right now I downloaded and installed Python 3.3.1 on Linux Mint 14, with Cinnamon: $ uname -a Linux buttu-oac 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ python3.3 Python 3.3.1 (default, Apr 12 2013, 16:24:16) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import curses Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.3/curses/__init__.py", line 13, in from _curses import * ImportError: No module named '_curses' It works fine on Python 3.2, where I have: $ ls -1 /usr/lib/python3.2/lib-dynload/*_curses* /usr/lib/python3.2/lib-dynload/_curses.cpython-32mu.so /usr/lib/python3.2/lib-dynload/_curses_panel.cpython-32mu.so On Python 3.3: $ ls -1 /usr/lib/python3.3/lib-dynload/*_curses* /usr/lib/python3.3/lib-dynload/_curses.cpython-33dm-x86_64-linux-gnu.so /usr/lib/python3.3/lib-dynload/_curses.cpython-33m-x86_64-linux-gnu.so /usr/lib/python3.3/lib-dynload/_curses_panel.cpython-33dm-x86_64-linux-gnu.so /usr/lib/python3.3/lib-dynload/_curses_panel.cpython-33m-x86_64-linux-gnu.so Is this a Python bug? ---------- components: Extension Modules messages: 186641 nosy: marco.buttu priority: normal severity: normal status: open title: ImportError: No module named '_curses' versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:28:37 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 12 Apr 2013 15:28:37 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error In-Reply-To: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> Message-ID: <1365780517.98.0.721265118518.issue16482@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The last patch proposed at issue 17277 and named traced_frame.patch fixes also issue 17697, and issues 7238, 16482. IMHO one should remove the assumption in PyFrame_GetLineNumber() that f_lineno is correct when f_trace is not NULL, as there does not seem to be a way to remove the local trace function of a generator frame. The traced_frame patch does that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:30:08 2013 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 12 Apr 2013 15:30:08 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error In-Reply-To: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> Message-ID: <1365780608.16.0.162737746374.issue16482@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Forgot to say that traced_frame.patch includes a test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:32:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Apr 2013 15:32:09 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1365780729.09.0.80451603478.issue17703@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Judging by the fact that the Py_AtExit funcs are called at the very end of Py_Finalize (after absolutely everything has been cleaned up), I think you shouldn't use any Python facilities at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:39:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Apr 2013 15:39:27 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1365781167.21.0.720292693561.issue17703@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, why do you try to clean up the dictionary at this point? Any non-trivial deallocation code (e.g. __del__ method) will fail running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:41:58 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 12 Apr 2013 15:41:58 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365780729.09.0.80451603478.issue17703@psf.upfronthosting.co.za> Message-ID: <51682B3C.8090905@egenix.com> Marc-Andre Lemburg added the comment: On 12.04.2013 17:32, Antoine Pitrou wrote: > > Judging by the fact that the Py_AtExit funcs are called at the very end of Py_Finalize (after absolutely everything has been cleaned up), I think you shouldn't use any Python facilities at this point. As mentioned earlier: this is the only way to cleanup extension modules in Python 2.x and the trash can patch broke this. > By the way, why do you try to clean up the dictionary at this point? Any non-trivial deallocation code (e.g. __del__ method) will fail running. The dictionaries just contain simple Python types that don't have __del__ methods, so deallocation works fine and it prevents memory leaks when embedding the Python interpreter and restarting it several times. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 17:48:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Apr 2013 15:48:44 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <51682B3C.8090905@egenix.com> Message-ID: <1422567026.47753232.1365781718576.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > As mentioned earlier: this is the only way to cleanup extension > modules > in Python 2.x and the trash can patch broke this. Well, the doc clearly says "Since Python?s internal finalization will have completed before the cleanup function, no Python APIs should be called by func". Why wouldn't you clean up the dict (if it exists) at module initialization instead? You will have a working Python runtime at this point. That said, we could hack a 2.7-specific hack to the patch, in order to disable the trashcan mechanism at shutdown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 18:04:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 16:04:35 +0000 Subject: [issue9556] Specifying the time a TimedRotatingFileHandler rotates In-Reply-To: <1281441457.15.0.524451784963.issue9556@psf.upfronthosting.co.za> Message-ID: <3ZnP7Q3VBTzS5S@mail.python.org> Roundup Robot added the comment: New changeset eead4be1bdd9 by Vinay Sajip in branch 'default': Closed #9556: Allowed specifying a time-of-day for a TimedRotatingFileHandler to rotate. http://hg.python.org/cpython/rev/eead4be1bdd9 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 18:20:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 16:20:27 +0000 Subject: [issue17653] fix typo in socketserver.rst Message-ID: <3ZnPTk3dFYz7LlC@mail.python.org> New submission from Roundup Robot: New changeset 26639365e62b by Ezio Melotti in branch '3.3': #17653: fix typo in socketserver docs. Patch by Tshepang Lekhonkhobe. http://hg.python.org/cpython/rev/26639365e62b New changeset 5118304a4c9c by Ezio Melotti in branch 'default': #17653: merge with 3.3. http://hg.python.org/cpython/rev/5118304a4c9c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 18:22:02 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Apr 2013 16:22:02 +0000 Subject: [issue17653] fix typo in socketserver.rst In-Reply-To: <3ZnPTk3dFYz7LlC@mail.python.org> Message-ID: <1365783722.84.0.876529392586.issue17653@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 type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 18:28:29 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 16:28:29 +0000 Subject: [issue17675] show addresses in socket.__repr__ In-Reply-To: <1365513370.53.0.242693872141.issue17675@psf.upfronthosting.co.za> Message-ID: <3ZnPg06fjfz7Ll8@mail.python.org> Roundup Robot added the comment: New changeset e68bd20b5434 by Giampaolo Rodola' in branch 'default': attempt to fix bb failure as per http://bugs.python.org/issue17675#msg186595 http://hg.python.org/cpython/rev/e68bd20b5434 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 18:31:30 2013 From: report at bugs.python.org (Tom Vaughan) Date: Fri, 12 Apr 2013 16:31:30 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1365784290.18.0.790611111389.issue16309@psf.upfronthosting.co.za> Tom Vaughan added the comment: Oh wow. That is not what I remembered/assumed about sh and PATH. Mind. Blown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 18:54:55 2013 From: report at bugs.python.org (Julian Berman) Date: Fri, 12 Apr 2013 16:54:55 +0000 Subject: [issue17705] Fill Character cannot be \0 Message-ID: <1365785695.21.0.22745237494.issue17705@psf.upfronthosting.co.za> New submission from Julian Berman: The docs say: "The fill character can be any character other than ?{? or ?}?." http://docs.python.org/dev/library/string.html#format-specification-mini-language But: >>> "{0:\x01>8.2f}".format(12) '\x01\x01\x0112.00' whereas: >>> "{0:\x00>8.2f}".format(12) ' 12.00' ---------- components: Interpreter Core messages: 186653 nosy: Julian priority: normal severity: normal status: open title: Fill Character cannot be \0 type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 19:27:46 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 17:27:46 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1365787666.69.0.0754026368175.issue17642@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On Windows, cntl-+. cntl-- Could we use the tk event system by defining font change events and event handlers? ---------- nosy: +terry.reedy versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 19:41:09 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 17:41:09 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365788469.62.0.9212083216.issue17643@psf.upfronthosting.co.za> Terry J. Reedy added the comment: > there are other tests in that test module that also rely on del resulting in immediate cleanup I would mark them all as 'cpython-only', since they are. Other implementation must be omitting this test module, ignoring its failures, or patching out the specific tests. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 19:43:29 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 12 Apr 2013 17:43:29 +0000 Subject: [issue17659] no way to determine First weekday (based on locale) In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1365788609.81.0.506408388669.issue17659@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- title: First weekday -> no way to determine First weekday (based on locale) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 19:43:43 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 12 Apr 2013 17:43:43 +0000 Subject: [issue17659] no way to determine First weekday (based on locale) In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1365788623.07.0.0122523875338.issue17659@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:00:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Apr 2013 18:00:15 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1365789615.27.0.631490303011.issue17703@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Marc-Andr?, does this patch work for you? ---------- keywords: +patch Added file: http://bugs.python.org/file29791/tstate_trashcan.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:08:52 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 18:08:52 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <1365283179.61.0.145925901601.issue17647@psf.upfronthosting.co.za> Message-ID: <1365790132.38.0.129915911569.issue17647@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We seem to agree that this is an OS+application issue, not a Python issue. I think the red FAILEDs would be nice for unittest (a possible separate issue). ---------- nosy: +terry.reedy resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:14:46 2013 From: report at bugs.python.org (Caitlin Potter) Date: Fri, 12 Apr 2013 18:14:46 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <1365790132.38.0.129915911569.issue17647@psf.upfronthosting.co.za> Message-ID: Caitlin Potter added the comment: A suggestion to work around this from #waf on freenode: http://codepad.org/1Y8K9e2m So it is probably not a big deal and can be wrapped up. But still it would be nice if Windows had native support for ANSI colours. On Fri, Apr 12, 2013 at 2:08 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > We seem to agree that this is an OS+application issue, not a Python issue. > > I think the red FAILEDs would be nice for unittest (a possible separate > issue). > > ---------- > nosy: +terry.reedy > resolution: -> invalid > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:22:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 18:22:40 +0000 Subject: [issue17573] add ElementTree XML processing benchmark to benchmark suite In-Reply-To: <1364557004.09.0.303350319351.issue17573@psf.upfronthosting.co.za> Message-ID: <3ZnSBl5810z7Lml@mail.python.org> Roundup Robot added the comment: New changeset dbf5693d7013 by Antoine Pitrou in branch 'default': Issue #17573: add three elementtree benchmarks. Initial patch by Stefan Behnel. http://hg.python.org/benchmarks/rev/dbf5693d7013 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:23:41 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 18:23:41 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365791021.51.0.789293444023.issue17656@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A week's notice to push any almost ready IDLE bugfixes before the .rc's would be nice. (I am assuming there are some, but would have to ask Roger.) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:32:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Apr 2013 18:32:15 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365791535.44.0.169763835523.issue17661@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't think the style is so important, especially since this issue only affects 2.7. ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:42:45 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 18:42:45 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: Message-ID: <51685585.1090004@udel.edu> Terry J. Reedy added the comment: Caitlin, when you reply by email, please snip the previous post as I have here, as it is already displayed directly above the reply on the website. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:46:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 18:46:25 +0000 Subject: [issue17573] add ElementTree XML processing benchmark to benchmark suite In-Reply-To: <1364557004.09.0.303350319351.issue17573@psf.upfronthosting.co.za> Message-ID: <3ZnSk81ysgz7Lmp@mail.python.org> Roundup Robot added the comment: New changeset 723d7f134cf5 by Antoine Pitrou in branch 'default': Tweak etree benchmarks and add an etree_iterparse benchmark (followup to issue #17573). http://hg.python.org/benchmarks/rev/723d7f134cf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:48:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Apr 2013 18:48:39 +0000 Subject: [issue17573] add ElementTree XML processing benchmark to benchmark suite In-Reply-To: <1364557004.09.0.303350319351.issue17573@psf.upfronthosting.co.za> Message-ID: <1365792519.79.0.850337973005.issue17573@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the benchmarks after some changes: - smaller document to reduce runtimes - avoid measuring processing and serializing performance as part of the parsing benchmark - added an iterparse benchmark (iterparse can be important for e.g. XMPP implementations) ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:52:24 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 12 Apr 2013 18:52:24 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365792744.18.0.117927373519.issue17643@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > I could mark the new test as cpython only, or add a gc.collect (but I'm > not sure if the latter is enough, either). test.support.gc_collect() should work on non-refcounted implementations. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 20:55:27 2013 From: report at bugs.python.org (Armin Rigo) Date: Fri, 12 Apr 2013 18:55:27 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1365792927.22.0.165386581644.issue16309@psf.upfronthosting.co.za> Armin Rigo added the comment: Uh, confusion. Indeed, "PATH= foo" finds foo in the current directory on bash. I'm not sure how I ran the original example. It seems that a default PATH is used, which includes at least "/bin" and ".". The point I was making in the original post is still valid: "PATH= foo" appears to behave identically to "unset PATH && foo" in all cases I tried so far. For example, for me both work with some local executable or with "ls" (which is in /bin), and neither works with "which" (which is in /usr/bin). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:03:08 2013 From: report at bugs.python.org (Caitlin Potter) Date: Fri, 12 Apr 2013 19:03:08 +0000 Subject: [issue17647] subprocess.communicate() should preserve colored output on Windows In-Reply-To: <51685585.1090004@udel.edu> Message-ID: Caitlin Potter added the comment: Sorry Terry, gmail hides it by default, didn't notice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:04:59 2013 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Apr 2013 19:04:59 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365793499.27.0.746259805158.issue17643@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah, test.support.gc_collect looks useful. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:10:05 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 19:10:05 +0000 Subject: [issue17665] convert test_wsgiref to idiomatic unittest code Message-ID: <1365793805.63.0.263878041576.issue17665@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy stage: -> patch review title: convert to idiomatic unittest code -> convert test_wsgiref to idiomatic unittest code type: -> performance versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:12:48 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 19:12:48 +0000 Subject: [issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll In-Reply-To: <1365444634.63.0.621793850181.issue17667@psf.upfronthosting.co.za> Message-ID: <1365793968.51.0.305182008944.issue17667@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +brian.curtin, tim.golden stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:14:58 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Apr 2013 19:14:58 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1365794098.15.0.425593591044.issue16309@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think bin is included: > PATH= gzip bash: gzip: No such file or directory But you are right...unset seems to be equivalent to PATH= I could have sworn it acted different when I tried it, but I just ran it again and it it acted the same, which makes sense. So given that I agree that the fix is good. And further fixing is not :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:17:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 19:17:25 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1365794245.03.0.646522567379.issue17670@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: expandtabs() weirdness -> Improve str.expandtabs() doc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:20:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 12 Apr 2013 19:20:28 +0000 Subject: [issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll In-Reply-To: <1365444634.63.0.621793850181.issue17667@psf.upfronthosting.co.za> Message-ID: <1365794428.11.0.32478238482.issue17667@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:39:16 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 19:39:16 +0000 Subject: [issue17676] spwd uses -1 for empty attributes In-Reply-To: <1365514128.27.0.523273104192.issue17676@psf.upfronthosting.co.za> Message-ID: <1365795556.05.0.830222479601.issue17676@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The docs for pwd and spwd modules specify that some items are strings and others are ints. Null strings should be '' and 'null' ints must be negative since 0 can be a valid item. It happens that all but 2 pwd items are strings and all but 2 spwd items are ints. The 2 pwd int items are uid and gid, which I believe are never missing, so you never encounter -1 for them. Similarly, the 2 spwd str items are nam and pwd, which I believe are not missing either, so you never encounter '' for them. Otherwise, your val != -1 test would not work. I believe the following expression will work for spwd (and even pwd) (I cannot test on Windows ;-). ':'.join((str(val) if val != -1 else '') for val in rec) ---------- nosy: +terry.reedy resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:47:29 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 19:47:29 +0000 Subject: [issue17704] ImportError: No module named '_curses' In-Reply-To: <1365780009.75.0.902696843023.issue17704@psf.upfronthosting.co.za> Message-ID: <1365796049.5.0.613758879751.issue17704@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In general, 'Is this a bug' is better asked on python-list. In this particular case, I strongly suggest that. I have no idea which developer I might refer this to, and I am sure you will get a response from a 3.3 on linux user on the mailing list who will compare your ls results to his and perhaps suggest another test. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:48:35 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Apr 2013 19:48:35 +0000 Subject: [issue17686] Doc using/unix broken link (http://linuxmafia.com/) In-Reply-To: <1365599495.88.0.846759502226.issue17686@psf.upfronthosting.co.za> Message-ID: <1365796115.61.0.711983069781.issue17686@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Do you know of a replacement, or should be just delete? ---------- nosy: +terry.reedy versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:51:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 19:51:07 +0000 Subject: [issue16658] Missing "return" in HTTPConnection.send() In-Reply-To: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> Message-ID: <3ZnV8p5qWmz7Ln8@mail.python.org> Roundup Robot added the comment: New changeset 70c7687de1cd by Andrew Svetlov in branch '3.3': Issue #16658: add missing return to HTTPConnection.send(). http://hg.python.org/cpython/rev/70c7687de1cd New changeset 2b89e9a6b482 by Andrew Svetlov in branch 'default': Issue #16658: add missing return to HTTPConnection.send(). http://hg.python.org/cpython/rev/2b89e9a6b482 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 21:51:45 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 12 Apr 2013 19:51:45 +0000 Subject: [issue17699] Fix test_getpass on Windows In-Reply-To: <1365712164.55.0.847820152156.issue17699@psf.upfronthosting.co.za> Message-ID: <1365796305.96.0.809260485762.issue17699@psf.upfronthosting.co.za> Zachary Ware added the comment: Buildbots look happy (with test_getpass, anyway) and my machine is happy too. Thanks for the commit :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:00:10 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Apr 2013 20:00:10 +0000 Subject: [issue16658] Missing "return" in HTTPConnection.send() In-Reply-To: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> Message-ID: <1365796810.67.0.765336949918.issue16658@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Pushed for 3.3 and 3.4. As I see 2.7 has no this problem. Close the issue. Thanks for all. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:26:08 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 12 Apr 2013 20:26:08 +0000 Subject: [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1365798368.13.0.913737836367.issue15657@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I just ran into this too. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:26:10 2013 From: report at bugs.python.org (Ankur Ankan) Date: Fri, 12 Apr 2013 20:26:10 +0000 Subject: [issue17369] Message.get_filename produces exception if the RFC2231 encoding is ill-formed In-Reply-To: <1362608740.33.0.297004510938.issue17369@psf.upfronthosting.co.za> Message-ID: <1365798370.06.0.516595009304.issue17369@psf.upfronthosting.co.za> Changes by Ankur Ankan : ---------- nosy: +Ankur.Ankan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:27:51 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 12 Apr 2013 20:27:51 +0000 Subject: [issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible In-Reply-To: <1362781994.31.0.121984055749.issue17386@psf.upfronthosting.co.za> Message-ID: <1365798471.34.0.605530387856.issue17386@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a new patch to address Ezio's review comments, including more updates to Doc/README.txt, the addition of an 'htmlview' target to make.bat, and documentation of the 'htmlview' target in the Makefile usage message. ---------- Added file: http://bugs.python.org/file29792/win_doc_make.v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:31:12 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 20:31:12 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <3ZnW336qTSz7Lkf@mail.python.org> Roundup Robot added the comment: New changeset c40e36a49033 by Andrew Svetlov in branch '3.3': Issue #13355: Raise ValueError on random.triangular call with invalid params. http://hg.python.org/cpython/rev/c40e36a49033 New changeset 613eb432b152 by Andrew Svetlov in branch 'default': Issue #13355: Raise ValueError on random.triangular call with invalid params. http://hg.python.org/cpython/rev/613eb432b152 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:31:58 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 12 Apr 2013 20:31:58 +0000 Subject: [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1365798718.81.0.279788597147.issue15657@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: We should fix the code for 3.2 through 3.4, but change the docs for 3.2 and 3.3 to remove the parenthetical note. For 3.4 we can leave the parenthetical note but say this is new in 3.4 (or maybe, that it doesn't actually work in some versions < 3.4). I agree that for code to work consistently across all Python 3.2 and 3.3 microversions, extension code is going to have to include both flags anyway. ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:39:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Apr 2013 20:39:43 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <3ZnWDv06Qkz7Ln8@mail.python.org> Roundup Robot added the comment: New changeset 1062c66e9bdc by Andrew Svetlov in branch '2.7': Issue #13355: Raise ValueError on random.triangular call with invalid params. http://hg.python.org/cpython/rev/1062c66e9bdc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:44:58 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Apr 2013 20:44:58 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1365799498.71.0.92447852598.issue13355@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Pushed. Yuriy Senko, thanks for patch. But, please, be more accurate with tests for another one. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 22:51:32 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 12 Apr 2013 20:51:32 +0000 Subject: [issue17665] convert test_wsgiref to idiomatic unittest code Message-ID: <1365799892.28.0.355735415703.issue17665@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 12 23:02:00 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Apr 2013 21:02:00 +0000 Subject: [issue17686] Doc using/unix broken link (http://linuxmafia.com/) In-Reply-To: <1365599495.88.0.846759502226.issue17686@psf.upfronthosting.co.za> Message-ID: <1365800520.54.0.549962516699.issue17686@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Perhaps http://en.opensuse.org/Portal:Packaging is a good replacement. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 00:20:58 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Apr 2013 22:20:58 +0000 Subject: [issue6783] Add a builtin method to 'int' for base/radix conversion In-Reply-To: <1251228941.52.0.551451692653.issue6783@psf.upfronthosting.co.za> Message-ID: <1365805258.77.0.408035818048.issue6783@psf.upfronthosting.co.za> R. David Murray added the comment: Given an inconclusive python-ideas thread, Mark's -0, and the age of the issue, I'm going to close this. If someone wants to bring it up on python-ideas again, they can open an new issue if consensus is reached. ---------- nosy: +r.david.murray stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 00:34:57 2013 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 12 Apr 2013 22:34:57 +0000 Subject: [issue17705] Fill Character cannot be \0 In-Reply-To: <1365785695.21.0.22745237494.issue17705@psf.upfronthosting.co.za> Message-ID: <1365806097.89.0.914206312567.issue17705@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 00:37:06 2013 From: report at bugs.python.org (Orion Poplawski) Date: Fri, 12 Apr 2013 22:37:06 +0000 Subject: [issue17706] Segfault in PyErr_SetObject Message-ID: <1365806226.48.0.566850087286.issue17706@psf.upfronthosting.co.za> New submission from Orion Poplawski: I'm seeing a segfault running the scipy 0.12 tests against numpy 1.7.1 with python 3.3.1. The crash is here: test_ticket_1645 (test_lapack.TestRegression) ... Program received signal SIGSEGV, Segmentation fault. PyErr_SetObject (exception=exception at entry=, value=value at entry='On entry to SGERQF parameter number 7 had an illegal value') at /usr/src/debug/Python-3.3.1/Python/errors.c:67 67 exc_value = tstate->exc_value; (gdb) print tstate $1 = (PyThreadState *) 0x0 So it appears that PyThreadState_GET() is returning NULL and PyErr_SetOject() is not handling that condition. Not sure if this is a sign of another issue. (gdb) bt #0 PyErr_SetObject (exception=exception at entry=, value=value at entry='On entry to SGERQF parameter number 7 had an illegal value') at /usr/src/debug/Python-3.3.1/Python/errors.c:67 #1 0x00007ffff7c93bbf in PyErr_SetString (exception=, string=string at entry=0x7fffffff8160 "On entry to SGERQF parameter number 7 had an illegal value") at /usr/src/debug/Python-3.3.1/Python/errors.c:125 #2 0x00007fffeea223f1 in xerbla_ (srname=, info=) at numpy/linalg/python_xerbla.c:35 #3 0x00007fffee4925d9 in sgerqf_ () from /usr/lib64/atlas/liblapack.so.3 #4 0x00007fffe6d5a56f in f2py_rout__flapack_sgerqf () from /scratch/orion/redhat/BUILDROOT/scipy-0.12.0-1.fc20.x86_64/usr/lib64/python3.3/site-packages/scipy/linalg/_flapack.cpython-33m.so #5 0x00007ffff7bda0cc in PyObject_Call (func=func at entry=, arg=arg at entry=(,), kw=kw at entry={'lwork': 2}) at /usr/src/debug/Python-3.3.1/Objects/abstract.c:2082 #6 0x00007ffff7c859b2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffffff85f8, func=) at /usr/src/debug/Python-3.3.1/Python/ceval.c:4406 #7 PyEval_EvalFrameEx ( f=f at entry=Frame 0x11ae310, for file /usr/lib64/python3.3/unittest/case.py, line 173, in handle (self=<_AssertRaisesContext(test_case=: 'assertMultiLineEqual', : 'assertListEqual', : 'assertDictEqual', : 'assertTupleEqual', : 'assertSetEqual', : 'assertSetEqual'}) at remote 0x7fffecd1c390>, msg=None, obj_name='', expected=, expected_regex=None) at remote 0x7fffe0716cd0>, name='assertRaises', callable_obj=, args=(,), kwargs={'lwork': 2}), throwflag=throwflag at entry=0) at /usr/src/debug/Python-3.3.1/Python/ceval.c:2744 #8 0x00007ffff7c879cc in fast_function (nk=, na=5, n=5, pp_stack=0x7fffffff8770, func=) at /usr/src/debug/Python-3.3.1/Python/ceval.c:4179 #9 call_function (oparg=, pp_stack=0x7fffffff8770) at /usr/src/debug/Python-3.3.1/Python/ceval.c:4112 .............. it goes on a long ways down. ---------- components: Interpreter Core messages: 186684 nosy: opoplawski priority: normal severity: normal status: open title: Segfault in PyErr_SetObject type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 02:01:22 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Apr 2013 00:01:22 +0000 Subject: [issue17704] ImportError: No module named '_curses' In-Reply-To: <1365780009.75.0.902696843023.issue17704@psf.upfronthosting.co.za> Message-ID: <1365811282.03.0.523853048017.issue17704@psf.upfronthosting.co.za> Ned Deily added the comment: Usually this kind of problem is caused by not having the necessary developer package of ncurses installed when building Python. The dev package includes the header files necessary for Python's curses module to build and link with libncurse{,w}. When you build Python 3.3.1, there probably was a message like: Python build finished, but the necessary bits to build these modules were not found: _curses I'm not familiar with Linux Mint but, if it is Debian or Ubuntu-based, try installing the libncurses5-dev package and rebuilding Python. The 3.3 _curses modules you show in /usr/lib are most likely left over from a previous Python 3.3.0 installation, possibly from a Linux Mint package. Note that the _curses files are installed in /usr/lib/python3.3 whereas the traceback from your Python 3.3.1 shows a /usr/local/lib/python3.3 path which is the default location if you built and installed it yourself. When built and installed, _curses should end up in /usr/local/lib/python3.3/lib-dynload. ---------- nosy: +ned.deily resolution: -> invalid stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 03:19:21 2013 From: report at bugs.python.org (Tom Pinckney) Date: Sat, 13 Apr 2013 01:19:21 +0000 Subject: [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1365815961.3.0.425373122217.issue6696@psf.upfronthosting.co.za> Tom Pinckney added the comment: Thanks everyone for helping me through my first python patch submission. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 03:30:25 2013 From: report at bugs.python.org (Sultan Qasim) Date: Sat, 13 Apr 2013 01:30:25 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts Message-ID: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> New submission from Sultan Qasim: This issue seems to be new in Python 3.3.1. This worked fine in Python 3.3.0 and earlier. I am using fully up-to-date installation of Arch Linux, running the official arch repo's 64 bit build of Python 3.3.1. This issue is probably a result of the changes to multiprocessing's pipes brought about in solutions to issues #10527 or #16955. The multiprocessing Queue's get() method on Python 3.3.1 does not block on Linux when a timeout of 1 second or less is specified. I have not tested this on Windows or Mac OS X. Example Code: from multiprocessing import Queue q = Queue() q.get(True, 0.5) # Expected result: block for half a second before throwing exception # Actual result: throws empty exception immediately without waiting q.get(True, 1) # Expected result: block for one second before throwing exception # Actual result: throws empty exception immediately without waiting q.get(True, 1.00001) # Expected result: block for just over a second before throwing exception # Actual result: throws empty exception immediately without waiting q.get(True, 1.00002) # Blocks for just over a second, as expected q.get(True, 2) # Blocks for two seconds, as expected ---------- components: Library (Lib) messages: 186687 nosy: sultanqasim priority: normal severity: normal status: open title: Multiprocessing queue get method does not block for short timeouts versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 03:30:35 2013 From: report at bugs.python.org (Sultan Qasim) Date: Sat, 13 Apr 2013 01:30:35 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365816635.08.0.832240044454.issue17707@psf.upfronthosting.co.za> Changes by Sultan Qasim : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 05:03:55 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 13 Apr 2013 03:03:55 +0000 Subject: [issue12768] docstrings for the threading module In-Reply-To: <1313548989.72.0.178892692878.issue12768@psf.upfronthosting.co.za> Message-ID: <1365822235.1.0.973221346181.issue12768@psf.upfronthosting.co.za> Eli Bendersky added the comment: Issue #17375 supersedes this one. Please post updated patches there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 05:04:07 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 13 Apr 2013 03:04:07 +0000 Subject: [issue12768] docstrings for the threading module In-Reply-To: <1313548989.72.0.178892692878.issue12768@psf.upfronthosting.co.za> Message-ID: <1365822247.4.0.131759635535.issue12768@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 05:12:03 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 13 Apr 2013 03:12:03 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1365822723.12.0.656478040945.issue16575@psf.upfronthosting.co.za> Eli Bendersky added the comment: I've opened a libffi issue in an attempt to get this fixed upstream: https://github.com/atgreen/libffi/issues/33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 05:16:39 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 13 Apr 2013 03:16:39 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1365822999.61.0.523078206663.issue17670@psf.upfronthosting.co.za> Eli Bendersky added the comment: I agree the doc could be clearer and Ned's example is very good. However I'd go one step forward and add a further elaboration of how the method works. This is the current doc (in default branch): Return a copy of the string where all tab characters are replaced by zero or more spaces, depending on the current column and the given tab size. The column number is reset to zero after each newline occurring in the string. If tabsize is not given, a tab size of 8 characters is assumed. This doesn?t understand other non-printing characters or escape sequences. I'd say this (note new second sentence): Return a copy of the string where all tab characters are replaced by zero or more spaces, depending on the current column and the given tab size. Every time a \t char appears in the string, the text before it gets padded with spaces until the next tab position is reached. The column number is reset to zero after each newline occurring in the string. If tabsize is not given, a tab size of 8 characters is assumed. This doesn?t understand other non-printing characters or escape sequences. And then follow with Ned's example. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 05:19:56 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 13 Apr 2013 03:19:56 +0000 Subject: [issue16954] Add docstrings for ElementTree module In-Reply-To: <1358090813.12.0.93631082121.issue16954@psf.upfronthosting.co.za> Message-ID: <1365823196.55.0.744639478536.issue16954@psf.upfronthosting.co.za> Eli Bendersky added the comment: David, would you like to pursue this further (figuring out how to make docstrings show in help() without duplicating?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 05:25:22 2013 From: report at bugs.python.org (Paul Munday) Date: Sat, 13 Apr 2013 03:25:22 +0000 Subject: [issue1496278] Incorrect error message related to **kwargs Message-ID: <1365823522.52.0.273042414514.issue1496278@psf.upfronthosting.co.za> Paul Munday added the comment: This wasn't fixed by the patch for #1283289. (Still true of at least 2.7.3 and 3.2.3) ---------- nosy: +tallpaul versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 05:25:38 2013 From: report at bugs.python.org (Paul Munday) Date: Sat, 13 Apr 2013 03:25:38 +0000 Subject: [issue1496278] Incorrect error message related to **kwargs Message-ID: <1365823538.79.0.509628430706.issue1496278@psf.upfronthosting.co.za> Changes by Paul Munday : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 07:46:48 2013 From: report at bugs.python.org (Masami HIRATA) Date: Sat, 13 Apr 2013 05:46:48 +0000 Subject: [issue17708] sys.flags.hash_randomization doesn't return correct value Message-ID: <1365832008.74.0.106201952551.issue17708@psf.upfronthosting.co.za> New submission from Masami HIRATA: OS: Windows 7 Starter Edition SP1 (32-bit) Python: 3.3.1 (python-3.3.1.msi) It seems that sys.flags.hash_randomization doesn't return correct value Output: C:\>set PYTHONHASHSEED=random C:\>C:\Python33\python.exe Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 20:25:12) [MSC v.1600 32 bit (In tel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.flags.hash_randomization 1 >>> ^Z C:\>set PYTHONHASHSEED=1 C:\>C:\Python33\python.exe Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 20:25:12) [MSC v.1600 32 bit (In tel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.flags.hash_randomization 1 >>> ^Z C:\>set PYTHONHASHSEED=12345 C:\>C:\Python33\python.exe ... >>> import sys >>> sys.flags.hash_randomization 12345 >>> ^Z Output I Expected: C:\>set PYTHONHASHSEED=random C:\>C:\Python33\python.exe ... >>> import sys >>> sys.flags.hash_randomization True >>> ^Z C:\>set PYTHONHASHSEED=1 C:\>C:\Python33\python.exe ... >>> import sys >>> sys.flags.hash_randomization False >>> ^Z C:\>set PYTHONHASHSEED=12345 C:\>C:\Python33\python.exe ... >>> import sys >>> sys.flags.hash_randomization False >>> ^Z ---------- components: Library (Lib) messages: 186693 nosy: msmhrt priority: normal severity: normal status: open title: sys.flags.hash_randomization doesn't return correct value versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 08:03:46 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Apr 2013 06:03:46 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1365833026.17.0.3770831475.issue13355@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I haven't had a chance to look at this one yet and am reopening. The triangular code was originally written so that low and high could be reversed and it would still work. I don't want to break any code that might be relying on that. Andrew Svetlov, this patch shouldn't be committed. I'm the maintainer of the random module and the person who wrote the original code for triangular. The bug report was assigned to me to take care of when I got a chance. Please be less aggressive with the commits. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 08:24:33 2013 From: report at bugs.python.org (paul j3) Date: Sat, 13 Apr 2013 06:24:33 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1365834273.12.0.564979203879.issue9253@psf.upfronthosting.co.za> paul j3 added the comment: This patch addresses both issues raised here: - throw an error when the subparser argument is missing - allow the subparser argument to be optional argparse.py: _SubParsersAction - add 'required=True' keyword. name(self) method - creates a name of the form {cmd1,cmd2} for error messages. _get_action_name() - try action.name() if it can't get a name from option_strings, dest or metavar. Still can return None. 2 error cases do a join on a list of action_names. If a name is None, this will choke. Add a ['%s'%x for x in list] guard. test_argparse.py: add cases to the subparser block to test the 'required' keyword, and to test the error message changes. argparse.rst: add a summary of the add_subparsers() arguments. ---------- Added file: http://bugs.python.org/file29793/required.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 08:31:22 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 13 Apr 2013 06:31:22 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365834682.9.0.0500002880174.issue17707@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Indeed, that's a regression introduced by fix for issue #10527. Just a rounding error: """ --- Lib/multiprocessing/connection.py.orig 2013-04-13 06:27:57.000000000 +0000 +++ Lib/multiprocessing/connection.py 2013-04-13 06:25:23.000000000 +0000 @@ -862,7 +862,7 @@ if hasattr(select, 'poll'): def _poll(fds, timeout): if timeout is not None: - timeout = int(timeout) * 1000 # timeout is in milliseconds + timeout = int(timeout * 1000) # timeout is in milliseconds fd_map = {} pollster = select.poll() for fd in fds: """ (the original patch really wasn't reviewed properly...) ---------- nosy: +neologix, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 08:31:59 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 13 Apr 2013 06:31:59 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365834719.99.0.85515265176.issue17707@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 09:18:45 2013 From: report at bugs.python.org (Russell Stuart) Date: Sat, 13 Apr 2013 07:18:45 +0000 Subject: [issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception` Message-ID: <1365837524.98.0.624427340429.issue17709@psf.upfronthosting.co.za> New submission from Russell Stuart: .. topic:: http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception` A bug report for Python 2.7's docs. .. _intro: Bug === Running:: sphinx-build -c conf2.7 -n -b html -E . html Produces:: Running Sphinx v1.1.3 loading intersphinx inventory from http://docs.python.org/2.7/objects.inv... building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] bug looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] bug /home/rstuart/zzz/bug.rst:1: WARNING: py:exc reference target not found: Exception /home/rstuart/zzz/bug.rst:1: WARNING: py:func reference target not found: repr writing additional files... genindex search copying static files... done dumping search index... done dumping object inventory... done build succeeded, 2 warnings. Note the ``WARNING`` lines. They should not be there. Running:: sphinx-build -c conf3.2 -b html -n -E . html Produces:: Running Sphinx v1.1.3 loading intersphinx inventory from http://docs.python.org/3.2/objects.inv... building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] bug looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] bug writing additional files... genindex search copying static files... done dumping search index... done dumping object inventory... done build succeeded. I presume this means something is wrong with http://docs.python.org/2.7/objects.inv it downloads. ``conf2.7.py``: .. include:: conf2.7/conf.py :literal: ``conf3.2.py``: .. include:: conf3.2/conf.py :literal: ---------- assignee: docs at python components: Documentation files: bug.rst messages: 186697 nosy: docs at python, ras priority: normal severity: normal status: open title: http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception` versions: Python 2.7 Added file: http://bugs.python.org/file29794/bug.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 09:19:36 2013 From: report at bugs.python.org (Russell Stuart) Date: Sat, 13 Apr 2013 07:19:36 +0000 Subject: [issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception` In-Reply-To: <1365837524.98.0.624427340429.issue17709@psf.upfronthosting.co.za> Message-ID: <1365837576.28.0.787807009772.issue17709@psf.upfronthosting.co.za> Changes by Russell Stuart : Added file: http://bugs.python.org/file29795/conf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 09:20:09 2013 From: report at bugs.python.org (Russell Stuart) Date: Sat, 13 Apr 2013 07:20:09 +0000 Subject: [issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception` In-Reply-To: <1365837524.98.0.624427340429.issue17709@psf.upfronthosting.co.za> Message-ID: <1365837609.25.0.595333492008.issue17709@psf.upfronthosting.co.za> Changes by Russell Stuart : Added file: http://bugs.python.org/file29796/conf.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 09:37:22 2013 From: report at bugs.python.org (=?utf-8?q?Izidor_Matu=C5=A1ov?=) Date: Sat, 13 Apr 2013 07:37:22 +0000 Subject: [issue17659] no way to determine First weekday (based on locale) In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1365838642.78.0.246105247413.issue17659@psf.upfronthosting.co.za> Izidor Matu?ov added the comment: Yes, I need to find out calendar-week-start-day information based on the current locale. Or in the other words, I need to find out what the correct parameter for calendar.Calendar([firstweekday]) object is. With locale en_US it should be Sunday, with locale sk_SK it should be Monday, and so on. I guess it could be find out from LC_TIME locale. There is already API for such small bits of information: locale.localeconv() Returns the database of the local conventions as a dictionary. This dictionary has the following strings as keys: However, there is no category for LC_TIME so far. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 10:00:11 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 13 Apr 2013 08:00:11 +0000 Subject: [issue17709] http://docs.python.org/2.7/objects.inv doesn't support :func:`repr` or :exc:`Exception` In-Reply-To: <1365837524.98.0.624427340429.issue17709@psf.upfronthosting.co.za> Message-ID: <1365840011.93.0.917422707573.issue17709@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 10:20:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Apr 2013 08:20:40 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1365841239.99.0.38542167885.issue13355@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Andrew Svetlov, please revert the commit. It breaks code that may have been working before the commit. Also, I don't want to change the exceptions being raised in old versions of Python. ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 10:46:00 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 13 Apr 2013 08:46:00 +0000 Subject: [issue16309] "PYTHONPATH=" different from no PYTHONPATH at all In-Reply-To: <1351075060.78.0.16981158153.issue16309@psf.upfronthosting.co.za> Message-ID: <1365842760.44.0.568610605332.issue16309@psf.upfronthosting.co.za> Armin Rigo added the comment: Grrr, ok, I have an "alias ls='/bin/ls'". It seems that both "PATH=" and "unset PATH" are equivalent to "PATH=.". This is behavior that we cannot add to PYTHONPATH, I fear, because so far "." is not implicitly included if PYTHONPATH is not set. Or if we do it's a big change, not just an internal fix... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 10:55:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 08:55:51 +0000 Subject: [issue17665] convert test_wsgiref to idiomatic unittest code Message-ID: <1365843351.69.0.98319893836.issue17665@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: I don't think the second change is correct. See also issue16510. ---------- nosy: +serhiy.storchaka type: performance -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 11:13:46 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 09:13:46 +0000 Subject: [issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work In-Reply-To: <1336252501.23.0.54042826511.issue14735@psf.upfronthosting.co.za> Message-ID: <1365844426.73.0.620061199621.issue14735@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 11:29:03 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 09:29:03 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <3ZnrJZ3VdXzS6p@mail.python.org> Roundup Robot added the comment: New changeset d02507c9f973 by Serhiy Storchaka in branch '2.7': Issue #17656: Fix extraction of zip files with unicode member paths. http://hg.python.org/cpython/rev/d02507c9f973 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 13:00:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 11:00:22 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input Message-ID: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: >>> import cPickle >>> cPickle.loads(b"S' \np0\n.") Traceback (most recent call last): File "", line 1, in SystemError: Negative size passed to PyString_FromStringAndSize >>> pickle.loads(b"S' \np0\n.") Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython2.7/Lib/pickle.py", line 1382, in loads return Unpickler(file).load() File "/home/serhiy/py/cpython2.7/Lib/pickle.py", line 858, in load dispatch[key](self) File "/home/serhiy/py/cpython2.7/Lib/pickle.py", line 966, in load_string raise ValueError, "insecure string pickle" ValueError: insecure string pickle >>> cPickle.loads(b"S'\np0\n.") Traceback (most recent call last): File "", line 1, in SystemError: Negative size passed to PyString_FromStringAndSize >>> pickle.loads(b"S'\np0\n.") '' Python 3 has the same behavior except C implementation raises UnpicklingError for b"S'\np0\n.". ---------- components: Extension Modules messages: 186704 nosy: alexandre.vassalotti, pitrou, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: SystemError in cPickle for incorrect input type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 13:38:04 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 13 Apr 2013 11:38:04 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365853084.13.0.912210148839.issue17710@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 13:41:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 11:41:49 +0000 Subject: [issue17711] Persistent id in pickle with protocol version 0 Message-ID: <1365853309.55.0.468755952624.issue17711@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Python 2 allows pickling and unpickling non-ascii persistent ids. In Python 3 C implementation of pickle saves persistent ids with protocol version 0 as utf8-encoded strings and loads as bytes. >>> import pickle, io >>> class MyPickler(pickle.Pickler): ... def persistent_id(self, obj): ... if isinstance(obj, str): ... return obj ... return None ... >>> class MyUnpickler(pickle.Unpickler): ... def persistent_load(self, pid): ... return pid ... >>> f = io.BytesIO(); MyPickler(f).dump('\u20ac'); data = f.getvalue() >>> MyUnpickler(io.BytesIO(data)).load() '?' >>> f = io.BytesIO(); MyPickler(f, 0).dump('\u20ac'); data = f.getvalue() >>> MyUnpickler(io.BytesIO(data)).load() b'\xe2\x82\xac' >>> f = io.BytesIO(); MyPickler(f, 0).dump('a'); data = f.getvalue() >>> MyUnpickler(io.BytesIO(data)).load() b'a' Python implementation in Python 3 doesn't works with non-ascii persistant ids at all. ---------- components: Extension Modules, Library (Lib) messages: 186705 nosy: alexandre.vassalotti, pitrou, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Persistent id in pickle with protocol version 0 type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:04:04 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 12:04:04 +0000 Subject: [issue17706] Segfault in PyErr_SetObject In-Reply-To: <1365806226.48.0.566850087286.issue17706@psf.upfronthosting.co.za> Message-ID: <1365854644.56.0.787612001739.issue17706@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What is xerbla? PyThreadState_GET() returning NULL means the GIL has been released, sounds like a bug in a third-party C extension. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:20:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 12:20:41 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365855641.76.0.645304374882.issue17707@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, georg.brandl, giampaolo.rodola, larry priority: high -> release blocker stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:29:59 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Apr 2013 12:29:59 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365856199.06.0.525738166619.issue17707@psf.upfronthosting.co.za> Georg Brandl added the comment: Very good, regression #2 for 3.3.2. Keep them coming right now :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:30:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 12:30:45 +0000 Subject: [issue17712] test_gdb failures Message-ID: <1365856245.17.0.785295424505.issue17712@psf.upfronthosting.co.za> New submission from Antoine Pitrou: I'm getting multiple test_gdb failures on a new (XUbuntu 13.04) system: ====================================================================== FAIL: test_basic_command (test.test_gdb.PyLocalsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/33/Lib/test/test_gdb.py", line 822, in test_basic_command cmds_after_breakpoint=['py-locals']) File "/home/antoine/cpython/33/Lib/test/test_gdb.py", line 170, in get_stack_trace self.assertEqual(err, '') AssertionError: 'warning: no loadable sections found in added symbol-file system-supplied DSO at [truncated]... != '' - warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000 (all test methods produce the same error) ---------- components: Tests messages: 186708 nosy: dmalcolm, pitrou priority: normal severity: normal status: open title: test_gdb failures type: behavior versions: Python 3.1, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:32:01 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 13 Apr 2013 12:32:01 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365856321.82.0.342907646808.issue17707@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: My patch, my fault. I'm very sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:33:09 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Apr 2013 12:33:09 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365856389.6.0.519313874658.issue17707@psf.upfronthosting.co.za> Georg Brandl added the comment: Don't worry, mistakes happen. My message was actually positive: it's better to catch the problems now than two weeks after the regression fix release... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:33:37 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Apr 2013 12:33:37 +0000 Subject: [issue17712] test_gdb failures In-Reply-To: <1365856245.17.0.785295424505.issue17712@psf.upfronthosting.co.za> Message-ID: <1365856417.66.0.100441585309.issue17712@psf.upfronthosting.co.za> Georg Brandl added the comment: I guess that warning needs to be added to all the others in test_gdb around line 150... ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:34:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 12:34:28 +0000 Subject: [issue17712] test_gdb failures In-Reply-To: <1365856245.17.0.785295424505.issue17712@psf.upfronthosting.co.za> Message-ID: <1365856468.91.0.637141314572.issue17712@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (if anyone knows why that warning appears, by the way, I'll be glad to hear about it :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:39:26 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 13 Apr 2013 12:39:26 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1365856766.24.0.552248400601.issue16510@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:42:05 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 13 Apr 2013 12:42:05 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1365856925.85.0.656663404148.issue16510@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: @David is that policy documented in the devguide? If not, should it be? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:47:44 2013 From: report at bugs.python.org (Pauli Virtanen) Date: Sat, 13 Apr 2013 12:47:44 +0000 Subject: [issue17706] Segfault in PyErr_SetObject In-Reply-To: <1365806226.48.0.566850087286.issue17706@psf.upfronthosting.co.za> Message-ID: <1365857263.99.0.708578041916.issue17706@psf.upfronthosting.co.za> Pauli Virtanen added the comment: Yes, this is a bug in numpy.linalg --- the GIL is released but the error handling code assumes it's not. The error doesn't appear with in typical LAPACK installations, so this code branch was missed. ---------- nosy: +pv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 14:55:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 12:55:02 +0000 Subject: [issue17706] Segfault in PyErr_SetObject In-Reply-To: <1365806226.48.0.566850087286.issue17706@psf.upfronthosting.co.za> Message-ID: <1365857702.02.0.336407764014.issue17706@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you, closing then. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 15:24:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 13:24:15 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation In-Reply-To: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> Message-ID: <1365859455.85.0.157360940872.issue16551@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated in response to Alexandre's comments. In additional to his suggestions some other minor things simplified. _batch_appends and _batch_setitems now use islice instead range. Some bugs found and new issues created (issue17710, issue17711). ---------- Added file: http://bugs.python.org/file29797/pickle_cleanup_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 15:49:57 2013 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 13 Apr 2013 13:49:57 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime Message-ID: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> New submission from Ned Batchelder: I just pulled down the tip of CPython, built it, and ran the tests, and got this failure: ``` ====================================================================== FAIL: test_compute_rollover_weekly_attime (test.test_logging.TimedRotatingFileHandlerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ned/python/cpython/Lib/test/test_logging.py", line 3972, in test_compute_rollover_weekly_attime wday = datetime.datetime.fromtimestamp(currentTime).weekday() AssertionError: 388800 != 475200 ---------------------------------------------------------------------- Ran 149 tests in 17.142s FAILED (failures=1, skipped=1) test test_logging failed 1 test failed: test_logging sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/test_logging-2-gimdv3.log' mode='a' encoding='UTF-8'> ``` Others preparing for today's sprint in Boston also had the same problem. Something to do with timezones? ---------- messages: 186717 nosy: nedbat priority: normal severity: normal status: open title: test_logging fails in test_compute_rollover_weekly_attime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 15:58:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 13:58:43 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <1365861523.61.0.504903836836.issue17713@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:19:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 14:19:26 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <3Znylf26Y3zS1Z@mail.python.org> Roundup Robot added the comment: New changeset d5e5017309b1 by Mark Dickinson in branch '2.7': Issue #16447: Fix potential segfault when setting __name__ on a class. http://hg.python.org/cpython/rev/d5e5017309b1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:30:35 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 14:30:35 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <3Znz0V2cS5zS1Z@mail.python.org> Roundup Robot added the comment: New changeset e6d1328412c8 by Mark Dickinson in branch '3.3': Issue #16447: Fix potential segfault when setting __name__ on a class. http://hg.python.org/cpython/rev/e6d1328412c8 New changeset c8d771f10022 by Mark Dickinson in branch 'default': Issue #16447: Merge fix from 3.3. http://hg.python.org/cpython/rev/c8d771f10022 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:31:25 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 14:31:25 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1365863485.63.0.609221876075.issue16447@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:31:31 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 14:31:31 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1365863491.29.0.564975079492.issue16447@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:31:37 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 14:31:37 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1365863497.52.0.0492863914173.issue16447@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: commit review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:36:07 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 14:36:07 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1365863767.44.0.00406656802845.issue13355@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree that the issue_13355.patch commit should be reverted: the code used to work fine in the case high < mode < low, and now does not. (Similarly, a call to random.uniform(2.0, 1.0) works as expected at the moment.) Really, I think all that's needed here is Terry's suggested one-line fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:45:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 14:45:57 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <3ZnzLD6fdpzS8X@mail.python.org> Roundup Robot added the comment: New changeset 9e7d31b04d78 by Mark Dickinson in branch 'default': Issue #17643: Add __callback__ attribute to weakref.ref. http://hg.python.org/cpython/rev/9e7d31b04d78 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:47:28 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 14:47:28 +0000 Subject: [issue17643] Expose weakref callback for introspection purposes. In-Reply-To: <1365252897.75.0.384188042072.issue17643@psf.upfronthosting.co.za> Message-ID: <1365864448.65.0.701478562115.issue17643@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed, using support.gc_collect for the test that requires garbage collection. Thanks for the reviews! ---------- assignee: -> mark.dickinson resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:47:32 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 13 Apr 2013 14:47:32 +0000 Subject: [issue17705] Fill Character cannot be \0 In-Reply-To: <1365785695.21.0.22745237494.issue17705@psf.upfronthosting.co.za> Message-ID: <1365864452.98.0.340199342319.issue17705@psf.upfronthosting.co.za> Stefan Krah added the comment: Unsurprisingly (libmpdec is a C library) this also does not work in _decimal. I could add a special case in _decimal.c at the cost of two additional if statements for all regular use cases. Is padding with NUL a legitimate use case? IOW, is the slowdown justified? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:49:59 2013 From: report at bugs.python.org (Federico Schwindt) Date: Sat, 13 Apr 2013 14:49:59 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1306354802.94.0.44002539476.issue12181@psf.upfronthosting.co.za> Message-ID: <1365864599.78.0.959814122296.issue12181@psf.upfronthosting.co.za> Federico Schwindt added the comment: Trent, would be possible to update the OpenBSD slaves to 5.3 (or -current)? There has been too many changes since 5.1 that affect python (for example the threads implementation). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 16:51:55 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 14:51:55 +0000 Subject: [issue17705] Fill Character cannot be \0 In-Reply-To: <1365785695.21.0.22745237494.issue17705@psf.upfronthosting.co.za> Message-ID: <1365864715.7.0.444180563359.issue17705@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Is padding with NUL a legitimate use case? I don't see a good reason to disallow it, and it seems like a fairly plausible need. Numpy, for example, pads strings will NUL bytes when placing a short string in long fixed-width field. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:02:11 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 15:02:11 +0000 Subject: [issue17671] io.BufferedRWPair can use uninitialized members In-Reply-To: <1365465332.23.0.700317324795.issue17671@psf.upfronthosting.co.za> Message-ID: <1365865331.29.0.496443429588.issue17671@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:05:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 15:05:33 +0000 Subject: [issue17536] update browser list with additional browser names In-Reply-To: <1364146928.84.0.219994349931.issue17536@psf.upfronthosting.co.za> Message-ID: <3Znzmr6bRjzRcN@mail.python.org> Roundup Robot added the comment: New changeset 5a1429e9b621 by doko in branch '2.7': - Issue #17536: Add to webbrowser's browser list: xdg-open, gvfs-open, http://hg.python.org/cpython/rev/5a1429e9b621 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:07:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 15:07:27 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <3Znzq26QngzRcn@mail.python.org> Roundup Robot added the comment: New changeset e948154af406 by Andrew Svetlov in branch '3.3': Revert changes for #13355 by request from Raymond Hettinger http://hg.python.org/cpython/rev/e948154af406 New changeset 39bbbf5d7b01 by Andrew Svetlov in branch 'default': Revert changes for #13355 by request from Raymond Hettinger http://hg.python.org/cpython/rev/39bbbf5d7b01 New changeset 620c691c12c5 by Andrew Svetlov in branch '2.7': Revert changes for #13355 by request from Raymond Hettinger http://hg.python.org/cpython/rev/620c691c12c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:07:30 2013 From: report at bugs.python.org (Matthias Klose) Date: Sat, 13 Apr 2013 15:07:30 +0000 Subject: [issue17536] update browser list with additional browser names In-Reply-To: <1364146928.84.0.219994349931.issue17536@psf.upfronthosting.co.za> Message-ID: <1365865650.91.0.450470226725.issue17536@psf.upfronthosting.co.za> Matthias Klose added the comment: now in 2.7 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:08:11 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Apr 2013 15:08:11 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1365865691.19.0.3437188475.issue13355@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Reverted. Sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:13:26 2013 From: report at bugs.python.org (Stefan Krah) Date: Sat, 13 Apr 2013 15:13:26 +0000 Subject: [issue17705] Fill Character cannot be \0 In-Reply-To: <1365864715.7.0.444180563359.issue17705@psf.upfronthosting.co.za> Message-ID: <20130413151328.GA1668@sleipnir.bytereef.org> Stefan Krah added the comment: Mark Dickinson wrote: > Numpy, for example, pads strings will NUL bytes when placing a short > string in long fixed-width field. I was hoping to escape the work, but that's quite convincing. ;) Changing libmpdec doesn't look very appealing, so probably I'll use "{" as a placeholder for NUL and then rewrite the result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:18:26 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 13 Apr 2013 15:18:26 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365856389.6.0.519313874658.issue17707@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: As they say, s*** happens (one of my first patches caused a regression with thread-local storage in multiple interpreters setup, so...) Note that it's a strong case for selectors inclusion (issue #16853) :-) BTW, this would probably need a test, and since I'm abroad, I won't be able to commit it, so if someone could pick it up... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:30:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 15:30:12 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365024552.84.0.0461498193244.issue17628@psf.upfronthosting.co.za> Message-ID: <1365867012.14.0.972439921641.issue17628@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Some crazy ideas. Try something like this: #define BLOCK unsigned long if (size >= sizeof(BLOCK)) { if (*(BLOCK*)data1 != *(BLOCK*)data2) return 0; return (memcmp((unsigned char*)data1 + sizeof(BLOCK), (unsigned char*)data2 + sizeof(BLOCK), size) == 0); } if (*(unsigned char*)data1 != *(unsigned char*)data2) return 0; return (memcmp(data1, data2, size) == 0); Or may be unroll memcmp for small size: switch (size) { #if SIZEOF_LONG == 8 case 7: ... #endif case 3: ... case 2: if (((unsigned char*)data1)[1] != ((unsigned char*)data2)[1]) return 0; case 1: if (((unsigned char*)data1)[0] != ((unsigned char*)data2)[0]) return 0; case 0: return 1; default: // case for size >= sizeof(BLOCK) } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:39:29 2013 From: report at bugs.python.org (Alessandro Piccione) Date: Sat, 13 Apr 2013 15:39:29 +0000 Subject: [issue17714] str.encode('base64') add trailing new line character is not documented Message-ID: <1365867569.46.0.547710519327.issue17714@psf.upfronthosting.co.za> New submission from Alessandro Piccione: str.encode() with 'base64' as argument add a trailing new line character to the returned string. This is the difference from base64.b64encode(str) (that is used internally). This is not documented in str.encode() http://docs.python.org/2/library/stdtypes.html?highlight=encode#str.encode Instead it is perfectly documented for base64.encodestring() http://docs.python.org/2/library/base64.html#base64.encodestring ---------- messages: 186734 nosy: alex.75 priority: normal severity: normal status: open title: str.encode('base64') add trailing new line character is not documented versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:39:53 2013 From: report at bugs.python.org (Alessandro Piccione) Date: Sat, 13 Apr 2013 15:39:53 +0000 Subject: [issue17714] str.encode('base64') add trailing new line character. It is not documented. In-Reply-To: <1365867569.46.0.547710519327.issue17714@psf.upfronthosting.co.za> Message-ID: <1365867593.88.0.416799071507.issue17714@psf.upfronthosting.co.za> Changes by Alessandro Piccione : ---------- title: str.encode('base64') add trailing new line character is not documented -> str.encode('base64') add trailing new line character. It is not documented. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:57:33 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 15:57:33 +0000 Subject: [issue17715] Raising an exception in __trunc__ gives a segmentation fault. Message-ID: <1365868653.81.0.515318912237.issue17715@psf.upfronthosting.co.za> New submission from Mark Dickinson: Python 3.4.0a0 (default:838fdf3bb0c6, Apr 13 2013, 16:54:22) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... def __trunc__(self): 1/0 ... >>> int(A()) Segmentation fault It looks as though the problem is in PyNumber_Long, where there's an unchecked return value for PyEval_CallObject. ---------- assignee: mark.dickinson components: Interpreter Core messages: 186735 nosy: mark.dickinson priority: high severity: normal status: open title: Raising an exception in __trunc__ gives a segmentation fault. type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 17:59:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 15:59:02 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1365868742.62.0.0824491926684.issue8865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Gregory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:00:29 2013 From: report at bugs.python.org (Sijin Joseph) Date: Sat, 13 Apr 2013 16:00:29 +0000 Subject: [issue16812] os.symlink can return wrong FileExistsError/WindowsError information In-Reply-To: <1356788634.61.0.928223501343.issue16812@psf.upfronthosting.co.za> Message-ID: <1365868829.11.0.911476334954.issue16812@psf.upfronthosting.co.za> Sijin Joseph added the comment: This looks to work correctly in default branch, >>> os.link('non-existent-name', 'new-name') Traceback (most recent call last): File "", line 1, in FileNotFoundError: [WinError 2] The system cannot find the file specified: 'non-existent-name' ---------- nosy: +sijinjoseph _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:04:57 2013 From: report at bugs.python.org (Pascal Chambon) Date: Sat, 13 Apr 2013 16:04:57 +0000 Subject: [issue17716] IMPORTANT - Process corruption on partly failed imports Message-ID: <1365869097.02.0.582677403017.issue17716@psf.upfronthosting.co.za> New submission from Pascal Chambon: Hello, we've encountered several times a very nasty bug on our framework, several times tests or even production code (served by mod_wsgi) ended up in a broken state, where imports like "from . import processing_exceptions", which were NOT in circular imports and were 100% existing submodules, raised exceptions like "ImportError: cannot import name processing_exceptions". Restarting the test/server fixed it, and we never knew what happened. I've crossed several forum threads on similar issues, only recently did I find one which gave a way to reproduce the bug: http://stackoverflow.com/questions/12830901/why-does-import-error-change-to-cannot-import-name-on-the-second-import So here attached is a python2 sample (python3 has the same pb), showing the bug (just run their test_import.py) What happens here, is that a package "mypkg" fails to get imported due to an exception (eg. temporarily failuure of DB), but only AFTER successfully importing a submodule mypkg.module_a. Thus, "mypkg.module_a" IS loaded and stays in sys.modules, but "mypkg" is erased from sys.modules (like the doc on python imports describes it). The next time we try, from within the same application, to import "mypkg", and we cross "from mypkg import module_a" in the mypkg's __init__.py code, it SEEMS that the import system checks sys.modules, and seeing "mypkg.module_a" in it, it THINKS that necessarily mypkg is already initialized and contains a name "module_a" in its global namespace. Thus the "cannot import name processing_exceptions" error. Importing "module_a" as an absolute or relative import changes nothing, however doing "import mypkg.module_a" solves the problem (dunno why). Another workaround is to cleanup sys.modules in mypkg/__init__.py, to ensure that a previously failed attempt at importing the package modules doesn't hinder us. # on top of "mypkg/__init__.py" exceeding_modules = [k for k in sys.modules.keys() if k.startswith("mypkg.")] for k in exceeding_modules: del sys.modules[k] Anyway, I don't know enough python's import internals to understand why, exactly, on second import attempt, the system tries a kind of faulty getattr(mypkg, "module_a"), instead of simply returning sys.modules["mypkg.module_a"] which exists. Could anyone help with that ? That's a very damaging issue, imo, since webserver workers can reach a completely broken state because of that. PS: more generally, I guess python users lack insight on the behaviour of "from xxx import yyy", especially when yyy is both a real submodule of xxx and a variable initialized in xxx/__init__.py (it seems the real module overrides the variable), or when the __all__ list of xxx could prevent the import of a submodule of xxx by not including it. Provided I better understand the workflow of all these stuffs - that have quite moved recently I heard - I'd be willing to summarize it for the python docs. ---------- components: Interpreter Core files: ImportFailPy2.zip messages: 186738 nosy: Pascal.Chambon priority: normal severity: normal status: open title: IMPORTANT - Process corruption on partly failed imports 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/file29798/ImportFailPy2.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:06:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 16:06:42 +0000 Subject: [issue14012] Misc tarfile fixes In-Reply-To: <1329235837.42.0.144867770777.issue14012@psf.upfronthosting.co.za> Message-ID: <1365869202.34.0.647245464037.issue14012@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: ?ric, can you please update your patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:07:04 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 16:07:04 +0000 Subject: [issue17715] Raising an exception in __trunc__ gives a segmentation fault. In-Reply-To: <1365868653.81.0.515318912237.issue17715@psf.upfronthosting.co.za> Message-ID: <1365869224.8.0.729647247223.issue17715@psf.upfronthosting.co.za> Mark Dickinson added the comment: Also affects 3.3. 2.7 seems to be okay. ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:09:30 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 16:09:30 +0000 Subject: [issue17665] convert test_wsgiref to idiomatic unittest code In-Reply-To: <1365843351.69.0.98319893836.issue17665@psf.upfronthosting.co.za> Message-ID: <1365869370.89.0.170698757819.issue17665@psf.upfronthosting.co.za> Ezio Melotti added the comment: In this case I don't think it matters much. The value is either True or False, so both assertTrue(...) and assertIs(..., True) work, even though the latter is technically more accurate. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:09:50 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 16:09:50 +0000 Subject: [issue17716] IMPORTANT - Process corruption on partly failed imports In-Reply-To: <1365869097.02.0.582677403017.issue17716@psf.upfronthosting.co.za> Message-ID: <1365869390.28.0.0878904348495.issue17716@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:10:07 2013 From: report at bugs.python.org (Sijin Joseph) Date: Sat, 13 Apr 2013 16:10:07 +0000 Subject: [issue16812] os.symlink can return wrong FileExistsError/WindowsError information In-Reply-To: <1356788634.61.0.928223501343.issue16812@psf.upfronthosting.co.za> Message-ID: <1365869407.73.0.338542274235.issue16812@psf.upfronthosting.co.za> Sijin Joseph added the comment: Behavior for symlink is as follows >>> os.symlink('non-existent-name', 'existing-name') Traceback (most recent call last): File "", line 1, in PermissionError: [WinError 5] Access is denied: 'non-existent-name' The error message is misleading, but can be fixed using the patch attached to issue13775 >>> os.symlink('non-existent-name1', 'non-existent-name2') No error. This behavior is same on Windows and Linux. Seems odd, but can be justified as ok behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:11:55 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Apr 2013 16:11:55 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1365869515.37.0.0569638409301.issue16510@psf.upfronthosting.co.za> R. David Murray added the comment: If it isn't documented it should be, and you could open an issue for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:12:20 2013 From: report at bugs.python.org (Ned Jackson Lovely) Date: Sat, 13 Apr 2013 16:12:20 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1365869540.87.0.781219214133.issue2118@psf.upfronthosting.co.za> Ned Jackson Lovely added the comment: Attaching a patch to make SMTPException an IOError, with corresponding update to docs to point out that __init__ on the SMTP object will raise IOErrors in general, and some SMTPExceptions in particular. Boston Python Sprint Apr 2013 ---------- nosy: +n Added file: http://bugs.python.org/file29799/issue2118.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:16:15 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 16:16:15 +0000 Subject: [issue17715] Raising an exception in __trunc__ gives a segmentation fault. In-Reply-To: <1365868653.81.0.515318912237.issue17715@psf.upfronthosting.co.za> Message-ID: <1365869775.39.0.669134293191.issue17715@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file29800/issue17715.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:16:23 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 16:16:23 +0000 Subject: [issue17715] Raising an exception in __trunc__ gives a segmentation fault. In-Reply-To: <1365868653.81.0.515318912237.issue17715@psf.upfronthosting.co.za> Message-ID: <1365869783.75.0.607259656081.issue17715@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:19:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 16:19:10 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1365869950.38.0.530498497321.issue17670@psf.upfronthosting.co.za> Ezio Melotti added the comment: "This doesn?t understand other non-printing characters or escape sequences." This might also be improved. Does it mean that all characters are considered having len(c) == 1, even if they are not printable or escape sequence (and which escape sequences? \f, \v?)? Adding an example with tabsize=8 might also help, but it might not be necessary if the wording is improved as Eli suggested. ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:19:43 2013 From: report at bugs.python.org (Dan Riti) Date: Sat, 13 Apr 2013 16:19:43 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365869983.88.0.761925905617.issue17661@psf.upfronthosting.co.za> Dan Riti added the comment: Reproduced the issue and generated a patch following Kyle's documented approach. Please note that this patch addresses the link problem, but does not address the style issue. Thanks. ---------- keywords: +patch nosy: +Dan.Riti Added file: http://bugs.python.org/file29801/using-ref.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:20:55 2013 From: report at bugs.python.org (Jason Michalski) Date: Sat, 13 Apr 2013 16:20:55 +0000 Subject: [issue17341] Poor error message when compiling invalid regex In-Reply-To: <1362318975.95.0.685473127287.issue17341@psf.upfronthosting.co.za> Message-ID: <1365870055.93.0.034847738028.issue17341@psf.upfronthosting.co.za> Changes by Jason Michalski : ---------- keywords: +patch Added file: http://bugs.python.org/file29802/cpython-3.3-17341.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:21:06 2013 From: report at bugs.python.org (Jason Michalski) Date: Sat, 13 Apr 2013 16:21:06 +0000 Subject: [issue17341] Poor error message when compiling invalid regex In-Reply-To: <1362318975.95.0.685473127287.issue17341@psf.upfronthosting.co.za> Message-ID: <1365870066.77.0.390572882601.issue17341@psf.upfronthosting.co.za> Changes by Jason Michalski : Added file: http://bugs.python.org/file29803/cpython-2.7-17341.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:26:23 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Apr 2013 16:26:23 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1365870383.38.0.874451067168.issue2118@psf.upfronthosting.co.za> R. David Murray added the comment: This looks good for 3.4. Ned, would you also be willing to prepare a doc patch for 3.3 that mentions that IOError may be raised? (I think the 3.3 patch will also apply to 2.7.) ---------- versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:29:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 16:29:32 +0000 Subject: [issue16812] os.symlink can return wrong FileExistsError/WindowsError information In-Reply-To: <1356788634.61.0.928223501343.issue16812@psf.upfronthosting.co.za> Message-ID: <1365870572.35.0.441527378327.issue16812@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: issue13775, issue16074, and issue16812 all are virtually about the same bug. There is no working patch in any issue, but the discussion in issue16074 is longer. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> bad error message in os.rename _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:30:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 16:30:06 +0000 Subject: [issue13775] Access Denied message on symlink creation misleading for an existing file/directory target. In-Reply-To: <1326330408.97.0.484457419227.issue13775@psf.upfronthosting.co.za> Message-ID: <1365870606.64.0.40356397793.issue13775@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: issue13775, issue16074, and issue16812 all are virtually about the same bug. There is no working patch in any issue, but the discussion in issue16074 is longer. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> bad error message in os.rename _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:34:20 2013 From: report at bugs.python.org (Kent Johnson) Date: Sat, 13 Apr 2013 16:34:20 +0000 Subject: [issue17390] display python version on idle title bar In-Reply-To: <1362920194.83.0.464215113749.issue17390@psf.upfronthosting.co.za> Message-ID: <1365870860.67.0.986125564046.issue17390@psf.upfronthosting.co.za> Kent Johnson added the comment: issue17390_editor_title.patch is not correct, it changes the title on any window that inherits from EditorWindow, including the shell window. Here is a new patch that changes short_title() instead of saved_change_hook(), so it can be overridden by derived classes. This is the same method used to change the title of the shell window. Derived classes of EditorWindow are PyShellEditorWindow and OutputWindow. OutputWindow overrides short_title() and IIUC PyShellEditorWindow should use the same title as a normal editor window. ---------- nosy: +kjohnson Added file: http://bugs.python.org/file29804/issue17390_editor_title_rev2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:34:32 2013 From: report at bugs.python.org (John Ehresman) Date: Sat, 13 Apr 2013 16:34:32 +0000 Subject: [issue17717] Set up nasm from external.bat Message-ID: <1365870872.82.0.912332979443.issue17717@psf.upfronthosting.co.za> New submission from John Ehresman: It would be nice for Tools\buildbot\external.bat to set a copy of nasm up to use. Is there a reason this is not done? ---------- components: Windows messages: 186752 nosy: jpe priority: normal severity: normal status: open title: Set up nasm from external.bat type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:35:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 16:35:25 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <3Zp1mX3F66zQnQ@mail.python.org> Roundup Robot added the comment: New changeset 185ae0c95e5b by Vinay Sajip in branch 'default': Issue #17713: Test temporarily skipped while failure investigated. http://hg.python.org/cpython/rev/185ae0c95e5b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:38:57 2013 From: report at bugs.python.org (Giles Hall) Date: Sat, 13 Apr 2013 16:38:57 +0000 Subject: [issue17640] from distutils.util import byte_compile hangs In-Reply-To: <1365172286.35.0.207252264643.issue17640@psf.upfronthosting.co.za> Message-ID: <1365871137.96.0.581688559708.issue17640@psf.upfronthosting.co.za> Giles Hall added the comment: I was unable to replicate this bug with clean builds of either Python3.3.0 and Python3.3.1rc1 on either Linux or OSX. I assume you also meant Ctrl-C, since there is no reading from standard input occurring in this script. Without further data such as platform/vendor information, an strace, or a secondary confirmation of this behavior, I would suggest closing this bug. My test environment on Linux was Ubuntu 12.10, Linux 3.2.0-34-generic, 2.15glibc. On OSX, I'm running 10.7.5 with the latest command line build tools. ---------- nosy: +vishnubob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:41:22 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 13 Apr 2013 16:41:22 +0000 Subject: [issue17715] Raising an exception in __trunc__ gives a segmentation fault. In-Reply-To: <1365868653.81.0.515318912237.issue17715@psf.upfronthosting.co.za> Message-ID: <1365871282.28.0.513223515851.issue17715@psf.upfronthosting.co.za> Benjamin Peterson added the comment: LGTM ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:45:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 16:45:53 +0000 Subject: [issue16074] bad error message in os.rename In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1365871553.37.0.647404566974.issue16074@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I just closed two almost identical issues in favour of this issue. I believe that in order to avoid ambiguity, there are three possible solutions of such issues: 1. Do not display any filename (as in Python 2.7). 2. Display both filenames (this can also be slightly ambiguous). 3. Depending on the errno display the first filename or the second filename, or neither, or both. ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:45:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 16:45:55 +0000 Subject: [issue17700] Update Curses HOWTO for 3.4 In-Reply-To: <1365719687.97.0.644773548697.issue17700@psf.upfronthosting.co.za> Message-ID: <1365871555.18.0.354761962396.issue17700@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:46:23 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 16:46:23 +0000 Subject: [issue17715] Raising an exception in __trunc__ gives a segmentation fault. In-Reply-To: <1365868653.81.0.515318912237.issue17715@psf.upfronthosting.co.za> Message-ID: <3Zp21C0nThzRRr@mail.python.org> Roundup Robot added the comment: New changeset 52bd2035e70a by Mark Dickinson in branch '3.3': Issue #17715: Add missing NULL Check to PyNumber_Long. http://hg.python.org/cpython/rev/52bd2035e70a New changeset 5358ee70f831 by Mark Dickinson in branch 'default': Issue #17715: Merge fix from 3.3. http://hg.python.org/cpython/rev/5358ee70f831 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:46:48 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 16:46:48 +0000 Subject: [issue17715] Raising an exception in __trunc__ gives a segmentation fault. In-Reply-To: <1365868653.81.0.515318912237.issue17715@psf.upfronthosting.co.za> Message-ID: <1365871608.21.0.0430694918254.issue17715@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:47:04 2013 From: report at bugs.python.org (Ned Jackson Lovely) Date: Sat, 13 Apr 2013 16:47:04 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1365871624.33.0.123366513045.issue2118@psf.upfronthosting.co.za> Ned Jackson Lovely added the comment: ...and the 3.3 doc patch. ---------- Added file: http://bugs.python.org/file29805/issue2118-doc-patch-3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:47:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 16:47:24 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1365871644.83.0.552333606659.issue17656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 18:50:21 2013 From: report at bugs.python.org (Dmitry Sivachenko) Date: Sat, 13 Apr 2013 16:50:21 +0000 Subject: [issue17640] from distutils.util import byte_compile hangs In-Reply-To: <1365172286.35.0.207252264643.issue17640@psf.upfronthosting.co.za> Message-ID: <1365871821.11.0.143129839364.issue17640@psf.upfronthosting.co.za> Dmitry Sivachenko added the comment: No, I meant Ctrl+D. I use FreeBSD-10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:00:57 2013 From: report at bugs.python.org (Brett Cannon) Date: Sat, 13 Apr 2013 17:00:57 +0000 Subject: [issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case In-Reply-To: <1365869097.02.0.582677403017.issue17716@psf.upfronthosting.co.za> Message-ID: <1365872457.52.0.370174448083.issue17716@psf.upfronthosting.co.za> Brett Cannon added the comment: TL;DR: don't do anything involving side-effects as part of an import that can fail like connecting to a database. Another bug that proposes tweaking the IMPORT_FROM bytecode semantics will more than likely solve your problem regardless. First question: what versions of Python did you test this against? You didn't specify the version when you filed the bug. Second, if you want to see how it all works, import is implemented in pure Python in Python 3.3 so you can actually read the code if you want: http://hg.python.org/cpython/file/185ae0c95e5b/Lib/importlib/_bootstrap.py. I also gave a talk at PyCon US 2013 (and PyCon Argentina) on how import works if you are curious: http://pyvideo.org/video/1707/how-import-works. Third, performing operations as a side-effect of import which could cause a failure is a dodgy practice, as you have found out. I would advise looking for a way to not trying to connect to your database as part of an import so that the import will succeed consistently and you won't have this problem. Fourth, everything is working as intended. We can't roll back imports because of possible side-effects you do during import, so we can't have pkg.module_a successfully import but then toss it aside just because pkg succeeds. And the from ... import format fails as it does on the second import because as you pointed out, pkg.module_a is not an attribute on pkg. The attempted import succeeds internally since pkg.module_a is just sitting there in sys.modules, but it isn't explicitly re-attached to pkg as that's not expected if the first import failed thanks to pkg failing but you choose to attempt to ignore that fact (so it should honestly fail). The bytecode uses getattr() on the module so there is no specific reason for it to think it should work. But when you do a straight import that succeeds as that will do the necessary binding to pkg. Fifth, http://bugs.python.org/issue17636 will probably make all of this a moot point. =) That issue is tracking a proposed change which will cause from ... import to pull from sys.modules if a module is in sys.modules but not attached on a module to deal with circular imports. But I think as a side-effect it will also help deal with your problem based on what you have described. Sixth, if you want to help clarify the docs for Python 3.3 and 2.7 that would be great! Just open a new bug with a patch for the doc changes and I would be happy to review it. ---------- dependencies: +Modify IMPORT_FROM to fallback on sys.modules title: IMPORTANT - Process corruption on partly failed imports -> From ... import fails when parent package failed but child module succeeded, yet works in std import case _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:01:10 2013 From: report at bugs.python.org (Giles Hall) Date: Sat, 13 Apr 2013 17:01:10 +0000 Subject: [issue17640] from distutils.util import byte_compile hangs In-Reply-To: <1365172286.35.0.207252264643.issue17640@psf.upfronthosting.co.za> Message-ID: <1365872470.37.0.929497125289.issue17640@psf.upfronthosting.co.za> Giles Hall added the comment: Hi Dmitry, since I can't replicate your issue, can you provide any more context from GDB and/or strace/ktrace? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:03:24 2013 From: report at bugs.python.org (Dan Riti) Date: Sat, 13 Apr 2013 17:03:24 +0000 Subject: [issue17686] Doc using/unix broken link (http://linuxmafia.com/) In-Reply-To: <1365599495.88.0.846759502226.issue17686@psf.upfronthosting.co.za> Message-ID: <1365872604.17.0.836243823112.issue17686@psf.upfronthosting.co.za> Dan Riti added the comment: I second akuchling's link suggestion, as it seems to be the most up to date openSUSE packaging resource. I have generated a patch to update the link. Also, it seems this link is also broken in the 2.7 documentation: http://docs.python.org/2/using/unix.html ---------- keywords: +patch nosy: +dan.riti Added file: http://bugs.python.org/file29806/update-link.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:08:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 17:08:13 +0000 Subject: [issue1243730] Big speedup in email message parsing Message-ID: <1365872893.19.0.0775090285708.issue1243730@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:08:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 17:08:24 +0000 Subject: [issue17686] Doc using/unix broken link (http://linuxmafia.com/) In-Reply-To: <1365599495.88.0.846759502226.issue17686@psf.upfronthosting.co.za> Message-ID: <3Zp2Vb2cZ6zRWY@mail.python.org> Roundup Robot added the comment: New changeset 2ed694679b81 by Ezio Melotti in branch '3.3': #17686: fix broken link in Doc/using/unix.rst. Patch by Dan Riti. http://hg.python.org/cpython/rev/2ed694679b81 New changeset 86a95813e5c3 by Ezio Melotti in branch 'default': #17686: merge with 3.3. http://hg.python.org/cpython/rev/86a95813e5c3 New changeset 0f31f38e8a17 by Ezio Melotti in branch '2.7': #17686: fix broken link in Doc/using/unix.rst. Patch by Dan Riti. http://hg.python.org/cpython/rev/0f31f38e8a17 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:08:59 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 17:08:59 +0000 Subject: [issue17686] Doc using/unix broken link (http://linuxmafia.com/) In-Reply-To: <1365599495.88.0.846759502226.issue17686@psf.upfronthosting.co.za> Message-ID: <1365872939.83.0.397838185805.issue17686@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:12:40 2013 From: report at bugs.python.org (Adam Duston) Date: Sat, 13 Apr 2013 17:12:40 +0000 Subject: [issue1727418] xmlrpclib waits indefinately Message-ID: <1365873160.86.0.866616575417.issue1727418@psf.upfronthosting.co.za> Adam Duston added the comment: We used the xmlrpc++0.7 library to set up a test server, consistent with what Arno reported in the original ticket. We weren?t able to reproduce the problem with 2.7.2 or 3.4. Furthermore, xmlrpclib.Server (or xmlrpc.client.Server in Python 3) connects with HTTP 1.1 as of http://bugs.python.org/issue1767370, making the original issue irrelevant. There is already a test for this issue: the xmlrpc server used in test_python_builders in test_xmlrpc_net.py has an HTTP 1.1 reply. ---------- nosy: +Adam.Duston versions: +Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:13:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 17:13:05 +0000 Subject: [issue17571] broken links on Lib/datetime.py docstring In-Reply-To: <1364543666.79.0.123809819447.issue17571@psf.upfronthosting.co.za> Message-ID: <3Zp2c11jvBzQD5@mail.python.org> Roundup Robot added the comment: New changeset 70f9f6752d28 by Ezio Melotti in branch '3.3': #17571: remove broken links in datetime.py docstring. http://hg.python.org/cpython/rev/70f9f6752d28 New changeset 0d2c364c7e5d by Ezio Melotti in branch 'default': #17571: merge with 3.3. http://hg.python.org/cpython/rev/0d2c364c7e5d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:13:38 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 17:13:38 +0000 Subject: [issue17571] broken links on Lib/datetime.py docstring In-Reply-To: <1364543666.79.0.123809819447.issue17571@psf.upfronthosting.co.za> Message-ID: <1365873218.49.0.371507702551.issue17571@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:13:48 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 13 Apr 2013 17:13:48 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <1365873228.19.0.0558632247546.issue17713@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: -> vinay.sajip components: +Library (Lib) type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:17:57 2013 From: report at bugs.python.org (Stephen Tu) Date: Sat, 13 Apr 2013 17:17:57 +0000 Subject: [issue17718] boolop constant checking for if/while Message-ID: <1365873477.58.0.16753210186.issue17718@psf.upfronthosting.co.za> New submission from Stephen Tu: Here's a simple patch to optimize away constant boolean conjunctions/disjunctions. for example: def foo(): if 1 and 0: print("hi") now disassembles into: 7 0 LOAD_CONST 0 (None) 3 RETURN_VALUE while I realize more general techniques for achieving this have been proposed (ie http://bugs.python.org/issue1346238), this is a very simple, self-contained patch. ---------- components: Interpreter Core files: constcheck.patch keywords: patch messages: 186767 nosy: Stephen.Tu priority: normal severity: normal status: open title: boolop constant checking for if/while type: performance versions: Python 3.4 Added file: http://bugs.python.org/file29807/constcheck.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:21:41 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 17:21:41 +0000 Subject: [issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible In-Reply-To: <1362781994.31.0.121984055749.issue17386@psf.upfronthosting.co.za> Message-ID: <1365873701.63.0.184111642661.issue17386@psf.upfronthosting.co.za> Ezio Melotti added the comment: Terry, do you want to test and commit this? Should it be backported to 3.3 (and possibly 2.7) too? ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:22:57 2013 From: report at bugs.python.org (Kent Johnson) Date: Sat, 13 Apr 2013 17:22:57 +0000 Subject: [issue17719] IDLE help text refers to incorrect Python version Message-ID: <1365873777.93.0.00334201360325.issue17719@psf.upfronthosting.co.za> New submission from Kent Johnson: The IDLE help text says, "Running without a subprocess: (DEPRECATED in Python 3.5 see Issue 16123)." According to the referenced issue, this feature is scheduled to be deprecated in *3.4* and *removed* in 3.5. The attached patch corrects the help text. ---------- assignee: docs at python components: Documentation files: deprecated_in_3.4.patch keywords: patch messages: 186769 nosy: docs at python, kjohnson priority: normal severity: normal status: open title: IDLE help text refers to incorrect Python version type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file29808/deprecated_in_3.4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:23:37 2013 From: report at bugs.python.org (Mike Milkin) Date: Sat, 13 Apr 2013 17:23:37 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1365873817.22.0.240933214501.issue9682@psf.upfronthosting.co.za> Mike Milkin added the comment: This patch adds better exception messages. If any label other then the last is empty or is too long the request is added to the exception message. If the last label is over 64, the label is added to the exception message ---------- keywords: +patch nosy: +mmilkin Added file: http://bugs.python.org/file29809/Issue9682.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:26:22 2013 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 13 Apr 2013 17:26:22 +0000 Subject: [issue17718] boolop constant checking for if/while In-Reply-To: <1365873477.58.0.16753210186.issue17718@psf.upfronthosting.co.za> Message-ID: <1365873982.74.0.123732974195.issue17718@psf.upfronthosting.co.za> Changes by Ned Batchelder : ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:26:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 17:26:55 +0000 Subject: [issue17719] IDLE help text refers to incorrect Python version In-Reply-To: <1365873777.93.0.00334201360325.issue17719@psf.upfronthosting.co.za> Message-ID: <1365874015.1.0.872836226766.issue17719@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +asvetlov stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:30:23 2013 From: report at bugs.python.org (Kent Johnson) Date: Sat, 13 Apr 2013 17:30:23 +0000 Subject: [issue17719] IDLE help text refers to incorrect Python version In-Reply-To: <1365873777.93.0.00334201360325.issue17719@psf.upfronthosting.co.za> Message-ID: <1365874222.99.0.108255130097.issue17719@psf.upfronthosting.co.za> Kent Johnson added the comment: Note: this text does not appear in Doc/library/idle.rst so it does not have to be corrected there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:33:05 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 17:33:05 +0000 Subject: [issue16074] bad error message in os.rename In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1365874385.7.0.460077716886.issue16074@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would say either option 3, or, if it's too complicated, option 2. FTR the two issues mentioned in the previous message are #13775 and #16812. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:35:26 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 13 Apr 2013 17:35:26 +0000 Subject: [issue9341] allow argparse subcommands to be grouped In-Reply-To: <1279887451.34.0.723880615782.issue9341@psf.upfronthosting.co.za> Message-ID: <1365874526.85.0.637649429853.issue9341@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:47:16 2013 From: report at bugs.python.org (Adam Duston) Date: Sat, 13 Apr 2013 17:47:16 +0000 Subject: [issue1727418] xmlrpclib waits indefinately Message-ID: <1365875236.28.0.243825837805.issue1727418@psf.upfronthosting.co.za> Changes by Adam Duston : ---------- versions: +Python 2.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:58:08 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 17:58:08 +0000 Subject: [issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs In-Reply-To: <1346871274.13.0.653364801762.issue15866@psf.upfronthosting.co.za> Message-ID: <1365875888.04.0.935203219822.issue15866@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 19:59:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 17:59:15 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365875955.84.0.208083572927.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, Mads and Brendan have submitted a contributor's agreement, so we can now take what we want from Mercurial's base85.py (which you can find at http://selenic.com/hg/file/4e1ae55e63ef/mercurial/pure/base85.py). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:04:49 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 13 Apr 2013 18:04:49 +0000 Subject: [issue17720] pickle.py's load_appends should call append() on objects other than lists Message-ID: <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti: In pickle.py, load_appends is currently defined as def load_appends(self): stack = self.stack mark = self.marker() list = stack[mark - 1] list.extend(stack[mark + 1:]) del stack[mark:] However, according to the spec of APPENDS, it should actually be: def load_appends(self): obj = stack[mark - 1] items = stack[mark + 1:] if isinstance(obj, list): obj.extend(items) else: for item in items: obj.append(item) This will match with the current behaviour of _pickle. ---------- assignee: alexandre.vassalotti components: Library (Lib) files: loads_appends.patch keywords: patch messages: 186774 nosy: alexandre.vassalotti, pitrou, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: pickle.py's load_appends should call append() on objects other than lists type: behavior versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29810/loads_appends.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:07:59 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Sat, 13 Apr 2013 18:07:59 +0000 Subject: [issue17721] Help button on preference window doesn't work Message-ID: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> New submission from Guilherme Sim?es: The Help button on the Preferences windows does not do anything. Maybe I can fix it, but I don't know what it was supposed to do in the first place. For now it probably should be removed. ---------- components: IDLE messages: 186775 nosy: Guilherme.Sim?es priority: normal severity: normal status: open title: Help button on preference window doesn't work type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:11:24 2013 From: report at bugs.python.org (Sijin Joseph) Date: Sat, 13 Apr 2013 18:11:24 +0000 Subject: [issue17627] Datetime and time doesn't update timezone in a running Win app In-Reply-To: <1365014351.49.0.143463684024.issue17627@psf.upfronthosting.co.za> Message-ID: <1365876684.58.0.690479870915.issue17627@psf.upfronthosting.co.za> Sijin Joseph added the comment: This is the same as issue10634 Problem is with the Windows CRT implementation of localtime which does not seem to be using updated timezone information. Can this become an issue with technologies like vMotion which allow Live Migration of virtual servers across data centers in different timezones? One way to address maybe to somehow reset the CRT timezone structures on Windows prior to a call to localtime. Does this seem like a good approach? Is the issue worth pursuing? ---------- nosy: +sijinjoseph versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:16:44 2013 From: report at bugs.python.org (Stephen Tu) Date: Sat, 13 Apr 2013 18:16:44 +0000 Subject: [issue17708] sys.flags.hash_randomization doesn't return correct value In-Reply-To: <1365832008.74.0.106201952551.issue17708@psf.upfronthosting.co.za> Message-ID: <1365877004.72.0.242022700816.issue17708@psf.upfronthosting.co.za> Stephen Tu added the comment: Py_HashRandomizationFlag was not getting properly set anywhere. This patch fixes this. Also a test case Behavior is now: $ cat ~/hr.py import sys print(sys.flags.hash_randomization) $ PYTHONHASHSEED=random ./python.exe ~/hr.py 1 $ PYTHONHASHSEED=0 ./python.exe ~/hr.py 0 $ PYTHONHASHSEED=1 ./python.exe ~/hr.py 0 ---------- keywords: +patch nosy: +Stephen.Tu Added file: http://bugs.python.org/file29811/hashrandomization.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:18:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 18:18:52 +0000 Subject: [issue17016] _sre: avoid relying on pointer overflow In-Reply-To: <1358870068.45.0.162917053865.issue17016@psf.upfronthosting.co.za> Message-ID: <3Zp43w1bZzzR3H@mail.python.org> Roundup Robot added the comment: New changeset 27162465316f by Serhiy Storchaka in branch '2.7': Issue #17016: Get rid of possible pointer wraparounds and integer overflows http://hg.python.org/cpython/rev/27162465316f New changeset 2673d207c524 by Serhiy Storchaka in branch '3.3': Issue #17016: Get rid of possible pointer wraparounds and integer overflows http://hg.python.org/cpython/rev/2673d207c524 New changeset f280786d0e64 by Serhiy Storchaka in branch 'default': Issue #17016: Get rid of possible pointer wraparounds and integer overflows http://hg.python.org/cpython/rev/f280786d0e64 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:21:31 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 13 Apr 2013 18:21:31 +0000 Subject: [issue17628] str==str: compare the first and last character before calling memcmp() In-Reply-To: <1365867012.14.0.972439921641.issue17628@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: You must check that data is aligned. Did you run a benchmark? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:22:01 2013 From: report at bugs.python.org (amathew) Date: Sat, 13 Apr 2013 18:22:01 +0000 Subject: [issue12220] minidom xmlns not handling spaces in xmlns attribute value field In-Reply-To: <1306789573.92.0.875996944294.issue12220@psf.upfronthosting.co.za> Message-ID: <1365877321.7.0.704431496414.issue12220@psf.upfronthosting.co.za> amathew added the comment: I added a more descriptive error message for invalid namespaces. I agree that it would be great to eventually move to DOMException's. ---------- keywords: +patch nosy: +amathew Added file: http://bugs.python.org/file29812/minidom_space_char_in_namespace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:25:06 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 13 Apr 2013 18:25:06 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365877506.06.0.963705796417.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: Ok, great. I'll update the patch to include both encoding schemes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:26:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 18:26:43 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365877603.76.0.871240310005.issue17710@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch for 2.7. ---------- keywords: +patch Added file: http://bugs.python.org/file29813/cpickle_systemerror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:27:08 2013 From: report at bugs.python.org (Sijin Joseph) Date: Sat, 13 Apr 2013 18:27:08 +0000 Subject: [issue17627] Datetime and time doesn't update timezone in a running Win app In-Reply-To: <1365014351.49.0.143463684024.issue17627@psf.upfronthosting.co.za> Message-ID: <1365877628.06.0.461058336458.issue17627@psf.upfronthosting.co.za> Sijin Joseph added the comment: Some more links discussing similar issues http://www.sourceware.org/bugzilla/show_bug.cgi?id=154 - tzset not called frequently enough by localtime() and friends http://stackoverflow.com/questions/12150651/library-code-for-dynamically-reloading-the-usr-share-zoneinfo-database - Workaround in linux for reloading timezone info http://msdn.microsoft.com/en-US/library/90s5c885(v=vs.100).aspx - Microsoft CRT documentation for _tzset function, which can be called to reset timezone info. Another possible fix, could be to add an overload for the functions to force reloading of the timezone info. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:27:21 2013 From: report at bugs.python.org (Mike Milkin) Date: Sat, 13 Apr 2013 18:27:21 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1365877641.36.0.207128595007.issue11957@psf.upfronthosting.co.za> Mike Milkin added the comment: I like option #2, and I was thinking of working on it today, poke me if anyone has a problem with this. ---------- nosy: +mmilkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:29:53 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Apr 2013 18:29:53 +0000 Subject: [issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible In-Reply-To: <1362781994.31.0.121984055749.issue17386@psf.upfronthosting.co.za> Message-ID: <1365877793.25.0.0847012097733.issue17386@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I do want to test this. If my regular machine does not get fixed soon, I will install svn on my current substitute to do so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:32:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 18:32:15 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365877935.49.0.13174958632.issue17710@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think the UnpicklingError in 3.x is a bug, though: it's just a different exception than ValueError. It's just a shame that the two are used interchangeably for the same purpose. ---------- stage: needs patch -> patch review versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:34:07 2013 From: report at bugs.python.org (Stephen Tu) Date: Sat, 13 Apr 2013 18:34:07 +0000 Subject: [issue17671] io.BufferedRWPair can use uninitialized members In-Reply-To: <1365465332.23.0.700317324795.issue17671@psf.upfronthosting.co.za> Message-ID: <1365878047.98.0.954448362803.issue17671@psf.upfronthosting.co.za> Stephen Tu added the comment: _forward_call() now checks if reader/write is NULL- if so, throws a runtime exception ---------- keywords: +patch nosy: +Stephen.Tu Added file: http://bugs.python.org/file29814/bufferedio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:34:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 18:34:11 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365878051.26.0.8281687274.issue17710@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, forget what I just said. A SystemError can actually be triggered through a slightly longer line: $ ./python -c "import pickle; print (repr(pickle.loads(b\"S' \np0\n.\")))" Traceback (most recent call last): File "", line 1, in SystemError: Negative size passed to PyBytes_FromStringAndSize ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:35:18 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 13 Apr 2013 18:35:18 +0000 Subject: [issue17711] Persistent id in pickle with protocol version 0 In-Reply-To: <1365853309.55.0.468755952624.issue17711@psf.upfronthosting.co.za> Message-ID: <1365878118.06.0.459720199281.issue17711@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: In protocol 0, the persistent ID is restricted to alphanumeric strings because of the problems that arise when the persistent ID contains newline characters. _pickle likely should be changed to use the ASCII decoded. And perhaps, we should check for embedded newline characters too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:35:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 18:35:59 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365878159.7.0.462404046076.issue17710@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:39:01 2013 From: report at bugs.python.org (peter recore) Date: Sat, 13 Apr 2013 18:39:01 +0000 Subject: [issue9538] Replace confusing pseudoname 'object' in special methods section. In-Reply-To: <1281211479.21.0.733519342396.issue9538@psf.upfronthosting.co.za> Message-ID: <1365878341.98.0.254543885784.issue9538@psf.upfronthosting.co.za> peter recore added the comment: Here is a patch that implements Eric's suggestion. I am a new contributor and would welcome feedback on if this is correct or not. ---------- keywords: +patch nosy: +peterrecore Added file: http://bugs.python.org/file29815/issue9538.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:40:18 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 18:40:18 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365878418.08.0.796009223708.issue17710@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And here is a 3.x patch. ---------- Added file: http://bugs.python.org/file29816/pickle_systemerror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:43:10 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 18:43:10 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <3Zp4by15JjzRRr@mail.python.org> Roundup Robot added the comment: New changeset 6ca27b5de309 by R David Murray in branch '2.7': #2118: clarify smtplib exception documentation. http://hg.python.org/cpython/rev/6ca27b5de309 New changeset 36d07a877f33 by R David Murray in branch '3.3': #2118: clarify smtplib exception documentation. http://hg.python.org/cpython/rev/36d07a877f33 New changeset 75e7bd46fcd7 by R David Murray in branch 'default': Merge #2118: clarify smtplib exception documentation. http://hg.python.org/cpython/rev/75e7bd46fcd7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:46:01 2013 From: report at bugs.python.org (Jessica McKellar) Date: Sat, 13 Apr 2013 18:46:01 +0000 Subject: [issue7152] urllib2.build_opener() skips ProxyHandler In-Reply-To: <1255720004.18.0.991850721386.issue7152@psf.upfronthosting.co.za> Message-ID: <1365878761.8.0.662633000106.issue7152@psf.upfronthosting.co.za> Jessica McKellar added the comment: I confirm Barry's observation in msg94150 that if you set http_proxy (or any `*_proxy` environment variable), ProxyHandler does show up in build_opener().handlers. You can also add a ProxyHandler to build_opener through the public API as described in http://docs.python.org/dev/library/urllib.request.html#examples. I've attached a patch that updates the urllib2 and urllib.request documentation to clarify the situation. The patch also adds a missing DataHandler to the enumerated default handlers in the urllib2 note on basic authentication. I built the documentation and inspected the generated HTML to confirm proper formatting. -- As a side note on what's going on with ProxyHandler's interaction with `if meth in ["redirect_request", "do_open", "proxy_open"]:`, since this was confusing to me until I dug into the source a bit: When you don't have any proxy environment variables set, ProxyHandler only has one _ method that might get the handler registered -- proxy_open -- which gets skipped because of the above blacklisted methods check. When a proxy environment variable is set, ProxyHandler grows a *_open method which does get it registered as a handler. ---------- keywords: +patch nosy: +jesstess versions: +Python 3.3, Python 3.4 -Python 2.6 Added file: http://bugs.python.org/file29817/issue7152.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:49:07 2013 From: report at bugs.python.org (Stephen Tu) Date: Sat, 13 Apr 2013 18:49:07 +0000 Subject: [issue17575] HTTPConnection.send In-Reply-To: <1364574303.8.0.198870267113.issue17575@psf.upfronthosting.co.za> Message-ID: <1365878947.6.0.975293984031.issue17575@psf.upfronthosting.co.za> Stephen Tu added the comment: I don't think this is a bug anymore in the codebase- looking at Lib/http/client.py, if hasattr(data, "read") is true, then the branch will return unconditionally. if hasattr(data, "read") : if self.debuglevel > 0: print("sendIng a read()able") encode = False try: mode = data.mode except AttributeError: # io.BytesIO and other file-like objects don't have a `mode` # attribute. pass else: if "b" not in mode: encode = True if self.debuglevel > 0: print("encoding file using iso-8859-1") while 1: datablock = data.read(blocksize) if not datablock: break if encode: datablock = datablock.encode("iso-8859-1") self.sock.sendall(datablock) return ---------- nosy: +Stephen.Tu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:50:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 18:50:09 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <3Zp4lx3fpnzNZl@mail.python.org> Roundup Robot added the comment: New changeset 1158c38bf2dc by R David Murray in branch 'default': #2118: Make SMTPException a subclass of IOError. http://hg.python.org/cpython/rev/1158c38bf2dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:50:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 18:50:42 +0000 Subject: [issue17671] io.BufferedRWPair can use uninitialized members In-Reply-To: <1365465332.23.0.700317324795.issue17671@psf.upfronthosting.co.za> Message-ID: <1365879042.78.0.721766262223.issue17671@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the patch, Stephen. Could you add a test in Lib/test/test_io.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:54:07 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Apr 2013 18:54:07 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1365879247.05.0.546725610287.issue2118@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Ned. After taking a look at the library documentation, I decided to change the docstring in a somewhat different way. In general in our docs we do not document all the possible exceptions a library can raise, but just the library-specific exceptions and the interesting special cases. So what I did was to remove the language that implied that *only* SMTPExceptions were raised. And then in the 3.4 docs noted that it is a subclass of IOError. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:55:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 18:55:10 +0000 Subject: [issue17689] Fix test discovery for test_tarfile.py In-Reply-To: <1365619249.38.0.463638779993.issue17689@psf.upfronthosting.co.za> Message-ID: <1365879310.78.0.395676176299.issue17689@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Wouldn't it be simpler to write (untested): def skipUnlessCompressionModule(name): """ Skip if the specified compression module is not available. Must e a string, currently any of 'gzip', 'bz2', or 'lzma'. """ return unittest.skipUnless(globals()[name], '{} not available'.format(name)) ? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 20:56:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 18:56:53 +0000 Subject: [issue17720] pickle.py's load_appends should call append() on objects other than lists In-Reply-To: <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za> Message-ID: <1365879413.32.0.680718574404.issue17720@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Your patch is bogus (duplicated load_appends definition). Also, I think you want to add a test if you want to avoid further regressions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:07:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 19:07:10 +0000 Subject: [issue17720] pickle.py's load_appends should call append() on objects other than lists In-Reply-To: <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za> Message-ID: <1365880030.98.0.224458268282.issue17720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, test is needed. Current tests don't cover this case. I suggest to move obj.append out of the tight loop, as in C implementation. append = obj.append for item in items: append(item) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:22:13 2013 From: report at bugs.python.org (Dan Riti) Date: Sat, 13 Apr 2013 19:22:13 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <1365880933.74.0.781644301881.issue15480@psf.upfronthosting.co.za> Dan Riti added the comment: So I figured I'd give this one a shot...generated a patch to remove TYPE_INT64. Tests seem to pass, but please provide any guidance if I did something wrong! Thanks. ---------- keywords: +patch nosy: +dan.riti Added file: http://bugs.python.org/file29818/marshall-remove-int64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:26:11 2013 From: report at bugs.python.org (James Pye) Date: Sat, 13 Apr 2013 19:26:11 +0000 Subject: [issue13672] Add co_qualname attribute in code objects In-Reply-To: <1325100000.16.0.854542819355.issue13672@psf.upfronthosting.co.za> Message-ID: <1365881171.01.0.6777138436.issue13672@psf.upfronthosting.co.za> James Pye added the comment: Considering the API changes necessary for adding qualname, perhaps a better solution would be to just start using the qualname instead of the function's "basename"--co_name is the qualname. This would offer an automatic improvement to the readability of coverage/profiling tool reports. Admittedly, not sure what kind of breakage might ensue... =\ ---------- nosy: +James.Pye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:27:20 2013 From: report at bugs.python.org (Jessica McKellar) Date: Sat, 13 Apr 2013 19:27:20 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1365881240.35.0.410426786513.issue9297@psf.upfronthosting.co.za> Jessica McKellar added the comment: murilobr, thank you for the detailed and persistent bug report :) I was not able to reproduce this issue when sending mail from myself to myself through an open Google SMTP server*, using either Python 2.7** or 3.1. Do you experience this issue with a GMail SMTP server? If not, this seems like something specific to your environment--perhaps a custom SMTP server you are using? Unless someone can reproduce the issue, I recommend that we close this ticket. * e.g. one from $ nslookup > set type=MX > google.com Server:192.168.1.1 Address:192.168.1.1#53 Non-authoritative answer: google.commail exchanger = 10 aspmx.l.google.com. google.commail exchanger = 50 alt4.aspmx.l.google.com. google.commail exchanger = 20 alt1.aspmx.l.google.com. google.commail exchanger = 30 alt2.aspmx.l.google.com. google.commail exchanger = 40 alt3.aspmx.l.google.com. ** This is targeted at 3.1 but the example uses str.decode, which doesn't exist in Python 3, so I went back and checked on 2.7. ---------- nosy: +jesstess versions: +Python 2.7 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:29:18 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Apr 2013 19:29:18 +0000 Subject: [issue9538] Replace confusing pseudoname 'object' in special methods section. In-Reply-To: <1281211479.21.0.733519342396.issue9538@psf.upfronthosting.co.za> Message-ID: <1365881358.37.0.31286932255.issue9538@psf.upfronthosting.co.za> Georg Brandl added the comment: Note that Sphinx searches for "object.__foo__" when :meth:`__foo__` is used; this change will break all those links. For that reason I'm -1 to this change: I don't see the perceived issue as problematic anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:29:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 19:29:45 +0000 Subject: [issue17719] IDLE help text refers to incorrect Python version In-Reply-To: <1365873777.93.0.00334201360325.issue17719@psf.upfronthosting.co.za> Message-ID: <3Zp5dh6C5PzMHT@mail.python.org> Roundup Robot added the comment: New changeset eac4e23ce2fd by R David Murray in branch 'default': #17719: fix incorrect version number in deprecation doc. http://hg.python.org/cpython/rev/eac4e23ce2fd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:31:33 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Apr 2013 19:31:33 +0000 Subject: [issue17719] IDLE help text refers to incorrect Python version In-Reply-To: <1365873777.93.0.00334201360325.issue17719@psf.upfronthosting.co.za> Message-ID: <1365881493.79.0.147308608803.issue17719@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Kent. For the record, the issue for the deprecation is #16123, and the issue that introduced the incorrect line is #5066. ---------- nosy: +r.david.murray resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:45:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 19:45:50 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <3Zp60F75mBzQVP@mail.python.org> Roundup Robot added the comment: New changeset d396e0716bf4 by Serhiy Storchaka in branch 'default': Issue #16061: Speed up str.replace() for replacing 1-character strings. http://hg.python.org/cpython/rev/d396e0716bf4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:47:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 19:47:21 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1365882441.13.0.948303345461.issue16061@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks to Ezio Melotti and Daniel Shahaf for their great help in correcting my clumsy wording. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:47:22 2013 From: report at bugs.python.org (Kyle McMartin) Date: Sat, 13 Apr 2013 19:47:22 +0000 Subject: [issue17659] no way to determine First weekday (based on locale) In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1365882442.8.0.395879653615.issue17659@psf.upfronthosting.co.za> Kyle McMartin added the comment: Hacky patch at adding support for querying these values from nl_langinfo, and a new exported function from the locale module to return a guess at the first day of the week appropriate for Calendar.firstdayofweek After writing this, I think it might be better to implement this as another hash, so keys can be queried and objects directly returned. I'll take a look at that approach soon. Of course, all this is contingent on having support from libc, and it seems only Linux currently has this, and the *BSDs (and hence OS X via FreeBSD) do not. I'll look into that as well. ---------- keywords: +patch nosy: +jkkm Added file: http://bugs.python.org/file29819/cpython-add-first-day-of-week.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:50:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 19:50:25 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1365882625.44.0.722767705367.issue2118@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since 3.3 IOError is an alias of OSError. We get rid of reference of IOError and other OSError aliases in the documentation and code, replacing them with OSError. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:51:14 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Apr 2013 19:51:14 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1365882674.5.0.97608930458.issue9682@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Mike. I made some review comments (you should have gotten an email, or look at them via the 'review' link on the patch). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 21:54:16 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 19:54:16 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1365882856.06.0.985977864535.issue2118@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: socket.error is another alias of OSError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:02:20 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 20:02:20 +0000 Subject: [issue17722] 'round' function doesn't honour a descriptor __round__ Message-ID: <1365883340.94.0.61379859162.issue17722@psf.upfronthosting.co.za> New submission from Mark Dickinson: Benjamin pointed out on #python-dev that the builtin round function should be using _PyObject_LookupSpecial to look up the __round__ method. Here's a fix. ---------- components: Interpreter Core files: round_descriptor.patch keywords: patch messages: 186813 nosy: mark.dickinson priority: normal severity: normal stage: patch review status: open title: 'round' function doesn't honour a descriptor __round__ type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29820/round_descriptor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:04:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:04:36 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1365883476.92.0.499125174553.issue16694@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Zachary, I suppose Modules/_operator.c is a rename of Modules/operator.c. Could you generate your patch using "hg diff --git" so that history isn't lost here? See also http://docs.python.org/devguide/committing.html#minimal-configuration ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:05:20 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 20:05:20 +0000 Subject: [issue17722] 'round' function doesn't honour a descriptor __round__ In-Reply-To: <1365883340.94.0.61379859162.issue17722@psf.upfronthosting.co.za> Message-ID: <1365883520.68.0.846756600934.issue17722@psf.upfronthosting.co.za> Mark Dickinson added the comment: Whoops. That patch introduces a new refleak; will fix shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:07:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 20:07:20 +0000 Subject: [issue17711] Persistent id in pickle with protocol version 0 In-Reply-To: <1365853309.55.0.468755952624.issue17711@psf.upfronthosting.co.za> Message-ID: <1365883640.69.0.509737323476.issue17711@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Even for alphanumeric strings Python 3 have a bug. It saves strings and load bytes objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:08:55 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 20:08:55 +0000 Subject: [issue17722] 'round' function doesn't honour a descriptor __round__ In-Reply-To: <1365883340.94.0.61379859162.issue17722@psf.upfronthosting.co.za> Message-ID: <1365883735.13.0.560149458317.issue17722@psf.upfronthosting.co.za> Mark Dickinson added the comment: Non-leaky patch. ---------- Added file: http://bugs.python.org/file29821/round_descriptor2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:13:36 2013 From: report at bugs.python.org (Dan Riti) Date: Sat, 13 Apr 2013 20:13:36 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1365884016.69.0.474383002635.issue13510@psf.upfronthosting.co.za> Dan Riti added the comment: After reading the comments, I generated a patch that does the following: - Reorganize to present `for line in f:` as the first approach for reading lines. I refrained from saying it's the *preferred* approach, however I can add that if desired. - Reorganize to present `f.readlines()` as the alternative approach. Any feedback is more then welcome! Thanks. ---------- keywords: +patch nosy: +dan.riti Added file: http://bugs.python.org/file29822/demote-readlines.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:14:21 2013 From: report at bugs.python.org (Shaun Hickson) Date: Sat, 13 Apr 2013 20:14:21 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <1365884061.88.0.303104623798.issue17713@psf.upfronthosting.co.za> Shaun Hickson added the comment: I was looking at this yesterday and this morning a little bit, and the expected value is too large by a day (e.g. as the test currently runs, actual = expected - (24 * 60 * 60)). ---------- nosy: +sphickson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:15:20 2013 From: report at bugs.python.org (Sijin Joseph) Date: Sat, 13 Apr 2013 20:15:20 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365884120.11.0.918457055493.issue16273@psf.upfronthosting.co.za> Sijin Joseph added the comment: Attaching a patch with a doc update to the tutorial, specifying that 1. The return value from f.tell is an opaque number for text files. 2. When seeking using text files the offset value needs to come from f.tell(). http://docs.python.org/3.4/library/io.html#io.TextIOBase.seek ---------- keywords: +patch nosy: +sijinjoseph Added file: http://bugs.python.org/file29823/16273-doc-update.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:16:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:16:07 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365884167.78.0.809938199077.issue16273@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> docs at python components: +Documentation, IO -Interpreter Core nosy: +docs at python priority: high -> normal stage: test needed -> patch review versions: +Python 3.3, Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:17:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 20:17:12 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365884232.22.0.667614363366.issue17710@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Of course, UnpicklingError is not a bug. Perhaps almost any exception except SystemError is not a bug. I mention it because it's a case where Python 3 differs from Python 2. I think _pickle.c patches can be simplified. + if (len < 2) + goto insecure; if (s[0] == '"' && s[len - 1] == '"') { ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:17:54 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 13 Apr 2013 20:17:54 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365884274.3.0.834755863533.issue17710@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I also wrote a patch for this. I took I slightly different approach though. I fixed the C implementation to be more strict on the quoting. Currently, it strips trailing non-printable characters, something pickle.py doesn't do. I also cleaned up the tests to check this behavior. ---------- Added file: http://bugs.python.org/file29824/fix_quoted_string_python3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:20:36 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:20:36 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365884436.93.0.41948759373.issue17710@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Alexandre, I don't like your patch very much: - you are changing the exception from ValueError to UnpicklingError (which doesn't derive from ValueError) in a bugfix release - you aren't actually adding any guards in the C code, so it's not demonstrably more robust ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:20:52 2013 From: report at bugs.python.org (peter recore) Date: Sat, 13 Apr 2013 20:20:52 +0000 Subject: [issue9538] Replace confusing pseudoname 'object' in special methods section. In-Reply-To: <1281211479.21.0.733519342396.issue9538@psf.upfronthosting.co.za> Message-ID: <1365884452.87.0.320849678832.issue9538@psf.upfronthosting.co.za> peter recore added the comment: George, When I build the docs with my changes, the links from the method names seem to work the same way as they do in the existing docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:24:01 2013 From: report at bugs.python.org (Mike Milkin) Date: Sat, 13 Apr 2013 20:24:01 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1365884641.04.0.736961150975.issue11957@psf.upfronthosting.co.za> Mike Milkin added the comment: There is no sane way to issue a warning without changing the signature and we don't want to change the signature without issuing a deprecation warning for the function, so sadly option 3 is the only way for this to work, (Im going to not touch this till ENUMS are merged in.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:24:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:24:11 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <1365884651.0.0.383690814205.issue15480@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you, Daniel. The patch looks technically ok. Could you sign a contributor agreement? It will cover all your future contributions to Python: http://www.python.org/psf/contrib/ ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:25:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:25:35 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1365884735.58.0.333872706188.issue13510@psf.upfronthosting.co.za> Antoine Pitrou added the comment: In 3.x I think we'll want to drop the following sentence: "Since the two approaches manage line buffering differently, they should not be mixed". But it can wait for another issue. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:28:56 2013 From: report at bugs.python.org (Dan Riti) Date: Sat, 13 Apr 2013 20:28:56 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <1365884936.52.0.103371978537.issue15480@psf.upfronthosting.co.za> Dan Riti added the comment: Antoine, I just filled one out maybe 2 hours ago (I'm at a CPython sprint in Boston). https://secure.echosign.com/public/viewAgreement?aid=T8FLXZG5LX3W2N&eid=T8GPRVI62IXF2Y& ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:30:41 2013 From: report at bugs.python.org (Yael) Date: Sat, 13 Apr 2013 20:30:41 +0000 Subject: [issue995907] memory leak with threads and enhancement of the timer class Message-ID: <1365885041.25.0.460010492759.issue995907@psf.upfronthosting.co.za> Yael added the comment: I am working on a patch for a new class that uses a single background thread, it should be ready soon. One unintended consequence of this change is that with one thread, multiple timers that have the same timeout will no longer run in parallel, but one after the other. ---------- nosy: +yael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:30:51 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:30:51 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1365884936.52.0.103371978537.issue15480@psf.upfronthosting.co.za> Message-ID: <1365885048.2474.0.camel@fsol> Antoine Pitrou added the comment: > Antoine, I just filled one out maybe 2 hours ago (I'm at a CPython > sprint in Boston). Ah, great, thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:31:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:31:22 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <1365885082.76.0.100783895061.issue15480@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:31:57 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 13 Apr 2013 20:31:57 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365885117.53.0.932573616312.issue17707@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Assigning to me. Will get back in 1 or 2 days. ---------- assignee: -> giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:32:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 20:32:46 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1365885166.62.0.44057611166.issue11957@psf.upfronthosting.co.za> Ezio Melotti added the comment: Can't you use *args and **kwargs and then raise a deprecation warning if count and/or flags are in args? Even if enums are merged in, there might still be issues depending on their implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:36:20 2013 From: report at bugs.python.org (Ned Jackson Lovely) Date: Sat, 13 Apr 2013 20:36:20 +0000 Subject: [issue17301] An in-place version of many bytearray methods is needed In-Reply-To: <1361910523.06.0.491264384267.issue17301@psf.upfronthosting.co.za> Message-ID: <1365885380.65.0.181015055393.issue17301@psf.upfronthosting.co.za> Ned Jackson Lovely added the comment: An mtranslate, or "mutating translate" method for bytearrays. My first C code in a long time, so be gentle. The name is bad, but I don't see a better suggestion below. ---------- keywords: +patch nosy: +n Added file: http://bugs.python.org/file29825/issue17301.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:38:11 2013 From: report at bugs.python.org (Jessica McKellar) Date: Sat, 13 Apr 2013 20:38:11 +0000 Subject: [issue7100] test_xmlrpc: global name 'stop_serving' is not defined In-Reply-To: <1255207170.52.0.845543632042.issue7100@psf.upfronthosting.co.za> Message-ID: <1365885491.65.0.0317269242873.issue7100@psf.upfronthosting.co.za> Jessica McKellar added the comment: To summarize (as I understand it) the state of this ticket: * stop_serving no longer exists anywhere in the code base, so the proximal cause of the bug report from 2009 no longer exists. * the tests in test_xmlrpc currently all pass without issue. * If you tried to create a test in a subclass of BaseServerTestCase which never issues a request to the MyXMLRPCServer instance set up by http_server, it will hang. The reason is that BaseServerTestCase uses setUp and tearDown methods that force the test to coordinate a threading.Event with http_server; if no request is made to the XMLRPC server, the test will hang in tearDown waiting for the server to set the Event flag. I think this ticket could be closed because the proximal issue no longer exists. Alternatively, a docstring could be added to BaseServerTestCase saying tests in subclasses must make at least 1 request else they should live in a different TestCase, or BaseServerTestCase could be refactored to not have this constraint. ---------- nosy: +jesstess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:41:18 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 20:41:18 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <3Zp7DF6SDgzQVx@mail.python.org> Roundup Robot added the comment: New changeset 74a440984b20 by Antoine Pitrou in branch 'default': Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal. http://hg.python.org/cpython/rev/74a440984b20 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:42:10 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 13 Apr 2013 20:42:10 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365885730.56.0.715801588004.issue17710@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I was targeting head, not the release branches. It is fine to change the exception there as we don't make any guarantee about the exceptions raised during the unpickling process. It is easy enough to fix patch use ValueError for the release branch. And adding guards is unnecessary after the removing the code for stripping trailing whitespace. Here's slightly updated patch that check if readline() reached an EOF instead of a newline. ---------- Added file: http://bugs.python.org/file29826/fix_quoted_string_python3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:42:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:42:23 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <1365885743.46.0.383933451504.issue15480@psf.upfronthosting.co.za> Antoine Pitrou added the comment: So, I've just tweaked the patch a bit so that ints longer than machine size are still tested for. Congrats for your first contribution! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:42:56 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 13 Apr 2013 20:42:56 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1365885776.22.0.12494905229.issue17710@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file29824/fix_quoted_string_python3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:44:31 2013 From: report at bugs.python.org (Dan Riti) Date: Sat, 13 Apr 2013 20:44:31 +0000 Subject: [issue15480] Drop TYPE_INT64 from marshal in Python 3.4 In-Reply-To: <1343497742.77.0.0142368260807.issue15480@psf.upfronthosting.co.za> Message-ID: <1365885871.09.0.978553588317.issue15480@psf.upfronthosting.co.za> Dan Riti added the comment: Looks great, thanks Antoine! =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:48:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 20:48:09 +0000 Subject: [issue7100] test_xmlrpc: global name 'stop_serving' is not defined In-Reply-To: <1255207170.52.0.845543632042.issue7100@psf.upfronthosting.co.za> Message-ID: <1365886089.26.0.963177243674.issue7100@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, this issue looks obsolete. Thanks for taking a look! ---------- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:48:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 20:48:30 +0000 Subject: [issue17016] _sre: avoid relying on pointer overflow In-Reply-To: <1358870068.45.0.162917053865.issue17016@psf.upfronthosting.co.za> Message-ID: <1365886110.44.0.978290671245.issue17016@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Extension Modules resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:49:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 20:49:35 +0000 Subject: [issue17016] _sre: avoid relying on pointer overflow In-Reply-To: <1358870068.45.0.162917053865.issue17016@psf.upfronthosting.co.za> Message-ID: <1365886175.17.0.15580092576.issue17016@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Nickolai, for the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:52:52 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Apr 2013 20:52:52 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1365886372.22.0.793318427024.issue2118@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree with Serhiy. Better to direcly use OSError than IOError alias. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:57:04 2013 From: report at bugs.python.org (Jason Michalski) Date: Sat, 13 Apr 2013 20:57:04 +0000 Subject: [issue17705] Fill Character cannot be \0 In-Reply-To: <1365785695.21.0.22745237494.issue17705@psf.upfronthosting.co.za> Message-ID: <1365886624.22.0.564889692172.issue17705@psf.upfronthosting.co.za> Jason Michalski added the comment: I worked on a patch that allows NUL padding for longs, floats and complex numbers. It seems NUL was being used as a sentinel in the format string parsing when no padding character is given. It was then replaced with a space in each call to fill_padding if it was NUL. ---------- keywords: +patch nosy: +Jason.Michalski Added file: http://bugs.python.org/file29827/cpython-3.3-17705.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 22:57:30 2013 From: report at bugs.python.org (Shaun Hickson) Date: Sat, 13 Apr 2013 20:57:30 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <1365886650.95.0.450391104448.issue17713@psf.upfronthosting.co.za> Shaun Hickson added the comment: Patch to fix test_compute_rollover_weekly_attime: 1) Use 6 rather than 7 for calculating expected rollover day 2) Roll all cases (rollover day earlier than current day, both days the same, and current day earlier than rollover day) into one if/else statement ---------- keywords: +patch Added file: http://bugs.python.org/file29828/issue17713.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:00:59 2013 From: report at bugs.python.org (Mike Milkin) Date: Sat, 13 Apr 2013 21:00:59 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1365886859.62.0.14439735527.issue11957@psf.upfronthosting.co.za> Mike Milkin added the comment: We could do that but we would be changing the signature before adding the warning ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:04:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 21:04:40 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <1365887080.21.0.224506282279.issue17713@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Shaun, your patch fails if I remove the @skip decorator: ====================================================================== FAIL: test_compute_rollover_weekly_attime (test.test_logging.TimedRotatingFileHandlerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/default/Lib/test/test_logging.py", line 3989, in test_compute_rollover_weekly_attime self.assertEqual(actual, expected) AssertionError: 388800 != 302400 On the other hand, the original test works fine here. I guess the diagnosing isn't complete yet :-) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:07:07 2013 From: report at bugs.python.org (Shaun Hickson) Date: Sat, 13 Apr 2013 21:07:07 +0000 Subject: [issue5993] python produces zombie in webbrowser.open In-Reply-To: <1242014278.58.0.774883846907.issue5993@psf.upfronthosting.co.za> Message-ID: <1365887227.44.0.636328105797.issue5993@psf.upfronthosting.co.za> Shaun Hickson added the comment: Just as an additional data point, I was also unable to recreate this on OS X 10.8.3 using any browser. ---------- nosy: +sphickson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:08:16 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 21:08:16 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <1365887296.15.0.824644832066.issue17713@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I also find the original code totally unreadable. Why "currentTime = 0"? Why no comments on the various calculations? Vinay, it would be nice if you could make some efforts here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:09:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Apr 2013 21:09:14 +0000 Subject: [issue17722] 'round' function doesn't honour a descriptor __round__ In-Reply-To: <1365883340.94.0.61379859162.issue17722@psf.upfronthosting.co.za> Message-ID: <1365887354.08.0.292521644969.issue17722@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps it will be good to add a new test when X doesn't not have a special method. I don't see this case is covered. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:10:54 2013 From: report at bugs.python.org (John Ehresman) Date: Sat, 13 Apr 2013 21:10:54 +0000 Subject: [issue17723] Use FileRead and FileWrite in fileio.c on Windows Message-ID: <1365887454.15.0.737377999184.issue17723@psf.upfronthosting.co.za> New submission from John Ehresman: File object's can use the win32 api FileRead and FileWrite instead of the CRT's read & write function. This would eliminate the need to set the mode to binary on stdin & stdout, which is the underlying cause of issue 16587. This could also possibly be the basis of adding nonblocking functionality. An initial patch is attached, but I still need to verify what this does to the CRT mode of files that are opened by python (rather than already be opened, like stdin & stdout are). ---------- files: use_filerw.patch keywords: patch messages: 186849 nosy: jpe priority: normal severity: normal status: open title: Use FileRead and FileWrite in fileio.c on Windows type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29829/use_filerw.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:12:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 13 Apr 2013 21:12:23 +0000 Subject: [issue17723] Use FileRead and FileWrite in fileio.c on Windows In-Reply-To: <1365887454.15.0.737377999184.issue17723@psf.upfronthosting.co.za> Message-ID: <1365887543.27.0.399619256547.issue17723@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:13:11 2013 From: report at bugs.python.org (Ned Jackson Lovely) Date: Sat, 13 Apr 2013 21:13:11 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1365887591.68.0.645685980018.issue2118@psf.upfronthosting.co.za> Ned Jackson Lovely added the comment: s/IOError/OSError/ ---------- Added file: http://bugs.python.org/file29830/issue2118-OSError.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:13:46 2013 From: report at bugs.python.org (Jessica McKellar) Date: Sat, 13 Apr 2013 21:13:46 +0000 Subject: [issue4140] urllib2: request with digest auth through proxy fail In-Reply-To: <1224258333.01.0.331002758914.issue4140@psf.upfronthosting.co.za> Message-ID: <1365887626.82.0.485235234875.issue4140@psf.upfronthosting.co.za> Jessica McKellar added the comment: jan.kollhof, thanks for the report and your work on this ticket! The format of the client response to a server's digest challenge is detailed in RFC 2617, section 3.2.2: The Authorization Request Header. The urllib2.py attachment is unfortunately the whole file and not a diff, but I think from the transcript in msg74918 that Jan is discussing the format of the digest-uri header. That field is in turn defined in RFC 2616, section 5.1.2: Request-URI. Request-URI = "*" | absoluteURI | abs_path | authority The absoluteURI form is REQUIRED when the request is being made to a proxy. So I believe urllib2 has the correct, RFC-conforming behavior here by sending the full URI through a proxy, and the issue is with IIS. Thus, I recommend that we close this ticket as invalid. ---------- nosy: +jesstess _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:14:08 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 13 Apr 2013 21:14:08 +0000 Subject: [issue16273] f.tell() returning negative number on Windows build In-Reply-To: <1350526122.97.0.103530434711.issue16273@psf.upfronthosting.co.za> Message-ID: <1365887648.2.0.220214993225.issue16273@psf.upfronthosting.co.za> Changes by Armin Rigo : ---------- nosy: -arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:16:33 2013 From: report at bugs.python.org (John Ehresman) Date: Sat, 13 Apr 2013 21:16:33 +0000 Subject: [issue16587] Py_Initialize breaks wprintf on Windows In-Reply-To: <1354321432.5.0.798652538273.issue16587@psf.upfronthosting.co.za> Message-ID: <1365887793.85.0.195940660992.issue16587@psf.upfronthosting.co.za> John Ehresman added the comment: One way to fix this is to use the FileRead & FileWrite api functions directly as proposed in issue 17723 I would regard this as a change in behavior and not a simple bug fix because there is probably code written for 3.3 that assumes the C level stdout is in binary after python is initialized so would target 3.4 for the change. ---------- nosy: +jpe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:17:28 2013 From: report at bugs.python.org (Max Mautner) Date: Sat, 13 Apr 2013 21:17:28 +0000 Subject: [issue17724] urllib -- add_handler method refactoring for clarity Message-ID: <1365887848.07.0.0995479400533.issue17724@psf.upfronthosting.co.za> New submission from Max Mautner: Response handlers are registered with the OpenerDirector class in the urllib.request module using the add_handler method--it's a convoluted method that I refactored for legibility's sake. ---------- files: urllib_add_handler.patch keywords: patch messages: 186853 nosy: Max.Mautner priority: normal severity: normal status: open title: urllib -- add_handler method refactoring for clarity type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29831/urllib_add_handler.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:19:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Apr 2013 21:19:09 +0000 Subject: [issue17722] 'round' function doesn't honour a descriptor __round__ In-Reply-To: <1365883340.94.0.61379859162.issue17722@psf.upfronthosting.co.za> Message-ID: <3Zp83x0jJYzP3Z@mail.python.org> Roundup Robot added the comment: New changeset cc59c215f19e by Benjamin Peterson in branch 'default': properly lookup the __round__ special method (closes #17722) http://hg.python.org/cpython/rev/cc59c215f19e ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:19:55 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 13 Apr 2013 21:19:55 +0000 Subject: [issue17722] 'round' function doesn't honour a descriptor __round__ In-Reply-To: <1365883340.94.0.61379859162.issue17722@psf.upfronthosting.co.za> Message-ID: <1365887995.82.0.796899886225.issue17722@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Sorry for trampling on you; I had a patch already in my wc. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:37:56 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 13 Apr 2013 21:37:56 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1365889076.55.0.988630130025.issue11957@psf.upfronthosting.co.za> Ezio Melotti added the comment: The change would still be backwards compatible (even though inspect.signature and similar functions might return something different). Note that I'm not saying that's the best option, but it should be doable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:41:17 2013 From: report at bugs.python.org (Vladimir Korolev) Date: Sat, 13 Apr 2013 21:41:17 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <1365889277.7.0.333873071481.issue17694@psf.upfronthosting.co.za> Vladimir Korolev added the comment: We have this issue triaged for at CPython hackathon in Boston. Here is a patch for the issue. We only tested on Mac OS X 10.8.3, which has zoned allocator, so the memory profile is exactly the same with our without this patch. The running time seems to be slightly better with the patch. The benchmark we used runs for about 5.6 seconds with the patch vs. 5.9 seconds without the patch. We run the benchmark multiple times and the results seem to be consistent. Here are the results of the benchmarking and memory profile testing: With Fix Without Fix Mem 1535 nodes (6377296 bytes) 1535 nodes (6378144 bytes) Time 5.68 5.9 sec The memory profile was measured by the MacOS X 'heap' command. The timings come from attached benchmark module. The original benchmark module is taken from here http://bugs.python.org/file25558/benchmark.py and was modified to test this issue. ---------- keywords: +patch nosy: +vladistan Added file: http://bugs.python.org/file29832/issue17694.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:42:58 2013 From: report at bugs.python.org (Vladimir Korolev) Date: Sat, 13 Apr 2013 21:42:58 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <1365889378.12.0.77856022881.issue17694@psf.upfronthosting.co.za> Vladimir Korolev added the comment: For some reason can't figure out how to attach multiple files. So here is the benchmark module ---------- Added file: http://bugs.python.org/file29833/benchmark.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:49:14 2013 From: report at bugs.python.org (Vladimir Korolev) Date: Sat, 13 Apr 2013 21:49:14 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <1365889754.24.0.0965812625227.issue17694@psf.upfronthosting.co.za> Vladimir Korolev added the comment: I'd like to note that the actual patch was written by Adam.Duston http://bugs.python.org/user17706 I just verified the results, measured the time/memory performance submitted the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:54:44 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 21:54:44 +0000 Subject: [issue17722] 'round' function doesn't honour a descriptor __round__ In-Reply-To: <1365883340.94.0.61379859162.issue17722@psf.upfronthosting.co.za> Message-ID: <1365890084.47.0.2518210672.issue17722@psf.upfronthosting.co.za> Mark Dickinson added the comment: No problem. Do you usually keep patches in your WC? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:56:03 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 13 Apr 2013 21:56:03 +0000 Subject: [issue17722] 'round' function doesn't honour a descriptor __round__ In-Reply-To: <1365883340.94.0.61379859162.issue17722@psf.upfronthosting.co.za> Message-ID: <1365890163.74.0.171102376752.issue17722@psf.upfronthosting.co.za> Benjamin Peterson added the comment: In this case, I had almost finished a patch as I was talking with you on IRC, but I had to go play in a show for 3 hours. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 13 23:58:30 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 13 Apr 2013 21:58:30 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1365890310.18.0.128721456994.issue15301@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1 on using PyNumber_Index. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 00:26:49 2013 From: report at bugs.python.org (Mike Milkin) Date: Sat, 13 Apr 2013 22:26:49 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1365892009.66.0.182202014397.issue9682@psf.upfronthosting.co.za> Mike Milkin added the comment: Made changes to to the tests and made changes to the error messages. I think decode() is valid since the input is already ascii encoded. ---------- Added file: http://bugs.python.org/file29834/Issue9682-full.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 00:55:01 2013 From: report at bugs.python.org (Trent Nelson) Date: Sat, 13 Apr 2013 22:55:01 +0000 Subject: [issue12181] SIGBUS error on OpenBSD (sparc64) In-Reply-To: <1306354802.94.0.44002539476.issue12181@psf.upfronthosting.co.za> Message-ID: <1365893701.22.0.309446498064.issue12181@psf.upfronthosting.co.za> Trent Nelson added the comment: Yeah those slaves are definitely due for an update. It's on the list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 01:03:09 2013 From: report at bugs.python.org (Stephen Tu) Date: Sat, 13 Apr 2013 23:03:09 +0000 Subject: [issue17671] io.BufferedRWPair can use uninitialized members In-Reply-To: <1365465332.23.0.700317324795.issue17671@psf.upfronthosting.co.za> Message-ID: <1365894189.22.0.960913020553.issue17671@psf.upfronthosting.co.za> Stephen Tu added the comment: patch with test in test_io ---------- Added file: http://bugs.python.org/file29835/bufferedio.withtest.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 01:19:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 13 Apr 2013 23:19:37 +0000 Subject: [issue17723] Use FileRead and FileWrite in fileio.c on Windows In-Reply-To: <1365887454.15.0.737377999184.issue17723@psf.upfronthosting.co.za> Message-ID: <1365895177.92.0.615720448617.issue17723@psf.upfronthosting.co.za> STINNER Victor added the comment: See issue #12939 which contains a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 01:19:57 2013 From: report at bugs.python.org (David Wolever) Date: Sat, 13 Apr 2013 23:19:57 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365895197.02.0.994122433848.issue17701@psf.upfronthosting.co.za> Changes by David Wolever : ---------- hgrepos: +182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 01:24:10 2013 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 13 Apr 2013 23:24:10 +0000 Subject: [issue17705] Fill Character cannot be \0 In-Reply-To: <1365785695.21.0.22745237494.issue17705@psf.upfronthosting.co.za> Message-ID: <1365895450.51.0.855016923784.issue17705@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 01:27:22 2013 From: report at bugs.python.org (David Wolever) Date: Sat, 13 Apr 2013 23:27:22 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365895642.34.0.129461894312.issue17701@psf.upfronthosting.co.za> Changes by David Wolever : Added file: http://bugs.python.org/file29836/b3b1dcdc8cee.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 01:38:32 2013 From: report at bugs.python.org (ingrid) Date: Sat, 13 Apr 2013 23:38:32 +0000 Subject: [issue17413] format_exception() breaks on exception tuples from trace function In-Reply-To: <1363222594.63.0.566610526845.issue17413@psf.upfronthosting.co.za> Message-ID: <1365896312.7.0.673816707631.issue17413@psf.upfronthosting.co.za> ingrid added the comment: It seems that settrace works normally when an exception is raised in the python code with the raise keyword. If an exception is raised in the C code, settrace breaks as the C code passes all exceptions as strings. To fix this issue we just added a line to normalize the C exception within settrace. We included a regression test for this defect. I paired on this with user bmac (http://bugs.python.org/user17692). ---------- keywords: +patch nosy: +ingrid Added file: http://bugs.python.org/file29837/issue17413.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 01:43:20 2013 From: report at bugs.python.org (ingrid) Date: Sat, 13 Apr 2013 23:43:20 +0000 Subject: [issue17413] format_exception() breaks on exception tuples from trace function In-Reply-To: <1363222594.63.0.566610526845.issue17413@psf.upfronthosting.co.za> Message-ID: <1365896600.39.0.488781693165.issue17413@psf.upfronthosting.co.za> Changes by ingrid : ---------- nosy: +bmac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 02:06:46 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 00:06:46 +0000 Subject: [issue17693] Use _PyUnicodeWriter API for CJK decoders In-Reply-To: <1365637855.94.0.450867352057.issue17693@psf.upfronthosting.co.za> Message-ID: <3ZpCnK3KnWzRY9@mail.python.org> Roundup Robot added the comment: New changeset d621bdaed7c3 by Victor Stinner in branch 'default': Issue #17693: CJK encoders now use the new Unicode API (PEP 393) http://hg.python.org/cpython/rev/d621bdaed7c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 02:24:54 2013 From: report at bugs.python.org (Martin Morrison) Date: Sun, 14 Apr 2013 00:24:54 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365899094.48.0.893219416001.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: Updated patch that includes both my original implementation of Ascii85, as well as the Mercurial implementation of base85. A few notes/questions: - I named the Mercurial base85 implementation functions with the "b85" prefix. For the Ascii85 ones, I used "a85". I considered overloading the same functions with a keyword argument to select which encoding, but rejected that. Thoughts? - I made only minor modifications to the Mercurial code to use bytes throughout (to match all the other APIs in the module). I also updated the docstrings a bit. My goal was to change as little as possible to guarantee identical behaviour. - I haven't made the changes to add a pure Python binascii module as suggested in msg186216. Although poorly named, "base64.py" already contains a number of other encodings, so this seemed the best place for these too. I'm happy to make that change as well though if you really want it as part of this issue. ---------- Added file: http://bugs.python.org/file29838/issue17618-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 02:37:10 2013 From: report at bugs.python.org (Masami HIRATA) Date: Sun, 14 Apr 2013 00:37:10 +0000 Subject: [issue17708] sys.flags.hash_randomization doesn't return correct value In-Reply-To: <1365832008.74.0.106201952551.issue17708@psf.upfronthosting.co.za> Message-ID: <1365899830.7.0.229773300741.issue17708@psf.upfronthosting.co.za> Masami HIRATA added the comment: It seems there is a misunderstanding on my part. Python v3.3.1 documentation says, "sys.flags The struct sequence flags exposes the status of command line flags. The attributes are read only." I think that sys.flags.hash_randomization should be always 1 on Python v3.3.1 because the documentation says, "-R Kept for compatibility. On Python 3.3 and greater, hash randomization is turned on by default." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 02:56:57 2013 From: report at bugs.python.org (Stephen Tu) Date: Sun, 14 Apr 2013 00:56:57 +0000 Subject: [issue17708] sys.flags.hash_randomization doesn't return correct value In-Reply-To: <1365832008.74.0.106201952551.issue17708@psf.upfronthosting.co.za> Message-ID: <1365901017.71.0.417006071234.issue17708@psf.upfronthosting.co.za> Stephen Tu added the comment: But it would seem that setting PYTHONHASHSEED != "random" does disable hash randomization. also, not sure what the semantics of the following is: $ PYTHONHASHSEED=1 python -R ... right now, python3 basically ignores -R. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:14:22 2013 From: report at bugs.python.org (Masami HIRATA) Date: Sun, 14 Apr 2013 01:14:22 +0000 Subject: [issue17708] sys.flags.hash_randomization doesn't return correct value In-Reply-To: <1365832008.74.0.106201952551.issue17708@psf.upfronthosting.co.za> Message-ID: <1365902062.67.0.737251165659.issue17708@psf.upfronthosting.co.za> Masami HIRATA added the comment: We should add 'randomization' and 'seed' attribute to sys.hash_info, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:16:55 2013 From: report at bugs.python.org (David Wolever) Date: Sun, 14 Apr 2013 01:16:55 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365902215.89.0.578603385837.issue17701@psf.upfronthosting.co.za> Changes by David Wolever : Removed file: http://bugs.python.org/file29836/b3b1dcdc8cee.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:17:26 2013 From: report at bugs.python.org (David Wolever) Date: Sun, 14 Apr 2013 01:17:26 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365902246.03.0.0674167147804.issue17701@psf.upfronthosting.co.za> Changes by David Wolever : Added file: http://bugs.python.org/file29839/ae18c5ae2c4d.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:20:58 2013 From: report at bugs.python.org (David Wolever) Date: Sun, 14 Apr 2013 01:20:58 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365902458.5.0.328769271138.issue17701@psf.upfronthosting.co.za> David Wolever added the comment: Ok, I've added some locale examples and fixed up the note numbering. See diff in file29839, and there is a live version to preview here: http://hul.wolever.net/python-doc/library/datetime.html#strftime-and-strptime-behavior If I can get a +1 on this, I'll port it to Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:34:08 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Apr 2013 01:34:08 +0000 Subject: [issue9538] Replace confusing pseudoname 'object' in special methods section. In-Reply-To: <1281211479.21.0.733519342396.issue9538@psf.upfronthosting.co.za> Message-ID: <1365903248.35.0.243754300849.issue9538@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The problem, for me, is that in 3.3 Data Model, 'object' is being used with a 3rd meaning, 'generic class' (or possibly 'subclass of object', if indeed every 'class' must be 'object' subclass, in the strict sense of 'object'). This is in addition to 'object' the specific class and generic Python object (which in CPython is a PyObject structure instance). The normal two meanings are often differentiated by typography: normal type for plain old object, something else for *object*. To add a bit to the confusion, 3.3.4. Customizing instance and subclass checks changes the prefix to 'class' instead of 'object' (which is what I would do in the whole section...) class.__instancecheck__(self, instance) class.__subclasscheck__(self, subclass) It then goes on to explain that it does not really mean 'generic class' but 'type/metaclass'. So, to me, the prefix here should really be 'metaclass'. Peter, the patch applied fine to my copy of default. It is incomplete in that the replacement should be made everywhere or nowhere in 3.3, not just in 3.3.2(.0) and 3.3.2.1. However, do not bother making a new patch until there is more agreement on a change than there is now. A possible alternative to the given proposal is an explanation in the short 3.3 header of the special use of 'object' within the section. ---------- versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:38:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Apr 2013 01:38:55 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <1365903535.72.0.0813124801856.issue17694@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch changes _PyUnicodeWriter_Init() API: it now only has one argument (the writer). Minimum length and overallocation must be configured using attributes. The problem with the old API was that it was not possible to configure minimum length and overallocation separatly. Disable overallocation in CJK decoders: only set the minimum length. Other changes: * Add min_char character to _PyUnicodeWriter. It is currenctly unused. Using _PyUnicodeWriter_Prepare(writer, 0, min_char) is different because it allocates immediatly the buffer, and calling _PyUnicodeWriter_Prepare() with size=0 is not supported (it does not widen the buffer if maxchar is bigger). * unicode_decode_call_errorhandler_writer() only enables overallocation if the replaced string is longer than 1 character * PyUnicode_DecodeRawUnicodeEscape() and _PyUnicode_DecodeUnicodeInternal() set minimum length instead of preallocating the whole buffer. It avoids the need of widen the buffer if the first written character is the biggest character. It also avoids an useless memory allocation if the decoder fails before the first write. * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow when computing the minimum length * _PyUnicodeWriter_Update() is now responsible to set size to zero if readonly is set The goal is to delay the first allocation until the first real write to be able to choose correctly the maximum character and the buffer size. If the buffer is allocated before the first write, even the first write must widen and/or enlarge the buffer. ---------- Added file: http://bugs.python.org/file29840/writer_minlen.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:41:55 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Apr 2013 01:41:55 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <1365903715.38.0.467432207114.issue17694@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't see how issue17694.patch can speedup Python because min_length is zero when overallocation is disabled. It may be noise of the benchmark script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:54:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Apr 2013 01:54:06 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <1365904446.45.0.202149644875.issue17694@psf.upfronthosting.co.za> STINNER Victor added the comment: PyUnicode_DecodeUnicodeEscape() should set writer.min_length instead of using _PyUnicodeWriter_Prepare(), but the following assertion fails (because writer.size is zero by default): assert(writer.pos < writer.size || (writer.pos == writer.size && c == '\n')); I don't understand this assertion, so I don't know how to modify it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 03:59:33 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Apr 2013 01:59:33 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <1365904773.75.0.999367303876.issue17694@psf.upfronthosting.co.za> STINNER Victor added the comment: PyUnicode_DecodeCharmap() still uses _PyUnicodeWriter_Prepare() (even with my patch). It may be interesting to benchmark min_length vs prepare. If min_length is not slower, it should be used instead of prepare to avoid widen the buffer if the first written character is non-ASCII, b'\x80'.decode('cp1252') for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 04:00:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 02:00:32 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <3ZpGJb4sg5zMBf@mail.python.org> Roundup Robot added the comment: New changeset faa5d705c27d by Meador Inge in branch '3.3': Issue #16804: Fix 'python -S -m site' failure. http://hg.python.org/cpython/rev/faa5d705c27d New changeset 8cbd8d8ac828 by Meador Inge in branch 'default': Issue #16804: Fix 'python -S -m site' failure. http://hg.python.org/cpython/rev/8cbd8d8ac828 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 04:01:50 2013 From: report at bugs.python.org (Meador Inge) Date: Sun, 14 Apr 2013 02:01:50 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1365904910.32.0.337351677739.issue16804@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 04:41:43 2013 From: report at bugs.python.org (David Wolever) Date: Sun, 14 Apr 2013 02:41:43 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365907303.27.0.818358042915.issue17701@psf.upfronthosting.co.za> Changes by David Wolever : Added file: http://bugs.python.org/file29841/53a0e908f787.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 04:42:43 2013 From: report at bugs.python.org (David Wolever) Date: Sun, 14 Apr 2013 02:42:43 +0000 Subject: [issue17701] Improving strftime documentation In-Reply-To: <1365725163.24.0.249924950016.issue17701@psf.upfronthosting.co.za> Message-ID: <1365907363.05.0.895590637025.issue17701@psf.upfronthosting.co.za> David Wolever added the comment: Fixed a misleading note about Unicode in localized formatters in file29841. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 06:01:45 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 14 Apr 2013 04:01:45 +0000 Subject: [issue17711] Persistent id in pickle with protocol version 0 In-Reply-To: <1365853309.55.0.468755952624.issue17711@psf.upfronthosting.co.za> Message-ID: <1365912105.04.0.585861667834.issue17711@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here's a patch that fix the bug. ---------- assignee: -> alexandre.vassalotti keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file29842/fix_bad_persid.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 07:03:39 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 14 Apr 2013 05:03:39 +0000 Subject: [issue10701] Error pickling a dict In-Reply-To: <1292338436.19.0.0995184249123.issue10701@psf.upfronthosting.co.za> Message-ID: <1365915819.59.0.234031679743.issue10701@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: The mutating __getstate__ is very likely the problem here. I've attached a small test case which shows the described behavior. We could fix this by always making a copy of any mutable container we want to iterate over to save its items. Performance-wise this solution is not very attractive. We are better off documenting this behavior as a limitation of __getstate__. ---------- Added file: http://bugs.python.org/file29843/issue10701.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 07:18:49 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 14 Apr 2013 05:18:49 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1365916729.2.0.110790882561.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: > Zachary, I suppose Modules/_operator.c is a rename of Modules/operator.c. > Could you generate your patch using "hg diff --git" so that history isn't lost here? Of course; I thought I already had, but apparently I messed that up a bit. v11 is in the proper format. In it, you can actually see what was changed in Modules/operator.c, which is the necessary s/operator/_operator/ changes, and a few extra commas removed from a couple of docstrings (to match the docstrings in the new Python versions). > See also http://docs.python.org/devguide/committing.html#minimal-configuration Thank you for that link! I had read through this some time ago, but either missed the part about the diff section, or it just didn't sink in or something. That is now added to my hg config file :) ---------- Added file: http://bugs.python.org/file29844/py_operator.v11.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 08:48:18 2013 From: report at bugs.python.org (paul j3) Date: Sun, 14 Apr 2013 06:48:18 +0000 Subject: [issue13922] argparse handling multiple "--" in args improperly In-Reply-To: <1328132556.72.0.92385645061.issue13922@psf.upfronthosting.co.za> Message-ID: <1365922098.42.0.046555317679.issue13922@psf.upfronthosting.co.za> paul j3 added the comment: This patch removes only one '--', the one that put a '-' in the 'arg_strings_pattern'. It does this in 'consume_positionals' right before calling 'take_action'. As before it does not do this if nargs is PARSER or REMAINDER. test_argparse.py has two DoubleDashRemoval cases, that attempt to highlight the changes from production (delete all --) and development (delete first -- in each positional group) versions. I have not made any changes to the documentation. All it says now is: "If you have positional arguments that must begin with - and don?t look like negative numbers, you can insert the pseudo-argument '--' which tells parse_args() that everything after that is a positional argument:" ---------- Added file: http://bugs.python.org/file29845/dbldash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 08:55:19 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 14 Apr 2013 06:55:19 +0000 Subject: [issue17720] pickle.py's load_appends should call append() on objects other than lists In-Reply-To: <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za> Message-ID: <1365922519.78.0.713871995455.issue17720@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Alright alright! Here's a less bogus patch. :) ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file29846/fix_loads_appends.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 09:09:27 2013 From: report at bugs.python.org (Kyle Simpson) Date: Sun, 14 Apr 2013 07:09:27 +0000 Subject: [issue17725] English mistake in Extending and Embedding Python doc page. Message-ID: <1365923367.93.0.414383739407.issue17725@psf.upfronthosting.co.za> New submission from Kyle Simpson: The second sentence in http://docs.python.org/3/extending/index.html says: Those modules can define new functions but also new object types and their methods. The word "but" doesn't make sense here. I suppose that the author meant to write: Those modules can not only define new functions but also new object types and their methods. ---------- assignee: docs at python components: Documentation messages: 186886 nosy: Kyle.Simpson, docs at python priority: normal severity: normal status: open title: English mistake in Extending and Embedding Python doc page. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 09:51:52 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Apr 2013 07:51:52 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1365925912.95.0.799491999036.issue17636@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for working through that Phillip - falling back to sys.modules when the expected attribute was missing is actually something I suggested as a possibility years ago, and Guido's response at the time was "If it was that easy, someone would have done it already". Your analysis is one of the pieces that was missing, along with Brett's insight that the code that needs the fallback is the IMPORT_FROM bytecode rather than the import implementation. I'm going to close the original circular import bug as being superseded by this one. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 09:53:25 2013 From: report at bugs.python.org (Kyle Simpson) Date: Sun, 14 Apr 2013 07:53:25 +0000 Subject: [issue17725] English mistake in Extending and Embedding Python doc page. In-Reply-To: <1365923367.93.0.414383739407.issue17725@psf.upfronthosting.co.za> Message-ID: <1365926005.15.0.305198044609.issue17725@psf.upfronthosting.co.za> Kyle Simpson added the comment: I have provided a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file29847/issue17725.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 09:59:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Apr 2013 07:59:21 +0000 Subject: [issue992389] attribute error due to circular import Message-ID: <1365926361.86.0.279407140478.issue992389@psf.upfronthosting.co.za> Nick Coghlan added the comment: The implementation of issue #17636 (making IMPORT_FROM fall back to sys.modules when appropriate) will make "import x.y" and "from x import y" equivalent for resolution purposes during import. That covers off the subset of circular references that we want to allow, so I'm closing this one in favour of the more precisely defined proposal. ---------- resolution: -> duplicate status: open -> closed superseder: -> Modify IMPORT_FROM to fallback on sys.modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:21:10 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Apr 2013 08:21:10 +0000 Subject: [issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case In-Reply-To: <1365869097.02.0.582677403017.issue17716@psf.upfronthosting.co.za> Message-ID: <1365927670.3.0.827187412278.issue17716@psf.upfronthosting.co.za> Nick Coghlan added the comment: The interpreter level problem covered by the current issue is that the difference between "import mypkg.module_a" and "from mypkg import module_a" is masking the fact that it is the original "import mypkg" that failed, and may still fail on the second and subsequent imports. That is, the user level code is at best dubious, but the interpreter is spitting out misleading error messages that obscure the real cause of the failure. In the tests for #17636, we should ensure that all of the following consistently raise RuntimeError when the import fails (on both the initial and subsequent import attempts): import badpkg.goodmod raise RuntimeError("Always fails") from badpkg import goodmod raise RuntimeError("Always fails") from . import goodmod raise RuntimeError("Always fails") Where that is the __init__.py code in the following layout: badpkg/ __init__.py goodmod.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:25:58 2013 From: report at bugs.python.org (Mike Hoy) Date: Sun, 14 Apr 2013 08:25:58 +0000 Subject: [issue17668] re.split loses characters matching ungrouped parts of a pattern In-Reply-To: <1365445138.49.0.018016443065.issue17668@psf.upfronthosting.co.za> Message-ID: <1365927958.3.0.547765491097.issue17668@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:26:43 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sun, 14 Apr 2013 08:26:43 +0000 Subject: [issue17726] faq/design: improve clarity Message-ID: <1365928003.07.0.655847572974.issue17726@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe: I puzzled a bit on what that sentence meant. ---------- assignee: docs at python components: Documentation files: diff messages: 186891 nosy: docs at python, tshepang priority: normal severity: normal status: open title: faq/design: improve clarity versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29848/diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:29:37 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Apr 2013 08:29:37 +0000 Subject: [issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case In-Reply-To: <1365869097.02.0.582677403017.issue17716@psf.upfronthosting.co.za> Message-ID: <1365928177.36.0.474296587917.issue17716@psf.upfronthosting.co.za> Nick Coghlan added the comment: More generally, I think we may have to revisit the question of what we remove from sys.modules on failure if, as a side effect of the import, a child module was imported successfully. In this situation, the possibilities are: 1. Remove the parent module, and all child modules. We don't currently do this because importing the child modules may have had side effects. However, I'm not sure this reasoning is sound, as the section of __init__.py before the failure may have had side effects too, and we don't let that stop us from removing the parent module. 2. Remove just the parent module. That's what we currently do, and it's a problem because we're knowingly breaking one of the import state invariants (i.e. if a non top-level module is present in sys.modules, then all parent modules in the chain can be assumed to also be in sys.modules) 3. Leave the partially initialised parent module in sys.modules as well. This would be a bad idea, since it would lead to very inconsistent behaviour as to whether or not the parent module was left in sys.modules based on the contents of __init__.py To be honest, I think purging the entire subtree (option 1 above) would be better than what we do now - breaking state invariants is bad, because it can lead to surprising errors a long way from the actual source of the problem. ---------- versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:31:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 08:31:08 +0000 Subject: [issue17726] faq/design: improve clarity In-Reply-To: <1365928003.07.0.655847572974.issue17726@psf.upfronthosting.co.za> Message-ID: <3ZpQzH3GfGzQMn@mail.python.org> Roundup Robot added the comment: New changeset ab35b5e81317 by Georg Brandl in branch '2.7': Closes #17726: small clarification in design FAQ. http://hg.python.org/cpython/rev/ab35b5e81317 New changeset f6fdf3457f74 by Georg Brandl in branch '3.3': Closes #17726: small clarification in design FAQ. http://hg.python.org/cpython/rev/f6fdf3457f74 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:33:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Apr 2013 08:33:29 +0000 Subject: [issue17711] Persistent id in pickle with protocol version 0 In-Reply-To: <1365853309.55.0.468755952624.issue17711@psf.upfronthosting.co.za> Message-ID: <1365928409.03.0.120241329226.issue17711@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think a string with character codes < 256 will be better for test_protocol0_is_ascii_only(). It can be latin1 encoded (Python 2 allows any 8-bit strings). PyUnicode_AsASCIIString() can be slower than _PyUnicode_AsStringAndSize() (actually PyUnicode_AsUTF8AndSize()) because the latter can use cached value. You can check if the persistent id only contains ASCII characters by checking PyUnicode_GET_LENGTH(pid_str) == size. And what are you going to do with the fact that in Python 2 you can pickle non-ascii persistent ids, which will not be able to unpickle in Python 3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:35:37 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 14 Apr 2013 08:35:37 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <1365928537.64.0.268035149523.issue17661@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:35:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 08:35:43 +0000 Subject: [issue17661] documentation of '%r' links to the wrong repr In-Reply-To: <1365424358.04.0.0999956639688.issue17661@psf.upfronthosting.co.za> Message-ID: <3ZpR4Z3J8GzRXH@mail.python.org> Roundup Robot added the comment: New changeset dd5e7aef4d5b by Georg Brandl in branch '2.7': Closes #17661: fix references to repr() going to module repr. http://hg.python.org/cpython/rev/dd5e7aef4d5b ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:43:34 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 14 Apr 2013 08:43:34 +0000 Subject: [issue17727] document that some distributions change site.py defaults Message-ID: <1365929014.79.0.72904930991.issue17727@psf.upfronthosting.co.za> New submission from Georg Brandl: >From the docs@ list: """ Dear all, the first paragraph of the documentation for the site module states that site.py constructs four directories using a head and tail part, and that one of the tail parts would be lib/pythonX.Y/site-packages on UNIX/Mac. However, in my Python 3.2 installation on Ubuntu 12.04 this is actually lib/python3/dist-packages (so no .Y and a different subdirectory) ! This is also stated in the module?s doc string. I don?t know why the Python documentation says something else, but that should be fixed. """ Attached a patch to explain why the defaults may look different on some distributions. Please review. ---------- assignee: docs at python components: Documentation files: site-patch.diff keywords: patch messages: 186897 nosy: barry, docs at python, doko, georg.brandl priority: normal severity: normal stage: patch review status: open title: document that some distributions change site.py defaults type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29849/site-patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 10:51:55 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Apr 2013 08:51:55 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365929515.72.0.482175492353.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I want to see both algorithms to be similar so far as it is possible. It might be worth extract and reuse a common code. Mercurial's code looks far more optimal (for example a85encode has a quadratic complexity in result accumulating). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 11:16:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 09:16:27 +0000 Subject: [issue13638] PyErr_SetFromErrnoWithFilenameObject is undocumented In-Reply-To: <1324312876.6.0.318234215993.issue13638@psf.upfronthosting.co.za> Message-ID: <3ZpRzb0QlFzNgb@mail.python.org> Roundup Robot added the comment: New changeset 4cc94d30926f by Georg Brandl in branch '2.7': Closes #13638: document PyErr_SetFromErrnoWithFilenameObject, http://hg.python.org/cpython/rev/4cc94d30926f New changeset ee848457930f by Georg Brandl in branch '3.3': Closes #13638: document PyErr_SetFromErrnoWithFilenameObject, http://hg.python.org/cpython/rev/ee848457930f ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 11:40:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 09:40:09 +0000 Subject: [issue14462] In re's named group the name cannot contain unicode characters In-Reply-To: <1333268208.65.0.802050679023.issue14462@psf.upfronthosting.co.za> Message-ID: <3ZpSVx0jZfzPTH@mail.python.org> Roundup Robot added the comment: New changeset 2fa27a3818a2 by Georg Brandl in branch '3.3': Closes #14462: allow any valid Python identifier in sre group names, as documented. http://hg.python.org/cpython/rev/2fa27a3818a2 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 11:59:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 09:59:05 +0000 Subject: [issue3056] Simplify the Integral ABC In-Reply-To: <1212803845.73.0.399511532431.issue3056@psf.upfronthosting.co.za> Message-ID: <3ZpSwm48WJzP3l@mail.python.org> Roundup Robot added the comment: New changeset 4678259af5a4 by Georg Brandl in branch '2.7': The Integral class does not contain implementations for the bit-shifting operations. (See #3056.) http://hg.python.org/cpython/rev/4678259af5a4 New changeset 1d4ba14cc505 by Georg Brandl in branch '3.3': The Integral class does not contain implementations for the bit-shifting operations. (See #3056.) http://hg.python.org/cpython/rev/1d4ba14cc505 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 12:07:44 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 14 Apr 2013 10:07:44 +0000 Subject: [issue17728] format() default precisions undocumented Message-ID: <1365934064.51.0.124560833588.issue17728@psf.upfronthosting.co.za> New submission from Georg Brandl: The docs for % formatting say what the default precision for presentation types e, f, g is. I couldn't find the same for format(). ---------- assignee: eric.smith components: Documentation messages: 186902 nosy: eric.smith, georg.brandl priority: normal severity: normal status: open title: format() default precisions undocumented versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 12:24:39 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 14 Apr 2013 10:24:39 +0000 Subject: [issue17729] advocacy howto improvements Message-ID: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> New submission from Georg Brandl: >From docs@: """ The howto-advocacy is interesting. You might consider removing the following sentences, which I found personally gave me a negative impression: "python hasn't had all the publicity" to my mind gives the impression that python is not popular. "python is definitely not a toy language that only usable for small tasks". This gives to me the impression that you feel many people think it is. Section "who's going to support it?" a company needs to be able to call someone, pay for support right now, within one hour, not on a maybe basis. I feel either remove this section or suggest links to three companies providing python support. Section "python is freely available , how good can it be?" I felt what I wanted to see was not that Linux and apache are good, but why python is good. """ I think the advocacy howto was written quite a while ago and could use a makeover. ---------- assignee: docs at python components: Documentation messages: 186903 nosy: akuchling, docs at python, georg.brandl priority: normal severity: normal status: open title: advocacy howto improvements versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 12:30:05 2013 From: report at bugs.python.org (Matthias Klose) Date: Sun, 14 Apr 2013 10:30:05 +0000 Subject: [issue17727] document that some distributions change site.py defaults In-Reply-To: <1365929014.79.0.72904930991.issue17727@psf.upfronthosting.co.za> Message-ID: <1365935405.91.0.650038320955.issue17727@psf.upfronthosting.co.za> Matthias Klose added the comment: the local patch adds as documentation on Debian/Ubuntu: """ For Debian and derivatives, this sys.path is augmented with directories for packages distributed within the distribution. Local addons go into /usr/local/lib/python/dist-packages, Debian addons install into /usr/lib/python3/dist-packages. /usr/lib/python/site-packages is not used. """ I can improve the local information, but I'm not sure how much should be added/changed in the upstream documentation. So maybe we should add an option for python-config to get the site dirs, or the list of site dirs too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 12:31:29 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 14 Apr 2013 10:31:29 +0000 Subject: [issue13050] RLock support the context manager protocol but this is not documented In-Reply-To: <1318172715.77.0.360303466185.issue13050@psf.upfronthosting.co.za> Message-ID: <1365935489.73.0.967017456606.issue13050@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, closing. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 12:38:06 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 10:38:06 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation In-Reply-To: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> Message-ID: <3ZpTnn6h4hzRCy@mail.python.org> Roundup Robot added the comment: New changeset 3dff836cedef by Serhiy Storchaka in branch 'default': Closes #16551. Cleanup pickle.py. http://hg.python.org/cpython/rev/3dff836cedef ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 12:45:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 10:45:22 +0000 Subject: [issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned In-Reply-To: <1353845836.76.0.0245039537422.issue16550@psf.upfronthosting.co.za> Message-ID: <3ZpTy95RHrzRM6@mail.python.org> Roundup Robot added the comment: New changeset 4ced30417300 by Alexandre Vassalotti in branch '3.3': Issue #16550: Update the opcode descriptions of pickletools to use unsigned http://hg.python.org/cpython/rev/4ced30417300 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 12:46:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 10:46:52 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <3ZpTzv6PG3zNlW@mail.python.org> Roundup Robot added the comment: New changeset adc72ff451dc by R David Murray in branch 'default': #2118: IOError is deprecated, use OSError. http://hg.python.org/cpython/rev/adc72ff451dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 12:54:38 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Apr 2013 10:54:38 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1365936878.12.0.890849145758.issue15301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Mark. There is only one question. For what version is it appropriate? Only for 3.4 or for all maintained? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 13:09:10 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 14 Apr 2013 11:09:10 +0000 Subject: [issue17413] format_exception() breaks on exception tuples from trace function In-Reply-To: <1363222594.63.0.566610526845.issue17413@psf.upfronthosting.co.za> Message-ID: <1365937750.67.0.908822754413.issue17413@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks Ingrid and Mark. The patch looks good; I put a couple of FYI comments on the review. I'm pretty sure this patch is correct, but I'd like someone with more experience modifying the ceval loop to confirm, so I'm nosying Benjamin. ---------- nosy: +benjamin.peterson stage: needs patch -> commit review versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 13:21:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 11:21:01 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <3ZpVlK22pJzP7t@mail.python.org> Roundup Robot added the comment: New changeset 1494daf809c1 by Vinay Sajip in branch 'default': Closes #17713: Fixed bug in test_compute_rollover_weekly_attime. http://hg.python.org/cpython/rev/1494daf809c1 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 13:25:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 11:25:39 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <3ZpVrf3sMszRWR@mail.python.org> Roundup Robot added the comment: New changeset efda51b85b31 by Vinay Sajip in branch 'default': Issue #17713: additional tweak to test. http://hg.python.org/cpython/rev/efda51b85b31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 13:30:27 2013 From: report at bugs.python.org (Larry Hastings) Date: Sun, 14 Apr 2013 11:30:27 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1365939026.99.0.513886324942.issue15301@psf.upfronthosting.co.za> Larry Hastings added the comment: Oh...! Serhiy, I thought you already checked in the AsIndex stuff. Guess I was asleep at the switch. Certainly the patch should go in for trunk. I'd be comfortable with it going in for 3.3 as a bugfix but that's ultimately Georg's call. I'll give you a comment or two on the diff. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 13:40:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Apr 2013 11:40:55 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1365939655.95.0.217383954839.issue17703@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 13:48:37 2013 From: report at bugs.python.org (Drekin) Date: Sun, 14 Apr 2013 11:48:37 +0000 Subject: [issue17730] code.interact() doesn't support no banner Message-ID: <1365940117.84.0.770011673155.issue17730@psf.upfronthosting.co.za> New submission from Drekin: Currently, there is no way to run code.interact without a banner ? empty string still means to print an empty line. If I want that behaviour, I must subclass code.InteractiveConsole and reimplement whole .interact method including the repl logic just not to print a banner. Maybe there should be .print_banner method for this. ---------- components: Library (Lib) messages: 186914 nosy: Drekin priority: normal severity: normal status: open title: code.interact() doesn't support no banner type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 13:59:43 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 14 Apr 2013 11:59:43 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365789615.27.0.631490303011.issue17703@psf.upfronthosting.co.za> Message-ID: <516A9A2D.2030902@egenix.com> Marc-Andre Lemburg added the comment: On 12.04.2013 20:00, Antoine Pitrou wrote: > > Marc-Andr?, does this patch work for you? > > Added file: http://bugs.python.org/file29791/tstate_trashcan.patch Thanks, Antoine. I can try this tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 14:04:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Apr 2013 12:04:53 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1365941093.94.0.154548199052.issue16694@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you! One optional thing, the code churn could be minimized in test_operator.py by writing "operator = self.module" at the beginning of each test method. Otherwise, looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 15:01:22 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 13:01:22 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <3ZpXz50w6KzR5M@mail.python.org> Roundup Robot added the comment: New changeset c40b50d65a00 by Nick Coghlan in branch '3.3': Close issue #16163: handle submodules in pkgutil.iter_importers http://hg.python.org/cpython/rev/c40b50d65a00 New changeset 3bb5a8a4830e by Nick Coghlan in branch 'default': Merge fix for #16163 from 3.3 http://hg.python.org/cpython/rev/3bb5a8a4830e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 15:02:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 14 Apr 2013 13:02:13 +0000 Subject: [issue16163] Wrong name in Lib/pkgutil.py:iter_importers In-Reply-To: <1349697246.97.0.772309039282.issue16163@psf.upfronthosting.co.za> Message-ID: <1365944533.33.0.132845111547.issue16163@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 Apr 14 15:21:01 2013 From: report at bugs.python.org (Mike Milkin) Date: Sun, 14 Apr 2013 13:21:01 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1365945661.03.0.204045197763.issue9682@psf.upfronthosting.co.za> Mike Milkin added the comment: I did not mean to take the decode out of the previos patch. Sorry for the spam. ---------- Added file: http://bugs.python.org/file29850/Issue9682-full.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 15:21:38 2013 From: report at bugs.python.org (Mike Milkin) Date: Sun, 14 Apr 2013 13:21:38 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1365945698.11.0.122827085478.issue9682@psf.upfronthosting.co.za> Changes by Mike Milkin : Removed file: http://bugs.python.org/file29834/Issue9682-full.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 15:26:44 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 14 Apr 2013 13:26:44 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1365946004.01.0.746457557738.issue17703@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes, let's not break thing in point releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 15:59:41 2013 From: report at bugs.python.org (Daniel Urban) Date: Sun, 14 Apr 2013 13:59:41 +0000 Subject: [issue17044] Implement PEP 422: Simple class initialisation hook In-Reply-To: <1359235758.38.0.556194565574.issue17044@psf.upfronthosting.co.za> Message-ID: <1365947981.71.0.761273559592.issue17044@psf.upfronthosting.co.za> Daniel Urban added the comment: I've attached a new patch. With this patch, type.__prepare__ has an optional keyword-only argument 'namespace', and returns it if it's specified. Also, __init_class__ is passed an argument: a mapping proxy of the mapping originally returned by __prepare__. > Would it make sense to have the signature of __init_class__ parallel > meta.__init__() I don't think so, because some of the arguments (name, bases) would be mostly useless, others would have a different meaning (namespace). Although, passing the keyword arguments from the class header might make some sense ... I'm not sure. If everybody agrees with these changes, I'll create a patch for the PEP too. ---------- Added file: http://bugs.python.org/file29851/pep422_6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 16:28:38 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Apr 2013 14:28:38 +0000 Subject: [issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs In-Reply-To: <1346871274.13.0.653364801762.issue15866@psf.upfronthosting.co.za> Message-ID: <1365949718.48.0.795493208532.issue15866@psf.upfronthosting.co.za> STINNER Victor added the comment: Should we really invest time to fix bugs related to astral (non-BMP) characters with rare codecs and error handlers (CJK codecs, xmlcharrefreplace error handler)? Python 3.3 is released and has a much better support of astral characters (in many places). I don't know for CJK codecs: Python 3.3 still uses the legacy Unicode API for CJK codecs and so depend on the wchar_t type (which is 16 bits on Windows). I just fixed Python 3.4 to use the new Unicode API (PEP 393), which always support astral characters support and don't depend on the size of the wchar_t type. I'm not against fixing Python 2.7, I'm just not interested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 16:34:58 2013 From: report at bugs.python.org (Phillip J. Eby) Date: Sun, 14 Apr 2013 14:34:58 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365925912.95.0.799491999036.issue17636@psf.upfronthosting.co.za> Message-ID: Phillip J. Eby added the comment: On Sun, Apr 14, 2013 at 3:51 AM, Nick Coghlan wrote: > Your analysis is one of the pieces that was missing, Unfortunately, I just noticed it's actually incorrect in a pretty important part In my original example, I said, "because of the circularity, this will *also* happen if you import 'a' first." This statement is actually false. Importing 'a' first in that example will result in a.util == b.util:util, not a.util=b.util. I made the mistake because I was for some reason thinking that 'a' was going to execute its import while being imported from b.util, and in that scenario it will not. That means there *is* an ordering dependency, and an ambiguity like this one can lie dormant until long after you've introduced the circularity. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 16:44:00 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 14:44:00 +0000 Subject: [issue17702] os.environ converts key type from string to bytes in KeyError exception In-Reply-To: <1365726971.44.0.005141093776.issue17702@psf.upfronthosting.co.za> Message-ID: <3ZpbFW3hzzzPGN@mail.python.org> Roundup Robot added the comment: New changeset 72df981e83d3 by Victor Stinner in branch '3.3': Close #17702: os.environ now raises KeyError with the original environment http://hg.python.org/cpython/rev/72df981e83d3 New changeset ea54559a4442 by Victor Stinner in branch 'default': (Merge 3.3) Close #17702: os.environ now raises KeyError with the original http://hg.python.org/cpython/rev/ea54559a4442 New changeset b0c002fa4335 by Victor Stinner in branch '3.3': Issue #17702: use assertRaises() for the unit test http://hg.python.org/cpython/rev/b0c002fa4335 New changeset cc6c5b5ec4f2 by Victor Stinner in branch 'default': (Merge 3.3) Issue #17702: use assertRaises() for the unit test http://hg.python.org/cpython/rev/cc6c5b5ec4f2 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 17:51:49 2013 From: report at bugs.python.org (Martin Morrison) Date: Sun, 14 Apr 2013 15:51:49 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365954709.66.0.264048565306.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: I've updated the Ascii85 algorithms to remove the quadratic complexity, and use a single struct.pack/unpack. They should now be much quicker for large input strings. It's difficult to factor out commonality with b85* because the encodings and rules differ. This is especially true for decode (where Ascii85 allows arbitrary whitespace, so it either has to be stepped through as I've implemented it, or it would have to first be sanitised with .replace() or similar, which is expensive for large inputs). For encode, the special cases supported by Ascii85 make it impossible to *just* use a lookup table, and the simplified algorithm for encoding means it isn't necessary to use one at all. I also wanted to keep the Mercurial code intact as much as possible, so it can be kept in sync in future if necessary. My notes from the previous diff also still apply if anyone has thoughts on those. ---------- Added file: http://bugs.python.org/file29852/issue17618-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 17:59:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 15:59:50 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <3Zpcx10mLGzR7W@mail.python.org> Roundup Robot added the comment: New changeset dbb943399c9b by Serhiy Storchaka in branch '2.7': Issue #17221: Resort Misc/NEWS. http://hg.python.org/cpython/rev/dbb943399c9b New changeset 7da08495b497 by Serhiy Storchaka in branch '3.3': Issue #17221: Resort Misc/NEWS. http://hg.python.org/cpython/rev/7da08495b497 New changeset 6fdcea9e89a3 by Serhiy Storchaka in branch 'default': Issue #17221: Resort Misc/NEWS. http://hg.python.org/cpython/rev/6fdcea9e89a3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 18:12:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Apr 2013 16:12:27 +0000 Subject: [issue17221] Resort Misc/NEWS In-Reply-To: <1361135741.75.0.253129131493.issue17221@psf.upfronthosting.co.za> Message-ID: <1365955947.94.0.965708852831.issue17221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I commit patches since no one objected. Not all errors are corrected. There are duplicates (`cat Misc/NEWS | sort | uniq -cd | sort -n`). I'm not sure that the line "What's New in Python 3.3.1 release candidate 1?" in Misc/NEWS for 3.4 correct. The difference between 3.3 and 3.4 is more than expected (`hg diff -r 3.3 -r default Misc/NEWS`). ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 18:17:32 2013 From: report at bugs.python.org (Yael) Date: Sun, 14 Apr 2013 16:17:32 +0000 Subject: [issue995907] memory leak with threads and enhancement of the timer class Message-ID: <1365956252.11.0.202607647893.issue995907@psf.upfronthosting.co.za> Yael added the comment: Added a class Threading.TimerPool. This new class spawns one thread, and that thread is running as long as there are active timers. ---------- keywords: +patch Added file: http://bugs.python.org/file29853/mywork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 18:51:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 16:51:53 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1361306836.21.0.240059339462.issue17244@psf.upfronthosting.co.za> Message-ID: <3Zpf544hMQzRTY@mail.python.org> Roundup Robot added the comment: New changeset 04aaeae6ee7b by Brett Cannon in branch 'default': Issue #17244: Don't mask exceptions raised during the creation of http://hg.python.org/cpython/rev/04aaeae6ee7b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 18:52:25 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 14 Apr 2013 16:52:25 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1361306836.21.0.240059339462.issue17244@psf.upfronthosting.co.za> Message-ID: <1365958345.9.0.314345066052.issue17244@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 Sun Apr 14 19:07:13 2013 From: report at bugs.python.org (Mike Milkin) Date: Sun, 14 Apr 2013 17:07:13 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1365959233.45.0.655592775319.issue17353@psf.upfronthosting.co.za> Mike Milkin added the comment: Looks like plistlib.writePlistToString is no loger in the plistlib. ---------- nosy: +mmilkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:09:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 17:09:50 +0000 Subject: [issue17341] Poor error message when compiling invalid regex In-Reply-To: <1362318975.95.0.685473127287.issue17341@psf.upfronthosting.co.za> Message-ID: <3ZpfTn6WvGzMZM@mail.python.org> Roundup Robot added the comment: New changeset 65db865c0851 by R David Murray in branch '3.3': #17341: Include name in re error message about invalid group name. http://hg.python.org/cpython/rev/65db865c0851 New changeset 227fed7a05d4 by R David Murray in branch 'default': Merge #17341: Include name in re error message about invalid group name. http://hg.python.org/cpython/rev/227fed7a05d4 New changeset bbb3aa45b4ea by R David Murray in branch '2.7': #17341: Include name in re error message about invalid group name. http://hg.python.org/cpython/rev/bbb3aa45b4ea ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:13:33 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 14 Apr 2013 17:13:33 +0000 Subject: [issue17341] Poor error message when compiling invalid regex In-Reply-To: <1362318975.95.0.685473127287.issue17341@psf.upfronthosting.co.za> Message-ID: <1365959613.22.0.540789748273.issue17341@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks Jason. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:31:40 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Apr 2013 17:31:40 +0000 Subject: [issue17693] Use _PyUnicodeWriter API for CJK decoders In-Reply-To: <1365637855.94.0.450867352057.issue17693@psf.upfronthosting.co.za> Message-ID: <3Zpfyy6rbqzNfv@mail.python.org> Roundup Robot added the comment: New changeset ffd4b72f7f95 by Victor Stinner in branch 'default': Issue #17693: Fix memory/reference leaks http://hg.python.org/cpython/rev/ffd4b72f7f95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:36:26 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Apr 2013 17:36:26 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1365960986.07.0.131028751272.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hi and thanks for the patch! > I named the Mercurial base85 implementation functions with the "b85" > prefix. For the Ascii85 ones, I used "a85". I considered overloading > the same functions with a keyword argument to select which encoding, > but rejected that. Thoughts? I agree, it's better like this. > I haven't made the changes to add a pure Python binascii module as > suggested in msg186216. Although poorly named, "base64.py" already contains > a number of other encodings, so this seemed the best place for these too. Yes, I think it's ok. I was thinking about binascii in the context of making a C version, but we can refactor things later anyway. Now about the patch: I haven't read it in detail, but it seems to lack tests for b85decode and b85encode. It should be easy enough to get some test values by calling Mercurial's version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:37:30 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Apr 2013 17:37:30 +0000 Subject: [issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs In-Reply-To: <1346871274.13.0.653364801762.issue15866@psf.upfronthosting.co.za> Message-ID: <1365961050.39.0.338495927247.issue15866@psf.upfronthosting.co.za> Ezio Melotti added the comment: I tend to agree with Victor: if you want to fix 2.7 go ahead, but if that's too much work it's OK with me to close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:40:29 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 14 Apr 2013 17:40:29 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1365961229.79.0.611289338929.issue10438@psf.upfronthosting.co.za> R. David Murray added the comment: After a discussion (at the Boston Python sprint, unfortunately I forget with who) of how difficult this could be to explain succinctly without confusing either java/C++ programmers on the one hand or Python programmers on the other hand, this, the wording in the attached patch occurred to me. I'm not certain that adding the extra words is worth it, but if so this might do. ---------- keywords: +patch Added file: http://bugs.python.org/file29854/static_method_call_examples_10438.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:51:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Apr 2013 17:51:29 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1365961888.99.0.57311746796.issue13510@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would actually remove the whole section about readlines() or possibly just mention it briefly (something like "If you want to read all the lines of a file in a list you can also use f.readlines().") The sizehint arg is rarely used, so I don't see the point of going in such details about it in the tutorial. In Lib/, there are only a couple of places where it's actually used: Lib/fileinput.py:358: self._buffer = self._file.readlines(self._bufsize) Lib/idlelib/GrepDialog.py:90: block = f.readlines(100000) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:52:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Apr 2013 17:52:46 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1365961888.99.0.57311746796.issue13510@psf.upfronthosting.co.za> Message-ID: <1365961964.2427.2.camel@fsol> Antoine Pitrou added the comment: > I would actually remove the whole section about readlines() or > possibly just mention it briefly (something like "If you want to read > all the lines of a file in a list you can also use f.readlines().") > The sizehint arg is rarely used, so I don't see the point of going in > such details about it in the tutorial. You are right, Ezio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:52:55 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 14 Apr 2013 17:52:55 +0000 Subject: [issue17731] test_iter_importers intermittent failure in test_pkgutil Message-ID: <1365961975.09.0.567055243786.issue17731@psf.upfronthosting.co.za> New submission from R. David Murray: A buildbot produced the following traceback, but the test passed when re-run. http://buildbot.python.org/all/builders/x86%20Gentoo%203.3/builds/630/steps/test/logs/stdio test_loader_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok ====================================================================== ERROR: test_iter_importers (test.test_pkgutil.ExtendPathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 1521, 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.3.murray-gentoo/build/Lib/test/test_pkgutil.py", line 206, in test_iter_importers importlib.import_module(fullname) File "/var/lib/buildslave/3.3.murray-gentoo/build/Lib/importlib/__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1586, in _gcd_import File "", line 1567, in _find_and_load File "", line 1524, in _find_and_load_unlocked ImportError: No module named 'spam.eggs'; spam is not a package During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/lib/buildslave/3.3.murray-gentoo/build/Lib/test/test_pkgutil.py", line 226, in test_iter_importers del sys.modules['spam.eggs'] KeyError: 'spam.eggs' ---------- keywords: buildbot messages: 186938 nosy: ncoghlan, r.david.murray priority: normal severity: normal status: open title: test_iter_importers intermittent failure in test_pkgutil type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:57:59 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Apr 2013 17:57:59 +0000 Subject: [issue17731] test_iter_importers intermittent failure in test_pkgutil In-Reply-To: <1365961975.09.0.567055243786.issue17731@psf.upfronthosting.co.za> Message-ID: <1365962279.95.0.390243166426.issue17731@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is related to #16163. Other buildbots failed too, e.g.: http://buildbot.python.org/all/builders/x86%20RHEL%206%203.3/builds/501 http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/4128 http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.3/builds/648 ---------- nosy: +berker.peksag, ezio.melotti stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 19:59:47 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Apr 2013 17:59:47 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1365962387.45.0.366573739976.issue13510@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree with removing .readlines section. If .readlines did not exist, I do not think we would add it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 20:06:12 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 14 Apr 2013 18:06:12 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1365962772.12.0.636892064821.issue17353@psf.upfronthosting.co.za> Ezio Melotti added the comment: On 3.x it's called writePlistToBytes, and it seems to have the same issue. ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 20:10:32 2013 From: report at bugs.python.org (Nick Sloan) Date: Sun, 14 Apr 2013 18:10:32 +0000 Subject: [issue17732] distutils.cfg Can Break venv Message-ID: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> New submission from Nick Sloan: When distutils.cfg defines an install-lib, it will be used within virtual environments created using venv as well, which makes it impossible to install things with setup.py or similar. Steps to reproduce: Create a distutils.cfg file and set a value for install-lib. Create a virtual environment: $pyvenv myvenv Activate that environment: $source myvenv/bin/activate Attempt to install something: $python distribute_setup.py It will attempt to install in the lib-install directory, and should fail with an error that the directory is not on the python path. This issue affects python3 from the mac homebrew project, which bundles a distutil.cfg, thus breaking pyvenv by default. ---------- assignee: eric.araujo components: Distutils messages: 186942 nosy: eric.araujo, nicksloan, tarek priority: normal severity: normal status: open title: distutils.cfg Can Break venv type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 20:41:56 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Apr 2013 18:41:56 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1365964916.49.0.732843528418.issue17732@psf.upfronthosting.co.za> ?ric Araujo added the comment: There is a --no-user-cfg option to disable reading ~/.pydistutils.cfg, but I don?t recall an option to ignore the global config. How does virtualenv avoid this problem, if it does? ---------- assignee: eric.araujo -> vinay.sajip components: +Library (Lib) -Distutils nosy: +carljm, vinay.sajip versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 20:44:19 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Apr 2013 18:44:19 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1365965059.26.0.330866662754.issue10438@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 20:57:31 2013 From: report at bugs.python.org (Mike Milkin) Date: Sun, 14 Apr 2013 18:57:31 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1365965851.01.0.17860180466.issue17353@psf.upfronthosting.co.za> Mike Milkin added the comment: Yep you are correct. >>> plistlib.readPlistFromBytes(plistlib.writePlistToBytes([[[[[[[[{'test': plistlib.Data(b'aaaaaa')}]]]]]]]])) [[[[[[[[{'test': Data(b'aaaaaa')}]]]]]]]] >>> plistlib.readPlistFromBytes(plistlib.writePlistToBytes([[[[[[[[[{'test': plistlib.Data(b'aaaaaa')}]]]]]]]]])) [[[[[[[[[{'test': Data(b'')}]]]]]]]]] I presume we want to raise a ValueError if the indentation is more than the maximal line length. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 21:01:10 2013 From: report at bugs.python.org (Nick Sloan) Date: Sun, 14 Apr 2013 19:01:10 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1365966070.76.0.527300445942.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: It looks like virtualenv includes an empty distutils.cfg at myvirtualenv/lib/python3.3/distutils/distutils.cfg. Most of myvirtualenv/lib/python3.3 is just symlinked to the base python version, but myvirtualenv/lib/python3.3/distutils/ is not, and I bet this is exactly why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 21:16:28 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 14 Apr 2013 19:16:28 +0000 Subject: [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1365966988.58.0.145585340729.issue10438@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Note that in Python 3 you can also do __class__.f() in a staticmethod. Not sure if that is encouraged though. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 21:37:13 2013 From: report at bugs.python.org (Pascal Chambon) Date: Sun, 14 Apr 2013 19:37:13 +0000 Subject: [issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case In-Reply-To: <1365869097.02.0.582677403017.issue17716@psf.upfronthosting.co.za> Message-ID: <1365968233.36.0.535429350175.issue17716@psf.upfronthosting.co.za> Pascal Chambon added the comment: Thanks for the feedback, I'm gonna read those docs and related issues asap, and check that planned evolutions will actually fix this. just as a side note in the meantime: I dont think that the problem here is the "purge " of sys.modules, the failure is actually located in the semantic difference between the two forms of import statements, that should basically behave the same but do not (hance the interest of these related issues noted above). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 21:37:37 2013 From: report at bugs.python.org (David Lam) Date: Sun, 14 Apr 2013 19:37:37 +0000 Subject: [issue16954] Add docstrings for ElementTree module In-Reply-To: <1358090813.12.0.93631082121.issue16954@psf.upfronthosting.co.za> Message-ID: <1365968257.38.0.338332630582.issue16954@psf.upfronthosting.co.za> David Lam added the comment: Hi Eli, I sure would! (Though, if anyone finds this issue and can figure out a solution, I'd encourage them to post it!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 22:13:05 2013 From: report at bugs.python.org (dspublic@freemail.hu) Date: Sun, 14 Apr 2013 20:13:05 +0000 Subject: [issue17575] HTTPConnection.send In-Reply-To: <1364574303.8.0.198870267113.issue17575@psf.upfronthosting.co.za> Message-ID: <1365970385.01.0.927220475906.issue17575@psf.upfronthosting.co.za> dspublic at freemail.hu added the comment: Thank you Stephen.Tu for information. I think so, the "return" has been found ;-) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 22:38:51 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 14 Apr 2013 20:38:51 +0000 Subject: [issue17135] imp doc should direct to importlib In-Reply-To: <1360080581.61.0.501686856177.issue17135@psf.upfronthosting.co.za> Message-ID: <1365971931.43.0.912014031184.issue17135@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Kristian. The 3.x docs were a "fresh start", so if we want to mark something as deprecated it would be a Python3 version number, the number current at the time of the deprecation. There is another open issue, 17177, that speaks specifically about deprecating the module, but it sounds like a documentation deprecation to start with is a good idea; I believe that at this point all the imp functions can be replicated with suitable importlib calls (Eric can correct me if I'm wrong). It would thus be as of version 3.4, at this point, since we didn't do it before the 3.3 release. This issue also mentions linking to "importlib instead of the import statement", which refers to the ':keyword:`import`' statement in the title. Do you want to resubmit the patch with those changes? Otherwise I can just make them when I commit it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:19:32 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 14 Apr 2013 21:19:32 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365974372.51.0.0448336581565.issue17707@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch including a unittest is in attachment. ---------- keywords: +patch Added file: http://bugs.python.org/file29855/issue17707.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:21:39 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 14 Apr 2013 21:21:39 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365974499.34.0.520943225299.issue17707@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : Removed file: http://bugs.python.org/file29855/issue17707.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:21:47 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 14 Apr 2013 21:21:47 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365974507.38.0.466982302354.issue17707@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : Added file: http://bugs.python.org/file29856/issue17707.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:26:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Apr 2013 21:26:56 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365974816.89.0.899617505469.issue17707@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Your test is much too strict (and I don't understand why you're using a Decimal). I think testing that the delta is greater or equal than 0.2 would be enough. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:26:59 2013 From: report at bugs.python.org (Ankur Ankan) Date: Sun, 14 Apr 2013 21:26:59 +0000 Subject: [issue17733] Unit tests for RFC 2231 parsing code Message-ID: <1365974819.78.0.85095518093.issue17733@psf.upfronthosting.co.za> Changes by Ankur Ankan : ---------- components: Tests nosy: Ankur.Ankan, r.david.murray priority: normal severity: normal status: open title: Unit tests for RFC 2231 parsing code type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:29:13 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 14 Apr 2013 21:29:13 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365974953.9.0.670079047623.issue17707@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yeah, right. Too strict indeed. I'll get rid of the assertLessEqual statement. Here's why Decimal is necessary: >>> import time >>> time.time() - time.time() -9.5367431640625e-07 >>> from decimal import Decimal >>> Decimal(time.time()) - Decimal(time.time()) Decimal('-0.000069141387939453125') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:32:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Apr 2013 21:32:37 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365975157.75.0.920173837257.issue17707@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't understand what you're worrying about here. This is just because of evaluation order: >>> import itertools >>> it = itertools.count() >>> f = it.__next__ >>> f() - f() -1 >>> f() - f() -1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:39:48 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 14 Apr 2013 21:39:48 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365975588.32.0.519035188814.issue17707@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Without using Decimal and without patching connections.py (hence q.get() returns immediately) the resulting delta is mismatched: ====================================================================== FAIL: test_timeout (__main__.WithProcessesTestQueue) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_multiprocessing.py", line 708, in test_timeout self.assertGreaterEqual(delta, 0.19) AssertionError: 9.107589721679688e-05 not greater than or equal to 0.19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:41:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Apr 2013 21:41:07 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365975588.32.0.519035188814.issue17707@psf.upfronthosting.co.za> Message-ID: <1365975665.2459.0.camel@fsol> Antoine Pitrou added the comment: > Without using Decimal and without patching connections.py (hence > q.get() returns immediately) the resulting delta is mismatched: Well, why are you surprised the test fails without the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:47:17 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 14 Apr 2013 21:47:17 +0000 Subject: [issue16954] Add docstrings for ElementTree module In-Reply-To: <1358090813.12.0.93631082121.issue16954@psf.upfronthosting.co.za> Message-ID: <1365976037.76.0.17976192847.issue16954@psf.upfronthosting.co.za> Eli Bendersky added the comment: You can ask on the python-dev mailing list. It's possible that other Python developers ran into a similar issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 14 23:56:03 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 14 Apr 2013 21:56:03 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1365976563.93.0.372083442302.issue17707@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: You're right, sorry. I got confused by the exponential notation in 9.107589721679688e-05. Updated patch is in attachment. ---------- Added file: http://bugs.python.org/file29857/issue17707.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 00:05:33 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Sun, 14 Apr 2013 22:05:33 +0000 Subject: [issue17480] pyvenv should be installed someplace more obvious on Windows In-Reply-To: <1363714170.98.0.299571294884.issue17480@psf.upfronthosting.co.za> Message-ID: <1365977133.4.0.250106076146.issue17480@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: I've just stumbled upon this issue after asking "Where is pyvenv script in Python 3 on Windows installed?" question at http://stackoverflow.com/q/15981111/95735 "Perhaps Windows installs should include (alongside Python.exe) a pyvenv.exe that invokes venv for the Python environment in which it's executed." I think it's the right thing to do. ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 00:10:54 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Sun, 14 Apr 2013 22:10:54 +0000 Subject: [issue17010] Windows launcher ignores active virtual environment In-Reply-To: <1358812657.25.0.839528896034.issue17010@psf.upfronthosting.co.za> Message-ID: <1365977454.49.0.6791528491.issue17010@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: Issue titled "Python Launcher and virtualenv?" at https://bitbucket.org/vinay.sajip/pylauncher/issue/15/ is related. ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 00:20:59 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Sun, 14 Apr 2013 22:20:59 +0000 Subject: [issue15281] pyvenv --symlinks option is a no-op? In-Reply-To: <1341675510.24.0.416671411372.issue15281@psf.upfronthosting.co.za> Message-ID: <1365978059.27.0.487330195931.issue15281@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: > Following discussions on python-dev, the default is always to symlink, > except on Windows (no support for true symlinks on XP and older) and In this case couldn't symlinks be automatically used on Windows Vista or newer? ---------- nosy: +piotr.dobrogost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 02:07:44 2013 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 15 Apr 2013 00:07:44 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1365984464.63.0.985045868365.issue9849@psf.upfronthosting.co.za> Mark Lawrence added the comment: The behaviour has changed from that given in msg116355. Using Python 3.3.1 on Windows. >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument('foo', nargs='1') Traceback (most recent call last): File "c:\python33\lib\argparse.py", line 1322, in add_argument self._get_formatter()._format_args(action, None) File "c:\python33\lib\argparse.py", line 585, in _format_args formats = ['%s' for _ in range(action.nargs)] TypeError: 'str' object cannot be interpreted as an integer During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "c:\python33\lib\argparse.py", line 1324, in add_argument raise ValueError("length of metavar tuple does not match nargs") ValueError: length of metavar tuple does not match nargs The docs http://docs.python.org/3/library/argparse.html#nargs are clear that nargs is an integer or various types of string so I think this could be closed as already fixed. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 02:16:35 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 15 Apr 2013 00:16:35 +0000 Subject: [issue17733] Add tests to test__header_value_parser for RFC 2231 parsing code Message-ID: <1365984995.9.0.777132214983.issue17733@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: Unit tests for RFC 2231 parsing code -> Add tests to test__header_value_parser for RFC 2231 parsing code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 02:55:26 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Apr 2013 00:55:26 +0000 Subject: [issue14012] Misc tarfile fixes In-Reply-To: <1329235837.42.0.144867770777.issue14012@psf.upfronthosting.co.za> Message-ID: <1365987326.62.0.692264733781.issue14012@psf.upfronthosting.co.za> ?ric Araujo added the comment: I should be able to do that but can?t say when. ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 02:56:17 2013 From: report at bugs.python.org (Meador Inge) Date: Mon, 15 Apr 2013 00:56:17 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <1365987377.61.0.562217118962.issue16826@psf.upfronthosting.co.za> Meador Inge added the comment: Here is a version which implements the subprocess method for testing suggested by ?ric. ---------- Added file: http://bugs.python.org/file29858/issue16826-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 03:43:29 2013 From: report at bugs.python.org (Dan Riti) Date: Mon, 15 Apr 2013 01:43:29 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1365990209.75.0.226100131167.issue13510@psf.upfronthosting.co.za> Dan Riti added the comment: Added a new version of the patch to incorporate Ezio's comment! ---------- Added file: http://bugs.python.org/file29859/demote-readlines-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 05:20:23 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Apr 2013 03:20:23 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1365996023.08.0.932413599822.issue13510@psf.upfronthosting.co.za> Ezio Melotti added the comment: Patch LGTM. I think it would also be better to say something like "Note that it's already possible to iterate on file objects using ``for line in file: ...`` without calling file.readlines()." in Doc/library/io.rst:readlines, as suggested in msg148703. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 05:26:45 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Apr 2013 03:26:45 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1365996404.99.0.971949483853.issue17353@psf.upfronthosting.co.za> Ezio Melotti added the comment: If possible it would be better to still generate a valid output, possibly by limiting the indentation or removing it after a certain point. However I don't know if there are any restrictions that should be followed while generating a plist (What happens if the line is too long? Is the indentation required?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 07:57:17 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 15 Apr 2013 05:57:17 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365976563.93.0.372083442302.issue17707@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: I think we should test multiple timeout values (e.g. 0.1, 0.5, 1 and 1.5): it'll take a little longer, but since the test suite didn't detect it, that's really lacking. Also, rathr than using an harcoded delta, we could maybe use a fudger factor, like what's done for threading lock tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 10:45:05 2013 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 15 Apr 2013 08:45:05 +0000 Subject: [issue15281] pyvenv --symlinks option is a no-op? In-Reply-To: <1341675510.24.0.416671411372.issue15281@psf.upfronthosting.co.za> Message-ID: <1366015505.85.0.937341259158.issue15281@psf.upfronthosting.co.za> Vinay Sajip added the comment: > In this case couldn't symlinks be automatically used on Windows Vista or newer? It seems simpler if the default behaviour is the same on all Windows flavours - you can specify --symlinks if you're on Windows Vista or later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 12:01:47 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 15 Apr 2013 10:01:47 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366020107.12.0.809857125019.issue15301@psf.upfronthosting.co.za> Larry Hastings added the comment: Okay, I got inspired and (in the words of Barry Warsaw) JFDI. Attached is my revised patch. I took Serhiy's patch and reworked it quite a bit: * I think it's now easier to follow. In particular: * The most common case (no overflow) is now first. In Serhiy's patch the most common case is buried in the middle of the second "if". * I removed some extraneous tests. * I changed the error messages to call the values "uid" and "gid", to match the names of the parameters. * I noticed that _fd_converter had the same bad-idea PyFloat_Check, so I changed it to use PyNumber_Index instead. In the process I also noticed that Serhiy's approach had a resource leak: it never decref'd the result of PyNumber_Index() when successful. To make sure I duplicated Serhiy's semantics, I had a test harness that ran both his and mine and ensured they returned the same thing (or both threw an error). Obviously I removed all that before cutting the patch. ---------- Added file: http://bugs.python.org/file29860/larry.chown.unsigned.uid.gid.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 12:51:51 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Apr 2013 10:51:51 +0000 Subject: [issue17731] test_iter_importers intermittent failure in test_pkgutil In-Reply-To: <1365961975.09.0.567055243786.issue17731@psf.upfronthosting.co.za> Message-ID: <1366023111.61.0.200614595675.issue17731@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 12:53:50 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 15 Apr 2013 10:53:50 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366023230.51.0.944820789338.issue15301@psf.upfronthosting.co.za> Mark Dickinson added the comment: To answer Serhiy's question: I'd say that this level of cleanup is probably only appropriate for 3.4. Larry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 12:59:45 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Apr 2013 10:59:45 +0000 Subject: [issue17713] test_logging fails in test_compute_rollover_weekly_attime In-Reply-To: <1365860997.8.0.335334018643.issue17713@psf.upfronthosting.co.za> Message-ID: <3Zq6DJ4RxczP2l@mail.python.org> Roundup Robot added the comment: New changeset 193e7ad92900 by Vinay Sajip in branch 'default': Issue #17713: Added failure diagnostics to test. http://hg.python.org/cpython/rev/193e7ad92900 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 13:16:39 2013 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 15 Apr 2013 11:16:39 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366024599.91.0.425410782541.issue17732@psf.upfronthosting.co.za> Vinay Sajip added the comment: This looks to me as if it will need a patch in distutils. Unlike virtualenv, which contains a patched copy of distutils (and hence allows having a .cfg adjacent to it), pyvenv does not create patched modules in the venv. It does not make sense to change this behaviour. The correct solution would appear to be for distutils to ignore certain configuration options (install-lib, but also equivalent options for headers and scripts) when running in a venv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 13:17:47 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 15 Apr 2013 11:17:47 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366024666.99.0.924872160551.issue15301@psf.upfronthosting.co.za> Larry Hastings added the comment: See my comment above (dated 2013-04-14 04:30). I'm passing the buck. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 13:20:45 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 15 Apr 2013 11:20:45 +0000 Subject: [issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1366024845.41.0.949762436964.issue17703@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Checked the patch: it fixes the problem. Thanks. Will this go into Python 2.7.5 ? I'm asking because we need to issue a patch level release of egenix-mx-base and if Python 2.7.5 will fix the problem, we'll just add the work-around for Python 2.7.4. Regarding a better cleanup logic: This is available in Python 3.x with the new module init logic and we'll use it there. PS: The approach with doing the cleanup at module startup time won't work, because the still existing objects will reference parts of the already cleaned up interpreter instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 13:47:35 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 15 Apr 2013 11:47:35 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1366026455.45.0.255537741452.issue17707@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Maybe I'm misinterpreting what you wrote but the test fails before the patch and succeeds after it so what's the point in adding multiple tests with different timeouts? > Also, rathr than using an harcoded delta, we could maybe use a fudger > factor, like what's done for threading lock tests. Not sure what you refer to here. Feel free to submit a patch if you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:14:27 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Apr 2013 12:14:27 +0000 Subject: [issue17731] test_iter_importers intermittent failure in test_pkgutil In-Reply-To: <1365961975.09.0.567055243786.issue17731@psf.upfronthosting.co.za> Message-ID: <1366028067.06.0.0591774496571.issue17731@psf.upfronthosting.co.za> Nick Coghlan added the comment: "spam" is a fairly generic name, so I'm guessing something else is leaving a "spam" module around in sys.modules - when I run the tests with the order given in RDM's original report, I get the same error. I also get a failure in test_builtin though, which is a little weird. With the attached file, test_builtin fails (so one of the uncommented tests appears to be interfering with that), while test_pkgutil passes (suggesting that the problem there is one the tests flagged with "#TEMP#" ---------- Added file: http://bugs.python.org/file29861/test_order_issue17731.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:15:12 2013 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Apr 2013 12:15:12 +0000 Subject: [issue17708] sys.flags.hash_randomization doesn't return correct value In-Reply-To: <1365832008.74.0.106201952551.issue17708@psf.upfronthosting.co.za> Message-ID: <1366028112.5.0.405693969203.issue17708@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:22:04 2013 From: report at bugs.python.org (Nick Sloan) Date: Mon, 15 Apr 2013 12:22:04 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366028524.48.0.413610988232.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: That's along the lines of what I've been thinking as I dig into this. I'd love to take a stab at a patch for this if no one else has done so already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:40:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Apr 2013 12:40:13 +0000 Subject: [issue17734] Failure when running test_builtin after test_genexps Message-ID: <1366029613.93.0.971367432491.issue17734@psf.upfronthosting.co.za> New submission from Nick Coghlan: I'm getting a failure in test_builtin when running the following: ./python -m test -w test_genexps test_builtin ====================================================================== FAIL: test_input_tty_non_ascii (test.test_builtin.BuiltinTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_builtin.py", line 1176, in test_input_tty_non_ascii self.check_input_tty("prompt?", b"quux\xe9", "utf-8") File "/home/ncoghlan/devel/py3k/Lib/test/test_builtin.py", line 1167, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + ====================================================================== FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.BuiltinTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/py3k/Lib/test/test_builtin.py", line 1180, in test_input_tty_non_ascii_unicode_errors self.check_input_tty("prompt?", b"quux\xe9", "ascii") File "/home/ncoghlan/devel/py3k/Lib/test/test_builtin.py", line 1167, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + The problem persists after a make clean and rebuild. ---------- messages: 186979 nosy: haypo, ncoghlan priority: normal severity: normal stage: test needed status: open title: Failure when running test_builtin after test_genexps type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:40:47 2013 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Apr 2013 12:40:47 +0000 Subject: [issue17731] test_iter_importers intermittent failure in test_pkgutil In-Reply-To: <1365961975.09.0.567055243786.issue17731@psf.upfronthosting.co.za> Message-ID: <1366029647.49.0.492386952927.issue17731@psf.upfronthosting.co.za> Nick Coghlan added the comment: Created #17734 for the weird interference between test_genexps and test_builtin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:42:10 2013 From: report at bugs.python.org (Pascal Chambon) Date: Mon, 15 Apr 2013 12:42:10 +0000 Subject: [issue17636] Modify IMPORT_FROM to fallback on sys.modules In-Reply-To: <1365124502.39.0.727243640375.issue17636@psf.upfronthosting.co.za> Message-ID: <1366029730.4.0.574035120702.issue17636@psf.upfronthosting.co.za> Changes by Pascal Chambon : ---------- nosy: +Pascal.Chambon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:45:19 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Apr 2013 12:45:19 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1366029919.06.0.195027528593.issue17353@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree that plistlib shouldn't raise an exception for data that can represented as a valid plist file. I've checked that the Cocoa class for generating plist files will happily create a plist file when the data is nested 100 levels deep. In that case NSData values generate lines of 12 characters long. An unrelated issue: PlistWriter.writeValue should treat bytes instances the same as Data instances in Python 3. That would be a (small) feature enhencement, and hence can only be done for Python 3.4. ---------- Added file: http://bugs.python.org/file29862/deeply-nested-plist.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:46:24 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 15 Apr 2013 12:46:24 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1366029984.41.0.309324807523.issue17353@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attach patch should fix the issue (but there needs to be a unittest as well). ---------- Added file: http://bugs.python.org/file29863/issue-17353.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:52:20 2013 From: report at bugs.python.org (Kyle Simpson) Date: Mon, 15 Apr 2013 12:52:20 +0000 Subject: [issue17735] inspect.findsource throws IndexError Message-ID: <1366030340.02.0.51431850328.issue17735@psf.upfronthosting.co.za> New submission from Kyle Simpson: Here is one way to reproduce this bug: 1. Create a module file (bug.py in this example) def func(): pass 2. Run Python >>> import bug >>> help(bug) 3. Edit bug.py def func(): pass def newfunc(): pass 4. Use the same Python interpreter as in step 2 >>> reload(bug) >>> help(bug) 5. Observe traceback [..snip..] File "C:\Python27\lib\inspect.py", line 578, in findsource if pat.match(lines[lnum]): break IndexError: list index out of range Note: A related but different issue is http://bugs.python.org/issue1218234. ---------- components: Library (Lib) messages: 186983 nosy: Kyle.Simpson priority: normal severity: normal status: open title: inspect.findsource throws IndexError type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 14:58:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Apr 2013 12:58:07 +0000 Subject: [issue17731] test_iter_importers intermittent failure in test_pkgutil In-Reply-To: <1365961975.09.0.567055243786.issue17731@psf.upfronthosting.co.za> Message-ID: <3Zq8rt1t4xzS9S@mail.python.org> Roundup Robot added the comment: New changeset 73c79022977b by Nick Coghlan in branch '3.3': Close #17731: Clean up properly in test_import http://hg.python.org/cpython/rev/73c79022977b New changeset 5d4001e32a31 by Nick Coghlan in branch 'default': Merge fix for #17731 from 3.3 http://hg.python.org/cpython/rev/5d4001e32a31 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 15:06:52 2013 From: report at bugs.python.org (Jonas Wagner) Date: Mon, 15 Apr 2013 13:06:52 +0000 Subject: [issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords Message-ID: <1366031212.38.0.552798611166.issue17736@psf.upfronthosting.co.za> New submission from Jonas Wagner: The attached patch corrects a wrong method comment in _elementtree.c. It happened to be at Line 316, and was thus discovered by random sampling. [1] [1] http://www-cs-faculty.stanford.edu/~uno/316.html ---------- components: Extension Modules files: elementtree_get_attrib_from_keywords.patch keywords: patch messages: 186985 nosy: Sjlver priority: normal severity: normal status: open title: Misleading method comment in _elementtree.c : get_attrib_from_keywords type: enhancement versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29864/elementtree_get_attrib_from_keywords.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 15:35:29 2013 From: report at bugs.python.org (Pascal Chambon) Date: Mon, 15 Apr 2013 13:35:29 +0000 Subject: [issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case In-Reply-To: <1365869097.02.0.582677403017.issue17716@psf.upfronthosting.co.za> Message-ID: <1366032929.16.0.491115950213.issue17716@psf.upfronthosting.co.za> Pascal Chambon added the comment: (sorry for the long post, but it's a complex issue I guess) I forgot to precise that I have this behaviour with the latest python2.7, as well as python3.3 (I guess other versions behave the same). I agree that having side effects in script imports looks dangerous, but on the other hand it's incredibly handy to use the "script" behaviour of module so that each one initializes/checks himself, rather than relying on the calling of initialization methods from somewhere else (many web frameworks don't even plan such setup scripts actually, I have a django ticket running on that subject just at the moment). Loads of python modules perform such inits (registration of atexit handlers, setup of loggers, of working/temp directories, or even modifying process-level settings.....), so even though we're currently adding protection via exception handlers (and checking the idempotency of our imports, crucial points!), I could not guarantee that none of the modules/packages we use won't have such temporary failures (failures that can't be fixed by the web server, because module trees become forever unimportable). With the video and the importlib code, I'm beginning to have a better understanding on the from..import, and I noticed that actually both "import mypkg.module_a" and "from mypkg import module_a" get broken when mypkg raised an exception after successfully loading module_a. It's just that the second form breaks loudly, whereas the first one remains silently corrupted (i.e the variable mypkg.module_a does NOT exist in both cases, so theer are pending AttributeErrors anyway). All comes from the fact that - to talk with "importlib/_bootstrap.py" terms - _gcd_import() assumes everything is loaded and bound when a chain of modules (eg. "mypkg.module_a") is in sys.modules, whereas intermediary bindings (setattr(mypkg, "module_a", module_a)) might have been lost due to an import failure (and the removal of the mypkg module). Hum I wonder, could we just recheck all bindings inside that _gcd_import() ? I guess there would be annoying corner cases with circular imports, i.e we could end up creating these bindings whereas they are just "pending to be done" in parent frames... Issue 17636 might provide a workaround for some cases, but it doesn't fix the root problem of the "rolled back" import (eg. here the absence of binding between mypkg and module_a, whatever the import form that was used). Imagine a tree "mypkg/mypkg2/module.py", if module.py gets well loaded but mypkg and mypkg2 fail, then later, somewhere else in the code, it seems an "import mypkg.mypkg2.module" will SUCCEED even though the module tree is broken, and AttributeErrors are pending. I guess Nick was right (and me wrong), the cleanest solution seems to enforce an invariant saying that a submodule can NOT fully be in sys.modules if his parent is not either loaded or "in the process" of loading it (thus if a binding between parent and child is missing, we're simply in the case of circular dependencies). Said another way, the import system should delete all children modules from sys.modules when aborting the import of a parent package. What do you think about it ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 15:41:08 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Mon, 15 Apr 2013 13:41:08 +0000 Subject: [issue17737] test_gdb fails on armv7hl Message-ID: <1366033268.62.0.309892862388.issue17737@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: Hi, it seems that test_gdb fails on armv7hl on Fedora 19 and 20 [1] (I'm also tracking my notes of the bug there). Basically, the problem seems to come down to PyObjectPtr.subclass_from_type (file python-gdb.py) returning different values for members of the stack trace (compared to successful builds - see [3] for x86_64 successful build and [4] for armv7hl failed build). The two failed tests fail with: ====================================================================== FAIL: test_up_at_top (test.test_gdb.StackNavigationTests) Verify handling of "py-up" at the top of the stack ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.3.1/Lib/test/test_gdb.py", line 678, in test_up_at_top cmds_after_breakpoint=['py-up'] * 4) File "/builddir/build/BUILD/Python-3.3.1/Lib/test/test_gdb.py", line 213, in get_stack_trace self.assertEqual(err, '') AssertionError: "Python Exception <__main__.PyFrameObjectPtr [truncated]... != '' - Python Exception <__main__.PyFrameObjectPtr object at 0x23a6db0>: - Error occurred in Python command: <__main__.PyFrameObjectPtr object at 0x23a6db0> ====================================================================== FAIL: test_threads (test.test_gdb.PyBtTests) Verify that "py-bt" indicates threads that are waiting for the GIL ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.3.1/Lib/test/test_gdb.py", line 759, in test_threads cmds_after_breakpoint=['thread apply all py-bt']) File "/builddir/build/BUILD/Python-3.3.1/Lib/test/test_gdb.py", line 213, in get_stack_trace self.assertEqual(err, '') AssertionError: "Python Exception There is no member named co_name.: \nError [truncated]... != '' - Python Exception There is no member named co_name.: - Error occurred in Python command: There is no member named co_name. ---------------------------------------------------------------------- The whole build log is accessible at [2]. Any clues would be appreciated. Thanks. [1] https://bugzilla.redhat.com/show_bug.cgi?id=951802 [2] http://arm.koji.fedoraproject.org//work/tasks/2722/1712722/build.log [3] https://gist.github.com/bkabrda/5387906 [4] https://gist.github.com/bkabrda/5387908 ---------- components: Tests messages: 186987 nosy: bkabrda priority: normal severity: normal status: open title: test_gdb fails on armv7hl versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 15:41:49 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 15 Apr 2013 13:41:49 +0000 Subject: [issue17708] sys.flags.hash_randomization doesn't return correct value In-Reply-To: <1365832008.74.0.106201952551.issue17708@psf.upfronthosting.co.za> Message-ID: <1366033309.32.0.509130020531.issue17708@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 15:52:23 2013 From: report at bugs.python.org (Pam McA'Nulty) Date: Mon, 15 Apr 2013 13:52:23 +0000 Subject: [issue17530] pprint could use line continuation for long bytes literals In-Reply-To: <1364067577.46.0.261047534718.issue17530@psf.upfronthosting.co.za> Message-ID: <1366033943.52.0.208998417734.issue17530@psf.upfronthosting.co.za> Pam McA'Nulty added the comment: Here's a patch. I needed to handle the fact that the repr of a single byte can be 1, 2 or 4 characters long and did not want to wrap in the middle of a byte representation. Note also that bytes literals require a continuation character. In the pathological case where the wrap size is smaller than the representation of a single byte, I chose to always print at least one byte per line. As an aside, I also replaced the str wrapping code's calls to len with the cached _len used in the rest of pprint.py ---------- keywords: +patch nosy: +Pam.McANulty Added file: http://bugs.python.org/file29865/bytes_pprint.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 15:55:09 2013 From: report at bugs.python.org (Pam McA'Nulty) Date: Mon, 15 Apr 2013 13:55:09 +0000 Subject: [issue17530] pprint could use line continuation for long bytes literals In-Reply-To: <1364067577.46.0.261047534718.issue17530@psf.upfronthosting.co.za> Message-ID: <1366034109.13.0.43827497713.issue17530@psf.upfronthosting.co.za> Pam McA'Nulty added the comment: oops, forgot to add some samples: >>> pprint.pprint(b"\n\n\n\n\n\n", width=5) b'\n'\ b'\n'\ b'\n'\ b'\n'\ b'\n'\ b'\n' >>> pprint.pprint({"a": b"\x00\xff" * 20}) {'a': b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00'\ b'\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff'\ b'\x00\xff\x00\xff\x00\xff'} >>> pprint.pprint({"a": b"\x00\xff" * 20}, width=20) {'a': b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'} >>> pprint.pprint(b'a\x00\n\\x00', width=20) b'a\x00\n\\x00' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 15:56:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Apr 2013 13:56:09 +0000 Subject: [issue17728] format() default precisions undocumented In-Reply-To: <1365934064.51.0.124560833588.issue17728@psf.upfronthosting.co.za> Message-ID: <3ZqB7r0P9zzRwY@mail.python.org> Roundup Robot added the comment: New changeset 725d6347ac7e by Eric V. Smith in branch '2.7': Issue #17728: Specify default precision for float.format for presentation types e, f, and g. http://hg.python.org/cpython/rev/725d6347ac7e New changeset ad481c95a1d4 by Eric V. Smith in branch '3.3': Issue #17728: Specify default precision for float.format for presentation types e, f, and g. http://hg.python.org/cpython/rev/ad481c95a1d4 New changeset 413c0b0a105f by Eric V. Smith in branch 'default': Issue #17728: Merge with 3.3. http://hg.python.org/cpython/rev/413c0b0a105f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 15:59:31 2013 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 15 Apr 2013 13:59:31 +0000 Subject: [issue17728] format() default precisions undocumented In-Reply-To: <1365934064.51.0.124560833588.issue17728@psf.upfronthosting.co.za> Message-ID: <1366034371.66.0.537758834273.issue17728@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 16:03:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 14:03:23 +0000 Subject: [issue17737] test_gdb fails on armv7hl In-Reply-To: <1366033268.62.0.309892862388.issue17737@psf.upfronthosting.co.za> Message-ID: <1366034603.88.0.533632842498.issue17737@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 16:06:53 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 15 Apr 2013 14:06:53 +0000 Subject: [issue17735] inspect.findsource throws IndexError In-Reply-To: <1366030340.02.0.51431850328.issue17735@psf.upfronthosting.co.za> Message-ID: <1366034813.06.0.889420490983.issue17735@psf.upfronthosting.co.za> R. David Murray added the comment: Can you explain what makes this one a different problem? It looks like the same one to me. Or is your intent in this issue just to avoid the exception? In that case it seems to me it would better to fix issue 1218234 if we can. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 16:10:24 2013 From: report at bugs.python.org (Jonas Wagner) Date: Mon, 15 Apr 2013 14:10:24 +0000 Subject: [issue17738] Unnecessary "if" in SHA1_copy Message-ID: <1366035024.21.0.783784062683.issue17738@psf.upfronthosting.co.za> New submission from Jonas Wagner: I'm puzzled by the following code in SHA1_copy (at python/Modules/sha1module.c:320 if (Py_TYPE(self) == &SHA1type) { if ( (newobj = newSHA1object())==NULL) return NULL; } else { if ( (newobj = newSHA1object())==NULL) return NULL; } Both branches of the if-statement are identical; it would seem that the if is unnecessary. Its condition does not have any side effect. Attached is a patch that simplifies the code. This code happened to be at Line 316, and was thus discovered by random sampling. [1] [1] http://www-cs-faculty.stanford.edu/~uno/316.html ---------- components: Extension Modules files: sha1copy.patch keywords: patch messages: 186992 nosy: Sjlver priority: normal severity: normal status: open title: Unnecessary "if" in SHA1_copy versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29866/sha1copy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 16:11:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 14:11:03 +0000 Subject: [issue17530] pprint could use line continuation for long bytes literals In-Reply-To: <1364067577.46.0.261047534718.issue17530@psf.upfronthosting.co.za> Message-ID: <1366035063.73.0.0456808165084.issue17530@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't understand why you say that "bytes literals require a continuation character": >>> (b"x" ... b"y") b'xy' >>> [b"x" ... b"y"] [b'xy'] I think the "len caching" is a misoptimization, it's useless here (most CPU time will be sent creating and wrapping the representation). Also perhaps it would be nice to refactor things a bit, since we have both _str_parts and _bytes_parts used in exactly the same way (but that can also be done later). As for the doc, the example would probably deserve to be a bit more "meaningful" :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 16:25:32 2013 From: report at bugs.python.org (sorin) Date: Mon, 15 Apr 2013 14:25:32 +0000 Subject: [issue8876] distutils should not assume that hardlinks will work In-Reply-To: <1275485916.86.0.44676570948.issue8876@psf.upfronthosting.co.za> Message-ID: <1366035932.02.0.187025918806.issue8876@psf.upfronthosting.co.za> sorin added the comment: Can we have this merged, it prevents us form using distutil, especially in a continuous integration environment where you do not have control over the build server. See: https://drone.io/github.com/pycontribs/tendo/1 ---------- nosy: +sorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 16:28:53 2013 From: report at bugs.python.org (Pam McA'Nulty) Date: Mon, 15 Apr 2013 14:28:53 +0000 Subject: [issue17530] pprint could use line continuation for long bytes literals In-Reply-To: <1364067577.46.0.261047534718.issue17530@psf.upfronthosting.co.za> Message-ID: <1366036133.81.0.331247983009.issue17530@psf.upfronthosting.co.za> Pam McA'Nulty added the comment: - eval expects bytes to have a continuation character and test_str_wrap did an eval check so I figured test_bytes_wrap should as well: # repr some bytes: >>> b = b"\x00\xff" * 5 >>> b b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff' >>> r = repr(b) >>> r "b'\\x00\\xff\\x00\\xff\\x00\\xff\\x00\\xff\\x00\\xff'" >>> eval(r) b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff' # hand-wrap it without the continuation character and it fails to eval (stuck the >>> s = "b'\\x00\\xff\\x00\\xff\\x00'\nb'\\xff\\x00\\xff\\x00\\xff'" >>> print(s) b'\x00\xff\x00\xff\x00' b'\xff\x00\xff\x00\xff' >>> eval(s) Traceback (most recent call last): File "", line 1, in File "", line 2 b'\xff\x00\xff\x00\xff' ^ SyntaxError: invalid syntax # stick the continuation character in, and it evals properly >>> s = s.replace("\n", "\\\n") >>> print(s) b'\x00\xff\x00\xff\x00'\ b'\xff\x00\xff\x00\xff' >>> eval(s) b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff' - I agree about the len v _len, but figured this wasn't all that foolish a consistency issue (i.e. the rest of pprint.py used _len) - I also wanted to refactor _str_parts and _bytes_parts, but couldn't decide on the best course. I was favoring a helper function to run the common loop since the two "if issubclass..." calls were so different and parameterizing the differences felt like it would obfuscate things too much. - I also agree on the doc. I figured I'd see if there weren't any hidden surprises with the patch before I worked on better doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 16:39:13 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Apr 2013 14:39:13 +0000 Subject: [issue8876] distutils should not assume that hardlinks will work In-Reply-To: <1275485916.86.0.44676570948.issue8876@psf.upfronthosting.co.za> Message-ID: <1366036753.52.0.252647006183.issue8876@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?ll get this in the next bugfix releases. ---------- keywords: -needs review nosy: +benjamin.peterson, georg.brandl, larry priority: normal -> release blocker versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 17:00:05 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 15 Apr 2013 15:00:05 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1366026455.45.0.255537741452.issue17707@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Maybe I'm misinterpreting what you wrote but the test fails before the patch and succeeds after it so what's the point in adding multiple tests with different timeouts? Well, the test you added tests explicitely for a value < 1s because this specific bug was due to a rounding error, but I think it could be interesting to check a couple more values, within a reasonable range (not too long). It's just a matter of calling it in a loop, but if you don't deem it necessary, that's fine with me. > Not sure what you refer to here. Feel free to submit a patch if you want. See e.g. : http://hg.python.org/cpython/file/413c0b0a105f/Lib/test/lock_tests.py#l65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 17:05:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 15:05:57 +0000 Subject: [issue17530] pprint could use line continuation for long bytes literals In-Reply-To: <1364067577.46.0.261047534718.issue17530@psf.upfronthosting.co.za> Message-ID: <1366038357.15.0.0636685735751.issue17530@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, but eval works if you put parentheses as required by the grammar: >>> s = "(b'xy'\nb'za')" >>> eval(s) b'xyza' Yes, _str_parts and _bytes_parts should probably remain separate. It's the higher-level routine that would deserve sharing. Also, perhaps the other wrapping routines (for dict, list...) could get the same treatment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 17:14:54 2013 From: report at bugs.python.org (David D Lowe) Date: Mon, 15 Apr 2013 15:14:54 +0000 Subject: [issue17739] ssl.SSLSocket.getpeercert does not return client certificate Message-ID: <1366038894.17.0.187002314395.issue17739@psf.upfronthosting.co.za> New submission from David D Lowe: The documentation for ssl.SSLSocket.getpeercert states: > If the binary_form parameter is True, and a certificate was provided, this method returns the DER-encoded form of the entire certificate as a sequence of bytes, or None if the peer did not provide a certificate. This return value is independent of validation; if validation was required (CERT_OPTIONAL or CERT_REQUIRED), it will have been validated, but if CERT_NONE was used to establish the connection, the certificate, if present, will not have been validated. However, in the case that validation is not required, getpeercert does not return a certificate, even when binary_form is set to True. ---------- components: Library (Lib) files: test.tar.gz messages: 186999 nosy: Flimm priority: normal severity: normal status: open title: ssl.SSLSocket.getpeercert does not return client certificate type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file29867/test.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 17:25:12 2013 From: report at bugs.python.org (Kyle Roberts) Date: Mon, 15 Apr 2013 15:25:12 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366039512.03.0.225930123594.issue17673@psf.upfronthosting.co.za> Kyle Roberts added the comment: I think `copy_from` should be included for mkstemp as well. It provides similar functionality to TemporaryFile and NamedTemporaryFile, but it doesn't delete the temp file on close as the other two do by default. Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 17:25:53 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Apr 2013 15:25:53 +0000 Subject: [issue17734] Failure when running test_builtin after test_genexps In-Reply-To: <1366029613.93.0.971367432491.issue17734@psf.upfronthosting.co.za> Message-ID: <1366039553.11.0.184413345426.issue17734@psf.upfronthosting.co.za> Ezio Melotti added the comment: Isn't this the same as #13886? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 17:40:40 2013 From: report at bugs.python.org (Dan Riti) Date: Mon, 15 Apr 2013 15:40:40 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1366040440.71.0.519810302396.issue13510@psf.upfronthosting.co.za> Dan Riti added the comment: Agreed Ezio, I've updated the patch to include the change to Doc/library/io.rst:readlines. ---------- Added file: http://bugs.python.org/file29868/demote-readlines-v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:01:06 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:01:06 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041666.08.0.389959097358.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's another new version of the patch, addressing Ezio's review comments and a few things I found after giving operator.py a closer look myself. Things changed in operator.py in this version: - all ``__func__ = func`` assignments are moved to the end, after importing * from _operator. With the assignments after each func, __func__ was still the Python version after importing from _operator. I suspect this means that _operator.c could be changed to not mess with creating each __func__ and just let operator.py do it, but not being a native C speaker, I don't know how to do it. Also, there is an added test case to test whether __func__ is func. It passes with the rest of the patch, but would fail on current operator.c; it seems that operator.c actually creates separate __func__ and func functions (that do the same thing). - If importing from _operator succeeds, import __doc__ from _operator as well. The Python implementation has an extra note at the end of __doc__ advertising that it is a Python implementation. Also, after submitting this patch, I'm going to try to clean up the files list on this issue a bit. I'll clear the nosy list while I do so to avoid spamming everybody with messages about it. (At least, I assume I can do so, I haven't tried this before :). If I can't clear the nosy list, I won't bother with cleaning up the files, again to avoid spamming) ---------- Added file: http://bugs.python.org/file29869/py_operator.v12.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:02:32 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:02:32 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041752.06.0.559998299374.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: -Arfrever, brett.cannon, eric.araujo, ezio.melotti, jcea, meador.inge, pitrou, serhiy.storchaka, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:02:44 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:02:44 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041764.2.0.197037142554.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28327/operator.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:02:51 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:02:51 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041771.63.0.803077301815.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28328/py_operator.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:02:56 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:02:56 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041776.42.0.506309099361.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28374/py_operator.v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:03:01 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:03:01 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041781.6.0.294267206552.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28383/py_operator.v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:03:05 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:03:05 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041785.88.0.349635936086.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28388/py_operator.v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:03:10 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:03:10 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041790.14.0.748509303207.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28522/py_operator.v7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:03:15 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:03:15 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041795.5.0.573530107444.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28524/py_operator.v8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:03:20 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:03:20 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041800.88.0.0934938416087.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28532/py_operator.v9.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:03:39 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:03:39 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366041819.48.0.439614284589.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +Arfrever, brett.cannon, eric.araujo, ezio.melotti, jcea, meador.inge, pitrou, serhiy.storchaka, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:05:11 2013 From: report at bugs.python.org (Nick Sloan) Date: Mon, 15 Apr 2013 16:05:11 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366041911.45.0.428379705612.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: Here is a patch that seems to fix the problem. It simply short-circuits distutils options that change directories. This is my first python patch ever, so I'm eager for comments. Is this the right approach? ---------- keywords: +patch Added file: http://bugs.python.org/file29870/distutilsvenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:09:59 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Apr 2013 16:09:59 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <3ZqF6H0HWVzSD5@mail.python.org> Roundup Robot added the comment: New changeset 1e8be05a4039 by Ezio Melotti in branch '3.3': #13510: clarify that f.readlines() is note necessary to iterate over a file. Patch by Dan Riti. http://hg.python.org/cpython/rev/1e8be05a4039 New changeset 7f4325dc4256 by Ezio Melotti in branch 'default': #13510: merge with 3.3. http://hg.python.org/cpython/rev/7f4325dc4256 New changeset 6a4746b0afaf by Ezio Melotti in branch '2.7': #13510: clarify that f.readlines() is note necessary to iterate over a file. Patch by Dan Riti. http://hg.python.org/cpython/rev/6a4746b0afaf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:13:13 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Apr 2013 16:13:13 +0000 Subject: [issue13510] Clarify that readlines() is not needed to iterate over a file In-Reply-To: <1322674949.97.0.856520026774.issue13510@psf.upfronthosting.co.za> Message-ID: <1366042393.2.0.350208372394.issue13510@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! I also realized I missed Terry suggestion about file.readlines() == list(file), so I added that too. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 18:41:56 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 16:41:56 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366044116.27.0.893039041464.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: A change that I mentioned in a Rietveld comment on v10, but not in my last message: __all__ in operator.py no longer includes all of the __func__s, as currently doing "from operator import *" does not import all of the __func__s. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 19:03:13 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 17:03:13 +0000 Subject: [issue17689] Fix test discovery for test_tarfile.py In-Reply-To: <1365619249.38.0.463638779993.issue17689@psf.upfronthosting.co.za> Message-ID: <1366045393.71.0.0310990389794.issue17689@psf.upfronthosting.co.za> Zachary Ware added the comment: That is indeed simpler than what I wrote, and it does work as expected. But, is it preferable to do it this way, or with Ezio's suggested method (``skip_unless_gzip = unittest.skipUnless(gzip, "gzip not available")``, and for bz2 and lzma)? I can see merits to both; mine only requires a docstring change if there's a new compression module sometime in the future, but Ezio's is simpler and shorter. Here's another thought; would it be more useful to have a general version of this skip decorator in test.support, something along the lines of: """ def skipWithoutModule(name): """ Skip if the named module is not available. """ try: module = importlib.import_module(name) except ImportError: module = None return unittest.skipUnless(module, "{} module not available".format(name)) """ And, actually, looking through test.support to see if there was anything like this already, I found requires_bz2 and requires_lzma that already exist; should I just add a requires_gzip to test.support and use those three in test_tarfile? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 20:06:48 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 18:06:48 +0000 Subject: [issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket Message-ID: <1366049208.35.0.954231970702.issue17740@psf.upfronthosting.co.za> New submission from Zachary Ware: In Doc/library/socket.rst, :func:`socket` links to #module-socket, not #socket.socket. The attached patch changes all occurances of :func:`socket` to :func:`~socket.socket`, except the first one which keeps the explicit module name (no ~). ---------- assignee: docs at python components: Documentation files: socket_func_link.diff keywords: patch messages: 187009 nosy: docs at python, zach.ware priority: normal severity: normal status: open title: :func:`socket` in socket.rst links to socket module, not socket.socket type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29871/socket_func_link.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 20:07:04 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 18:07:04 +0000 Subject: [issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket In-Reply-To: <1366049208.35.0.954231970702.issue17740@psf.upfronthosting.co.za> Message-ID: <1366049224.81.0.307096977241.issue17740@psf.upfronthosting.co.za> Changes by Zachary Ware : Added file: http://bugs.python.org/file29872/socket_func_link_2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 20:16:10 2013 From: report at bugs.python.org (Nick Sloan) Date: Mon, 15 Apr 2013 18:16:10 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366049770.25.0.282995199031.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: On second thought, there is probably no good reason to ignore the build-* settings. Here is an updated patch. ---------- Added file: http://bugs.python.org/file29873/distutilsvenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 20:17:39 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Apr 2013 18:17:39 +0000 Subject: [issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket In-Reply-To: <1366049208.35.0.954231970702.issue17740@psf.upfronthosting.co.za> Message-ID: <1366049859.1.0.20827324178.issue17740@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think :func:`.socket` should work too. ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 20:38:54 2013 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 15 Apr 2013 18:38:54 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366051134.2.0.543983954612.issue17732@psf.upfronthosting.co.za> Vinay Sajip added the comment: > On second thought, there is probably no good reason to ignore the build-* settings. I was just about to mention this. I'm not an expert on distutils internals and whether this is the best way to accomplish what's needed, but the approach seems reasonable to me. Why the empty list and the extend, though? Why not something like the following? if sys.prefix == sys.base_prefix: # not in venv ignore_options = [] else: # in venv ignore_options = ['install-base', ...] My other comments on the patch are generic, i.e. you need to look at the tests and docs, too. Anyway, thanks for the effort you've spent to come up with a patch. Can I suggest that you sign a PSF contributor form to license your work to the PSF? http://www.python.org/psf/contrib/contrib-form/ ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 20:51:43 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 18:51:43 +0000 Subject: [issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket In-Reply-To: <1366049208.35.0.954231970702.issue17740@psf.upfronthosting.co.za> Message-ID: <1366051903.44.0.305194950607.issue17740@psf.upfronthosting.co.za> Zachary Ware added the comment: So it does. Would you like a new pair of patches? It is just a search-and-replace from ":func:`socket`" to ":func:`.socket`". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:04:18 2013 From: report at bugs.python.org (Orion Poplawski) Date: Mon, 15 Apr 2013 19:04:18 +0000 Subject: [issue17706] Segfault in PyErr_SetObject In-Reply-To: <1365806226.48.0.566850087286.issue17706@psf.upfronthosting.co.za> Message-ID: <1366052658.83.0.884299815723.issue17706@psf.upfronthosting.co.za> Orion Poplawski added the comment: Despite numpy not calling the library properly, it stills seems to me that python should not segfault due to not handling a null pointer. But thanks for the help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:13:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 19:13:11 +0000 Subject: [issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1366053191.03.0.590752589703.issue17703@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- title: Trash can mechanism segfault during interpreter finalization in Python 2.7.4 -> Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:13:19 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 19:13:19 +0000 Subject: [issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1366053199.02.0.63796119992.issue17703@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> commit review type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:20:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Apr 2013 19:20:26 +0000 Subject: [issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <3ZqKL16bqyzSCw@mail.python.org> Roundup Robot added the comment: New changeset e814fbd470bf by Antoine Pitrou in branch '2.7': Issue #17703: Fix a regression where an illegal use of Py_DECREF() after interpreter finalization can cause a crash. http://hg.python.org/cpython/rev/e814fbd470bf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:21:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 19:21:03 +0000 Subject: [issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1365774192.26.0.770170442284.issue17703@psf.upfronthosting.co.za> Message-ID: <1366053663.79.0.444123656878.issue17703@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:21:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 19:21:57 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1366053717.5.0.832752954186.issue17710@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I was targeting head, not the release branches. Perhaps, but I don't see the point of choosing a different fix in the default branch than in the bugfix branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:23:12 2013 From: report at bugs.python.org (Nick Sloan) Date: Mon, 15 Apr 2013 19:23:12 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366053792.46.0.554545103891.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: My thought was that perhaps there will be other circumstances where we may want to ignore options in the future. The idea was that by providing an ignore_options list that can be extended, multiple conditions with different sets of options can be stacked together easily. I was thinking a set might actually be an even better choice than a list. Would love feedback on this approach. Am I over-designing for an unlikely case? I'm happy to use Vinay's suggestion if we don't think it is worth it to consider possible future conflicts with distutils.cfg options. If there is any reason a set would be worse to use, let me know, otherwise my next patch will use a set rather than a list. Another question: should I be checking which config file these come from, or ignoring all occurrences of these options? Seems like setup.cfg at the very least shouldn't have any restrictions. Possibly ~/.pydistutils.cfg too. I'll review tests to see if this necessitates any changes, add a new test that covers this, and I'll make a note in the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:26:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Apr 2013 19:26:24 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366053984.84.0.886364175755.issue15301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >* The most common case (no overflow) is now first. In Serhiy's patch > the most common case is buried in the middle of the second "if". It's because my implementation is a simplified version of more complicated patch for issue2005, which supports signed uid_t and sizeof(uid_t) > sizeof(long). And this support can be added if necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:26:41 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 15 Apr 2013 19:26:41 +0000 Subject: [issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 In-Reply-To: <1366053663.79.0.444123656878.issue17703@psf.upfronthosting.co.za> Message-ID: <516C546E.5080704@egenix.com> Marc-Andre Lemburg added the comment: On 15.04.2013 21:21, Antoine Pitrou wrote: > > Committed! Cool, thanks for the quick turnaround. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:32:32 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Apr 2013 19:32:32 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366054352.18.0.10216207399.issue17732@psf.upfronthosting.co.za> ?ric Araujo added the comment: I would ignore options from all config files, and do the simplest thing (i.e. not add the ignore_options attribute). ---------- assignee: vinay.sajip -> eric.araujo components: +Distutils -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:35:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Apr 2013 19:35:34 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <3ZqKgV1PB3zSds@mail.python.org> Roundup Robot added the comment: New changeset 527b7f88b53c by Antoine Pitrou in branch '2.7': Issue #17710: Fix cPickle raising a SystemError on bogus input. http://hg.python.org/cpython/rev/527b7f88b53c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:38:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Apr 2013 19:38:53 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366054733.35.0.154365055296.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think Antoine is more appropriate for committing this patch. I waited so long with this because I do not dare to take responsibility for themselves (it's almost like adding a new module). ---------- assignee: serhiy.storchaka -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:43:04 2013 From: report at bugs.python.org (Georg Brandl) Date: Mon, 15 Apr 2013 19:43:04 +0000 Subject: [issue17728] format() default precisions undocumented In-Reply-To: <1365934064.51.0.124560833588.issue17728@psf.upfronthosting.co.za> Message-ID: <1366054984.11.0.458009734575.issue17728@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 21:43:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Apr 2013 19:43:59 +0000 Subject: [issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned In-Reply-To: <1353845836.76.0.0245039537422.issue16550@psf.upfronthosting.co.za> Message-ID: <1366055039.28.0.134109536943.issue16550@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: serhiy.storchaka -> alexandre.vassalotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 22:05:49 2013 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Apr 2013 20:05:49 +0000 Subject: [issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case In-Reply-To: <1365869097.02.0.582677403017.issue17716@psf.upfronthosting.co.za> Message-ID: <1366056349.71.0.764209668196.issue17716@psf.upfronthosting.co.za> Brett Cannon added the comment: Have to think about the whole rollback situation in terms of a failure to import a parent. Whenever you want to change the semantics of import you will break someone's code, it's just a question of how wide the breakage would be and how much of an improvement it will lead to. Probably cheapest way to tell is to implement it and see if the stdlib's test suite still passes. In terms of implementation, I guess you would need to check if the import failed on a package (if possible), and then do a prefix search through all the keys in sys.modules to see if any children made it through, and then drop them and mention their import failure as well (probably through some exception chaining). It obviously makes failed exceptions more expensive, but I don't think people treat them as a cheap form of EAFP like other uses of exceptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 22:20:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Apr 2013 20:20:05 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <3ZqLfs0DjczSYX@mail.python.org> Roundup Robot added the comment: New changeset 4e412cbaaf96 by Antoine Pitrou in branch '3.3': Issue #17710: Fix pickle raising a SystemError on bogus input. http://hg.python.org/cpython/rev/4e412cbaaf96 New changeset 5a16d2992112 by Antoine Pitrou in branch 'default': Issue #17710: Fix pickle raising a SystemError on bogus input. http://hg.python.org/cpython/rev/5a16d2992112 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 22:23:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 20:23:43 +0000 Subject: [issue17710] SystemError in cPickle for incorrect input In-Reply-To: <1365850822.02.0.920252942398.issue17710@psf.upfronthosting.co.za> Message-ID: <1366057423.23.0.151382514117.issue17710@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the patches. Feel free to improve the default branch if you like. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 22:29:30 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 20:29:30 +0000 Subject: [issue17671] io.BufferedRWPair can use uninitialized members In-Reply-To: <1365465332.23.0.700317324795.issue17671@psf.upfronthosting.co.za> Message-ID: <1366057770.5.0.759555096222.issue17671@psf.upfronthosting.co.za> Antoine Pitrou added the comment: About the test: + self.assertRaises(Exception, pair.read) + self.assertRaises(Exception, pair.write) First, you should check for the actual RuntimeError. Second, you need to pass the right arguments for these method calls: for example read(1) and write(b"x"). Otherwise the Exception could correspond to something else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 22:49:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 20:49:42 +0000 Subject: [issue17741] event-driven XML parser Message-ID: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> New submission from Antoine Pitrou: iterparse() is a blocking operation. It is not really suitable for event-driven applications (e.g. non-blocking I/O). Here is a patch adding a IncrementalParser class. ---------- components: Library (Lib) files: etree_incparser.patch keywords: patch messages: 187029 nosy: eli.bendersky, flox, pitrou priority: normal severity: normal stage: patch review status: open title: event-driven XML parser type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29874/etree_incparser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 22:51:38 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 20:51:38 +0000 Subject: [issue17741] event-driven XML parser In-Reply-To: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> Message-ID: <1366059098.55.0.364191347135.issue17741@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Note that basing iterparse() on IncrementalParser and removing the API discrepancy between the Python and C modules helps make the etree code smaller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 23:02:03 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Apr 2013 21:02:03 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1366059723.18.0.306365979506.issue17670@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the suggested. Here's a revised wording and a slightly more legible example: Return a copy of the string where all tab characters are replaced by zero or more spaces, depending on the current tab column and the given tab size. Starting at the first character of the string, the tab column is set to zero. Whenever a tab character (``\t``) is encountered, space characters are inserted as needed until the next tab position is reached and the tab column is set to that tab position; the tab character itself is not copied. Whenever a newline character (``\n`` or ``\r``) is encountered, it is copied and the tab column is reset to zero. Any other character is copied unchanged and the tab column is incremented by one regardless of how it may be represented when printed. If *tabsize* is not given, a tab size of 8 characters is assumed. >>> '012\t4\t89'.expandtabs(4) '012 4 89' ---------- Added file: http://bugs.python.org/file29875/issue17670_doc_rev_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 23:13:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 21:13:14 +0000 Subject: [issue17739] ssl.SSLSocket.getpeercert does not return client certificate In-Reply-To: <1366038894.17.0.187002314395.issue17739@psf.upfronthosting.co.za> Message-ID: <1366060394.94.0.614898996561.issue17739@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for reporting this. This is a documentation issue. As stated in the OpenSSL docs: "Due to the protocol definition, a TLS/SSL server will always send a certificate, if present. A client will only send a certificate when explicitly requested to do so by the server (see SSL_CTX_set_verify(3))." (Note that you can use CERT_OPTIONAL on the server. This will let through clients without a certificate, but will reject clients with an invalid certificate.) ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, pitrou stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 23:25:21 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 15 Apr 2013 21:25:21 +0000 Subject: [issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible In-Reply-To: <1362781994.31.0.121984055749.issue17386@psf.upfronthosting.co.za> Message-ID: <1366061121.74.0.709749750539.issue17386@psf.upfronthosting.co.za> Zachary Ware added the comment: I caught a small oversight. This new patch changes the example in README.txt to ``make html "PYTHON2=C:\Python27\python.exe"`` (PYTHON->PYTHON2). Also, I added a bit of backward compatibility to make.bat; %PYTHON2% will default to %PYTHON% if it is set. Otherwise, %PYTHON% is ignored and unchanged. ---------- Added file: http://bugs.python.org/file29876/win_doc_make.v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 23:35:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 15 Apr 2013 21:35:41 +0000 Subject: [issue17738] Unnecessary "if" in SHA1_copy In-Reply-To: <1366035024.21.0.783784062683.issue17738@psf.upfronthosting.co.za> Message-ID: <1366061741.52.0.147689118506.issue17738@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gregory.p.smith stage: -> patch review versions: +Python 2.7 -Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 15 23:57:13 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Mon, 15 Apr 2013 21:57:13 +0000 Subject: [issue15281] pyvenv --symlinks option is a no-op? In-Reply-To: <1341675510.24.0.416671411372.issue15281@psf.upfronthosting.co.za> Message-ID: <1366063033.09.0.296806527662.issue15281@psf.upfronthosting.co.za> Piotr Dobrogost added the comment: It's simpler but is it better this way? I doubt. I think we should take advantage of symlinks whenever we can and only fallback to copying if they are not available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 00:03:35 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Apr 2013 22:03:35 +0000 Subject: [issue17742] Add _PyBytesWriter API Message-ID: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> New submission from STINNER Victor: In Python 3.3, I added _PyUnicodeWriter API to factorize code handling a Unicode "buffer", just the code to allocate memory and resize the buffer if needed. I propose to do the same with a new _PyBytesWriter API. The API is very similar to _PyUnicodeWriter: * _PyBytesWriter_Init(writer) * _PyBytesWriter_Prepare(writer, count) * _PyBytesWriter_WriteStr(writer, bytes_obj) * _PyBytesWriter_WriteChar(writer, ch) * _PyBytesWriter_Finish(writer) * _PyBytesWriter_Dealloc(writer) The patch changes ASCII, Latin1, UTF-8 and charmap encoders to use _PyBytesWriter API. A second patch changes CJK encoders. I did not run a benchmark yet. I wrote a patch to factorize the code, not the make the code faster. Notes on performances: * I peek the "small buffer allocated on the stack" idea from UTF-8 encoder, but the smaller buffer is always 500 bytes (instead of a size depending on the Unicode maximum character of the input Unicode string) * _PyBytesWriter overallocates by 25% (when overallocation is enabled), whereas charmap encoders doubles the buffer: /* exponentially overallocate to minimize reallocations */ if (requiredsize < 2*outsize) requiredsize = 2*outsize; * I didn't check if the allocation size is the same with the patch. min_size and overallocate attributes should be set correctly to not make the code slower. * The code writing a single into a _PyUnicodeWriter buffer is inlined in unicodeobject.c. _PyBytesWriter API does not provide inlined function for the same purpose. ---------- files: bytes_writer.patch keywords: patch messages: 187035 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Add _PyBytesWriter API versions: Python 3.4 Added file: http://bugs.python.org/file29877/bytes_writer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 00:03:50 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Apr 2013 22:03:50 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366063430.76.0.913030645194.issue17742@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file29878/bytes_writer_cjkcodecs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 00:10:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Apr 2013 22:10:19 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366063819.22.0.662123359838.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #17694. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 00:12:43 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Mon, 15 Apr 2013 22:12:43 +0000 Subject: [issue17743] Use extended syntax of `set` command in activate.bat/deactivate.bat batch files. Message-ID: <1366063963.5.0.506967251468.issue17743@psf.upfronthosting.co.za> New submission from Piotr Dobrogost: This makes it possible to handle paths/usernames with special characters - see https://github.com/pypa/virtualenv/pull/352 ---------- components: Library (Lib) messages: 187037 nosy: piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: Use extended syntax of `set` command in activate.bat/deactivate.bat batch files. type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 00:14:31 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Mon, 15 Apr 2013 22:14:31 +0000 Subject: [issue17744] Unset VIRTUAL_ENV environment variable in deactivate.bat Message-ID: <1366064071.06.0.700925428013.issue17744@psf.upfronthosting.co.za> New submission from Piotr Dobrogost: activate.bat sets VIRTUAL_ENV environment variable. This variable is treated as a sign that virtualenv is active. For this reason deactivate.bat should unset this variable. See https://github.com/pypa/virtualenv/pull/364 ---------- components: Library (Lib) messages: 187038 nosy: piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: Unset VIRTUAL_ENV environment variable in deactivate.bat type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 00:47:46 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Apr 2013 22:47:46 +0000 Subject: [issue17012] Differences between /usr/bin/which and shutil.which() In-Reply-To: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> Message-ID: <1366066066.85.0.517786472561.issue17012@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 00:48:58 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Apr 2013 22:48:58 +0000 Subject: [issue17012] Differences between /usr/bin/which and shutil.which() In-Reply-To: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> Message-ID: <1366066138.78.0.78874877006.issue17012@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: >From a documentation standpoint, path='' is not the same as "When no path is specified", so indeed it should return None when path=''. Serhiy's patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 00:57:15 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 15 Apr 2013 22:57:15 +0000 Subject: [issue17012] Differences between /usr/bin/which and shutil.which() In-Reply-To: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> Message-ID: <1366066635.97.0.172143368246.issue17012@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 02:01:03 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Tue, 16 Apr 2013 00:01:03 +0000 Subject: [issue17745] "packaging" no longer planned to be included Message-ID: <1366070463.53.0.324723238706.issue17745@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe: attached patch reflects current reality (me assuming that PEPs are living documents) ---------- assignee: docs at python components: Documentation files: diff messages: 187040 nosy: docs at python, tshepang priority: normal severity: normal status: open title: "packaging" no longer planned to be included Added file: http://bugs.python.org/file29879/diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 02:52:49 2013 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 16 Apr 2013 00:52:49 +0000 Subject: [issue17741] event-driven XML parser In-Reply-To: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> Message-ID: <1366073569.19.0.488259624045.issue17741@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 03:16:48 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 16 Apr 2013 01:16:48 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1366075008.51.0.412088061309.issue17670@psf.upfronthosting.co.za> Eli Bendersky added the comment: It's better, although the distinction between "tab column" and "tab position" is not entirely clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 03:24:10 2013 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 16 Apr 2013 01:24:10 +0000 Subject: [issue17741] event-driven XML parser In-Reply-To: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> Message-ID: <1366075450.55.0.0933888929635.issue17741@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks Antoine. This looks interesting - I'm somewhat swamped ATM but will try to review the patch in the next few days. Incidentally, since it is a new feature would it be worthwhile to discuss it on python-ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 03:34:56 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Apr 2013 01:34:56 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366076096.63.0.827804683271.issue16694@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would like to spend some time with this before it goes forward (especially the attrgetter, itemgetter, methodgetter group). Right now, it looks like a nice effort but I don't see how it makes Python any better for adding it. The odds are that this code will add bloat but not benefit any user (it won't get called at all). ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 03:39:08 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Apr 2013 01:39:08 +0000 Subject: [issue17738] Unnecessary "if" in SHA1_copy In-Reply-To: <1366035024.21.0.783784062683.issue17738@psf.upfronthosting.co.za> Message-ID: <3ZqTkz1vdWzSLn@mail.python.org> Roundup Robot added the comment: New changeset aec657f11b66 by Benjamin Peterson in branch '3.3': remove pointless code (closes #17738) http://hg.python.org/cpython/rev/aec657f11b66 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 03:39:26 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 01:39:26 +0000 Subject: [issue17012] Differences between /usr/bin/which and shutil.which() In-Reply-To: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> Message-ID: <1366076366.94.0.4622099091.issue17012@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: barry -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 03:39:45 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 01:39:45 +0000 Subject: [issue17012] Differences between /usr/bin/which and shutil.which() In-Reply-To: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> Message-ID: <1366076385.49.0.0342221896455.issue17012@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Serhiy, I'd say go ahead and commit it. +1 from me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 04:00:06 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 02:00:06 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366077606.23.0.0223412854827.issue16694@psf.upfronthosting.co.za> R. David Murray added the comment: Raymond: it's not for the benefit of CPython. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 05:15:45 2013 From: report at bugs.python.org (Kyle Simpson) Date: Tue, 16 Apr 2013 03:15:45 +0000 Subject: [issue17735] inspect.findsource throws IndexError In-Reply-To: <1366030340.02.0.51431850328.issue17735@psf.upfronthosting.co.za> Message-ID: <1366082145.21.0.653844690504.issue17735@psf.upfronthosting.co.za> Kyle Simpson added the comment: Right, this issue is about the IndexError. The current patch for issue 1218234 doesn't solve this problem. You will still get IndexErrors, but you will get them when functions are removed rather than when functions are added. I think we should simply throw an IOError instead of an IndexError. This matches the docstring and prevents help() from blowing up after reloading a module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 06:16:42 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Apr 2013 04:16:42 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366085802.18.0.849944912444.issue16694@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [David] > Raymond: it's not for the benefit of CPython. IIRC, all the other implementations of Python already have this code passing tests, so it isn't really for their benefit either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 06:22:58 2013 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 16 Apr 2013 04:22:58 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366086178.81.0.201591535596.issue16694@psf.upfronthosting.co.za> Alex Gaynor added the comment: If a pure python operator module were a part of the stdlib, we (PyPy) would probably delete most (if not all) of our own operator module. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 08:40:33 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Apr 2013 06:40:33 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366094433.49.0.910975897471.issue16694@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I reviewed the attrgetter(), mathodgetter(), and itemgetter() code in py_operator.v12.diff. The looks clean and correct. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 09:09:45 2013 From: report at bugs.python.org (paul j3) Date: Tue, 16 Apr 2013 07:09:45 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366096185.32.0.672667122425.issue14191@psf.upfronthosting.co.za> paul j3 added the comment: This patch permits the mixing of optionals with positionals, with the caveat that a particular positional cannot be split up. If: parser = ArgumentParser() parser.add_argument('-f','--foo') parser.add_argument('cmd') parser.add_argument('rest', nargs='*') '-f1 cmd 1 2 3', 'cmd -f1 1 2 3', 'cmd 1 2 3 -f1' all give {cmd='cmd', rest=['1','2','3'], foo='1'}. But 'cmd 1 -f1 2 3', does not recognize ['2','3']. Previously 'cmd -f1 1 2 3' would return rest=[], and not recognize ['1','2','3']. With this change the nargs='*' behaves more like nargs='+', surviving to parse the 2nd group of positional strings. The trick is to modify arg_counts in consume_positionals(), removing matches that don't do anything (don't consume argument strings). if 'O' in arg_strings_pattern[start_index:]: # if there is an optional after this, remove # 'empty' positionals from the current match while len(arg_counts)>1 and arg_counts[-1]==0: arg_counts = arg_counts[:-1] This change passes all of the existing test_argparse.py tests. It also passes the optparse tests that I added in http://bugs.python.org/issue9334#msg184987 I added 4 cases to illustrate this change. ---------- Added file: http://bugs.python.org/file29880/mixed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 09:10:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Apr 2013 07:10:57 +0000 Subject: [issue17119] Integer overflow when passing large string or tuple to Tkinter In-Reply-To: <1359920139.05.0.774798858282.issue17119@psf.upfronthosting.co.za> Message-ID: <1366096257.43.0.690115700974.issue17119@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch. Please run test_tcl test on 64-bit platform with > 20 GiB of memory. I haven't included a test for huge tuples because it requires a lot of memory (perhaps the hundreds of GiBs) and should run a long time. It is impossible to calculate exact requirements from Python side, it's TCL implementation details. I'm not sure even about a huge string test. ---------- keywords: +patch nosy: +gpolo stage: needs patch -> patch review title: Integer overflow when passing large string to Tkinter -> Integer overflow when passing large string or tuple to Tkinter versions: -Python 3.2 Added file: http://bugs.python.org/file29881/tkinter_size_overflow.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 09:46:03 2013 From: report at bugs.python.org (xiaowei) Date: Tue, 16 Apr 2013 07:46:03 +0000 Subject: [issue17320] os.path.abspath in window7, return error In-Reply-To: <1362050461.97.0.932202728371.issue17320@psf.upfronthosting.co.za> Message-ID: <1366098363.17.0.642009746795.issue17320@psf.upfronthosting.co.za> Changes by xiaowei : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 09:51:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Apr 2013 07:51:36 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366098696.48.0.901537082771.issue17742@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please provide the benchmarks results? I am afraid that it may hit a performance. Results on Windows are especially interesting. ---------- components: +Interpreter Core stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 09:52:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Apr 2013 07:52:13 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366098733.18.0.0759604940994.issue17742@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 09:53:55 2013 From: report at bugs.python.org (Greg Trahair) Date: Tue, 16 Apr 2013 07:53: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: <1366098835.79.0.757219809875.issue17204@psf.upfronthosting.co.za> Changes by Greg Trahair : ---------- nosy: +Greg.Trahair _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 09:55:47 2013 From: report at bugs.python.org (Greg Trahair) Date: Tue, 16 Apr 2013 07:55:47 +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: <1366098947.1.0.24956060254.issue17204@psf.upfronthosting.co.za> Changes by Greg Trahair : ---------- nosy: -Greg.Trahair _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 10:13:18 2013 From: report at bugs.python.org (Jean-Baptiste Lallement) Date: Tue, 16 Apr 2013 08:13:18 +0000 Subject: [issue17746] test_shutil.TestWhich.test_non_matching_mode fails when running as root Message-ID: <1366099998.54.0.409643145074.issue17746@psf.upfronthosting.co.za> New submission from Jean-Baptiste Lallement: The test test_shutil.TestWhich.test_non_matching_mode fails when running as root because the temporary file is always writeable for this user. To reproduce on linux: $ sudo python3.3 -E -Wd -tt /usr/lib/python3.3/test/regrtest.py -v -w test_shutil [...] ====================================================================== FAIL: test_non_matching_mode (test.test_shutil.TestWhich) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_shutil.py", line 1334, in test_non_matching_mode self.assertIsNone(rv) AssertionError: '/tmp/Tmpnf1xg5/Tmptzup_q.Exe' is not None ---------------------------------------------------------------------- Possible solutions: - skip the test when running as root - search for a file with executable bit set instead of writeable - set immutable attribute on the file ---------- components: Tests files: test_shutil.log messages: 187054 nosy: jibel priority: normal severity: normal status: open title: test_shutil.TestWhich.test_non_matching_mode fails when running as root versions: Python 3.3 Added file: http://bugs.python.org/file29882/test_shutil.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 10:14:25 2013 From: report at bugs.python.org (Jean-Baptiste Lallement) Date: Tue, 16 Apr 2013 08:14:25 +0000 Subject: [issue17746] test_shutil.TestWhich.test_non_matching_mode fails when running as root In-Reply-To: <1366099998.54.0.409643145074.issue17746@psf.upfronthosting.co.za> Message-ID: <1366100065.44.0.489621895406.issue17746@psf.upfronthosting.co.za> Jean-Baptiste Lallement added the comment: Reference on LP: https://bugs.launchpad.net/ubuntu/+source/python3.3/+bug/1169458 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 10:43:02 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Apr 2013 08:43:02 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366101782.0.0.221641150336.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Now we can remove all __func__s from _operator.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:02:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Apr 2013 09:02:44 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366102964.9.0.374821016144.issue17742@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I did not run a benchmark yet. I wrote a patch to factorize the code, > not the make the code faster. Your patches don't seem to reduce the line count, so I don't understand the point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:03:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Apr 2013 09:03:40 +0000 Subject: [issue17745] "packaging" no longer planned to be included In-Reply-To: <1366070463.53.0.324723238706.issue17745@psf.upfronthosting.co.za> Message-ID: <1366103020.22.0.122338173227.issue17745@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Distutils, Distutils2 nosy: +alexis, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:05:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Apr 2013 09:05:28 +0000 Subject: [issue17741] event-driven XML parser In-Reply-To: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> Message-ID: <1366103128.1.0.732166861108.issue17741@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've posted on the tulip mailing-list already: https://groups.google.com/forum/?fromgroups=#!topic/python-tulip/SNOnS27Bctc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:19:35 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Apr 2013 09:19:35 +0000 Subject: [issue17746] test_shutil.TestWhich.test_non_matching_mode fails when running as root In-Reply-To: <1366099998.54.0.409643145074.issue17746@psf.upfronthosting.co.za> Message-ID: <1366103975.23.0.785599461852.issue17746@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Library (Lib) -Tests nosy: +hynek, serhiy.storchaka, tarek stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:20:07 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 16 Apr 2013 09:20:07 +0000 Subject: [issue17747] Deprecate pickle fast mode Message-ID: <1366104007.06.0.988369979601.issue17747@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti: Pickle fast mode is currently a deprecated feature of the Pickler class used to disable its memoization mechanism. It was used mainly to create smaller output by not emitting a PUT opcode for each object saved. Unfortunately, this mode only worked with non-cyclic data structures. If it encounters a such structure, this will result in a recursion exceed error (or a stack overflow if we are unlucky). However, if correctly used, the fast mode is indeed faster. ./perf.py -b fastpickle ../cpython/python.exe ../fastmode/python.exe Running fastpickle... INFO:root:Running ../fastmode/python.exe ./performance/bm_pickle.py -n 50 --use_cpickle pickle INFO:root:Running ../cpython/python.exe ./performance/bm_pickle.py -n 50 --use_cpickle pickle Report on Darwin avassalotti.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64 i386 Total CPU cores: 4 ### fastpickle ### Min: 0.588284 -> 0.466613: 1.26x faster Avg: 0.599152 -> 0.476224: 1.26x faster Significant (t=70.69) Stddev: 0.00862 -> 0.00877: 1.0173x larger Timeline: http://tinyurl.com/btrxdm9 Anyhow, I am not convinced the mode is worth keeping for such limited use cases. The feature was undocumented throughout Python 2.x. So it found very few users if any. And it has currently no test coverage at all. So, in my opinion, the feature is at moment more a maintenance burden than anything else. Now, if we are to deprecate it, I propose we change fast mode to do nothing and leave the 'fast' attribute on Pickler to not break any code that might use it. We should also emit a warning whenever the attribute is set. ---------- assignee: alexandre.vassalotti components: Library (Lib) keywords: needs review messages: 187059 nosy: alexandre.vassalotti, pitrou, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Deprecate pickle fast mode type: behavior versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:22:52 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Tue, 16 Apr 2013 09:22:52 +0000 Subject: [issue17748] Condition.wait timeout can't be set to more than 50 ms Message-ID: <1366104172.5.0.472723952105.issue17748@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: On Python 2, Condition.wait timeout is always taken as min(delay * 2, remaining, .05) which means it cannot be longer than 50 ms. I don't see a reason for this and AFAIK this is no longer true for Python 3, where timeout can be arbitrarily long. Would it be possible to replace the min() call with just "remaining" completely? If not, would it at least be possible to add an argument to wait(), that would trigger this behaviour (something like patch suggested by Jaroslav Skarvada [1] who reported this issue at [2])? Thanks. [1] https://bugzilla.redhat.com/attachment.cgi?id=736029&action=diff [2] https://bugzilla.redhat.com/show_bug.cgi?id=917709 ---------- components: Library (Lib) messages: 187060 nosy: bkabrda priority: normal severity: normal status: open title: Condition.wait timeout can't be set to more than 50 ms versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:30:28 2013 From: report at bugs.python.org (Fabian) Date: Tue, 16 Apr 2013 09:30:28 +0000 Subject: [issue17749] root logging functions break logger configuration Message-ID: <1366104628.63.0.334199445392.issue17749@psf.upfronthosting.co.za> New submission from Fabian: If I get and configure a named logger in the main module and another module that is imported uses the root logging functions (e.g., logging.info("Hello World!")) somehow affects the configuration of the first (named) logger. The file m1.py defines the logger "testlogger" and then imports the module m2.py. In m2.py the root logger is used through logging.info(...). This message apparantly doesn't appear anywhere. After the import in m1.py the previously defined logger is used through logger.info(...). This message appears (formatted) in the logfile: 2013-04-16 11:23:56,231 INFO Hello from __main__ and (unformatted) at stdout: INFO:testlogger:Hello from __main__ I did not expect this behavior, therefore I reported this bug. In my expectation the call to logging.info() should not affect the behavior of the named and configured logger. Main module (m1.py): import logging def setup_logging(): # made this a function to avoid cluttering the global namespace logger = logging.getLogger("testlogger") logger.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') handler = (logging.FileHandler("testlog.log"), logging.StreamHandler()) handler = handler[0] # 0 : write to logfile, 1 : write to stdout handler.setFormatter(formatter) logger.addHandler(handler) return logger logger = setup_logging() import m2 logger.info("Hello from %s", __name__) Other module (m2.py) import logging logging.info("Hello from %s", __name__) I observed this behavior with Python v2.7.3 ---------- components: IO messages: 187061 nosy: fmueller priority: normal severity: normal status: open title: root logging functions break logger configuration versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:35:14 2013 From: report at bugs.python.org (=?utf-8?q?Jaroslav_=C5=A0karvada?=) Date: Tue, 16 Apr 2013 09:35:14 +0000 Subject: [issue17748] Condition.wait timeout can't be set to more than 50 ms In-Reply-To: <1366104172.5.0.472723952105.issue17748@psf.upfronthosting.co.za> Message-ID: <1366104913.98.0.143982326257.issue17748@psf.upfronthosting.co.za> Jaroslav ?karvada added the comment: The current behaviour is not good for power consumption especially with the current tickless kernels - the python processes using "threading" shows in the top of the "powertop" list (on machine tuned for low power consumption) causing 20 wakeups per second. Also I can confirm the python3 behaves correctly (shows in the bottom of the "powertop" list). ---------- nosy: +yarda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:45:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Apr 2013 09:45:02 +0000 Subject: [issue17748] Condition.wait timeout can't be set to more than 50 ms In-Reply-To: <1366104172.5.0.472723952105.issue17748@psf.upfronthosting.co.za> Message-ID: <1366105502.86.0.474438751367.issue17748@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Locks in 2.7 don't support a timeout, which is why Condition.wait has a polling loop. The comment explains it all: # Balancing act: We can't afford a pure busy loop, so we # have to sleep; but if we sleep the whole timeout time, # we'll be unresponsive. Lock timeouts are a new feature in 3.2 and therefore won't be backported in 2.7, which is in bugfix mode. Consider it a good reason to switch to 3.x :-) (yes, we are aware about the power consumption issue) ---------- nosy: +pitrou resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 11:45:35 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Apr 2013 09:45:35 +0000 Subject: [issue17749] root logging functions break logger configuration In-Reply-To: <1366104628.63.0.334199445392.issue17749@psf.upfronthosting.co.za> Message-ID: <1366105535.52.0.220893789564.issue17749@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:23:10 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:23:10 +0000 Subject: [issue17746] test_shutil.TestWhich.test_non_matching_mode fails when running as root In-Reply-To: <1366099998.54.0.409643145074.issue17746@psf.upfronthosting.co.za> Message-ID: <1366107790.18.0.221913332665.issue17746@psf.upfronthosting.co.za> Matthias Klose added the comment: one way would be to skip this test when running as root. Would the check for the X bit work on Windows? @unittest.skipUnless(hasattr(os, 'getuid') and os.getuid() != 0, "test always succeeds as root") ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:28:23 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Apr 2013 10:28:23 +0000 Subject: [issue11957] re.sub confusion between count and flags args In-Reply-To: <1304101630.86.0.175815070517.issue11957@psf.upfronthosting.co.za> Message-ID: <1366108103.21.0.125630882088.issue11957@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:35:25 2013 From: report at bugs.python.org (Stijn Hoop) Date: Tue, 16 Apr 2013 10:35:25 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366108525.31.0.437864962387.issue5004@psf.upfronthosting.co.za> Stijn Hoop added the comment: Still seeing this on Fedora 18 / Python 2.7.3. I only have loopback in /etc/hosts [TUE\shoop at pclin281] <~> cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 I search in .campus.tue.nl and .win.tue.nl: [TUE\shoop at pclin281] <~> grep search /etc/resolv.conf search campus.tue.nl. win.tue.nl. Hostname -f reliably returns .campus.tue.nl as it should [TUE\shoop at pclin281] <~> hostname -f pclin281.campus.tue.nl [TUE\shoop at pclin281] <~> hostname -f pclin281.campus.tue.nl But socket.getfqdn disagrees, even with itself when run multiple times: [TUE\shoop at pclin281] <~> python Python 2.7.3 (default, Aug 9 2012, 17:23:57) [GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.getfqdn() 'pclin281' >>> socket.getfqdn() 'pclin281.win.tue.nl' >>> socket.getfqdn() 'pclin281' >>> socket.getfqdn() 'pclin281.win.tue.nl' >>> Note that pclin281.win.tue.nl is in fact also a valid DNS entry, but not one that I would expect the function to ever return given the search order. ---------- nosy: +Stijn.Hoop _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:39:40 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:39:40 +0000 Subject: [issue17750] allow the testsuite to run in the installed location Message-ID: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> New submission from Matthias Klose: [Meta issue, opening separate issues for test cases] The default install always installs the testsuite together with all the python batteries. So make sure that you can run the testsuite can run from the installed location too. - some tests require the sources to run (using the srcdir macro, or files not installed, e.g. xxmodule.c). - some tests assume write permissions. - some tests assume not being run as root. ---------- assignee: doko components: Tests messages: 187066 nosy: doko priority: normal severity: normal stage: needs patch status: open title: allow the testsuite to run in the installed location type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:39:57 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:39:57 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366108797.88.0.101551329867.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_shutil.TestWhich.test_non_matching_mode fails when running as root _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:40:20 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:40:20 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366108820.46.0.205291210791.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- nosy: +jibel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:46:52 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:46:52 +0000 Subject: [issue17751] ctypes/test/test_macholib.py fails when run from the installed location Message-ID: <1366109212.26.0.351017025931.issue17751@psf.upfronthosting.co.za> New submission from Matthias Klose: the ctypes tests unconditionally import macholib.dyld, which is not available in an installed testsuite on other platforms. So either don't install this test, or only run the import and test when on MacOS? ---------- components: Tests messages: 187067 nosy: doko priority: normal severity: normal stage: needs patch status: open title: ctypes/test/test_macholib.py fails when run from the installed location type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:47:23 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:47:23 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366109243.12.0.0537652001317.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +ctypes/test/test_macholib.py fails when run from the installed location _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:49:34 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:49:34 +0000 Subject: [issue17752] many distutils tests fail when run from the installed location Message-ID: <1366109374.8.0.221213577793.issue17752@psf.upfronthosting.co.za> New submission from Matthias Klose: many distutils tests fail when run from the installed location, either depending on the 'srcdir' macro, files not installed ('xxmodule.c'), or needing write permissions in the installed location. ---------- components: Tests messages: 187068 nosy: doko priority: normal severity: normal stage: needs patch status: open title: many distutils tests fail when run from the installed location versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:49:54 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:49:54 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366109394.04.0.0311374983531.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +many distutils tests fail when run from the installed location _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:53:57 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:53:57 +0000 Subject: [issue17753] test_zipfile: requires write access to test and email.test Message-ID: <1366109637.36.0.807884734436.issue17753@psf.upfronthosting.co.za> New submission from Matthias Klose: test_zipfile requires write access to the installed location, when trying to byte-compile files. ====================================================================== ERROR: test_write_pyfile (test.test_zipfile.PyZipFileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_zipfile.py", line 876, in test_write_pyfile zipfp.writepy(fn) File "/usr/lib/python3.3/zipfile.py", line 1622, in writepy fname, arcname = self._get_codename(pathname[0:-3], basename) File "/usr/lib/python3.3/zipfile.py", line 1674, in _get_codename if _compile(file_py): File "/usr/lib/python3.3/zipfile.py", line 1639, in _compile py_compile.compile(file, doraise=True, optimize=optimize) File "/usr/lib/python3.3/py_compile.py", line 141, in compile with open(cfile, 'wb') as fc: PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.3/test/__pycache__/test_zipfile.cpython-33.pyc' ====================================================================== ERROR: test_write_with_optimization (test.test_zipfile.PyZipFileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_zipfile.py", line 920, in test_write_with_optimization zipfp.writepy(packagedir) File "/usr/lib/python3.3/zipfile.py", line 1585, in writepy fname, arcname = self._get_codename(initname[0:-3], basename) File "/usr/lib/python3.3/zipfile.py", line 1689, in _get_codename if not _compile(file_py, optimize=self._optimize): File "/usr/lib/python3.3/zipfile.py", line 1639, in _compile py_compile.compile(file, doraise=True, optimize=optimize) File "/usr/lib/python3.3/py_compile.py", line 141, in compile with open(cfile, 'wb') as fc: PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.3/email/__pycache__/__init__.cpython-33.pyo' ---------- components: Tests messages: 187069 nosy: doko priority: normal severity: normal stage: needs patch status: open title: test_zipfile: requires write access to test and email.test versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 12:54:13 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 10:54:13 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366109653.86.0.268295611348.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_zipfile: requires write access to test and email.test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:14:31 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:14:31 +0000 Subject: [issue17754] test_ctypes assumes LANG=C LC_ALL=C Message-ID: <1366110871.25.0.649633802528.issue17754@psf.upfronthosting.co.za> New submission from Matthias Klose: this test assumes LANG=C LC_ALL=C test.test_ctypes (unittest.loader.LoadTestsFailure) ... ERROR ====================================================================== ERROR: test.test_ctypes (unittest.loader.LoadTestsFailure) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_ctypes.py", line 11, in load_tests skipped, testcases = ctypes.test.get_tests(ctypes.test, "test_*.py", verbosity=0) File "/usr/lib/python3.3/ctypes/test/__init__.py", line 64, in get_tests mod = __import__(modname, globals(), locals(), ['*']) File "/usr/lib/python3.3/ctypes/test/test_find.py", line 17, in lib_gle = find_library("gle") File "/usr/lib/python3.3/ctypes/util.py", line 242, in find_library return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name)) File "/usr/lib/python3.3/ctypes/util.py", line 99, in _findLib_gcc trace = f.read() File "/usr/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 471: ordinal not in range(128) ---------- components: Tests messages: 187070 nosy: doko priority: normal severity: normal stage: needs patch status: open title: test_ctypes assumes LANG=C LC_ALL=C versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:14:49 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:14:49 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366110889.82.0.226205666368.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_ctypes assumes LANG=C LC_ALL=C _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:16:12 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:16:12 +0000 Subject: [issue17754] test_ctypes assumes LANG=C LC_ALL=C In-Reply-To: <1366110871.25.0.649633802528.issue17754@psf.upfronthosting.co.za> Message-ID: <1366110972.43.0.954790639604.issue17754@psf.upfronthosting.co.za> Matthias Klose added the comment: hmm, looks more an issue in ctypes/util.py. _findLib_gcc should set the environment explicitly as already done in _findSoname_ldconfig. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:16:36 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:16:36 +0000 Subject: [issue17754] test_ctypes assumes LANG=C LC_ALL=C In-Reply-To: <1366110871.25.0.649633802528.issue17754@psf.upfronthosting.co.za> Message-ID: <1366110996.77.0.0862864690527.issue17754@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- components: +ctypes -Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:23:32 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:23:32 +0000 Subject: [issue17755] test_builtin assumes LANG=C Message-ID: <1366111412.63.0.121023508439.issue17755@psf.upfronthosting.co.za> New submission from Matthias Klose: I'm not sure about this one ... but it fails with an utf8 locale which happended to be set as the default, run from the installed location. ====================================================================== FAIL: test_input_tty_non_ascii (test.test_builtin.BuiltinTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tmp/lib/python3.4/test/test_builtin.py", line 1176, in test_input_tty_non_ascii self.check_input_tty("prompt\xe9", b"quux\xe9", "utf-8") File "/home/tmp/lib/python3.4/test/test_builtin.py", line 1167, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + ====================================================================== FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.BuiltinTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tmp/lib/python3.4/test/test_builtin.py", line 1180, in test_input_tty_non_ascii_unicode_errors self.check_input_tty("prompt\xe9", b"quux\xe9", "ascii") File "/home/tmp/lib/python3.4/test/test_builtin.py", line 1167, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + ---------- components: Tests messages: 187072 nosy: doko priority: normal severity: normal stage: needs patch status: open title: test_builtin assumes LANG=C versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:23:49 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:23:49 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366111429.21.0.126662835325.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_builtin assumes LANG=C _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:32:39 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:32:39 +0000 Subject: [issue17756] test_syntax_error fails when run in the installed location Message-ID: <1366111959.84.0.955866306047.issue17756@psf.upfronthosting.co.za> New submission from Matthias Klose: no idea yet about that one ... ====================================================================== FAIL: test_syntax_error (test.test_code_module.TestInteractiveConsole) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_code_module.py", line 57, in test_syntax_error raise AssertionError("No syntax error from console") AssertionError: No syntax error from console ---------- components: Tests messages: 187073 nosy: doko priority: normal severity: normal stage: needs patch status: open title: test_syntax_error fails when run in the installed location versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:32:57 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:32:57 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366111977.62.0.383726935654.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_syntax_error fails when run in the installed location _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:39:21 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:39:21 +0000 Subject: [issue17757] test_executable_without_cwd fails when run in the installed location Message-ID: <1366112361.07.0.169777986559.issue17757@psf.upfronthosting.co.za> New submission from Matthias Klose: this test already has a: @unittest.skipIf(sysconfig.is_python_build(), "need an installed Python. See #7774") but fails in the installed location. ====================================================================== FAIL: test_executable_without_cwd (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_subprocess.py", line 385, in test_executable_without_cwd self._assert_cwd('', "somethingyoudonthave", executable=sys.executable) File "/usr/lib/python3.3/test/test_subprocess.py", line 313, in _assert_cwd normcase(p.stdout.read().decode("utf-8"))) AssertionError: '' != '/tmp/tmp.eN4iQiwrR5/ubtree0t-testsuite-testtmp/tmpdir/test_python_21982' + /tmp/tmp.eN4iQiwrR5/ubtree0t-testsuite-testtmp/tmpdir/test_python_21982 ====================================================================== FAIL: test_executable_without_cwd (test.test_subprocess.ProcessTestCaseNoPoll) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_subprocess.py", line 385, in test_executable_without_cwd self._assert_cwd('', "somethingyoudonthave", executable=sys.executable) File "/usr/lib/python3.3/test/test_subprocess.py", line 313, in _assert_cwd normcase(p.stdout.read().decode("utf-8"))) AssertionError: '' != '/tmp/tmp.eN4iQiwrR5/ubtree0t-testsuite-testtmp/tmpdir/test_python_21982' + /tmp/tmp.eN4iQiwrR5/ubtree0t-testsuite-testtmp/tmpdir/test_python_21982 ---------- components: Tests messages: 187074 nosy: doko priority: normal severity: normal stage: needs patch status: open title: test_executable_without_cwd fails when run in the installed location versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 13:39:38 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 11:39:38 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366112378.43.0.946453150681.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_executable_without_cwd fails when run in the installed location _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 14:35:32 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 16 Apr 2013 12:35:32 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366115732.68.0.937379999723.issue15301@psf.upfronthosting.co.za> Changes by Larry Hastings : Added file: http://bugs.python.org/file29883/larry.chown.unsigned.uid.gid.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 14:36:13 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 16 Apr 2013 12:36:13 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366115773.18.0.680277561473.issue15301@psf.upfronthosting.co.za> Larry Hastings added the comment: Whoops, forgot to write something here. Updated patch (in previous edit to the issue) incorporating Serhiy's suggestions from Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 15:08:29 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 13:08:29 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366117709.08.0.567381812821.issue17750@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 15:46:38 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Tue, 16 Apr 2013 13:46:38 +0000 Subject: [issue17737] test_gdb fails on armv7hl In-Reply-To: <1366033268.62.0.309892862388.issue17737@psf.upfronthosting.co.za> Message-ID: <1366119998.57.0.443745900612.issue17737@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: This may also be related to the tests failing on official buildbots as mentioned in [1], although the error messages look different. However both of these issues seem to be a memory corruption problem, as one of the frames in stack trace (the one that fails the tests for me) has ob_refcnt < 0 and ob_type = 0x26000000, (corresponds to tuple if I'm not mistaken) and all sorts of other weird values. [1] http://bugs.python.org/issue12605#msg166423 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 15:49:52 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 13:49:52 +0000 Subject: [issue17712] test_gdb failures In-Reply-To: <1365856245.17.0.785295424505.issue17712@psf.upfronthosting.co.za> Message-ID: <1366120192.46.0.0369797087061.issue17712@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry, doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 15:50:30 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 13:50:30 +0000 Subject: [issue17712] test_gdb failures In-Reply-To: <1365856245.17.0.785295424505.issue17712@psf.upfronthosting.co.za> Message-ID: <1366120230.36.0.230499742406.issue17712@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Possibly this issue: Possibly this issue: https://bugzilla.redhat.com/show_bug.cgi?id=312011 I'm seeing tons of this on Ubuntu 13.04. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 15:51:19 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 13:51:19 +0000 Subject: [issue17758] test_site fails when the user does not have a home directory Message-ID: <1366120279.38.0.306129828747.issue17758@psf.upfronthosting.co.za> New submission from Matthias Klose: seen when running the testsuite as user nobody, with test_site fails when the user's home directory does not exist, and is not creatable (e.g. /nonexistent). FAILED (failures=3) test test_pydoc failed Re-running test 'test_site' in verbose mode test test_site crashed -- Traceback (most recent call last): File "/usr/lib/python3.3/test/regrtest.py", line 1213, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) File "/usr/lib/python3.3/test/test_site.py", line 29, in os.makedirs(site.USER_SITE) File "/usr/lib/python3.3/os.py", line 258, in makedirs makedirs(head, mode, exist_ok) File "/usr/lib/python3.3/os.py", line 258, in makedirs makedirs(head, mode, exist_ok) File "/usr/lib/python3.3/os.py", line 258, in makedirs makedirs(head, mode, exist_ok) File "/usr/lib/python3.3/os.py", line 258, in makedirs makedirs(head, mode, exist_ok) File "/usr/lib/python3.3/os.py", line 269, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/nonexistent' ---------- components: Tests messages: 187078 nosy: doko priority: normal severity: normal stage: needs patch status: open title: test_site fails when the user does not have a home directory type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 15:52:22 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 13:52:22 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366120342.41.0.680558590762.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_site fails when the user does not have a home directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 15:59:48 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 13:59:48 +0000 Subject: [issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04 Message-ID: <1366120788.32.0.41011359208.issue17759@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: socket.gethostbyname('sadflkjsasf.i.nvali.d') gives a TimeoutError instead of an IOError on Ubuntu 13.04, causing the test to fail. % ./python -m unittest test.test_urllibnet .E../home/barry/projects/python/cpython/Lib/test/test_urllibnet.py:94: DeprecationWarning: FancyURLopener style of invoking requests is deprecated. Use newer urlopen functions/methods open_url = urllib.request.FancyURLopener().open(URL) ......... ====================================================================== ERROR: test_bad_address (test.test_urllibnet.urlopenNetworkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/barry/projects/python/cpython/Lib/test/test_urllibnet.py", line 118, in test_bad_address socket.gethostbyname(bogus_domain) TimeoutError: [Errno 110] Connection timed out ---------------------------------------------------------------------- Ran 13 tests in 6.116s FAILED (errors=1) ---------- messages: 187079 nosy: barry, doko priority: normal severity: normal status: open title: test_urllibnet.test_bad_address() fails on Ubuntu 13.04 versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:07:27 2013 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 16 Apr 2013 14:07:27 +0000 Subject: [issue17749] root logging functions break logger configuration In-Reply-To: <1366104628.63.0.334199445392.issue17749@psf.upfronthosting.co.za> Message-ID: <1366121247.45.0.349576745198.issue17749@psf.upfronthosting.co.za> Vinay Sajip added the comment: No, this behaviour is as expected. The sequence of events: 1. You call setup_logging(), which creates a logger with level DEBUG, and add a file handler to it. 2. You import m2, which calls logging.info(), which adds a handler to the root logger (via basicConfig() - see the documentation note just below the documentation for the logging.log function). However, since the root logger's default level is WARNING, the logging.info() call produces no output. 3. You call logger.info(), which calls your file handler as expected, then calls the handlers of ancestor loggers (as documented - see http://docs.python.org/2.7/howto/logging.html#logging-flow for more info). This results in the message being output to file (via the handler you added in setup_logging) and to console (via the handler you added to the root logger in logging.info() in m2.py). Note that if you add a line logger.propagate = False in setup_logging before you return the logger, then the root logger's handler isn't called. However, the general best practice is to let propagation do the work (i.e. don't set it to False unless you have very specific needs). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:08:12 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 14:08:12 +0000 Subject: [issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04 In-Reply-To: <1366120788.32.0.41011359208.issue17759@psf.upfronthosting.co.za> Message-ID: <1366121292.95.0.0266660198938.issue17759@psf.upfronthosting.co.za> Matthias Klose added the comment: would be good to know if this is related to glibc-2.17, or not. There was a similiar issue ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:15:36 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Apr 2013 14:15:36 +0000 Subject: [issue17689] Fix test discovery for test_tarfile.py In-Reply-To: <1365619249.38.0.463638779993.issue17689@psf.upfronthosting.co.za> Message-ID: <1366121736.98.0.804326969812.issue17689@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I found requires_bz2 and requires_lzma that already exist; There's also requires_zlib. import_module is also somewhat similar, but it's used to skip the whole test file when the module is missing. > Here's another thought; would it be more useful to have a general > version of this skip decorator in test.support We were discussing this a couple of days ago on #python-dev. Adding a skip_unless_module('modulename') (or requires_module('modulename')) and get rid of the several requires_* is certainly an option. skip_unless_* (or requires_*) is shorter and more readable than skip_unless_module('modulename'), so this would be my preferred choice if it's defined and used within a single test module. However if we add something to test.support, I'd rather have a more generic skip_unless_module('modulename') and get rid of the requires_*. It's should also be possible to define specific ``skip_unless_x = skip_unless_module('x')`` in the test modules if necessary. > should I just add a requires_gzip to test.support and use those three > in test_tarfile? I think that's reasonable for now -- we can always refactor it later and replace them with a skip_unless_module() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:16:35 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 16 Apr 2013 14:16:35 +0000 Subject: [issue14398] bz2.BZ2DEcompressor.decompress fail on large files In-Reply-To: <1332605719.75.0.496276331472.issue14398@psf.upfronthosting.co.za> Message-ID: <1366121795.65.0.201832599253.issue14398@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Why does only 2.7 have tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:26:48 2013 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 Apr 2013 14:26:48 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1366122408.0.0.716398600189.issue16659@psf.upfronthosting.co.za> Brett Cannon added the comment: I was talking with Alex Gaynor about the Python implementation of operator (http://bugs.python.org/issue16694) and asked about this bug since Raymond said the fact PyPy had an RPython implementation was a knock against bothering with this. Alex said if performance could be shown to be good then PyPy would be willing to consider dropping their accelerated version and switch to this (http://bugs.python.org/issue16694). So if someone is so motivated, doing a benchmark showing whether PyPy's accelerated version (which is relatively new so you would need to probably grab 2.0 or maybe 1.9) is faster/same/slower than this pure Python version would be nice to have. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:31:41 2013 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 16 Apr 2013 14:31:41 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1366122701.08.0.423072601396.issue16659@psf.upfronthosting.co.za> Alex Gaynor added the comment: Looking at the patch (haven't actually benchmarked it), I have two concerns with respect to performance: a) The need for locking, this doesn't exist in the C or RPython versions because of the GIL. That locking is going to be distinctly un-free. b) The need for manually masking overflowing arithmetic (yes I know, everything is a long, but just looking at it algorithmically, we really want the 2s complement). I don't have an opinion about how to solve either of these, but without a solution I doubt performance will ever be competitive. I think it would be a mistake to assume these issues are specific to this patch, they strike me as generally applicable issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:42:25 2013 From: report at bugs.python.org (Olivier Berger) Date: Tue, 16 Apr 2013 14:42:25 +0000 Subject: [issue17760] No i18n of IDLE's interface in french Message-ID: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> New submission from Olivier Berger: The IDLE UI isn't internationalized, AFAICS. This doesn't help when teachning Python to non-english native speakers. While learning basic english skills is no problem for wanabe Python hackers, it isn't so for young programmers being tought informatics through Python classes. Maybe this is a FAQ... but I couldn't discriminate enough my search terms to find prior reports :-/ Thanks in advance. ---------- components: IDLE messages: 187086 nosy: olberger priority: normal severity: normal status: open title: No i18n of IDLE's interface in french type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:49:05 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 14:49:05 +0000 Subject: [issue17761] platform._parse_release_file doesn't close the /etc/lsb-release file, doesn't know about 'Ubuntu' Message-ID: <1366123744.99.0.817269180469.issue17761@psf.upfronthosting.co.za> New submission from Matthias Klose: platform._parse_release_file doesn't close the /etc/lsb-release file, and is missing Ubuntu in _supported_dists. ---------- components: Library (Lib) messages: 187087 nosy: doko priority: normal severity: normal stage: patch review status: open title: platform._parse_release_file doesn't close the /etc/lsb-release file, doesn't know about 'Ubuntu' versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:53:10 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 14:53:10 +0000 Subject: [issue17761] platform._parse_release_file doesn't close the /etc/lsb-release file, doesn't know about 'Ubuntu' In-Reply-To: <1366123744.99.0.817269180469.issue17761@psf.upfronthosting.co.za> Message-ID: <1366123990.86.0.499987632241.issue17761@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- keywords: +patch Added file: http://bugs.python.org/file29884/pr17761.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:53:23 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 14:53:23 +0000 Subject: [issue17761] platform._parse_release_file doesn't close the /etc/lsb-release file, doesn't know about 'Ubuntu' In-Reply-To: <1366123744.99.0.817269180469.issue17761@psf.upfronthosting.co.za> Message-ID: <1366124003.52.0.587053987092.issue17761@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- keywords: +needs review -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:55:35 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 14:55:35 +0000 Subject: [issue3949] curses' sigwinch handler isn't visible from python In-Reply-To: <1222204708.76.0.512730295083.issue3949@psf.upfronthosting.co.za> Message-ID: <1366124135.5.0.63743921919.issue3949@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: test needed -> needs patch versions: +Python 2.7, Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:56:30 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 14:56:30 +0000 Subject: [issue3948] readline steals sigwinch In-Reply-To: <1222203569.91.0.225970694441.issue3948@psf.upfronthosting.co.za> Message-ID: <1366124190.99.0.441210117862.issue3948@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 2.7, Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 16:57:33 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Apr 2013 14:57:33 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366124253.82.0.521648023255.issue17760@psf.upfronthosting.co.za> Ezio Melotti added the comment: You could try to propose this on the python-ideas mailing list -- the bug tracker is for more concrete proposals. FWIW I'm -0.5 on translating IDLE's UI. IMHO every developer must learn English sooner or later and it's better to start using it from the beginning. Most of text in the UI of IDLE should also be fairly simple to understand. ---------- nosy: +ezio.melotti, roger.serwy, terry.reedy resolution: -> rejected stage: -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:01:08 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 15:01:08 +0000 Subject: [issue17762] platform.linux_distribution() should honor /etc/os-release Message-ID: <1366124468.64.0.40642643299.issue17762@psf.upfronthosting.co.za> New submission from Matthias Klose: http://www.freedesktop.org/software/systemd/man/os-release.html is a recent standard describing release information for an operating system. platform.linux_distribution() should know about it. - should that be the first file to be parsed? - names returned for the ID are different than the ones returned from /etc/lsb-release. The os-release thing only allows lower case letters for the ID (e.g. Ubuntu vs. ubuntu). The list of _supported_distros may need to list both. - take the version from VERSION_ID - there is no real attribute for the code name. The closest maybe is VERSION. ---------- components: Library (Lib) messages: 187089 nosy: doko priority: normal severity: normal stage: needs patch status: open title: platform.linux_distribution() should honor /etc/os-release versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:03:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 16 Apr 2013 15:03:10 +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: <1366124590.1.0.253430296154.issue17762@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:14:24 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 15:14:24 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366125264.62.0.101948050507.issue17750@psf.upfronthosting.co.za> R. David Murray added the comment: This has been fixed and broken again several times in the past[1]. We need a buildbot that runs the tests installed[2]. Antoine, do you have any thoughts about how to set up such a thing? I'm willing to host it. [1] I believe there used to be a program that ran the tests installed, from a cronjob on some dedicated machine somewhere. It also ran a -R run, I think, as well as being part of a job that built the docs. When the doc building strategy was changed, somewhere in the process of the transition to Python3 (the program was Python2 only, I believe), it seems to have been taken offline completely. [2] failing when run as root is a separate problem, and less practical to set a buildbot run for, though since my buildbots run in VMs, it is not completely out of the question. ---------- nosy: +pitrou, r.david.murray type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:19:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Apr 2013 15:19:30 +0000 Subject: [issue17012] Differences between /usr/bin/which and shutil.which() In-Reply-To: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> Message-ID: <3ZqqxY5dM6zSrH@mail.python.org> Roundup Robot added the comment: New changeset eb8c575fa781 by Barry Warsaw in branch '3.3': - Issue #17012: shutil.which() no longer fallbacks to the PATH environment http://hg.python.org/cpython/rev/eb8c575fa781 New changeset 8f5b37f8f964 by Barry Warsaw in branch 'default': - Issue #17012: shutil.which() no longer fallbacks to the PATH environment http://hg.python.org/cpython/rev/8f5b37f8f964 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:20:37 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 15:20:37 +0000 Subject: [issue17755] test_builtin assumes LANG=C In-Reply-To: <1366111412.63.0.121023508439.issue17755@psf.upfronthosting.co.za> Message-ID: <1366125637.54.0.991568836193.issue17755@psf.upfronthosting.co.za> R. David Murray added the comment: Based on the test failure this may be the same as #13886 and/or #17734. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:21:11 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 15:21:11 +0000 Subject: [issue17012] Differences between /usr/bin/which and shutil.which() In-Reply-To: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> Message-ID: <1366125671.55.0.1051320443.issue17012@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I couldn't wait. :) ---------- assignee: serhiy.storchaka -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:22:58 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 15:22:58 +0000 Subject: [issue17012] Differences between /usr/bin/which and shutil.which() In-Reply-To: <1358856840.71.0.975366262743.issue17012@psf.upfronthosting.co.za> Message-ID: <1366125778.29.0.1160775823.issue17012@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:23:36 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 15:23:36 +0000 Subject: [issue17763] test_pydoc fails with the installed testsuite Message-ID: <1366125816.55.0.847870350484.issue17763@psf.upfronthosting.co.za> New submission from Matthias Klose: this fails on an Ubuntu installation, running the installed tests. confirmed by a coworker. Where does the 'invalid distro' come from? ====================================================================== FAIL: test_apropos_with_bad_package (test.test_pydoc.PydocImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_pydoc.py", line 457, in test_apropos_with_bad_package result = run_pydoc('zqwykjv', '-k', PYTHONPATH=TESTFN) File "/usr/lib/python3.3/test/test_pydoc.py", line 219, in run_pydoc rc, out, err = assert_python_ok('-B', pydoc.__file__, *args, **env) File "/usr/lib/python3.3/test/script_helper.py", line 55, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/usr/lib/python3.3/test/script_helper.py", line 47, in _assert_python "stderr follows:\n%s" % (rc, cmd_line, err.decode('ascii', 'ignore'))) AssertionError: Process return code is 2, cmd is: ['/usr/bin/python3.3dm', '-B', '/usr/lib/python3.3/pydoc.py', '-k', 'zqwykjv'], stderr follows: invalid distro: 'Ubuntu' Usage: pydoc.py [options] A simple dialog based tool for basic configuration of Speech Dispatcher and problem diagnostics. pydoc.py: error: no such option: -k ====================================================================== FAIL: test_apropos_with_unreadable_dir (test.test_pydoc.PydocImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_pydoc.py", line 467, in test_apropos_with_unreadable_dir result = run_pydoc('zqwykjv', '-k', PYTHONPATH=TESTFN) File "/usr/lib/python3.3/test/test_pydoc.py", line 219, in run_pydoc rc, out, err = assert_python_ok('-B', pydoc.__file__, *args, **env) File "/usr/lib/python3.3/test/script_helper.py", line 55, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/usr/lib/python3.3/test/script_helper.py", line 47, in _assert_python "stderr follows:\n%s" % (rc, cmd_line, err.decode('ascii', 'ignore'))) AssertionError: Process return code is 2, cmd is: ['/usr/bin/python3.3dm', '-B', '/usr/lib/python3.3/pydoc.py', '-k', 'zqwykjv'], stderr follows: invalid distro: 'Ubuntu' Usage: pydoc.py [options] A simple dialog based tool for basic configuration of Speech Dispatcher and problem diagnostics. pydoc.py: error: no such option: -k ====================================================================== FAIL: test_url_requests (test.test_pydoc.PydocUrlHandlerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.3/test/test_pydoc.py", line 560, in test_url_requests self.assertEqual(result, title) AssertionError: 'Pydoc: Error - search?key=pydoc' != 'Pydoc: Search Results' - Pydoc: Error - search?key=pydoc + Pydoc: Search Results ---------- components: Tests messages: 187094 nosy: doko priority: normal severity: normal stage: needs patch status: open title: test_pydoc fails with the installed testsuite versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:23:54 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 15:23:54 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366125834.73.0.000194929730916.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_pydoc fails with the installed testsuite _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:26:48 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 15:26:48 +0000 Subject: [issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04 In-Reply-To: <1366120788.32.0.41011359208.issue17759@psf.upfronthosting.co.za> Message-ID: <1366126008.73.0.399766722328.issue17759@psf.upfronthosting.co.za> R. David Murray added the comment: I can't see how this could be classed as a bug in Python. An invalid domain should quickly return a DNS error on a correctly configured operating system, which is what the test is testing. If this report came from less well know names, I'd just close the issue as invalid.... ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:30:15 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 16 Apr 2013 15:30:15 +0000 Subject: [issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04 In-Reply-To: <1366126008.73.0.399766722328.issue17759@psf.upfronthosting.co.za> Message-ID: <20130416113010.1be3107a@anarchist> Barry A. Warsaw added the comment: On Apr 16, 2013, at 03:26 PM, R. David Murray wrote: >I can't see how this could be classed as a bug in Python. An invalid domain >should quickly return a DNS error on a correctly configured operating system, >which is what the test is testing. If this report came from less well know >names, I'd just close the issue as invalid.... It may still be invalid (i.e. not a bug in Python), but I wanted to at least record it in our tracker for reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:32:24 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 15:32:24 +0000 Subject: [issue17763] test_pydoc fails with the installed testsuite In-Reply-To: <1366125816.55.0.847870350484.issue17763@psf.upfronthosting.co.za> Message-ID: <1366126344.9.0.870313223786.issue17763@psf.upfronthosting.co.za> Matthias Klose added the comment: this can be avoided when running python with -S, the error comes from a package installed in site-packages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:44:37 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 15:44:37 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366127077.21.0.900758733768.issue5004@psf.upfronthosting.co.za> R. David Murray added the comment: Note that socket.getfqdn is a wrapper around a couple of socket calls that are just wrappers of OS level socket calls. If you take a look at socket.py you'll see the definition. As Martin said earlier, if you (or anyone else) can figure out what hostname does differently and suggest how to patch our getfqdn method to behave similarly, I'm sure the patch will be welcome. Unfortunately there won't be any good way to write a test for this. ---------- nosy: +r.david.murray versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 17:56:45 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 15:56:45 +0000 Subject: [issue17759] test_urllibnet.test_bad_address() fails on Ubuntu 13.04 In-Reply-To: <1366120788.32.0.41011359208.issue17759@psf.upfronthosting.co.za> Message-ID: <1366127805.6.0.482378140093.issue17759@psf.upfronthosting.co.za> R. David Murray added the comment: OK, that makes sense. I leave it to you to close, I guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 18:02:34 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 16:02:34 +0000 Subject: [issue17763] test_pydoc fails with the installed testsuite In-Reply-To: <1366125816.55.0.847870350484.issue17763@psf.upfronthosting.co.za> Message-ID: <1366128154.44.0.799630224435.issue17763@psf.upfronthosting.co.za> R. David Murray added the comment: There's an issue somewhere about allowing certain tests to be run in a tailored python environment (I'm pretty sure it involved test_site but I can't lay my hands on it). It seems like test_pydoc would be another candidate for that capability. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 18:19:04 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 16:19:04 +0000 Subject: [issue17689] Fix test discovery for test_tarfile.py In-Reply-To: <1365619249.38.0.463638779993.issue17689@psf.upfronthosting.co.za> Message-ID: <1366129144.05.0.188234803286.issue17689@psf.upfronthosting.co.za> Zachary Ware added the comment: >> should I just add a requires_gzip to test.support and use those three >> in test_tarfile? > I think that's reasonable for now -- we can always refactor it later > and replace them with a skip_unless_module() Here's a patch :) ---------- Added file: http://bugs.python.org/file29885/test_tarfile_discovery.v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 18:28:50 2013 From: report at bugs.python.org (Malte Swart) Date: Tue, 16 Apr 2013 16:28:50 +0000 Subject: [issue17764] Support http.server passing bind address via commend line argument Message-ID: <1366129730.55.0.013246712373.issue17764@psf.upfronthosting.co.za> New submission from Malte Swart: The http.server supports a shortcut to start it directly via the interpreter. To be able to use this shortcut on server with insecure interfaces, this patch adds a --bind, -b option to specify a bind address. ---------- components: Library (Lib) files: http-server-bind-arg.patch keywords: patch messages: 187102 nosy: malte.swart priority: normal severity: normal status: open title: Support http.server passing bind address via commend line argument type: enhancement Added file: http://bugs.python.org/file29886/http-server-bind-arg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 19:24:36 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 17:24:36 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366133076.47.0.991256091086.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: Thank you for the review, Raymond. Since Serhiy agrees that the _operator __func__s are unnecessary, here's a v13 that removes them. Again, I'm not a native C speaker, so these new changes in _operator.c deserve a bit of extra scrutiny. Everything builds and still passes the test suite, though. Also changed in this patch, test_pow and test_inplace remove explicit testing of __func__s. Those tests are useless, as they are merely rerunning already run tests on the same function with a different name, which is confirmed by test_dunder_is_original. I can extend that test with an explicit list of funcs which should have a __func__ if anyone thinks it's worth it. ---------- Added file: http://bugs.python.org/file29887/py_operator.v13.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 19:28:24 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Apr 2013 17:28:24 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366133304.6.0.596737297909.issue17750@psf.upfronthosting.co.za> Ned Deily added the comment: We could change an existing buildbot, say one of the snakebite buildbots, to add a `make install` and run the tests from it. I don't think it should be very difficult. Just make sure ./configure --prefix= has a reasonable value like a dedicated directory (rather than /usr/local), avoid --enable-shared, rm -r on the prefix directories prior to the `make install` step, and cd to some clean directory (other than the source or build directories) then run the tests from `/bin/python -m test (or test.regrtest for 2.7) ... ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 19:35:48 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Apr 2013 17:35:48 +0000 Subject: [issue17757] test_executable_without_cwd fails when run in the installed location In-Reply-To: <1366112361.07.0.169777986559.issue17757@psf.upfronthosting.co.za> Message-ID: <1366133748.32.0.890360419735.issue17757@psf.upfronthosting.co.za> Ned Deily added the comment: Duplicate of Issue17046 ---------- nosy: +ned.deily resolution: -> duplicate status: open -> closed superseder: -> test_subprocess test_executable_without_cwd fails when run with installed python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 19:36:00 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Apr 2013 17:36:00 +0000 Subject: [issue17046] test_subprocess test_executable_without_cwd fails when run with installed python In-Reply-To: <1359266652.98.0.400492689788.issue17046@psf.upfronthosting.co.za> Message-ID: <1366133760.21.0.36938841998.issue17046@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 19:37:27 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 17:37:27 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366133847.82.0.151896095746.issue17750@psf.upfronthosting.co.za> R. David Murray added the comment: It occurs to me that the tricky bit is that the install directory contents should be (a) read-only (easy) and ideally (b) owned by root (a little trickier, but doable with a setuid script or tailored sudo command). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 20:09:51 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Apr 2013 18:09:51 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366135791.77.0.155004225006.issue17760@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The idle-dev list would be even more appropriate. I have been thinking about translated help text and have been thinking about discussing it on that list when more pressing IDLE issues are disposed of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 20:27:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Apr 2013 18:27:31 +0000 Subject: [issue17739] ssl.SSLSocket.getpeercert does not return client certificate In-Reply-To: <1366038894.17.0.187002314395.issue17739@psf.upfronthosting.co.za> Message-ID: <3Zqw6Q4Gt8zSTh@mail.python.org> Roundup Robot added the comment: New changeset 8dffb76faacc by Antoine Pitrou in branch '2.7': Issue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for server sockets. http://hg.python.org/cpython/rev/8dffb76faacc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 20:28:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Apr 2013 18:28:49 +0000 Subject: [issue17739] ssl.SSLSocket.getpeercert does not return client certificate In-Reply-To: <1366038894.17.0.187002314395.issue17739@psf.upfronthosting.co.za> Message-ID: <3Zqw805ftTzSTh@mail.python.org> Roundup Robot added the comment: New changeset 908f1a61b907 by Antoine Pitrou in branch '3.3': Issue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for server sockets. http://hg.python.org/cpython/rev/908f1a61b907 New changeset 537c1f1ab53c by Antoine Pitrou in branch 'default': Issue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for server sockets. http://hg.python.org/cpython/rev/537c1f1ab53c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 20:29:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 16 Apr 2013 18:29:25 +0000 Subject: [issue17739] ssl.SSLSocket.getpeercert does not return client certificate In-Reply-To: <1366038894.17.0.187002314395.issue17739@psf.upfronthosting.co.za> Message-ID: <1366136965.02.0.721160455626.issue17739@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I have now fixed the documentation. Thank you! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 20:31:14 2013 From: report at bugs.python.org (Nick Sloan) Date: Tue, 16 Apr 2013 18:31:14 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366137074.77.0.619151279612.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: Here is an updated patch with documentation changes and a new test. 5 tests in distutils have errors. I have left those alone for now. ---------- Added file: http://bugs.python.org/file29888/distutilsvenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 20:35:07 2013 From: report at bugs.python.org (Nick Sloan) Date: Tue, 16 Apr 2013 18:35:07 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366137307.81.0.363588684153.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: That is, errors that pre-existed my patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 20:57:01 2013 From: report at bugs.python.org (Nick Sloan) Date: Tue, 16 Apr 2013 18:57:01 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366138621.92.0.653139028138.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: Whoops. One of the options I had in my list doesn't actually exist. Here is yet another update. ---------- Added file: http://bugs.python.org/file29889/distutilsvenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 21:02:45 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 19:02:45 +0000 Subject: [issue14408] Support ./python -m unittest in the stdlib tests In-Reply-To: <1332735237.61.0.855199980132.issue14408@psf.upfronthosting.co.za> Message-ID: <1366138965.34.0.939878753594.issue14408@psf.upfronthosting.co.za> Zachary Ware added the comment: I just happened across this issue, which I think has been superseded by issues #16748 and #16968. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 21:03:48 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 19:03:48 +0000 Subject: [issue17037] Use a test.support helper to wrap the PEP 399 boilerplate In-Reply-To: <1359179328.16.0.396710574984.issue17037@psf.upfronthosting.co.za> Message-ID: <1366139028.65.0.157864098642.issue17037@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 21:04:22 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 19:04:22 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1366139062.16.0.327439303024.issue7559@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 21:06:46 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 19:06:46 +0000 Subject: [issue10572] Move test sub-packages to Lib/test In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za> Message-ID: <1366139206.42.0.768956905176.issue10572@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 21:11:10 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 16 Apr 2013 19:11:10 +0000 Subject: [issue17765] weakref.ref ignores a 'callback' keyword argument Message-ID: <1366139470.36.0.39573405184.issue17765@psf.upfronthosting.co.za> New submission from Mark Dickinson: Passing a weakref.ref callback by keyword currently fails silently: Python 3.4.0a0 (default:537c1f1ab53c, Apr 16 2013, 20:07:47) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import weakref >>> weakref.ref({1, 2, 3}, callback=lambda ref:print("collected")) For Python 3.4, I'd suggest that either (1) this should be an exception, or (2) it should be permissible to pass the callback by keyword. ---------- messages: 187115 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: weakref.ref ignores a 'callback' keyword argument type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 21:17:07 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 19:17:07 +0000 Subject: [issue17766] Fix test discovery for test_iterlen.py Message-ID: <1366139827.64.0.673243838717.issue17766@psf.upfronthosting.co.za> New submission from Zachary Ware: Just subclassing and test_main in this one. ---------- components: Tests files: test_iterlen_discovery.diff keywords: patch messages: 187116 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_iterlen.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29890/test_iterlen_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 21:51:12 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 19:51:12 +0000 Subject: [issue17767] Fix test discovery for test_locale.py Message-ID: <1366141872.94.0.252098297991.issue17767@psf.upfronthosting.co.za> New submission from Zachary Ware: This one actually had Failures rather than Errors; those failures arose from enUS_locale being None because it was being changed in test_main. This patch attempts to fix things by adapting get_enUS_locale() to return a tuple of a suitable setting for enUS_locale and a reason for skipping the tests that were formerly ignored if enUS_locale was None. ---------- components: Tests files: test_locale_discovery.diff keywords: patch messages: 187117 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_locale.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29891/test_locale_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 21:58:00 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 16 Apr 2013 19:58:00 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1366142280.41.0.273242437595.issue17707@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I think I'll just stick with the original patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 22:05:33 2013 From: report at bugs.python.org (Stefan Krah) Date: Tue, 16 Apr 2013 20:05:33 +0000 Subject: [issue17768] _decimal: allow NUL fill character Message-ID: <1366142733.14.0.416773869119.issue17768@psf.upfronthosting.co.za> New submission from Stefan Krah: Making the _decimal part of #17705 a separate issue. I noticed that decimal.py does not allow a newline as a fill character: Python 3.3.0rc2+ (default:50dd7426b880, Sep 25 2012, 15:52:28) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.modules['_decimal'] = None >>> from decimal import * >>> format(Decimal(123), "\n<10") Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.3/decimal.py", line 3768, in __format__ spec = _parse_format_specifier(specifier, _localeconv=_localeconv) File "/usr/local/lib/python3.3/decimal.py", line 6176, in _parse_format_specifier raise ValueError("Invalid format specifier: " + format_spec) ValueError: Invalid format specifier: <10 The feature isn't particularly useful, but it would be easiest for _decimal to support it rather than having another special case. Are you okay with the decimal.py patch? ---------- assignee: skrah components: Extension Modules files: decimal_newline_fillchar.diff keywords: patch messages: 187119 nosy: Jason.Michalski, Julian, eric.smith, mark.dickinson, skrah priority: normal severity: normal stage: needs patch status: open title: _decimal: allow NUL fill character type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29892/decimal_newline_fillchar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 22:20:23 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 20:20:23 +0000 Subject: [issue14408] Support ./python -m unittest in the stdlib tests In-Reply-To: <1332735237.61.0.855199980132.issue14408@psf.upfronthosting.co.za> Message-ID: <1366143623.58.0.659633347022.issue14408@psf.upfronthosting.co.za> R. David Murray added the comment: Zach, what about the test_socket patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 22:22:14 2013 From: report at bugs.python.org (Max Cantor) Date: Tue, 16 Apr 2013 20:22:14 +0000 Subject: [issue17769] python-config --ldflags gives broken output when statically linking Python with --as-needed Message-ID: <1366143734.86.0.154931116413.issue17769@psf.upfronthosting.co.za> New submission from Max Cantor: On certain Linux distributions such as Ubuntu, the linker is invoked by default with --as-needed, which has an undesireable side effect when linking static libraries: it is bad at detecting required symbols, and the order of libraries on the command line become significant. Right now, on my Ubuntu 12.10 system with a custom 32-bit version of Python, I get the following command output: mcantor at hpmongo:~$ /opt/pym32/bin/python-config --ldflags -L/opt/pym32/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic When linking a project with those flags, I get the following error: /usr/bin/ld: /opt/pym32/lib/python2.7/config/libpython2.7.a(dynload_shlib.o): undefined reference to symbol 'dlopen@@GLIBC_2.1' /usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libdl.so so try adding it to the linker command line /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../i386-linux-gnu/libdl.so: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status To resolve the error, I moved -ldl and -lutil *AFTER* -lpython2.7, so the relevant chunk of my gcc command line looked like this: -L/opt/pym32/lib/python2.7/config -lpthread -lm -lpython2.7 -ldl -lutil -Xlinker -export-dynamic I have no idea why --as-needed has such an unpleasant side effect when static libraries are being used, and it's arguable from my perspective that this behavior is the real bug. However it's equally likely that there's a good reason for that behavior, like it causes a slowdown during leap-years on Apple IIs or something. So here I am. python-config ought to respect the quirks of --as-needed when outputting its ldflags. ---------- components: Build, Cross-Build messages: 187121 nosy: Max.Cantor priority: normal severity: normal status: open title: python-config --ldflags gives broken output when statically linking Python with --as-needed type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 22:39:01 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 16 Apr 2013 20:39:01 +0000 Subject: [issue14408] Support ./python -m unittest in the stdlib tests In-Reply-To: <1332735237.61.0.855199980132.issue14408@psf.upfronthosting.co.za> Message-ID: <1366144741.62.0.419996213695.issue14408@psf.upfronthosting.co.za> Zachary Ware added the comment: The test_socket patch is incomplete with the way I've been converting test modules, but it is a good starting point. Should this issue be renamed to be specifically for test_socket? The necessity of reaping threads at the end of the test poses a bit of an issue for test discovery, which has been discussed pretty thoroughly in #16968. If the fix in that issue is approved and committed, it would be pretty easy to extend Matt's test_socket patch to complete the conversion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 22:52:04 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 20:52:04 +0000 Subject: [issue14408] Support ./python -m unittest in test_socket In-Reply-To: <1332735237.61.0.855199980132.issue14408@psf.upfronthosting.co.za> Message-ID: <1366145524.48.0.850104397072.issue14408@psf.upfronthosting.co.za> R. David Murray added the comment: Sure, let's rename it since there's a useful patch here. ---------- title: Support ./python -m unittest in the stdlib tests -> Support ./python -m unittest in test_socket _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 16 22:52:36 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 20:52:36 +0000 Subject: [issue14408] Support ./python -m unittest in test_socket In-Reply-To: <1332735237.61.0.855199980132.issue14408@psf.upfronthosting.co.za> Message-ID: <1366145556.99.0.654805154514.issue14408@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- dependencies: +Fix test discovery for test_concurrent_futures.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 00:19:45 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 16 Apr 2013 22:19:45 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1366150785.88.0.68402633139.issue17707@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 00:23:21 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 22:23:21 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366151001.82.0.757248216148.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_subprocess test_executable_without_cwd fails when run with installed python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 00:27:26 2013 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Apr 2013 22:27:26 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366151246.79.0.558367500826.issue17750@psf.upfronthosting.co.za> Matthias Klose added the comment: it doesn't have to be root, just another user as for running the testsuite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 00:30:09 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Apr 2013 22:30:09 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366151409.89.0.00620208846249.issue17750@psf.upfronthosting.co.za> R. David Murray added the comment: Right, it doesn't *have* to be root, but that would be the typical situation when the tests are run with Python installed. Having it be any other user still requires some privilege increase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 02:31:20 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Wed, 17 Apr 2013 00:31:20 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366158680.46.0.699795717481.issue17532@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: I tested the extensions in MacOS and they seem to work (even the Terminal Mode). The Options menu appear and everything seems to be fine. The patch attached removes the Configure entry from the Options menu because this entry is already in the application menu as "Preferences". It also includes the Options menu in editor windows even without extensions, allowing the use of Code Context. ---------- keywords: +patch nosy: +Guilherme.Sim?es Added file: http://bugs.python.org/file29893/17532MenuOptions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 02:37:02 2013 From: report at bugs.python.org (Mike Milkin) Date: Wed, 17 Apr 2013 00:37:02 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1366159022.49.0.481691067664.issue17353@psf.upfronthosting.co.za> Mike Milkin added the comment: Adding tests. ---------- Added file: http://bugs.python.org/file29894/issue-17357-tests.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 03:12:33 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 01:12:33 +0000 Subject: [issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket In-Reply-To: <1366049208.35.0.954231970702.issue17740@psf.upfronthosting.co.za> Message-ID: <3Zr55r3RLVz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 7041401699e9 by Ezio Melotti in branch '3.3': #17740: fix links to the socket function. Initial patch by Zachary Ware. http://hg.python.org/cpython/rev/7041401699e9 New changeset b6802d2a6c4e by Ezio Melotti in branch 'default': #17740: merge with 3.3. http://hg.python.org/cpython/rev/b6802d2a6c4e New changeset 053d55ab495c by Ezio Melotti in branch '2.7': #17740: fix links to the socket function. Initial patch by Zachary Ware. http://hg.python.org/cpython/rev/053d55ab495c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 03:13:51 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 17 Apr 2013 01:13:51 +0000 Subject: [issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket In-Reply-To: <1366049208.35.0.954231970702.issue17740@psf.upfronthosting.co.za> Message-ID: <1366161231.35.0.425420874172.issue17740@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patches! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 03:36:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 01:36:58 +0000 Subject: [issue17766] Fix test discovery for test_iterlen.py In-Reply-To: <1366139827.64.0.673243838717.issue17766@psf.upfronthosting.co.za> Message-ID: <3Zr5f14VZ9zSSs@mail.python.org> Roundup Robot added the comment: New changeset c2550f75c8b1 by Ezio Melotti in branch '3.3': #17766: test_iterlen now works with unittest test discovery. Patch by Zachary Ware. http://hg.python.org/cpython/rev/c2550f75c8b1 New changeset 2add6c86f38e by Ezio Melotti in branch 'default': #17766: merge with 3.3. http://hg.python.org/cpython/rev/2add6c86f38e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 03:38:13 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 17 Apr 2013 01:38:13 +0000 Subject: [issue17766] Fix test discovery for test_iterlen.py In-Reply-To: <1366139827.64.0.673243838717.issue17766@psf.upfronthosting.co.za> Message-ID: <1366162692.99.0.164210231997.issue17766@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 05:12:25 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Apr 2013 03:12:25 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1366168345.85.0.422682278136.issue9849@psf.upfronthosting.co.za> paul j3 added the comment: It does shift the error from parse_args to add_argument, but the message 'ValueError: length of metavar tuple does not match nargs', indicates that it's a side effect of checking on the tuple form of `metavar`. http://bugs.python.org/issue9348 There is still room for cleaning up these tests. There are 2 functions that define what are acceptable values for nargs, [None, OPTIONAL, ZERO_OR_MORE, ONE_OR_MORE, REMAINDER, PARSER, integer]. Should one or other explicitly check nargs is an integer if it does not match one of the other strings? And the test in _ActionContainer.add_argument() # raise an error if the metavar does not match the type if hasattr(self, "_get_formatter"): try: self._get_formatter()._format_args(action, None) except TypeError: raise ValueError("length of metavar tuple does not match nargs") uses an ArgumentParser._get_formatter method (though 'hasattr' prevents runtime errors). In fact both functions that use nargs belong to the parser, not the container. I wonder if `add_argument` should be moved to ArgumentParser. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 05:15:09 2013 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Apr 2013 03:15:09 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1366168509.7.0.367448527397.issue9849@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 05:23:07 2013 From: report at bugs.python.org (Harry Johnston) Date: Wed, 17 Apr 2013 03:23:07 +0000 Subject: [issue17770] MSI installer default behaviour inconsistent Message-ID: <1366168987.71.0.824205265915.issue17770@psf.upfronthosting.co.za> New submission from Harry Johnston: When installing python-2.7.4.msi via the GUI, the default setting for the installation type is "All Users". When installing it passively, e.g. msiexec /package python-2.7.4.msi /passive the default installation type is "Just For Me", or at least that is how it is behaving - no entry is added to Uninstall Programs, the Start Menu entries are created for the current user only, and registry entries are created in HKCU instead of HKLM. This makes enterprise deployments difficult. I'm running Windows 7 x64 SP1. ---------- components: Installation messages: 187133 nosy: Harry.Johnston priority: normal severity: normal status: open title: MSI installer default behaviour inconsistent type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 05:26:18 2013 From: report at bugs.python.org (Harry Johnston) Date: Wed, 17 Apr 2013 03:26:18 +0000 Subject: [issue17770] MSI installer default behaviour inconsistent In-Reply-To: <1366168987.71.0.824205265915.issue17770@psf.upfronthosting.co.za> Message-ID: <1366169178.4.0.00495767919152.issue17770@psf.upfronthosting.co.za> Harry Johnston added the comment: Never mind, I found where this is documented. Still seems odd to me, but it's not a bug. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 05:46:02 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 17 Apr 2013 03:46:02 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366170362.88.0.890096011654.issue17646@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The other patch author hasn't updated his patch, so this issue can just superseded the other one. I uploaded a few review comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 05:46:12 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 17 Apr 2013 03:46:12 +0000 Subject: [issue17491] Consolidate traceback.format_tb and traceback.print_tb In-Reply-To: <1363747737.23.0.181460448728.issue17491@psf.upfronthosting.co.za> Message-ID: <1366170372.69.0.183814489726.issue17491@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> out of date status: open -> closed superseder: -> traceback.py has a lot of code duplication _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 05:54:55 2013 From: report at bugs.python.org (Kyle Roberts) Date: Wed, 17 Apr 2013 03:54:55 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366170895.73.0.342235345194.issue17673@psf.upfronthosting.co.za> Kyle Roberts added the comment: Attached is a patch to include the copy_from argument in mkstemp, TemporaryFile, and NamedTemporaryFile. Also attached is a text file for testing the copy operation. Some notes: I intended to use shutil's copyfile(src, dst) method to copy the copy_from file to the temp file, but copyfile implicitly closes the dst file (our temp file), which would lead to deleting the temp file. I created a simple private _copyfile(src, dst) that keeps the dst file open after writing to it. One question I have regarding my _copyfile is should I include the check for a named pipe as was done in shutil.copyfile? I think that the same issue applies as described in http://bugs.python.org/issue3002. Another thing I wasn't sure of is the best way to include a test file. The copy_from tests included in the patch include a txt file, but the way I went about getting it seems wonky. Is there a best practice for this? Finally, the copy_from parameter only takes a string filepath argument. I thought it might be better to avoid handling two different types (string or file-like object) for copying because that is how other copy operations (i.e. copyfile()) work. ---------- keywords: +patch Added file: http://bugs.python.org/file29895/copy_from.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 05:55:20 2013 From: report at bugs.python.org (Kyle Roberts) Date: Wed, 17 Apr 2013 03:55:20 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366170920.77.0.420354873813.issue17673@psf.upfronthosting.co.za> Changes by Kyle Roberts : Added file: http://bugs.python.org/file29896/copy_from_test.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 06:01:31 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Wed, 17 Apr 2013 04:01:31 +0000 Subject: [issue17771] Missing period in concurrent execution doc in standard library Message-ID: <1366171291.19.0.507321849064.issue17771@psf.upfronthosting.co.za> New submission from Andriy Mysyk: No period after the first sentence of the first paragraph in /Doc/build/html/library/concurrency.html. "The appropriate choice of tool will depend on the task to be executed (CPU bound vs IO bound) and preferred style of development (event driven cooperative multitasking vs preemptive multitasking) Here?s an overview:" ---------- assignee: docs at python components: Documentation messages: 187137 nosy: amysyk, docs at python priority: normal severity: normal status: open title: Missing period in concurrent execution doc in standard library type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 06:08:49 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Wed, 17 Apr 2013 04:08:49 +0000 Subject: [issue17771] Missing period in concurrent execution doc in standard library In-Reply-To: <1366171291.19.0.507321849064.issue17771@psf.upfronthosting.co.za> Message-ID: <1366171729.84.0.127891556583.issue17771@psf.upfronthosting.co.za> Andriy Mysyk added the comment: I will create a patch for this issue by Apr 23, 2013. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 06:14:17 2013 From: report at bugs.python.org (Kyle Roberts) Date: Wed, 17 Apr 2013 04:14:17 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366172057.25.0.929780115241.issue17673@psf.upfronthosting.co.za> Kyle Roberts added the comment: Sorry, disregard my second question about finding a test file. I found an example in test_mailcap.py. I've uploaded a new patch with the cleaner test functions. ---------- Added file: http://bugs.python.org/file29897/copy_from_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 06:14:36 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Apr 2013 04:14:36 +0000 Subject: [issue16988] argparse: PARSER option for nargs not documented In-Reply-To: <1358458215.07.0.403888123098.issue16988@psf.upfronthosting.co.za> Message-ID: <1366172076.48.0.619707550201.issue16988@psf.upfronthosting.co.za> paul j3 added the comment: I've experimented with an argparse adaptation of profile.py: parser = argparse.ArgumentParser(usage=usage) parser.add_argument('-o', '--outfile', dest="outfile", help="Save stats to ", metavar="path") parser.add_argument('-s', '--sort', dest="sort", help="Sort order when printing to stdout ...", default=-1) parser.add_argument('args', nargs=argparse.PARSER, metavar="scriptfile [arg] ...") # expect at least one positional, a py module It is somewhat like subparsers, but without defined subparser choices. Or you could say that PARSER (A...) is to REMAINDER (...) as '+' is to '*'. It requires at least one argument. I could, just as well, have created two arguments, 'scriptfile' and 'args' (with '...'). I don't know if that is an argument for documenting it or not. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 06:21:03 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Wed, 17 Apr 2013 04:21:03 +0000 Subject: [issue17771] Missing period in concurrent execution doc in standard library In-Reply-To: <1366171291.19.0.507321849064.issue17771@psf.upfronthosting.co.za> Message-ID: <1366172463.44.0.58050384199.issue17771@psf.upfronthosting.co.za> Andriy Mysyk added the comment: Added a missing period to concurrency.rst ---------- keywords: +patch type: enhancement -> Added file: http://bugs.python.org/file29898/mywork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 06:32:34 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Wed, 17 Apr 2013 04:32:34 +0000 Subject: [issue17771] Missing period in concurrent execution doc in standard library In-Reply-To: <1366171291.19.0.507321849064.issue17771@psf.upfronthosting.co.za> Message-ID: <1366173154.14.0.428515607301.issue17771@psf.upfronthosting.co.za> Changes by Andriy Mysyk : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 06:34:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 04:34:56 +0000 Subject: [issue17771] Missing period in concurrent execution doc in standard library In-Reply-To: <1366171291.19.0.507321849064.issue17771@psf.upfronthosting.co.za> Message-ID: <3Zr9bM73NBzSJp@mail.python.org> Roundup Robot added the comment: New changeset 72b650a99b36 by Ezio Melotti in branch '3.3': #17771: fix typo. Patch by Andriy Mysyk. http://hg.python.org/cpython/rev/72b650a99b36 New changeset 61a17d9e58e2 by Ezio Melotti in branch 'default': #17771: merge with 3.3. http://hg.python.org/cpython/rev/61a17d9e58e2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 06:35:36 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 17 Apr 2013 04:35:36 +0000 Subject: [issue17771] Missing period in concurrent execution doc in standard library In-Reply-To: <1366171291.19.0.507321849064.issue17771@psf.upfronthosting.co.za> Message-ID: <1366173336.24.0.128278092129.issue17771@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 versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 07:28:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 05:28:01 +0000 Subject: [issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work In-Reply-To: <1336252501.23.0.54042826511.issue14735@psf.upfronthosting.co.za> Message-ID: <3ZrBmc6xP4zPfH@mail.python.org> Roundup Robot added the comment: New changeset f2a744e067e0 by Roger Serwy in branch '2.7': #14735: Update IDLE docs to omit "Control-z on Windows". http://hg.python.org/cpython/rev/f2a744e067e0 New changeset 017891cc973f by Roger Serwy in branch '3.3': #14735: Update IDLE docs to omit "Control-z on Windows". http://hg.python.org/cpython/rev/017891cc973f New changeset 3fda81465102 by Roger Serwy in branch 'default': #14735: merge with 3.3. http://hg.python.org/cpython/rev/3fda81465102 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 07:30:16 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 17 Apr 2013 05:30:16 +0000 Subject: [issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work In-Reply-To: <1336252501.23.0.54042826511.issue14735@psf.upfronthosting.co.za> Message-ID: <1366176616.53.0.0924671530348.issue14735@psf.upfronthosting.co.za> Roger Serwy added the comment: I am closing this issue as fixed since the documentation now matches the behavior of IDLE. ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 07:30:27 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 17 Apr 2013 05:30:27 +0000 Subject: [issue14735] Version 3.2.3 IDLE CTRL-Z plus Carriage Return to end does not work In-Reply-To: <1336252501.23.0.54042826511.issue14735@psf.upfronthosting.co.za> Message-ID: <1366176627.15.0.561542023421.issue14735@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 07:44:55 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 17 Apr 2013 05:44:55 +0000 Subject: [issue17764] Support http.server passing bind address via commend line argument In-Reply-To: <1366129730.55.0.013246712373.issue17764@psf.upfronthosting.co.za> Message-ID: <1366177495.88.0.527235651539.issue17764@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 09:11:51 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Apr 2013 07:11:51 +0000 Subject: [issue16878] argparse: positional args with nargs='*' defaults to [] In-Reply-To: <1357465299.57.0.35284685768.issue16878@psf.upfronthosting.co.za> Message-ID: <1366182711.34.0.1809538844.issue16878@psf.upfronthosting.co.za> paul j3 added the comment: In this example: >>> p.add_argument('--foo', nargs='*', default=None) >>> p.parse_args([]) Namespace(foo=None) >>> p.parse_args(['--foo']) Namespace(foo=[]) 'p.parse_args([])' just assigns the default to 'foo' in the Namespace. "p.parse_args(['--foo'])" invokes 'take_action(,[]). That is, it 'assigns' an empty array to 'foo'. The same thing would happen if 'foo' was a positional. 'take_action' then passes these arguments to '_get_values'. That is where the differences between '?' and '*' arise. The key pieces of code in '_get_values' when arg_strings==[] are: # optional argument produces a default when not present if not arg_strings and action.nargs == OPTIONAL: ....value = action.default # and evaluate 'value' if is a string # when nargs='*' on a positional, if there were no command-line # args, use the default if it is anything other than None elif (not arg_strings and action.nargs == ZERO_OR_MORE ...): if action.default is not None: value = action.default else: value = arg_strings # i.e. [] In other words, if nargs='?', the attribute gets its default value. But for '*', this is true only if the default is not None. So in: parse([], nargs='?') # get the default value: None parse([], nargs='*') # default is None, get arg_strings [] parse([], nargs='*', default=None) # same case parse([], nargs='*', default=False) # default is not None, get default parse([], nargs='*', default=0) # same case I tried changing the _get_values() so '*' got the default (like '?' does), and got 54 failures when running test_argparse.py. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 10:17:39 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Wed, 17 Apr 2013 08:17:39 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366186659.23.0.616730361511.issue17532@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: I actually removed something I shouldn't have in the first patch so I'm attaching a new one. ---------- Added file: http://bugs.python.org/file29899/17532MenuOptions-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 11:04:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 09:04:28 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366189468.07.0.974057307872.issue16694@psf.upfronthosting.co.za> Antoine Pitrou added the comment: length_hint() looks ok as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 11:15:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 09:15:03 +0000 Subject: [issue17758] test_site fails when the user does not have a home directory In-Reply-To: <1366120279.38.0.306129828747.issue17758@psf.upfronthosting.co.za> Message-ID: <1366190103.75.0.732977731828.issue17758@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As a sidenote, I find it a bit scary that test_site even *tries* to create USER_SITE. The test suite shouldn't touch anything outside of test-specific temp files. ---------- nosy: +christian.heimes, pitrou type: enhancement -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 11:56:31 2013 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Apr 2013 09:56:31 +0000 Subject: [issue17758] test_site fails when the user does not have a home directory In-Reply-To: <1366120279.38.0.306129828747.issue17758@psf.upfronthosting.co.za> Message-ID: <1366192591.19.0.179267262934.issue17758@psf.upfronthosting.co.za> Christian Heimes added the comment: Don't be scared ... :) I'll think about a solution. ---------- assignee: -> christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 12:16:23 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 10:16:23 +0000 Subject: [issue17772] test_gdb doesn't detect a gdb built with python3.3 (or higher) Message-ID: <1366193783.12.0.853305189614.issue17772@psf.upfronthosting.co.za> New submission from Matthias Klose: test_gdb skipped -- gdb not built with embedded python support $ gdb --version GNU gdb (GDB) 7.5.91.20130408 $ ldd /usr/bin/gdb|grep python libpython3.3m.so.1.0 => /usr/lib/libpython3.3m.so.1.0 ---------- messages: 187151 nosy: dmalcolm, doko priority: normal severity: normal stage: needs patch status: open title: test_gdb doesn't detect a gdb built with python3.3 (or higher) versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 12:38:58 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 10:38:58 +0000 Subject: [issue17773] test_pydoc fails with the installed testsuite (2.7) Message-ID: <1366195138.79.0.33949510354.issue17773@psf.upfronthosting.co.za> New submission from Matthias Klose: these are failures not seen with 3.x, running with -S doesn't help. test_pydoc test test_pydoc failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_pydoc Re-running failed tests in verbose mode Re-running test 'test_pydoc' in verbose mode test_html_doc (test.test_pydoc.PyDocDocTest) ... --- expected +++ got @@ -19 +19 @@ -
B +
B @@ -22 +22 @@ -
A +
A @@ -56,12 +55,0 @@ - - 
-Functions - -        -
doc_func()
This function solves all of the world's problems:
-hunger
-lack of Python
-war
-
nodoc_func()
-

- FAIL test_input_strip (test.test_pydoc.PyDocDocTest) ... ok test_issue8225 (test.test_pydoc.PyDocDocTest) ... ok test_non_str_name (test.test_pydoc.PyDocDocTest) ... ok test_not_here (test.test_pydoc.PyDocDocTest) ... ok test_stripid (test.test_pydoc.PyDocDocTest) ... ok test_text_doc (test.test_pydoc.PyDocDocTest) ... --- expected +++ got @@ -34,9 +33,0 @@ -FUNCTIONS - doc_func() - This function solves all of the world's problems: - hunger - lack of Python - war - - nodoc_func() - FAIL test_apropos_with_bad_package (test.test_pydoc.PydocImportTest) ... FAIL test_apropos_with_unreadable_dir (test.test_pydoc.PydocImportTest) ... FAIL test_badimport (test.test_pydoc.PydocImportTest) ... ok test_class (test.test_pydoc.TestDescriptions) ... ok test_classic_class (test.test_pydoc.TestDescriptions) ... ok test_module (test.test_pydoc.TestDescriptions) ... ok test_namedtuple_public_underscore (test.test_pydoc.TestDescriptions) ... ERROR test_builtin (test.test_pydoc.TestHelper) ... ok test_keywords (test.test_pydoc.TestHelper) ... test test_pydoc failed -- multiple errors occurred ok ====================================================================== ERROR: test_namedtuple_public_underscore (test.test_pydoc.TestDescriptions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/test/test_pydoc.py", line 383, in test_namedtuple_public_underscore help(NT) NameError: global name 'help' is not defined ====================================================================== FAIL: test_html_doc (test.test_pydoc.PyDocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/test/test_pydoc.py", line 248, in test_html_doc self.fail("outputs are not equal, see diff above") AssertionError: outputs are not equal, see diff above ====================================================================== FAIL: test_text_doc (test.test_pydoc.PyDocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/test/test_pydoc.py", line 259, in test_text_doc self.fail("outputs are not equal, see diff above") AssertionError: outputs are not equal, see diff above ====================================================================== FAIL: test_apropos_with_bad_package (test.test_pydoc.PydocImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/test/test_pydoc.py", line 341, in test_apropos_with_bad_package result = run_pydoc('zqwykjv', '-k', PYTHONPATH=TESTFN) File "/usr/lib/python2.7/test/test_pydoc.py", line 196, in run_pydoc rc, out, err = assert_python_ok('-B', pydoc.__file__, *args, **env) File "/usr/lib/python2.7/test/script_helper.py", line 55, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/usr/lib/python2.7/test/script_helper.py", line 47, in _assert_python "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore'))) AssertionError: Process return code is -11, stderr follows: ====================================================================== FAIL: test_apropos_with_unreadable_dir (test.test_pydoc.PydocImportTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/test/test_pydoc.py", line 351, in test_apropos_with_unreadable_dir result = run_pydoc('zqwykjv', '-k', PYTHONPATH=TESTFN) File "/usr/lib/python2.7/test/test_pydoc.py", line 196, in run_pydoc rc, out, err = assert_python_ok('-B', pydoc.__file__, *args, **env) File "/usr/lib/python2.7/test/script_helper.py", line 55, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/usr/lib/python2.7/test/script_helper.py", line 47, in _assert_python "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore'))) AssertionError: Process return code is -11, stderr follows: ---------------------------------------------------------------------- Ran 16 tests in 3.323s FAILED (failures=4, errors=1) [47527 refs] ---------- components: Tests messages: 187152 nosy: doko priority: normal severity: normal stage: needs patch status: open title: test_pydoc fails with the installed testsuite (2.7) versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 12:39:17 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 10:39:17 +0000 Subject: [issue17750] allow the testsuite to run in the installed location In-Reply-To: <1366108780.66.0.667292537865.issue17750@psf.upfronthosting.co.za> Message-ID: <1366195157.71.0.851009675683.issue17750@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- dependencies: +test_pydoc fails with the installed testsuite (2.7) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 12:45:22 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 17 Apr 2013 10:45:22 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1366195522.77.0.287281936257.issue17353@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The tests look good, thanks for writing them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 13:10:09 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 11:10:09 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <3ZrLMN47KFz7LkD@mail.python.org> Roundup Robot added the comment: New changeset 65623d7dc76e by Giampaolo Rodola' in branch '3.3': Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts. http://hg.python.org/cpython/rev/65623d7dc76e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 13:12:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 11:12:43 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <3ZrLQL3dwgzQvL@mail.python.org> Roundup Robot added the comment: New changeset 87882c96d138 by Giampaolo Rodola' in branch 'default': Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts. http://hg.python.org/cpython/rev/87882c96d138 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 13:18:37 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 17 Apr 2013 11:18:37 +0000 Subject: [issue17707] Multiprocessing queue get method does not block for short timeouts In-Reply-To: <1365816625.92.0.503962460634.issue17707@psf.upfronthosting.co.za> Message-ID: <1366197517.5.0.307908077365.issue17707@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- keywords: +3.2regression, 3.3regression resolution: -> fixed status: open -> closed versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 14:05:19 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 17 Apr 2013 12:05:19 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1366200319.75.0.637987682202.issue15207@psf.upfronthosting.co.za> Tim Golden added the comment: Attached is a q&d script to produce the list of extension -> mimetype maps for a version of the mimetypes module. ---------- Added file: http://bugs.python.org/file29900/mt.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 14:07:14 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 17 Apr 2013 12:07:14 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1366200319.75.0.637987682202.issue15207@psf.upfronthosting.co.za> Message-ID: <516E906A.8060608@timgolden.me.uk> Tim Golden added the comment: Three outputs produced by mt.py: tip as-is; tip without registry; tip with new approach to registry. The results for 2.7 are near-enough identical. Likewise the results for an elevated prompt. ---------- Added file: http://bugs.python.org/file29901/mt-tip.txt Added file: http://bugs.python.org/file29902/mt-tip-newregistry.txt Added file: http://bugs.python.org/file29903/mt-tip-noregistry.txt _______________________________________ Python tracker _______________________________________ -------------- next part -------------- .jpg => image/jpg .mid => audio/midi .midi => audio/midi .pct => image/pict .pic => image/pict .pict => image/pict .rtf => application/rtf .xul => text/xul .3g2 => video/3gpp2 .3gp => video/3gpp .AMR => audio/AMR .a => application/octet-stream .aac => audio/x-aac .ac3 => audio/x-ac3 .acrobatsecuritysettings => application/vnd.adobe.acrobat-security-settings .adts => audio/vnd.dlna.adts .ai => application/postscript .aif => audio/x-aiff .aifc => audio/x-aiff .aiff => audio/x-aiff .amc => application/x-mpeg .application => application/x-ms-application .asx => video/x-ms-asf-plugin .au => audio/basic .avi => video/x-msvideo .bat => text/plain .bcpio => application/x-bcpio .bin => application/octet-stream .bmp => image/bmp .c => text/plain .c2r => text/vnd-ms.click2record+xml .caf => audio/x-caf .cat => vnd.ms-pki.seccat .cdf => application/x-netcdf .cer => x-x509-ca-cert .contact => text/x-ms-contact .cpio => application/x-cpio .crl => pkix-crl .csh => application/x-csh .css => text/css .dir => application/x-director .dll => application/octet-stream .doc => application/msword .dot => application/msword .dvi => application/x-dvi .dwfx => model/vnd.dwfx+xps .easmx => model/vnd.easmx+xps .edrwx => model/vnd.edrwx+xps .eml => message/rfc822 .eprtx => model/vnd.eprtx+xps .eps => application/postscript .etx => text/x-setext .exe => application/octet-stream .fdf => application/vnd.fdf .fif => application/fractals .flc => video/flc .gif => image/gif .gsm => audio/x-gsm .gtar => application/x-gtar .gz => application/x-gzip .h => text/plain .hdf => application/x-hdf .hqx => application/mac-binhex40 .hta => application/hta .htc => text/x-component .htm => text/html .html => text/html .ico => image/x-icon .ics => text/calendar .ief => image/ief .iqy => text/x-ms-iqy .jnlp => application/x-java-jnlp-file .jp2 => image/x-jpeg2000-image .jpe => image/jpeg .jpeg => image/jpeg .jpg => image/pjpeg .js => application/javascript .jtx => application/x-jtx+xps .ksh => text/plain .latex => application/x-latex .m1v => video/mpeg .m3u => audio/x-mpegurl .m3u8 => application/vnd.apple.mpegurl .m4a => audio/x-m4a .m4b => audio/x-m4b .m4p => audio/x-m4p .m4v => video/x-m4v .man => application/x-troff-man .mdi => image/vnd.ms-modi .me => application/x-troff-me .mht => message/rfc822 .mhtml => message/rfc822 .mid => midi/mid .mif => application/x-mif .mov => video/quicktime .movie => video/x-sgi-movie .mp2 => audio/mpeg .mp3 => audio/x-mpg .mp4 => video/mp4 .mpa => video/mpeg .mpe => video/mpeg .mpeg => video/x-mpeg2a .mpf => application/vnd.ms-mediapackage .mpg => video/mpeg .ms => application/x-troff-ms .nc => application/x-netcdf .nix => application/x-mix-transfer .nws => message/rfc822 .o => application/octet-stream .obj => application/octet-stream .oda => application/oda .odc => text/x-ms-odc .osdx => application/opensearchdescription+xml .p10 => pkcs10 .p12 => x-pkcs12 .p7b => x-pkcs7-certificates .p7c => application/pkcs7-mime .p7m => pkcs7-mime .p7r => x-pkcs7-certreqresp .p7s => pkcs7-signature .pbm => image/x-portable-bitmap .pdf => application/pdf .pdfxml => application/vnd.adobe.pdfxml .pdx => application/vnd.adobe.pdx .pfx => application/x-pkcs12 .pgm => image/x-portable-graymap .pict => image/x-pict .pko => vnd.ms-pki.pko .pl => text/plain .pls => audio/x-scpls .png => image/x-png .pnm => image/x-portable-anymap .pntg => image/x-macpaint .pot => application/vnd.ms-powerpoint .ppa => application/vnd.ms-powerpoint .ppm => image/x-portable-pixmap .pps => application/vnd.ms-powerpoint .ppt => application/x-mspowerpoint .ps => application/postscript .pwz => application/vnd.ms-powerpoint .py => text/x-python .pyc => application/x-python-code .pyo => application/x-python-code .qcp => audio/vnd.qcelp .qt => video/quicktime .qtif => image/x-quicktime .qtl => application/x-quicktimeplayer .ra => audio/x-pn-realaudio .ram => application/x-pn-realaudio .ras => image/x-cmu-raster .rdf => application/xml .rels => application/vnd.ms-package.relationships+xml .rgb => image/x-rgb .roff => application/x-troff .rqy => text/x-ms-rqy .rtsp => application/x-rtsp .rtx => text/richtext .sdp => application/x-sdp .sdv => video/sd-video .sgi => image/x-sgi .sgm => text/x-sgml .sgml => text/x-sgml .sh => application/x-sh .shar => application/x-shar .sit => application/x-stuffit .slupkg-ms => application/x-ms-license .snd => audio/basic .so => application/octet-stream .spl => application/futuresplash .src => application/x-wais-source .sst => vnd.ms-pki.certstore .stl => vnd.ms-pki.stl .sv4cpio => application/x-sv4cpio .sv4crc => application/x-sv4crc .svg => image/svg+xml .swf => application/x-shockwave-flash .t => application/x-troff .tar => application/x-tar .targa => image/x-targa .tcl => application/x-tcl .tex => application/x-tex .texi => application/x-texinfo .texinfo => application/x-texinfo .tgz => application/x-compressed .tif => image/tiff .tiff => image/tiff .tr => application/x-troff .tsv => text/tab-separated-values .tts => video/vnd.dlna.mpeg-tts .txt => text/plain .ustar => application/x-ustar .vcf => text/x-vcard .vdx => application/vnd.ms-visio.viewer .vsd => application/vnd.visio .vsi => application/ms-vsi .vsto => application/x-ms-vsto .wal => interface/x-winamp3-skin .wav => audio/x-wav .wax => audio/x-ms-wax .wiz => application/msword .wlz => interface/x-winamp-lang .wm => video/x-ms-wm .wma => audio/x-ms-wma .wmd => application/x-ms-wmd .wmv => video/x-ms-wmv .wmx => video/x-ms-wmx .wmz => application/x-ms-wmz .wpl => application/vnd.ms-wpl .wsc => text/scriptlet .wsdl => application/xml .wsz => interface/x-winamp-skin .wvx => video/x-ms-wvx .xaml => application/xaml+xml .xbap => application/x-ms-xbap .xbm => image/x-xbitmap .xdp => application/vnd.adobe.xdp+xml .xfd => application/vnd.adobe.xfd+xml .xfdf => application/vnd.adobe.xfdf .xlb => application/vnd.ms-excel .xls => application/x-msexcel .xml => text/xml .xpdl => application/xml .xpm => image/x-xpixmap .xps => application/vnd.ms-xpsdocument .xsl => application/xml .xwd => image/x-xwindowdump .z => application/x-compress .zip => application/x-zip-compressed -------------- next part -------------- .jpg => image/jpg .mid => audio/midi .midi => audio/midi .pct => image/pict .pic => image/pict .pict => image/pict .rtf => application/rtf .xul => text/xul .3g2 => video/3gpp2 .3gp => video/3gpp .3gp2 => video/3gpp2 .3gpp => video/3gpp .AAC => audio/aac .ADT => audio/vnd.dlna.adts .ADTS => audio/aac .AddIn => text/xml .M2T => video/vnd.dlna.mpeg-tts .M2TS => video/vnd.dlna.mpeg-tts .M2V => video/mpeg .MOD => video/mpeg .MTS => video/vnd.dlna.mpeg-tts .SDP => application/sdp .SSISDeploymentManifest => text/xml .TS => video/vnd.dlna.mpeg-tts .TTS => video/vnd.dlna.mpeg-tts .WMD => application/x-ms-wmd .XOML => text/plain .a => application/octet-stream .ac3 => audio/ac3 .acrobatsecuritysettings => application/vnd.adobe.acrobat-security-settings .ai => application/postscript .aif => audio/aiff .aifc => audio/aiff .aiff => audio/aiff .air => application/vnd.adobe.air-application-installer-package+zip .amc => application/x-mpeg .application => application/x-ms-application .asa => application/xml .asax => application/xml .ascx => application/xml .asf => video/x-ms-asf .ashx => application/xml .asm => text/plain .asmx => application/xml .asp => text/x-asp .aspx => application/xml .asx => video/x-ms-asf .au => audio/basic .avi => video/avi .bat => text/plain .bcpio => application/x-bcpio .bflang2 => application/x-bluefish-language2 .bfproject => application/x-bluefish-project .bin => application/octet-stream .bmp => image/bmp .c => text/plain .caf => audio/x-caf .cat => application/vnd.ms-pki.seccat .cc => text/plain .cd => text/plain .cdda => audio/aiff .cdf => application/x-netcdf .cer => application/x-x509-ca-cert .cod => text/plain .config => application/xml .contact => text/x-ms-contact .coverage => application/xml .cpio => application/x-cpio .cpp => text/plain .crl => application/pkix-crl .crt => application/x-x509-ca-cert .cs => text/plain .csdproj => text/plain .csh => application/x-csh .csproj => text/plain .css => text/css .csv => application/vnd.ms-excel .cur => text/plain .cxx => text/plain .d => text/x-dsrc .datasource => application/xml .dbproj => text/plain .dcr => application/x-director .def => text/plain .der => application/x-x509-ca-cert .dib => image/bmp .dif => video/x-dv .dir => application/x-director .dll => application/x-msdownload .doc => application/msword .docm => application/vnd.ms-word.document.macroEnabled.12 .docx => application/vnd.openxmlformats-officedocument.wordprocessingml.document .dot => application/msword .dsp => text/plain .dsw => text/plain .dtd => application/xml-dtd .dtsConfig => text/xml .dv => video/x-dv .dvi => application/x-dvi .dwfx => model/vnd.dwfx+xps .dxr => application/x-director .easmx => model/vnd.easmx+xps .edrwx => model/vnd.edrwx+xps .eml => message/rfc822 .eprtx => model/vnd.eprtx+xps .eps => application/postscript .etl => application/etl .etx => text/x-setext .exe => application/x-msdownload .fdf => application/vnd.fdf .fif => application/fractals .filters => Application/xml .gif => image/gif .gitattributes => text/plain .gitignore => text/plain .gitmodules => text/plain .group => text/x-ms-group .gsm => audio/x-gsm .gtar => application/x-gtar .gz => application/x-gzip .h => text/plain .hdf => application/x-hdf .hpp => text/plain .hqx => application/mac-binhex40 .hta => application/hta .htc => text/x-component .htm => text/html .html => text/html .hxa => application/xml .hxc => application/xml .hxd => application/octet-stream .hxe => application/xml .hxf => application/xml .hxh => application/octet-stream .hxi => application/octet-stream .hxk => application/xml .hxq => application/octet-stream .hxr => application/octet-stream .hxs => application/octet-stream .hxt => application/xml .hxv => application/xml .hxw => application/octet-stream .hxx => text/plain .i => text/plain .ico => image/x-icon .ics => text/calendar .idl => text/plain .ief => image/ief .inc => text/plain .inl => text/plain .ipproj => text/plain .iqy => text/x-ms-iqy .java => text/x-java .jfif => image/jpeg .jnlp => application/x-java-jnlp-file .jpe => image/jpeg .jpeg => image/jpeg .jpg => image/jpeg .js => application/javascript .jsp => application/x-jsp .jtx => application/x-jtx+xps .ksh => text/plain .latex => application/x-latex .library-ms => application/windows-library+xml .lst => text/plain .m1v => video/mpeg .m3u => audio/mpegurl .m3u8 => application/vnd.apple.mpegurl .m4a => audio/x-m4a .m4b => audio/x-m4b .m4p => audio/x-m4p .m4v => video/x-m4v .mac => image/x-macpaint .mak => text/plain .man => application/x-troff-man .map => text/plain .master => application/xml .mdi => image/vnd.ms-modi .mdp => text/plain .me => application/x-troff-me .mfp => application/x-shockwave-flash .mht => message/rfc822 .mhtml => message/rfc822 .mid => audio/mid .midi => audio/mid .mif => application/x-mif .mk => text/plain .mov => video/quicktime .movie => video/x-sgi-movie .mp2 => audio/mpeg .mp2v => video/mpeg .mp3 => audio/mpeg .mp4 => video/mp4 .mp4v => video/mp4 .mpa => video/mpeg .mpe => video/mpeg .mpeg => video/mpeg .mpf => application/vnd.ms-mediapackage .mpg => video/mpeg .mpv2 => video/mpeg .mqv => video/quicktime .ms => application/x-troff-ms .mw => text/x-mediawiki .nc => application/x-netcdf .nsh => text/x-nsh .nsi => text/x-nsi .nws => message/rfc822 .o => application/octet-stream .obj => application/octet-stream .oda => application/oda .odc => text/x-ms-odc .odh => text/plain .odl => text/plain .orderedtest => application/xml .osdx => application/opensearchdescription+xml .p10 => application/pkcs10 .p12 => application/x-pkcs12 .p7b => application/x-pkcs7-certificates .p7c => application/pkcs7-mime .p7m => application/pkcs7-mime .p7r => application/x-pkcs7-certreqresp .p7s => application/pkcs7-signature .pbm => image/x-portable-bitmap .pct => image/pict .pdf => application/pdf .pdfxml => application/vnd.adobe.pdfxml .pdx => application/vnd.adobe.pdx .pfx => application/x-pkcs12 .pgm => image/x-portable-graymap .php => application/x-php .php3 => application/x-php .pic => image/pict .pict => image/pict .pkgdef => text/plain .pkgundef => text/plain .pko => application/vnd.ms-pki.pko .pl => application/x-perl .png => image/png .pnm => image/x-portable-anymap .pnt => image/x-macpaint .pntg => image/x-macpaint .po => text/x-gettext-translation .pot => application/vnd.ms-powerpoint .potm => application/vnd.ms-powerpoint.template.macroEnabled.12 .potx => application/vnd.openxmlformats-officedocument.presentationml.template .ppa => application/vnd.ms-powerpoint .ppm => image/x-portable-pixmap .pps => application/vnd.ms-powerpoint .ppsm => application/vnd.ms-powerpoint.slideshow.macroEnabled.12 .ppsx => application/vnd.openxmlformats-officedocument.presentationml.slideshow .ppt => application/vnd.ms-powerpoint .pptm => application/vnd.ms-powerpoint.presentation.macroEnabled.12 .pptx => application/vnd.openxmlformats-officedocument.presentationml.presentation .ps => application/postscript .psc1 => application/PowerShell .pwz => application/vnd.ms-powerpoint .py => text/x-python .pyc => application/x-python-code .pyo => application/x-python-code .pyproj => text/plain .pyw => text/plain .qht => text/x-html-insertion .qhtm => text/x-html-insertion .qt => video/quicktime .qti => image/x-quicktime .qtif => image/x-quicktime .qtl => application/x-quicktimeplayer .ra => audio/x-pn-realaudio .ram => application/x-pn-realaudio .ras => image/x-cmu-raster .rat => application/rat-file .rb => text/x-ruby .rc => text/plain .rc2 => text/plain .rct => text/plain .rdf => application/xml .rdlc => application/xml .resx => application/xml .rgb => image/x-rgb .rgs => text/plain .rmi => audio/mid .roff => application/x-troff .rpt => application/x-rpt .rqy => text/x-ms-rqy .rtf => application/msword .rtx => text/richtext .ruleset => application/xml .s => text/plain .scp => application/sqlcompare .sct => text/scriptlet .sd2 => audio/x-sd2 .searchConnector-ms => application/windows-search-connector+xml .settings => application/xml .sgm => text/x-sgml .sgml => text/x-sgml .sh => text/x-shellscript .shar => application/x-shar .shtml => text/html .sit => application/x-stuffit .sitemap => application/xml .skin => application/xml .slk => application/vnd.ms-excel .sln => text/plain .slupkg-ms => application/x-ms-license .snd => audio/basic .snippet => application/xml .so => application/octet-stream .sol => text/plain .sor => text/plain .spc => application/x-pkcs7-certificates .spl => application/futuresplash .src => application/x-wais-source .srf => text/plain .sst => application/vnd.ms-pki.certstore .stl => application/vnd.ms-pki.stl .sv4cpio => application/x-sv4cpio .sv4crc => application/x-sv4crc .svc => application/xml .svg => image/svg+xml .swf => application/x-shockwave-flash .t => application/x-troff .tar => application/x-tar .tcl => application/x-tcl .testrunconfig => application/xml .testsettings => application/xml .tex => application/x-tex .texi => application/x-texinfo .texinfo => application/x-texinfo .tgz => application/x-compressed .tif => image/tiff .tiff => image/tiff .tlh => text/plain .tli => text/plain .tpl => application/x-smarty .tr => application/x-troff .trx => application/xml .tsv => text/tab-separated-values .txt => text/plain .user => text/plain .ustar => application/x-ustar .vb => text/plain .vbdproj => text/plain .vbproj => text/plain .vbs => application/x-vbscript .vcf => text/x-vcard .vcproj => Application/xml .vcxproj => Application/xml .vddproj => text/plain .vdp => text/plain .vdproj => text/plain .vdx => application/vnd.visio .vscontent => application/xml .vsct => text/xml .vsd => application/vnd.visio .vsi => application/ms-vsi .vsix => application/vsix .vsixlangpack => text/xml .vsixmanifest => text/xml .vsl => application/vnd.visio .vsmdi => application/xml .vspscc => text/plain .vss => application/vnd.visio .vsscc => text/plain .vssettings => text/xml .vssscc => text/plain .vst => application/vnd.visio .vstemplate => text/xml .vsto => application/x-ms-vsto .vsu => application/vnd.visio .vsw => application/vnd.visio .vsx => application/vnd.visio .vtx => application/vnd.visio .wal => interface/x-winamp3-skin .wav => audio/wav .wax => audio/x-ms-wax .wbk => application/msword .wdp => image/vnd.ms-photo .wdseml => message/rfc822 .wiq => application/xml .wiz => application/msword .wlz => interface/x-winamp-lang .wm => video/x-ms-wm .wma => audio/x-ms-wma .wmv => video/x-ms-wmv .wmx => video/x-ms-wmx .wmz => application/x-ms-wmz .wpl => application/vnd.ms-wpl .wsc => text/scriptlet .wsdl => application/xml .wsz => interface/x-winamp-skin .wvx => video/x-ms-wvx .xaml => application/xaml+xml .xbap => application/x-ms-xbap .xbm => image/x-xbitmap .xdp => application/vnd.adobe.xdp+xml .xdr => application/xml .xfdf => application/vnd.adobe.xfdf .xht => application/xhtml+xml .xhtml => application/xhtml+xml .xla => application/vnd.ms-excel .xlam => application/vnd.ms-excel.addin.macroEnabled.12 .xlb => application/vnd.ms-excel .xlc => application/vnd.ms-excel .xld => application/vnd.ms-excel .xlk => application/vnd.ms-excel .xll => application/vnd.ms-excel .xlm => application/vnd.ms-excel .xls => application/vnd.ms-excel .xlsb => application/vnd.ms-excel.sheet.binary.macroEnabled.12 .xlsm => application/vnd.ms-excel.sheet.macroEnabled.12 .xlsx => application/vnd.openxmlformats-officedocument.spreadsheetml.sheet .xlt => application/vnd.ms-excel .xltm => application/vnd.ms-excel.template.macroEnabled.12 .xltx => application/vnd.openxmlformats-officedocument.spreadsheetml.template .xlv => application/vnd.ms-excel .xlw => application/vnd.ms-excel .xml => text/xml .xmta => application/xml .xpdl => application/xml .xpm => image/x-xpixmap .xps => application/vnd.ms-xpsdocument .xrm-ms => text/xml .xsc => application/xml .xsd => application/xml .xsl => application/xslt+xml .xslt => application/xml .xss => application/xml .xwd => image/x-xwindowdump .z => application/x-compress .zip => application/x-zip-compressed -------------- next part -------------- .jpg => image/jpg .mid => audio/midi .midi => audio/midi .pct => image/pict .pic => image/pict .pict => image/pict .rtf => application/rtf .xul => text/xul .a => application/octet-stream .ai => application/postscript .aif => audio/x-aiff .aifc => audio/x-aiff .aiff => audio/x-aiff .au => audio/basic .avi => video/x-msvideo .bat => text/plain .bcpio => application/x-bcpio .bin => application/octet-stream .bmp => image/x-ms-bmp .c => text/plain .cdf => application/x-netcdf .cpio => application/x-cpio .csh => application/x-csh .css => text/css .dll => application/octet-stream .doc => application/msword .dot => application/msword .dvi => application/x-dvi .eml => message/rfc822 .eps => application/postscript .etx => text/x-setext .exe => application/octet-stream .gif => image/gif .gtar => application/x-gtar .h => text/plain .hdf => application/x-hdf .htm => text/html .html => text/html .ico => image/vnd.microsoft.icon .ief => image/ief .jpe => image/jpeg .jpeg => image/jpeg .jpg => image/jpeg .js => application/javascript .ksh => text/plain .latex => application/x-latex .m1v => video/mpeg .m3u => application/vnd.apple.mpegurl .m3u8 => application/vnd.apple.mpegurl .man => application/x-troff-man .me => application/x-troff-me .mht => message/rfc822 .mhtml => message/rfc822 .mif => application/x-mif .mov => video/quicktime .movie => video/x-sgi-movie .mp2 => audio/mpeg .mp3 => audio/mpeg .mp4 => video/mp4 .mpa => video/mpeg .mpe => video/mpeg .mpeg => video/mpeg .mpg => video/mpeg .ms => application/x-troff-ms .nc => application/x-netcdf .nws => message/rfc822 .o => application/octet-stream .obj => application/octet-stream .oda => application/oda .p12 => application/x-pkcs12 .p7c => application/pkcs7-mime .pbm => image/x-portable-bitmap .pdf => application/pdf .pfx => application/x-pkcs12 .pgm => image/x-portable-graymap .pl => text/plain .png => image/png .pnm => image/x-portable-anymap .pot => application/vnd.ms-powerpoint .ppa => application/vnd.ms-powerpoint .ppm => image/x-portable-pixmap .pps => application/vnd.ms-powerpoint .ppt => application/vnd.ms-powerpoint .ps => application/postscript .pwz => application/vnd.ms-powerpoint .py => text/x-python .pyc => application/x-python-code .pyo => application/x-python-code .qt => video/quicktime .ra => audio/x-pn-realaudio .ram => application/x-pn-realaudio .ras => image/x-cmu-raster .rdf => application/xml .rgb => image/x-rgb .roff => application/x-troff .rtx => text/richtext .sgm => text/x-sgml .sgml => text/x-sgml .sh => application/x-sh .shar => application/x-shar .snd => audio/basic .so => application/octet-stream .src => application/x-wais-source .sv4cpio => application/x-sv4cpio .sv4crc => application/x-sv4crc .svg => image/svg+xml .swf => application/x-shockwave-flash .t => application/x-troff .tar => application/x-tar .tcl => application/x-tcl .tex => application/x-tex .texi => application/x-texinfo .texinfo => application/x-texinfo .tif => image/tiff .tiff => image/tiff .tr => application/x-troff .tsv => text/tab-separated-values .txt => text/plain .ustar => application/x-ustar .vcf => text/x-vcard .wav => audio/x-wav .wiz => application/msword .wsdl => application/xml .xbm => image/x-xbitmap .xlb => application/vnd.ms-excel .xls => application/vnd.ms-excel .xml => text/xml .xpdl => application/xml .xpm => image/x-xpixmap .xsl => application/xml .xwd => image/x-xwindowdump .zip => application/zip From report at bugs.python.org Wed Apr 17 14:23:36 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 17 Apr 2013 12:23:36 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1366201416.69.0.0403144173055.issue15207@psf.upfronthosting.co.za> Tim Golden added the comment: There seems to be a consensus that the current behaviour is undesirable, indeed "broken" for any meaningful use. The critical argument against the current Registry approach is that it returns unexpected (or outright incorrect) mimetypes for very standard extensions. The arguments against reading the Registry at all are: * That it requires some extra level of privilege to read the appropriate keys. * That there is a startup cost to reading the Registry * That it can be and is updated by arbitrary programs (typically during installation) and therefore its values cannot be relied upon. We have 3.5 proposals on the table: 1) Don't read the registry at all, ie revert issue4969 (this is what Ben Hoyt is advocating) [noregistry] 2) Read the registry *before* reading the standard types (this is not strongly advocated by anyone). 3) Read the registry but in a different way, mapping from extension to mimetype rather than vice versa. (This is Dave Chambers' patch from issue15207). [newregistry] 3a) Lookup as per (3) but only on demand. This eliminates any startup cost. I've produced three output files from a simple dump of the mimetypes database. For the purposes of taking this forward, we're really comparing the noregistry and the newregistry variants. One key issue is what to do when the same key occurs in both sets but with a different value. (Examples include .avi -> video/x-msvideo vs video/avi; and .zip -> application/zip vs application/x-zip-compressed). And the other key issue is whether the overheads (security, speed) of using the registry outweigh its usefulness in any case. Could I ask those who would remove the registry use altogether to comment on the newregistry output (generating your own if it helps) to see whether it changes your views at all. Either approach -- no-registry or new-registry -- feasible and the code churn is about equal. I'm unsure about compatibility issues: it's hard to see anyone relying on the incorrect mimetypes; but it's certainly possible to see someone relying on the additional (correct) mimetypes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 14:45:30 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 17 Apr 2013 12:45:30 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1366201416.69.0.0403144173055.issue15207@psf.upfronthosting.co.za> Message-ID: <516E9965.8030008@egenix.com> Marc-Andre Lemburg added the comment: I think it's important to stick to established standards for MIME types and to make sure that Python returns the same values on all platforms using the default settings. Apache comes with a mime.types file which includes both the official IANA types and many common, but unregistered types: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?view=markup This can be used as reference (much like we use the X.org locale database as reference for the locale module). If an application wants to use the Windows registry settings instead, that's fine, but it should not be the default if there's a difference in output compared to the hard-coded list in mimetypes. Note that this would probably require a redesign of the internals of the mimetypes module. It currently provides only a small subset as default mapping and then reads the full set from one of the mime.types files it can find on the system. Such a redesign would only be possible for Python 3.4, not Python 2.7. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 15:03:01 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 13:03:01 +0000 Subject: [issue17774] unable to disable -r in run_tests.py Message-ID: <1366203781.64.0.116345501767.issue17774@psf.upfronthosting.co.za> New submission from Matthias Klose: it is not possible to disable -r in run_tests.py. Other options like -u or -j can be overwritten, but not removing -r. ---------- components: Tests messages: 187160 nosy: doko priority: normal severity: normal stage: needs patch status: open title: unable to disable -r in run_tests.py type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 15:24:53 2013 From: report at bugs.python.org (Max Mautner) Date: Wed, 17 Apr 2013 13:24:53 +0000 Subject: [issue17724] urllib -- add_handler method refactoring for clarity In-Reply-To: <1365887848.07.0.0995479400533.issue17724@psf.upfronthosting.co.za> Message-ID: <1366205093.12.0.512287664036.issue17724@psf.upfronthosting.co.za> Changes by Max Mautner : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 15:57:06 2013 From: report at bugs.python.org (David Walker) Date: Wed, 17 Apr 2013 13:57:06 +0000 Subject: [issue17775] Error with Hello, World in 3.3.1 Message-ID: <1366207026.0.0.721321770199.issue17775@psf.upfronthosting.co.za> New submission from David Walker: I'm brand new to Python (and programming in general) and I'm reading "Python for Dummies" while trying to learn this. I downloaded 3.3.1 and when I entered the command >>> print "Hello, World!" it would give the following error: SyntaxError: invalid syntax File "", line 1 print "Hello, World!" Yet when I do the same thing in v 2.7.4 it works fine. Is there something I'm doing wrong? Thanks in advance ---------- components: Windows messages: 187161 nosy: walkah21 priority: normal severity: normal status: open title: Error with Hello, World in 3.3.1 type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 15:58:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Apr 2013 13:58:49 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366207129.91.0.146197556528.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After a more careful look of the b85encode code I say that it's implementation is not optimal. For the sake of simplicity the entire volume of data is copied several times. This can affect the processing of a large volume of data. On other hand, this dumb copying can be faster then more smart processing in a85encode. Only benchmarks will show the truth. Using a trick with struct.unpack() has very unpleasant side effect. It might be a few speed up encoding, but creates the Struct object with the size is many times larger than the size of the processed data. Worse, this object is cached and continues to consume memory. Since the size of the data most likely will be unique, almost every call of b85encode creates a new object. This will lead to memory leaks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 15:59:11 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Apr 2013 13:59:11 +0000 Subject: [issue17775] Error with Hello, World in 3.3.1 In-Reply-To: <1366207026.0.0.721321770199.issue17775@psf.upfronthosting.co.za> Message-ID: <1366207151.1.0.345527077039.issue17775@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Python 3 and Python 2 have different syntax (same code won't work with both versions). You would have to run print("Hello, World") Please close this bug as invalid. ---------- nosy: +Ramchandra Apte type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 16:00:59 2013 From: report at bugs.python.org (David Walker) Date: Wed, 17 Apr 2013 14:00:59 +0000 Subject: [issue17775] Error with Hello, World in 3.3.1 In-Reply-To: <1366207026.0.0.721321770199.issue17775@psf.upfronthosting.co.za> Message-ID: <1366207259.21.0.353930630826.issue17775@psf.upfronthosting.co.za> Changes by David Walker : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 16:10:41 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 17 Apr 2013 14:10:41 +0000 Subject: [issue17768] _decimal: allow NUL fill character In-Reply-To: <1366142733.14.0.416773869119.issue17768@psf.upfronthosting.co.za> Message-ID: <1366207841.05.0.339932071578.issue17768@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Yes. ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 16:13:03 2013 From: report at bugs.python.org (=?utf-8?q?Damien_Mari=C3=A9?=) Date: Wed, 17 Apr 2013 14:13:03 +0000 Subject: [issue17776] IDLE Internationalization Message-ID: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> New submission from Damien Mari?: Following the issue 17760 Internationalization should be implemented. I propose to implement it as an optionnal settings first. And with the gettext library. I'm not experienced with the idlelib module but here is a first patch, don't hesitate to comment it. It just add i18n to the menu for now. ---------- components: IDLE files: patch.diff keywords: patch messages: 187165 nosy: Damien.Mari? priority: normal severity: normal status: open title: IDLE Internationalization type: enhancement Added file: http://bugs.python.org/file29904/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 16:26:36 2013 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 17 Apr 2013 14:26:36 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1366208796.75.0.204424146115.issue9849@psf.upfronthosting.co.za> Mark Lawrence added the comment: The first error raised is "TypeError: 'str' object cannot be interpreted as an integer", followed by "ValueError: length of metavar tuple does not match nargs". Therefore the code has already been changed to reflect the title of this issue. If other code changes are needed I believe that should be done in a new or another already existing issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 16:29:28 2013 From: report at bugs.python.org (Dave Chambers) Date: Wed, 17 Apr 2013 14:29:28 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1366208968.0.0.948625548474.issue15207@psf.upfronthosting.co.za> Dave Chambers added the comment: Enough with the bikeshedding... it's been 10 months... fix the bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 16:43:27 2013 From: report at bugs.python.org (Brian Curtin) Date: Wed, 17 Apr 2013 14:43:27 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1366209807.47.0.808512444179.issue15207@psf.upfronthosting.co.za> Brian Curtin added the comment: Just an FYI, but if it takes 10 more months to get it right, we'll do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 16:57:16 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Apr 2013 14:57:16 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366210636.32.0.853937355267.issue17673@psf.upfronthosting.co.za> R. David Murray added the comment: Personally I prefer having the test create the needed test file, rather than adding a new file to the repository, for small files. That's just my opinion, though; as you found what you did is common practice currently. Your patch doesn't include the file, though. (I haven't reviewed the rest of the patch.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 17:08:11 2013 From: report at bugs.python.org (Kyle Roberts) Date: Wed, 17 Apr 2013 15:08:11 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366211291.52.0.0426442722241.issue17673@psf.upfronthosting.co.za> Kyle Roberts added the comment: Thanks for the quick response. The test file is sandwiched in between the two patch files, so it's easy to miss. You made a great point about not cluttering up the repo with any unnecessary files. I'll change the test methods to create a new copy_from file that's closed at the end of each test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 17:28:06 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Apr 2013 15:28:06 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366212486.09.0.956410152406.issue17673@psf.upfronthosting.co.za> R. David Murray added the comment: I did miss it. Not that it matters if you are going to rewrite the test, but FYI you can include new files in a patch by adding them ('hg add') before doing the 'hg diff' to generate the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 17:28:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Apr 2013 15:28:33 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366212513.57.0.719294791039.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After searching a lot of other implementations of this encoding I conclude that there are at least three different variants. 1. The original btoa/atob encoding. 4 zeros are packaged as 'z', last incomplete 4 bytes are padded by zeros, an output is wrapped into several lines and decoder ignores '\n'. There are many implementations of this algorithm in different languages. 2. Adobe version. This is an extended version of (1). The last incomplete 4 bytes produces less then 5 output characters, an output is enclosed in <~ and ~>. Decoder ignores all ascii whitespaces, not only '\n'. There are many implementations of this algorithm in different languages. 3. Git and Mercurial version. This is a very simplified version of (1) with an alternative character set. Zeros are not packed, an output is not broken into several lines and decoder doesn't ignores any whitespaces. I don't know is whether this variant used besides Git and Mercurial. Some implementations combine (1) and (2) (optionally enclose an output in <~ and ~>, optionally wrap an output into several lines, optionally pad last 4 incomplete bytes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 17:37:35 2013 From: report at bugs.python.org (Reynir Reynisson) Date: Wed, 17 Apr 2013 15:37:35 +0000 Subject: [issue17777] Unrecognized string literal escape sequences give SyntaxErrors Message-ID: <1366213055.37.0.161368185198.issue17777@psf.upfronthosting.co.za> New submission from Reynir Reynisson: Strings like "\u" trigger a SyntaxError. According to the language reference "all unrecognized escape sequences are left in the string unchanged"[0]. The string "\u" clearly doesn't match any of the escape sequences (in particular \uxxxx). This may be intentional, but it is not clear from the language reference that this is the case. If it is intentional it should probably be stated more explicit in the language reference. I think this may be confusing for new users since the syntax errors may lead them to believe the interpreter will give syntax error for all unrecognized escape sequences. [0]: http://docs.python.org/3/reference/lexical_analysis.html#literals ---------- assignee: docs at python components: Documentation, Unicode messages: 187173 nosy: docs at python, ezio.melotti, reynir priority: normal severity: normal status: open title: Unrecognized string literal escape sequences give SyntaxErrors type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 17:47:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 15:47:55 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1366212513.57.0.719294791039.issue17618@psf.upfronthosting.co.za> Message-ID: <1773654976.60822846.1366213668813.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > After searching a lot of other implementations of this encoding I > conclude that there are at least three different variants. Yes. The current proposal is to include both the Adobe version ("ascii85") and the Mercurial/Git version ("base85"). btoa/atob seems extinct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 17:54:45 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Apr 2013 15:54:45 +0000 Subject: [issue17777] Unrecognized string literal escape sequences give SyntaxErrors In-Reply-To: <1366213055.37.0.161368185198.issue17777@psf.upfronthosting.co.za> Message-ID: <1366214085.3.0.887671301368.issue17777@psf.upfronthosting.co.za> R. David Murray added the comment: It is a recognized escape sequence, but the syntax of the escape sequence is wrong, thus the syntax error. An "escape sequence" is a backslash character followed by a letter. Perhaps that is the bit that needs to be clarified in the docs? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 18:03:36 2013 From: report at bugs.python.org (Olivier Berger) Date: Wed, 17 Apr 2013 16:03:36 +0000 Subject: [issue17776] IDLE Internationalization In-Reply-To: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> Message-ID: <1366214616.81.0.861884404753.issue17776@psf.upfronthosting.co.za> Olivier Berger added the comment: Excellent. I've started playing with pygettext and msgfmt and it looks like this works, from the initial tests I've made ---------- nosy: +olberger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 18:14:39 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 17 Apr 2013 16:14:39 +0000 Subject: [issue17776] IDLE Internationalization In-Reply-To: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> Message-ID: <1366215279.32.0.46697580468.issue17776@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, roger.serwy, terry.reedy stage: -> patch review versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 18:14:53 2013 From: report at bugs.python.org (Void) Date: Wed, 17 Apr 2013 16:14:53 +0000 Subject: [issue14315] zipfile.ZipFile() unable to open zip File In-Reply-To: <1331810146.14.0.995585507713.issue14315@psf.upfronthosting.co.za> Message-ID: <1366215293.7.0.935721072236.issue14315@psf.upfronthosting.co.za> Void added the comment: > FWIW, I think it will OK to just ignore extra fields that we can't > interpret as according to the standard. The only one we currently > care about is the "Zip64 extended information extra field". Also, > other programs (including the Info-Zip tools) seem to mostly ignore > these fields. Yes, please. > The ellipsis is just a standard convention for indicating a repeating > pattern. Extra fields which are not multiples of four bytes are not > properly formed. . . . [;pause;] Totally agree. But at the very least it should check the size and raise a proper exception (e.g. BadZipFile). FWIW, the code is already avoiding proper bounds checking using the built-in behavior of slicing -- tp, ln = unpack(' I still don't see the bug; the module is behaving correctly - it is the zipfile that is buggy. Supporting this specific kind of buggy zipfiles is a new feature. You realize that you are calling user-controlled data buggy, right? ---------- nosy: +void.sender _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 18:34:46 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Apr 2013 16:34:46 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1366216486.87.0.497087817208.issue17050@psf.upfronthosting.co.za> paul j3 added the comment: The problem isn't with REMAINDER, but with the distinction between optionals and arguments. If you change '--def' to 'def', the parse should work: >>> p = ArgumentParser(prog='test.py') >>> p.add_argument('remainder', nargs=argparse.REMAINDER) >>> p.parse_args(['def']) '--def' would give problems with almost all of the nargs options, especially '*' and '?'. The issue is that '--def' looks like an optional. Since it is not found in the defined arguments, it is classed as an unknown extra and skipped (try p.parse_known_args(['--def'])). All of this takes place before 'REMAINDER' has a chance to look at the argument strings. In http://bugs.python.org/issue9334 I submitted a patch that defines a 'args_default_to_positional' parser option. If this is True, that unrecognized '--def' would be classed as a 'positional' and would be captured by the REMAINDER. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 18:45:46 2013 From: report at bugs.python.org (Kyle Roberts) Date: Wed, 17 Apr 2013 16:45:46 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366217146.88.0.0711745854273.issue17673@psf.upfronthosting.co.za> Kyle Roberts added the comment: Very cool, I didn't think it'd be included in the patch for some reason. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 18:50:53 2013 From: report at bugs.python.org (Ger Luijten) Date: Wed, 17 Apr 2013 16:50:53 +0000 Subject: [issue5492] Error on leaving IDLE with quit() or exit() under Linux In-Reply-To: <1364772128.49.0.86021422733.issue5492@psf.upfronthosting.co.za> Message-ID: Ger Luijten added the comment: Hello Roger, To you and others that worked on this bug a big thanks for the extra deep dig into the chain of events to find this old bug and fix it. Impressive! Because I'm not familiar with the inner workings that cause this bug I was wondering if the kill command you use is the structural solution or just a clever workarond to prevent the error being written to the text widget and forcing the program to stop abruptly. For me your explanation raised the question if other processes that should terminate normally are now prevented from doing so and for instance are not able to do clear allocated memory (garbage collection). Could you shed some light on your bug fix? Greetings, Ger 2013/4/1 Roger Serwy > > Roger Serwy added the comment: > > I found the root cause of the original error. > > Entering "exit()" at the shell raises SystemExit which gets written to the > shell's text widget. The call to actually write the text passes through > .write() in Lib/idlelib/OutputWindow.py, which calls text.update(). The > call to .update() enters the Tk event loop and flushes pending events, > including expired .after callbacks. > > Forcing the .after callback in .close() to 1 ms will always trigger the > error. Commenting out the text.update() in OutputWindow.py avoids the error. > > The patch causes .kill_subprocess() to execute immediately which prevents > the subprocess from writing to sys.stderr. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 19:01:22 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 17 Apr 2013 17:01:22 +0000 Subject: [issue17778] Fix test discovery for test_multiprocessing.py Message-ID: <1366218082.59.0.595129290582.issue17778@psf.upfronthosting.co.za> New submission from Zachary Ware: I think this one only didn't work with discovery by accident: the only change necessary to make discovery pass was to make _TestPoll match all other _Test* classes by inheriting from BaseTestCase instead of unittest.TestCase. The remainder of the changes are to eliminate test_main by converting it instead to setUpModule. setUpModule is, I think, necessary on this one due to a failing test in WithProcessesTestLogging when the initial call to multiprocessing.get_logger().setLevel() (originally in test_main) is moved to top-level code. ---------- components: Tests files: test_multiprocessing_discovery.diff keywords: patch messages: 187181 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_multiprocessing.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29905/test_multiprocessing_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 19:03:22 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Apr 2013 17:03:22 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1366218202.5.0.50925236797.issue17050@psf.upfronthosting.co.za> paul j3 added the comment: Here's a way of passing an optional-like argument to a subparser: parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(dest='cmd') sub1 = subparsers.add_parser('cmd') sub1.add_argument('foo',nargs='*') args = parser.parse_args('cmd -- --def 1 2 3'.split()) producing Namespace(cmd='cmd', foo=['--def', '1', '2', '3']) The '--' forces the parser to treat '--def' as a positional. If nargs='REMAINDER', foo=['--', '--def', ...]. But the following subparser definition would be even better: sub1.add_argument('--def', action='store_true') sub1.add_argument('rest',nargs='...') Here the '--def' is handle explicitly, as opposed to being passed on. You don't need the whole subparsers mechanism if you are just going to pass those arguments (unparsed) to another program. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 19:14:33 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 17 Apr 2013 17:14:33 +0000 Subject: [issue17555] ForkAwareThreadLock leak after fork In-Reply-To: <1364354575.82.0.702442791552.issue17555@psf.upfronthosting.co.za> Message-ID: <1366218873.81.0.809995106349.issue17555@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- title: Creating new processes after importing multiprocessing.managers consumes more and more memory -> ForkAwareThreadLock leak after fork versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 19:26:35 2013 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 17 Apr 2013 17:26:35 +0000 Subject: [issue17772] test_gdb doesn't detect a gdb built with python3.3 (or higher) In-Reply-To: <1366193783.12.0.853305189614.issue17772@psf.upfronthosting.co.za> Message-ID: <1366219595.44.0.584128327257.issue17772@psf.upfronthosting.co.za> Dave Malcolm added the comment: I didn't know that gdb supported embedding Python 3. Is this a set of patches you're applying downstream, or an official gdb feature? If so, it means everyone coding to the gdb API needs to somehow make their FOO-gdb.py files be Python 3-compatible. Currently the Tools/gdb/libpython.py is Python 2 compatible, and I'm sure there are going to be incompatibilities with python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 19:46:31 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 17:46:31 +0000 Subject: [issue17772] test_gdb doesn't detect a gdb built with python3.3 (or higher) In-Reply-To: <1366193783.12.0.853305189614.issue17772@psf.upfronthosting.co.za> Message-ID: <1366220791.5.0.425876794548.issue17772@psf.upfronthosting.co.za> Matthias Klose added the comment: yes, this from the FSF 7.6 branch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 19:53:03 2013 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 17 Apr 2013 17:53:03 +0000 Subject: [issue17772] test_gdb doesn't detect a gdb built with python3.3 (or higher) In-Reply-To: <1366193783.12.0.853305189614.issue17772@psf.upfronthosting.co.za> Message-ID: <1366221183.02.0.889011790361.issue17772@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks. Does upstream gdb have a plan dcoumented somewhere for how to deal with all of the FOO-gdb.py files. Are they expected to be coded to the common Python 2/3 subset? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:14:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Apr 2013 18:14:42 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366222482.66.0.480931794823.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > btoa/atob seems extinct. At least half of ascii85 encoders in wild implement this variant. I think we can provide a universal solution compatible (with some pre/postprocessing) with both variants. Enclose encoded data in <~ and ~> or not, and at which column wrap an encoded data. Padding can be easy implemented as preprocessing (data + (-len(data)) % 4 * b'\0'). As for Git/Mercurial's base85, what other applications use this encoding? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:21:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 18:21:48 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1366222482.66.0.480931794823.issue17618@psf.upfronthosting.co.za> Message-ID: <1366222906.2556.7.camel@fsol> Antoine Pitrou added the comment: Le mercredi 17 avril 2013 ? 18:14 +0000, Serhiy Storchaka a ?crit : > I think we can provide a universal solution compatible (with some > pre/postprocessing) with both variants. Enclose encoded data in <~ and > ~> or not, and at which column wrap an encoded data. Padding can be > easy implemented as preprocessing (data + (-len(data)) % 4 * b'\0'). That's ok with me. It's just more work for whoever does it :-) > As for Git/Mercurial's base85, what other applications use this > encoding? I don't know, but they use it to produce binary diffs ("diff" chunks of binary files), so any application wanting to parse Mercurial/Git diffs would have to recognize base85 data. (and I also like that the Mercurial/Git variant is the simpler of all 3 :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:25:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 18:25:17 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1366223117.2.0.0751497316272.issue17673@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some comments about the patch: - unless I'm missing something, I think you should re-use the fd instead of reopening the file by name - it would be nice if copy_from accepted an open file-like object, e.g. a BytesIO instance - I don't think you need a specific file for the test; just use an existing one (e.g. __file__, or one of the data files somewhere in the test subtree) - the doc needs some "versionchanged" markers ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:29:16 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 17 Apr 2013 18:29:16 +0000 Subject: [issue17779] Fix test discovery for test_osx_env.py Message-ID: <1366223356.18.0.930448045627.issue17779@psf.upfronthosting.co.za> New submission from Zachary Ware: This patch converts test_osx_env.py to use a skip decorator instead of just not running the test at all. ---------- components: Tests files: test_osx_env_discovery.diff keywords: patch messages: 187189 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_osx_env.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29906/test_osx_env_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:36:06 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 18:36:06 +0000 Subject: [issue17780] the test suite should use a TEMPDIR in the build directory, not the source directory Message-ID: <1366223766.74.0.431919060709.issue17780@psf.upfronthosting.co.za> New submission from Matthias Klose: the test suite should use a TEMPDIR in the build directory, not the source directory, e.g. the source directory might not be writeable. looks like regrtest._make_temp_dir_for_build() needs just to use abs_builddir instead of srcdir. ---------- components: Tests messages: 187190 nosy: doko priority: normal severity: normal status: open title: the test suite should use a TEMPDIR in the build directory, not the source directory versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:39:40 2013 From: report at bugs.python.org (Martin Morrison) Date: Wed, 17 Apr 2013 18:39:40 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1366222906.2556.7.camel@fsol> Message-ID: <516EEC5C.3040601@ensoft.co.uk> Martin Morrison added the comment: > Using a trick with struct.unpack() has very unpleasant side effect. > It might be a few speed up encoding, but creates the Struct object > with the size is many times larger than the size of the processed > data. Worse, this object is cached and continues to consume memory. > Since the size of the data most likely will be unique, almost every > call of b85encode creates a new object. This will lead to memory > leaks. Can you elaborate on this? What leakage is there? I assume this is some implementation quirk of the struct module that I'm not aware of. > Le mercredi 17 avril 2013 ? 18:14 +0000, Serhiy Storchaka a ?crit : >> I think we can provide a universal solution compatible (with some >> pre/postprocessing) with both variants. Enclose encoded data in <~ >> and ~> or not, and at which column wrap an encoded data. Padding >> can be easy implemented as preprocessing (data + (-len(data)) % 4 * >> b'\0'). > > That's ok with me. It's just more work for whoever does it :-) As I mentioned in one of my previous comments, I was trying very hard not to touch the Mercurial solution (b85(en|de)code in the latest patch), and just copy it wholesale. Mostly, I don't really like the way the solution reads (unpythonic in my eyes), but can understand that for this kind of thing that might be the best way. In my solution (a85(en|de)code) I wrote it from scratch in what I felt was a readable way. I can quite easily extend my version to support your description of the btoa/atob version (i.e. no bracketing, always pad, always wrap output). I'm less convinced it's sensible to merge the ascii85 implementations and the Mercurial b85 one. If you really want that though, I would be in favour of using my a85 implementation and just changing the encode inner function to use the lookup table. (we can do all this independently of the function names, which I think Antoine and I are agreed should be separate for the different implementations) >> As for Git/Mercurial's base85, what other applications use this >> encoding? > > I don't know, but they use it to produce binary diffs ("diff" chunks > of binary files), so any application wanting to parse Mercurial/Git > diffs would have to recognize base85 data. > > (and I also like that the Mercurial/Git variant is the simpler of > all 3 :-)) I actually prefer the Ascii85 one for the simplicity of the encoding (shift base 85 chunks of the input by 33 to get into the printable ascii range) rather than the clunky lookup table approach. ? chacun son go?t. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:40:08 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 18:40:08 +0000 Subject: [issue17781] optimize compilation options Message-ID: <1366224008.41.0.60101315886.issue17781@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Ubuntu's system Python 3.3 shows consistently better performance than a vanilla Python 3.3: around 10-15% faster in general (see attached benchmark numbers). If this can be attributed to different compilation options, it would be nice to backport those options to our standard build config. ---------- components: Build files: perflog.txt messages: 187192 nosy: barry, doko, pitrou priority: low severity: normal status: open title: optimize compilation options type: performance versions: Python 3.4 Added file: http://bugs.python.org/file29907/perflog.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:45:41 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 18:45:41 +0000 Subject: [issue17781] optimize compilation options In-Reply-To: <1366224008.41.0.60101315886.issue17781@psf.upfronthosting.co.za> Message-ID: <1366224341.44.0.609193428014.issue17781@psf.upfronthosting.co.za> Matthias Klose added the comment: most of that can be attributed to the pgo build, which is upstream for a long time. the second thing to do is to build with lto, and see what speedups you get in addition. and it certainly helps to build the interpreter statically (without --enable-shared). but thanks to confirming my own experience ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:50:43 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 18:50:43 +0000 Subject: [issue17761] platform._parse_release_file doesn't close the /etc/lsb-release file, doesn't know about 'Ubuntu' In-Reply-To: <1366123744.99.0.817269180469.issue17761@psf.upfronthosting.co.za> Message-ID: <1366224643.66.0.778633402861.issue17761@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can't you use a "with" statement instead of calling close() explicitly? ---------- nosy: +lemburg, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 20:51:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Apr 2013 18:51:07 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366224667.42.0.852159918119.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Can you elaborate on this? What leakage is there? I assume this is some implementation quirk of the struct module that I'm not aware of. issue14596. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 21:03:35 2013 From: report at bugs.python.org (Martin Morrison) Date: Wed, 17 Apr 2013 19:03:35 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1366224667.42.0.852159918119.issue17618@psf.upfronthosting.co.za> Message-ID: <516EF1F8.70700@ensoft.co.uk> Martin Morrison added the comment: >> Can you elaborate on this? What leakage is there? I assume this is some > implementation quirk of the struct module that I'm not aware of. > > issue14596. Thanks for the pointer. I will rework the patch for the encoder/decoders to use an explicit Struct so that the inbuilt cache gets bypassed and we don't "leak", ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 21:25:27 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 19:25:27 +0000 Subject: [issue17782] Fix test_signal failure on x32 Message-ID: <1366226727.47.0.55075488936.issue17782@psf.upfronthosting.co.za> New submission from Antoine Pitrou: x32 is a special Linux ABI on x86-64 CPUs. When compiling for x32, there's a failure in test_sigtimedwait. The failure is due to the fact that on x32, "long" is 32 bits but "timespec.tv_nsec" is 64 bits. Therefore we can't pass the pointer to tv_nsec directly to _PyTime_ObjectToTimespec. Patch attached. ---------- components: Interpreter Core files: x32_timespec.patch keywords: patch messages: 187197 nosy: haypo, mark.dickinson, pitrou priority: low severity: normal stage: patch review status: open title: Fix test_signal failure on x32 type: crash versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29908/x32_timespec.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 21:26:25 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 19:26:25 +0000 Subject: [issue17782] Fix test_signal failure on x32 In-Reply-To: <1366226727.47.0.55075488936.issue17782@psf.upfronthosting.co.za> Message-ID: <1366226785.98.0.416964274996.issue17782@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 21:37:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 19:37:57 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366227477.53.0.380760376533.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Serhiy, Martin, perhaps one of you could report the potential memory leak on the Mercurial bug tracker: http://bz.selenic.com/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 21:38:00 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 19:38:00 +0000 Subject: [issue17783] run the testsuite in batched mode Message-ID: <1366227480.23.0.0819092121273.issue17783@psf.upfronthosting.co.za> New submission from Matthias Klose: running all the tests in one batch sometimes can go wrong. there is of course the --single mode, but starting the testsuite for each single test seems to be a bit of overhead. So extend the --single API to something like --next= which runs the next tests. or would --batch be a better name? and maybe don't change the single default parameter in the signature, and introduce a new parameter. the proposed patch is currently against the 3.3 branch, and without doc changes. ---------- components: Tests files: batch-test.diff keywords: patch messages: 187199 nosy: doko priority: normal severity: normal stage: patch review status: open title: run the testsuite in batched mode versions: Python 3.4 Added file: http://bugs.python.org/file29909/batch-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 21:45:54 2013 From: report at bugs.python.org (Paul Winkler) Date: Wed, 17 Apr 2013 19:45:54 +0000 Subject: [issue13831] get method of multiprocessing.pool.Async should return full traceback In-Reply-To: <1327006000.05.0.152231015377.issue13831@psf.upfronthosting.co.za> Message-ID: <1366227954.24.0.438230692271.issue13831@psf.upfronthosting.co.za> Changes by Paul Winkler : ---------- nosy: +slinkp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 21:48:01 2013 From: report at bugs.python.org (Paul Winkler) Date: Wed, 17 Apr 2013 19:48:01 +0000 Subject: [issue13831] get method of multiprocessing.pool.Async should return full traceback In-Reply-To: <1327006000.05.0.152231015377.issue13831@psf.upfronthosting.co.za> Message-ID: <1366228081.88.0.583448621138.issue13831@psf.upfronthosting.co.za> Changes by Paul Winkler : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 21:56:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Apr 2013 19:56:44 +0000 Subject: [issue17782] Fix test_signal failure on x32 In-Reply-To: <1366226727.47.0.55075488936.issue17782@psf.upfronthosting.co.za> Message-ID: <1366228604.29.0.591349396951.issue17782@psf.upfronthosting.co.za> STINNER Victor added the comment: The patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 22:00:30 2013 From: report at bugs.python.org (Reynir Reynisson) Date: Wed, 17 Apr 2013 20:00:30 +0000 Subject: [issue17777] Unrecognized string literal escape sequences give SyntaxErrors In-Reply-To: <1366213055.37.0.161368185198.issue17777@psf.upfronthosting.co.za> Message-ID: <1366228830.4.0.578619601375.issue17777@psf.upfronthosting.co.za> Reynir Reynisson added the comment: Thank you for the quick reply. Yes, something along those lines would help. Maybe adding "The escape sequence \x expects exactly two hex digits" would make it even clearer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 22:10:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 20:10:44 +0000 Subject: [issue17782] Fix test_signal failure on x32 In-Reply-To: <1366226727.47.0.55075488936.issue17782@psf.upfronthosting.co.za> Message-ID: <3ZrZM744BBzMk9@mail.python.org> Roundup Robot added the comment: New changeset 7a0fb0f59cf6 by Antoine Pitrou in branch '3.3': - Issue #17782: Fix undefined behaviour on platforms where ``struct timespec``'s "tv_nsec" member is not a C long. http://hg.python.org/cpython/rev/7a0fb0f59cf6 New changeset f9e0eacb6b13 by Antoine Pitrou in branch 'default': Issue #17782: Fix undefined behaviour on platforms where ``struct timespec``'s "tv_nsec" member is not a C long. http://hg.python.org/cpython/rev/f9e0eacb6b13 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 22:11:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Apr 2013 20:11:40 +0000 Subject: [issue17782] Fix test_signal failure on x32 In-Reply-To: <1366226727.47.0.55075488936.issue17782@psf.upfronthosting.co.za> Message-ID: <1366229500.61.0.925377142779.issue17782@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 22:24:49 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Apr 2013 20:24:49 +0000 Subject: [issue14174] argparse.REMAINDER fails to parse remainder correctly In-Reply-To: <1330690090.15.0.511487898244.issue14174@psf.upfronthosting.co.za> Message-ID: <1366230289.48.0.29406183915.issue14174@psf.upfronthosting.co.za> paul j3 added the comment: An alternative to Jason's example: parser = argparse.ArgumentParser() parser.add_argument('app') parser.add_argument('--config') parser.add_argument('app_args', nargs=argparse.REMAINDER) args = parser.parse_args(['--config', 'bar', 'app']) print vars(args) # as expected: {'app': 'app', 'app_args': [], 'config': 'bar'} When you have several positionals, one or more of which may have 0 arguments (*,?,...), it is best to put all of the optional arguments first. With 'app --config bar', parse_args identifies a 'AOA' pattern (argument, optional, argument). It then checks which positional arguments match. 'app' claims 1, 'app_args' claims 2 (REMAINDER means match everything that follows). That leaves nothing for '--config'. What you expected was that 'app' would match with the 1st string, '--config' would match the next 2, leaving nothing for 'app_args'. In http://bugs.python.org/issue14191 I wrote a patch that would give the results you want if 'app_args' uses '*'. That is makes it possible to interleave positional and optional argument strings. But it does not change the behavior of REMAINDER. parser.add_argument('app_args', nargs='*') -------------- Maybe the documentation example for REMAINDER needs to modified to show just how 'greedy' REMAINDER is. Adding a: parser.add_argument('--arg1',action='store_true') does not change the outcome. REMAINDER still grabs '--arg1' even though it is a defined argument. Namespace(arg1=False, args=['--arg1', 'XX', 'ZZ'], command='cmd', foo='B') ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 22:29:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 20:29:14 +0000 Subject: [issue17555] ForkAwareThreadLock leak after fork In-Reply-To: <1364354575.82.0.702442791552.issue17555@psf.upfronthosting.co.za> Message-ID: <3ZrZmT50PPzS1k@mail.python.org> Roundup Robot added the comment: New changeset 66731a1b1aa4 by Richard Oudkerk in branch '2.7': Issue #17555: Fix ForkAwareThreadLock so that size of after fork http://hg.python.org/cpython/rev/66731a1b1aa4 New changeset 21314f27a40c by Richard Oudkerk in branch '3.3': Issue #17555: Fix ForkAwareThreadLock so that size of after fork http://hg.python.org/cpython/rev/21314f27a40c New changeset 2c350a75ff43 by Richard Oudkerk in branch 'default': Issue #17555: Fix ForkAwareThreadLock so that size of after fork http://hg.python.org/cpython/rev/2c350a75ff43 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 22:33:57 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Apr 2013 20:33:57 +0000 Subject: [issue14174] argparse.REMAINDER fails to parse remainder correctly In-Reply-To: <1330690090.15.0.511487898244.issue14174@psf.upfronthosting.co.za> Message-ID: <1366230837.86.0.0358928161189.issue14174@psf.upfronthosting.co.za> paul j3 added the comment: By the way, parser.parse_args() uses parse_known_arg(). parse_known_args returns a Namespace and a list of unknown arguments. If that list is empty, parse_args returns the Namespace. If the list is not empty, parse_args raises an error. So parse_known_args does not change how arguments are parsed. It just changes how the unknowns are handled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 23:05:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 21:05:38 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <3ZrbZT64pjzSLV@mail.python.org> Roundup Robot added the comment: New changeset edf029fc9591 by Victor Stinner in branch 'default': Close #17694: Add minimum length to _PyUnicodeWriter http://hg.python.org/cpython/rev/edf029fc9591 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 23:44:44 2013 From: report at bugs.python.org (Matthias Klose) Date: Wed, 17 Apr 2013 21:44:44 +0000 Subject: [issue17784] the test suite should honor an http_proxy for running the test suite Message-ID: <1366235084.83.0.373131563913.issue17784@psf.upfronthosting.co.za> New submission from Matthias Klose: the test suite should honor an http_proxy for running the test suite, at least for all the tests using the urlfetch resource. maybe for some tests using the network resource too. this would allow running tests in somehow constrained environments. ---------- components: Tests messages: 187208 nosy: doko priority: normal severity: normal status: open title: the test suite should honor an http_proxy for running the test suite _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 17 23:52:03 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Apr 2013 21:52:03 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366235523.55.0.787218674936.issue17760@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Oliver opened thread " I18n of IDLE's interface ?" on idle-dev list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 00:14:35 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 17 Apr 2013 22:14:35 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366236875.15.0.561054119409.issue17760@psf.upfronthosting.co.za> Ezio Melotti added the comment: FTR, here is a link to thread: http://mail.python.org/pipermail/idle-dev/2013-April/003254.html. There's also a follow-up issue with a patch: #17776. http://mail.python.org/pipermail/idle-dev/2013-April/003258.html also has a list of reasons to avoid internationalization, and 4 is one of the main reasons I'm against it. Students already have to learn several English words anyway (e.g. keywords like if, else, for, while, class, try, except, finally, break, continue, etc.; functions like all, any, print, input, range, sorted, reversed, etc.; "concepts" like classes, functions, methods, variables, attributes, etc.). Adding a few more (open, close, save, exit, cut, copy, paste, find, etc.) is not going to make a lot of difference anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 00:30:32 2013 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Apr 2013 22:30:32 +0000 Subject: [issue17694] Enhance _PyUnicodeWriter API to control minimum buffer length without overallocation In-Reply-To: <1365638001.77.0.401787088666.issue17694@psf.upfronthosting.co.za> Message-ID: <1366237832.8.0.163050112357.issue17694@psf.upfronthosting.co.za> STINNER Victor added the comment: The commit changes the default value of min_length when overallocation is enabled: it does not use at least 100 characters anymore. It did not directly introduce a bug, but the regression comes from 7ed9993d53b4 (use _PyUnicodeWriter for Unicode decoders). The following commits should fix these issues. changeset: 83435:94d1c3bdb79c tag: tip user: Victor Stinner date: Thu Apr 18 00:25:28 2013 +0200 files: Objects/unicodeobject.c description: Fix bug in Unicode decoders related to _PyUnicodeWriter Bug introduced by changesets 7ed9993d53b4 and edf029fc9591. changeset: 83434:7eb52460c999 user: Victor Stinner date: Wed Apr 17 23:58:16 2013 +0200 files: Objects/unicodeobject.c description: Fix typo in unicode_decode_call_errorhandler_writer() Bug introduced by changeset 7ed9993d53b4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 00:38:07 2013 From: report at bugs.python.org (paul j3) Date: Wed, 17 Apr 2013 22:38:07 +0000 Subject: [issue16142] ArgumentParser inconsistent with parse_known_args In-Reply-To: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> Message-ID: <1366238287.79.0.635450212886.issue16142@psf.upfronthosting.co.za> paul j3 added the comment: parser = argparse.ArgumentParser() parser.add_argument('-k','--known',action='store_true') print(parser.parse_known_args(['-k','-u'])) print(parser.parse_known_args(['-ku'])) print(parser.parse_known_args(['-uk'])) I think you want these 3 cases to produce the same output: (Namespace(known=True), ['-u']) With the attached patch, '-ku' produces the same result as '-k -u'. Instead of raising the "ignored explicit argument 'u'" error, if puts '-u' in the 'extras' list. 'parse_args' then raises a "error: unrecognized arguments: u" error. That's an easy change, and does not break anything in the 'test_argparse.py' file. But keep in mind that this test file mostly uses 'parse_args', and usually it ignores the failure messages. Getting '-uk' to work this way would be much harder. While it isn't obvious from the documentation, '-uk' is a valid option string, and '-u' is a valid abbreviation. Notice in 16.4.4.1. of the documentation, the difference between long and short options is based on the number of characters, not whether there it starts with '-' or '--'. So identifying what is wrong with '-uk' would require ambiguous reasoning. I wonder what optparse does. ---------- keywords: +patch nosy: +paul.j3 Added file: http://bugs.python.org/file29910/dashku.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 00:39:25 2013 From: report at bugs.python.org (Martin Morrison) Date: Wed, 17 Apr 2013 22:39:25 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366238365.04.0.0203309622458.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: New diff. Changes from the last one: - change in struct handling to avoid issue14596 - Addition of btoa85 and atob85 functions that do legacy 'btoa' encoding/decoding. These are just wrappers around a85(en|de)code, which now have additional keyword args to control wrapping, padding, framing, and whitespace skipping - New tests covering all 3 variants ---------- Added file: http://bugs.python.org/file29911/issue17618-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 00:51:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Apr 2013 22:51:26 +0000 Subject: [issue17135] imp doc should direct to importlib In-Reply-To: <1360080581.61.0.501686856177.issue17135@psf.upfronthosting.co.za> Message-ID: <3ZrdwY5Sh9zS1k@mail.python.org> Roundup Robot added the comment: New changeset f22c463ce73c by R David Murray in branch 'default': #17135: mark imp as deprecated as of 3.4. http://hg.python.org/cpython/rev/f22c463ce73c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 01:00:44 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 17 Apr 2013 23:00:44 +0000 Subject: [issue17555] ForkAwareThreadLock leak after fork In-Reply-To: <1364354575.82.0.702442791552.issue17555@psf.upfronthosting.co.za> Message-ID: <1366239644.08.0.564924691802.issue17555@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 01:52:57 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 17 Apr 2013 23:52:57 +0000 Subject: [issue17785] Use faster URL shortener for perf.py Message-ID: <1366242777.62.0.0914691479989.issue17785@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti: As noted previously, TinyURL URL shortening API is rather slow and not always available. Each requests takes between 0.5 and 1.5 seconds. We should change it to use Google URL Shortener which returns a response within 10 milliseconds and is much more available. ---------- assignee: alexandre.vassalotti components: Benchmarks files: use_google_shortener.patch keywords: patch messages: 187215 nosy: alexandre.vassalotti, pitrou priority: normal severity: normal stage: patch review status: open title: Use faster URL shortener for perf.py type: performance Added file: http://bugs.python.org/file29912/use_google_shortener.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 02:27:55 2013 From: report at bugs.python.org (Ben Hoyt) Date: Thu, 18 Apr 2013 00:27:55 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1366244875.42.0.193692570779.issue15207@psf.upfronthosting.co.za> Ben Hoyt added the comment: Okay, I'm looking at the diff between mt-tip-noregistry.txt and mt-tip-newregistry.txt, and I've attached a file showing the lines that are *different* between the two, as well as the Apache mime.types value for that file extension. In most cases, noregistry gives the right mime type, and newregistry is wrong. However, in a few cases, the registry value is right (i.e., according to Apache's mime.types). However, I think that's a totally separate issue, and maybe we should probably open a bug to update a few of the hard-coded mappings in mimetypes.py. The cases where noregistry is right (according to Apache): * .aif * .aifc * .aiff * .avi * .sh * .wav * .xsl *. zip The cases where noregistry is wrong (according to Apache): * .bmp is hard-coded as "image/x-ms-bmp", but it should be image/bmp * .dll and .exe are hard-coded as "application/octet-stream", but should be "application/x-msdownload" * .ico is hard-coded as "image/vnd.microsoft.icon" but should be "image/x-icon" * .m3u is hard-coded as "application/vnd.apple.mpegurl" but should be "audio/x-mpegurl" None of these are standardized IANA mime types, and they're not particularly common for web servers to be serving, so it probably doesn't matter too much that the current hard-coded values are wrong. Also, I'm guessing web browsers will interpret the older type image/x-ms-bmp as image/bmp anyway. So maybe we should open another issue to fix the hard-coded types in mimetypes.py shown above, but again, that's another issue. The other thing here is all the *new types* that the registry adds, such as ".acrobatsecuritysettings". I don't see that these add much value -- just a bunch of types that depend on the programs you have installed. And in my mind at least, the behaviour of mimetypes.guess_type() should not change based on what programs you have installed. In short, "noregistry" gives more accurate results in most cases that matter, and I still strongly feel we should revert to that. (The only alternative, in my opinion, is to switch to Dave Chambers' version of read_windows_registry(), but not call it by default.) ---------- Added file: http://bugs.python.org/file29913/different.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 03:08:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Apr 2013 01:08:07 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366247287.85.0.532610402096.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a benchmark. It looks like the overallocation is not configured correctly for charmap and UTF-8 encoders: it is always enabled for UTF-8 encoder (whereas it should only be enabled on the first call to an error handler), and never enabled for charmap encoder. ---------- Added file: http://bugs.python.org/file29914/bench_encoders.compare _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 03:47:55 2013 From: report at bugs.python.org (Pam McA'Nulty) Date: Thu, 18 Apr 2013 01:47:55 +0000 Subject: [issue17530] pprint could use line continuation for long bytes literals In-Reply-To: <1364067577.46.0.261047534718.issue17530@psf.upfronthosting.co.za> Message-ID: <1366249675.31.0.40756781917.issue17530@psf.upfronthosting.co.za> Pam McA'Nulty added the comment: Here's a new version. It looks more like the str_parts patch and uses parentheses instead of continuation as suggested. Sample output: >>> pprint.pprint(b"\n\na\x00", width=1) (b'\n' b'\n' b'a' b'\x00') ---------- Added file: http://bugs.python.org/file29915/bytes_pprint2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 04:46:29 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Apr 2013 02:46:29 +0000 Subject: [issue17776] IDLE Internationalization In-Reply-To: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> Message-ID: <1366253189.88.0.588801142192.issue17776@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Whether and how much to internationalize Idle is being discussed on idle-dev thread "I18n of IDLE's interface ?". I was going to suggest there that the menu system would be the first place to start. A prime concern for me is that we not break anything (hence some of the questions below), and the menu labels seem relatively safe (compared to format strings -- see post on thread). While locale is used to format dates and times, I believe this would be the first use of gettext within the stdlib itself. To me it is a plausible to do because the idlelib modules are used to write and run code rather than being imported into code. I still have this concern: if a beginner can manage to handle 'English' keywords, builtin names, and exception names and messages*, does having translated menu labels give enough benefit to be worth the bother? I am open to the answer being yes, but before I were to commit this patch to the CPython repository, I would like to see a working example translation and a report of a field test with real students. (* I an not including stdlib because many beginners programs make little use of imports.) As for the patch: It looks good as far as it goes, but I have little knowledge of locale and gettext beyond the bare bones and no experience with either. The gettext doc is not all that clear to me, and it seems exclusively unix-focused, whereas I am on Windows. My questions: 1. Does it actually work on Windows (and Mac), without bugs? (I could sometime look as test_gettext and try it on Windows, but not on the machine I am on at the moment.) 2. +gettext.bindtextdomain('idlelib') What does this actually do. Where do .mo files go on the various OSes. This sort of doc has to be part of a patch. 3. Does the gettext machinery look at an environmental locale variable behind the scenes? Is that how it decides on the translation language, if any? 4. +_ = gettext.gettext Leave aside the issue of doing the binding in builtins versus each module, as in the patch (this seems safer). The doc is skimpier than I would like: "Return the localized translation of message, based on the current global domain, language, and locale directory." The latter part is part of my question above. As for the first part: is the default behavior to simply echo the text passed in? If Idle executes in a non-default environment/locale, but there is no translation file, does it echo the original string (English) or raise an exception? Same question if there is an appropriate translation file but no entry for the particular string? Overall, does gettext *ever* raise an exception, or does it *always* return a string of the correct type, or might it return bytes when unicode is expected (in 3.x)? In other words, can replacing a string literal with a gettext call cause Idle to crash? 5. Focusing only on the menus, do you expect anything more applied to the repository than a patch like this and a doc patch? Who do you see as running Tools/i18n/pygettext.py, a core dev, one other person, or each translator? What do you see happening with the .pot file for each release? Include it with the release? Distribute on pypi? or regenerate it by each translator? And what about .mo files? It would seem silly to have multiple French .mo files, although I can imaging that different teachers might disagree on the best translation for their students ;-). Let me put is another way. The patch by itself is useless. In fact, even if it is completely transparent to users, it will *not* be transparent to Idle developers working on the code. It will actually be a detriment* unless there is additional work done. Who do you two, or any other advocates of IdleIl8n envision as doing the various tasks needed to make it useful? Perhaps there should be an IdleIl8n project on PyPI. In fact, such a project could be done without 'official' cooperation. If indeed there is no such project, I would wonder whether such absence indicates an absence of need. Or is it knowledge of how? Testing something as a 3rd party distribution and getting community acceptance is one normal way for things to get added to the stdlib. (6, Suppose English speaking teachers or user might want to customize the menu labels. Can that also be done with .gettext?) * Besides uglifying the code a bit, this patch will break any existing patches on the tracker that target the same lines and make tracing the history of any patched line through hg annotate harder. Thought also needs to be given to the extension mechanism. As I understand it, pygettest.py will not pick up menu entries dynamically added by extensions. Roger, the extension expert, might comment on this. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 05:09:09 2013 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Apr 2013 03:09:09 +0000 Subject: [issue17721] Help button on preference window doesn't work In-Reply-To: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> Message-ID: <1366254549.5.0.178871426078.issue17721@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 05:21:51 2013 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Apr 2013 03:21:51 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366255311.74.0.269051156847.issue17532@psf.upfronthosting.co.za> Todd Rovito added the comment: I tested the patch on OS X 10.8 and it works perfect!!! Thanks Guilherme. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 05:31:06 2013 From: report at bugs.python.org (Todd Rovito) Date: Thu, 18 Apr 2013 03:31:06 +0000 Subject: [issue17776] IDLE Internationalization In-Reply-To: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> Message-ID: <1366255866.61.0.51389918352.issue17776@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 07:08:29 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 18 Apr 2013 05:08:29 +0000 Subject: [issue4140] urllib2: request with digest auth through proxy fail In-Reply-To: <1224258333.01.0.331002758914.issue4140@psf.upfronthosting.co.za> Message-ID: <1366261709.21.0.304736006526.issue4140@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Yes, RFC specifically states that "The absoluteURI form is REQUIRED when the request is being made to a proxy." Thanks Jessica for making a note of that. Closing this issue as Invalid. ---------- dependencies: -urllib2 fails against IIS 6.0 (No support for MD5-sess auth) resolution: accepted -> invalid stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 07:23:17 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 18 Apr 2013 05:23:17 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366262597.96.0.572204659236.issue17532@psf.upfronthosting.co.za> Roger Serwy added the comment: Hi Guilherme, Have you signed the contributor agreement? It can be found at: http://www.python.org/psf/contrib/contrib-form/ Your patch looks good to me, but I don't have a Mac to test against. I trust Todd's test that it works on the latest MacOSX version. Hopefully it works on earlier OSX versions as well. (I think it should, but Tk on Mac has been problematic.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 07:25:01 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 18 Apr 2013 05:25:01 +0000 Subject: [issue17721] Help button on preference window doesn't work In-Reply-To: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> Message-ID: <1366262701.9.0.376369611487.issue17721@psf.upfronthosting.co.za> Roger Serwy added the comment: This falls under annoyance #11 from issue13504. I'll cross-reference it there. ---------- nosy: +roger.serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 07:26:42 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 18 Apr 2013 05:26:42 +0000 Subject: [issue13504] Meta-issue for "Invent with Python" IDLE feedback In-Reply-To: <1322613083.36.0.200533745275.issue13504@psf.upfronthosting.co.za> Message-ID: <1366262802.78.0.00775615946872.issue13504@psf.upfronthosting.co.za> Roger Serwy added the comment: Issue17721 addresses part of point 11) "And am I the only person who noticed that the Help button doesn?t actually do anything?" ---------- dependencies: +Help button on preference window doesn't work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 07:48:21 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 18 Apr 2013 05:48:21 +0000 Subject: [issue5492] Error on leaving IDLE with quit() or exit() under Linux In-Reply-To: <1237121077.76.0.63532373748.issue5492@psf.upfronthosting.co.za> Message-ID: <1366264101.43.0.116714597485.issue5492@psf.upfronthosting.co.za> Roger Serwy added the comment: Hello Ger, Sure, I can explain. IDLE is driven by the Tk event loop. Calls to .update() flushes all pending events and expired .after callbacks. When close() gets called in PyShell, it places the finalization of the close (using close2()) into the Tk event queue as a .after callback. Now, when the error message arrives over RPC to the PyShell, it is written to the .text widget using the write() method. Here's a snippet from PyShell.py: self.text.mark_gravity("iomark", "right") count = OutputWindow.write(self, s, tags, "iomark") self.text.mark_gravity("iomark", "left") The OutputWindow.write() command eventually calls .update() before returning. That .update() call may flush the close2() callback if the timer expired. If so, then .text gets set to None. The next line to restore the gravity to the left is doing an attribute lookup for "mark_gravity" on None which causes the error. I hope that clarifies why the patch works. Can someone verify that the patch works? I've managed to convince myself of its validity, but it is always good to get another set of eyes on it in case I missed something. ---------- assignee: -> roger.serwy stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 09:06:53 2013 From: report at bugs.python.org (paul j3) Date: Thu, 18 Apr 2013 07:06:53 +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: <1366268813.63.0.876913201999.issue17204@psf.upfronthosting.co.za> paul j3 added the comment: The 'subparsers' object has a _parser_class attribute that is normally set to the class of the parent parser. In the attached file I create a class CustomParser(argparse.ArgumentParser) that makes a parser instance which copies all of the attributes of prototype parser. proto1 = argparse.ArgumentParser(prog='SUBPROG1') proto1.add_argument('--foo') subparsers._parser_class = CustomParser sub1 = subparsers.add_parser('cmd1', proto=proto1, help='parser based on proto1') 'sub1' is a functional copy of 'proto1'. I think this does what you want without changing the argparse code. There probably is a way of defining CustomParser (maybe its '__new__' method) so 'sub1' is actually 'proto1'. But the copy approach appears to work just fine. ---------- nosy: +paul.j3 Added file: http://bugs.python.org/file29916/issue17204.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 09:19:37 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Thu, 18 Apr 2013 07:19:37 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366269577.93.0.609400115007.issue17532@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: Hi Roger, I just signed the contributor agreement. Unfortunately, I can't test on older MacOS versions, but I also think it should work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 10:03:52 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Apr 2013 08:03:52 +0000 Subject: [issue17786] Crash in test_ctypes.test_callbacks() on AMD64 NetBSD 5.1.2 [SB] 3.x Message-ID: <1366272232.44.0.752593622389.issue17786@psf.upfronthosting.co.za> New submission from STINNER Victor: Fatal Python error: Segmentation fault Current thread 0x0000000000000000: File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/ctypes/test/test_as_parameter.py", line 87 in test_callbacks File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/case.py", line 496 in run File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/case.py", line 535 in __call__ File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py", line 105 in run File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py", line 67 in __call__ File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py", line 105 in run File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py", line 67 in __call__ File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py", line 105 in run File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/suite.py", line 67 in __call__ File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/unittest/runner.py", line 168 in run File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/support.py", line 1557 in _run_suite File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/support.py", line 1591 in run_unittest File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py", line 1286 in File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py", line 1287 in runtest_inner File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py", line 999 in runtest File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py", line 797 in main File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/regrtest.py", line 1572 in main_in_temp_cwd File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/test/__main__.py", line 3 in File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/runpy.py", line 73 in _run_code File "/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/runpy.py", line 160 in _run_module_as_main [1] Segmentation fault ./python ./Tools... The crash occurs since the build http://buildbot.python.org/all/builders/AMD64%20NetBSD%205.1.2%20%5BSB%5D%203.x/builds/891/. The build was triggered because of the new changeset ae5c4a9118b8a3f490f77f2084d46163ca229aef, but I don't see a link between this changeset and ctypes. I may be another change in the toolchain, a system upgrade, or sometimes like that. It looks like the crash is specific to Python 3.4. ---------- components: Extension Modules messages: 187228 nosy: ezio.melotti, haypo, pitrou, trent priority: normal severity: normal status: open title: Crash in test_ctypes.test_callbacks() on AMD64 NetBSD 5.1.2 [SB] 3.x versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 10:42:28 2013 From: report at bugs.python.org (ingrid) Date: Thu, 18 Apr 2013 08:42:28 +0000 Subject: [issue17413] format_exception() breaks on exception tuples from trace function In-Reply-To: <1363222594.63.0.566610526845.issue17413@psf.upfronthosting.co.za> Message-ID: <1366274548.11.0.846675209481.issue17413@psf.upfronthosting.co.za> ingrid added the comment: Thank you, r.david.murray. I have updated the patch with your suggestions included. ---------- Added file: http://bugs.python.org/file29917/issue17413.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 11:37:48 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 18 Apr 2013 09:37:48 +0000 Subject: [issue17787] Optimize pickling function lookups in hot loops. Message-ID: <1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti: I found through profiling that batch_list_exact and batch_dict_exact spent a fair amount of time looking up the pickling function. I have found a way to optimize the lookup using a simple heuristic that assume items in dicts and lists have often a common type. So we have save some time by jumping right to the pickling function we need. Here are the result of running the benchmarks: ### fastpickle ### Min: 0.593904 -> 0.541918: 1.10x faster Avg: 0.606811 -> 0.564606: 1.07x faster Significant (t=10.18) Stddev: 0.01061 -> 0.02733: 2.5760x larger Timeline: http://tinyurl.com/bwbvw7j ### pickle_list ### Min: 0.907891 -> 0.915905: 1.01x slower Avg: 0.970537 -> 0.948349: 1.02x faster Significant (t=2.08) Stddev: 0.07107 -> 0.02526: 2.8136x smaller Timeline: http://tinyurl.com/cmlymq7 ---------- assignee: alexandre.vassalotti files: optimize_save_dispatch.patch keywords: patch messages: 187230 nosy: alexandre.vassalotti priority: normal severity: normal stage: patch review status: open title: Optimize pickling function lookups in hot loops. type: performance versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29918/optimize_save_dispatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 11:57:12 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 18 Apr 2013 09:57:12 +0000 Subject: [issue17787] Optimize pickling function dispatch in hot loops. In-Reply-To: <1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> Message-ID: <1366279032.77.0.968766086433.issue17787@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: In addition, we could bring back the switch dispatch based on the first letter of the type name. It does seem to speed up things as well but as much as the type cache optimization. ---------- nosy: +pitrou, serhiy.storchaka title: Optimize pickling function lookups in hot loops. -> Optimize pickling function dispatch in hot loops. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 12:02:40 2013 From: report at bugs.python.org (Eric Wieser) Date: Thu, 18 Apr 2013 10:02:40 +0000 Subject: [issue17788] Add a with expression, for use in comprehensions Message-ID: <1366279360.22.0.996047925833.issue17788@psf.upfronthosting.co.za> New submission from Eric Wieser: It would be nice if there was a `with` "expression". Such that instead of: with open(...) as f: result = foo(f) One could write: result = foo(f) with open(...) as f This would be particularly useful in comprehensions. Instead of: files = {} for fname in os.listdir('.'): if predicate(fname): with open(fname) as f: files[fname] = foo(f) files = { fname: foo(f) with open(fname) as f for fname in os.listdir('.') if predicate(fname) } ---------- messages: 187232 nosy: Eric.Wieser priority: normal severity: normal status: open title: Add a with expression, for use in comprehensions type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 12:03:51 2013 From: report at bugs.python.org (Eric Wieser) Date: Thu, 18 Apr 2013 10:03:51 +0000 Subject: [issue17788] Add a with expression, for use in comprehensions In-Reply-To: <1366279360.22.0.996047925833.issue17788@psf.upfronthosting.co.za> Message-ID: <1366279431.1.0.287975350656.issue17788@psf.upfronthosting.co.za> Changes by Eric Wieser : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 12:13:03 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 18 Apr 2013 10:13:03 +0000 Subject: [issue17787] Optimize pickling function dispatch in hot loops. In-Reply-To: <1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> Message-ID: <1366279983.26.0.729987991866.issue17787@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I found a bug in the pickle_list benchmark. These are the new results: ### fastpickle ### Min: 0.603416 -> 0.542480: 1.11x faster Avg: 0.628639 -> 0.575296: 1.09x faster Significant (t=6.29) Stddev: 0.03330 -> 0.04985: 1.4969x larger Timeline: http://tinyurl.com/c7xm7p6 ### pickle_list ### Min: 0.366062 -> 0.317290: 1.15x faster Avg: 0.391959 -> 0.331500: 1.18x faster Significant (t=15.86) Stddev: 0.02131 -> 0.01651: 1.2910x smaller Timeline: http://tinyurl.com/cad2mkx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 12:14:07 2013 From: report at bugs.python.org (Stijn Hoop) Date: Thu, 18 Apr 2013 10:14:07 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366280047.5.0.509696653675.issue5004@psf.upfronthosting.co.za> Stijn Hoop added the comment: OK, fair enough. >From reading sources, it appears that hostname is using getaddrinfo(3) on kernelhostname with hints->ai_flags & AI_CANONNAME, while Lib/socket.py simply uses gethostbyaddr(kernelhostname), and falls back on kernelhostname in case of errors. Unfortunately I am not entirely sure who is "correct" here, as I don't know the intent of socket.getfqdn(). In my case, kernelhostname is set to 'pclin281' e.g. without the dots. I believe this to be correct, but I know that this is already "controversial" as in there exists software that expects an FQDN there, and internet folklore is split about 50/50 about this necessity. Then, apparently, there is confusion about AI_CANONNAME and what it actually should do. glibc upstream does address lookups but Fedora patches this out. See this recent glibc bug for more pointers: http://sourceware.org/bugzilla/show_bug.cgi?id=15218 As mentioned in that bug, a lot of software runs on Fedora and works using that definition of AI_CANONNAME. However, switching Lib/socket.py / getfqdn from gethostbyaddr to getaddrinfo might have more implications than just fixing this case. I can try to write a patch, but is this the right direction? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 12:24:22 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 10:24:22 +0000 Subject: [issue14910] argparse: disable abbreviation In-Reply-To: <1337943742.57.0.897347214609.issue14910@psf.upfronthosting.co.za> Message-ID: <1366280662.25.0.145427965881.issue14910@psf.upfronthosting.co.za> Mark Lawrence added the comment: Ping :) ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 12:29:49 2013 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 Apr 2013 10:29:49 +0000 Subject: [issue17788] Add a with expression, for use in comprehensions In-Reply-To: <1366279360.22.0.996047925833.issue17788@psf.upfronthosting.co.za> Message-ID: <1366280989.43.0.359955538748.issue17788@psf.upfronthosting.co.za> Berker Peksag added the comment: I think this needs to be discussed on python-ideas first. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 12:34:17 2013 From: report at bugs.python.org (Stijn Hoop) Date: Thu, 18 Apr 2013 10:34:17 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366281257.21.0.160339306063.issue5004@psf.upfronthosting.co.za> Stijn Hoop added the comment: Attached is a very lightly tested patch that matches hostname -f behaviour on my system. I suspect this should be OK but it definitely needs more testing than just my system... ---------- keywords: +patch Added file: http://bugs.python.org/file29919/python2.7-socket-getfqdn.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 13:50:04 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 11:50:04 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366285804.86.0.92797062201.issue5004@psf.upfronthosting.co.za> R. David Murray added the comment: The problem with your patch is that it changes the (effective) meaning of the 'name' parameter. Before the patch, name can be an IP address. After the patch, that will fail on Fedora. (It also fails on my Gentoo system). It is interesting to note, as well, that the documentation for gethostbyaddr says that it is obsolete and getaddrinfo should be used instead. Could we use the getaddrinfo call if we don't get an FQDN back from gethostbyaddr? It doesn't look like that would completely solve your problem, though, given your example output. Have you figured out why that is happening? Alternatively, perhaps we could fall back to gethostbyaddr if we don't get an fqdn from the getaddrinfo call. However, given that the documentation actually specifies the algorithm used by getfqdn, I'm not sure if we can make either change in a bugfix version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 13:50:34 2013 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 18 Apr 2013 11:50:34 +0000 Subject: [issue17788] Add a with expression, for use in comprehensions In-Reply-To: <1366279360.22.0.996047925833.issue17788@psf.upfronthosting.co.za> Message-ID: <1366285834.2.0.0746641325552.issue17788@psf.upfronthosting.co.za> Eric V. Smith added the comment: Indeed, this should be on python-ideas. Eric: can you start a thread over there? Thanks. ---------- nosy: +eric.smith resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 13:52:49 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 11:52:49 +0000 Subject: [issue12713] argparse: allow abbreviation of sub commands by users In-Reply-To: <1312854957.22.0.437190269629.issue12713@psf.upfronthosting.co.za> Message-ID: <1366285969.56.0.35232244258.issue12713@psf.upfronthosting.co.za> Mark Lawrence added the comment: The latest patch seems okay to me. I've successfully applied it and ran the test suite and everything passed. Could someone please take a look with a view to getting this committed, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 14:14:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Apr 2013 12:14:13 +0000 Subject: [issue17787] Optimize pickling function dispatch in hot loops. In-Reply-To: <1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> Message-ID: <1366287253.05.0.116961960193.issue17787@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why did you add all those calls to PyMemoTable_Get? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 14:25:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Apr 2013 12:25:11 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366287911.27.0.244760045493.issue17760@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I strongly disagree with Ezio's argumentation here. If Kate and Firefox are internationalized, IDLE can very well be internationalized too. ---------- nosy: +pitrou resolution: rejected -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 14:33:57 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Apr 2013 12:33:57 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366288437.57.0.0507539780274.issue17760@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That said, this issue can be considered a duplicate of #17776. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 14:45:19 2013 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 18 Apr 2013 12:45:19 +0000 Subject: [issue17741] event-driven XML parser In-Reply-To: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> Message-ID: <1366289119.29.0.87616122625.issue17741@psf.upfronthosting.co.za> Eli Bendersky added the comment: Antoine, the patch LGTM. There's some more cleaning that needs to be done in surrounding code, but I can do that later. Also I should probably update the documentation with a bit more details. Just add a NEWS entry when you commit. Thanks for working on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 14:52:57 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 12:52:57 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366289577.21.0.217823954687.issue17760@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> IDLE Internationalization _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 15:05:43 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Apr 2013 13:05:43 +0000 Subject: [issue17781] optimize compilation options In-Reply-To: <1366224008.41.0.60101315886.issue17781@psf.upfronthosting.co.za> Message-ID: <1366290343.89.0.606419313135.issue17781@psf.upfronthosting.co.za> Christian Heimes added the comment: Here is a patch for -flto. You need to run autoconf to re-generate configure, too. ---------- keywords: +patch nosy: +christian.heimes Added file: http://bugs.python.org/file29920/lto_flag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 15:18:21 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 18 Apr 2013 13:18:21 +0000 Subject: [issue17788] Add a with expression, for use in comprehensions In-Reply-To: <1366279360.22.0.996047925833.issue17788@psf.upfronthosting.co.za> Message-ID: <1366291101.2.0.564704045266.issue17788@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 15:24:14 2013 From: report at bugs.python.org (Matthias Klose) Date: Thu, 18 Apr 2013 13:24:14 +0000 Subject: [issue17781] optimize compilation options In-Reply-To: <1366224008.41.0.60101315886.issue17781@psf.upfronthosting.co.za> Message-ID: <1366291454.01.0.35724116722.issue17781@psf.upfronthosting.co.za> Matthias Klose added the comment: the proposed patch is wrong. when linking with -flto, you should pass all the relevant CFLAGS to the linker as well. Also pass -fuse-linker-plugin. and this should be an opt-in, not the default. Depending on the architecture and the compiler version, -flto is not as stable as you want it to be. and last, this ends up as the default for building third party extensions too, which again, I think should be an opt-in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 15:43:51 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 18 Apr 2013 13:43:51 +0000 Subject: [issue13831] get method of multiprocessing.pool.Async should return full traceback In-Reply-To: <1327006000.05.0.152231015377.issue13831@psf.upfronthosting.co.za> Message-ID: <1366292631.58.0.653712223772.issue13831@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Pickling an exception (assuming it works) does not capture the traceback. Doing so would be difficult/impossible since the traceback refers to a linked list of frames, and each frame has references to lots of other stuff like the code object, the global dict, local dict, builtin dict, ... I certainly do not know how to make traceback objects pickle compatible. But you could wrap any exception raised by your function in another exception whose representation contains a formatted traceback of the original exception. E.g. class WrapException(Exception): def __init__(self): exc_type, exc_value, exc_tb = sys.exc_info() self.exception = exc_value self.formatted = ''.join(traceback.format_exception(exc_type, exc_value, exc_tb)) def __str__(self): return '%s\nOriginal traceback:\n%s' % (Exception.__str__(self), self.formatted) def go(): try: 1/0 except Exception: raise WrapException() Then raising an unpickled WrapException instance gives the original traceback >>> try: go() ... except Exception as e: exc = e ... >>> raise pickle.loads(pickle.dumps(exc)) Traceback (most recent call last): File "", line 1, in __main__.WrapException: Original traceback: Traceback (most recent call last): File "", line 3, in go ZeroDivisionError: integer division or modulo by zero ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 15:53:31 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 18 Apr 2013 13:53:31 +0000 Subject: [issue17776] IDLE Internationalization In-Reply-To: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> Message-ID: <1366293211.17.0.236766445752.issue17776@psf.upfronthosting.co.za> Roger Serwy added the comment: Extensions would need to be modified to use the gettext module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 15:53:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Apr 2013 13:53:51 +0000 Subject: [issue17135] imp doc should direct to importlib In-Reply-To: <1360080581.61.0.501686856177.issue17135@psf.upfronthosting.co.za> Message-ID: <3Zs1xq1RqtzSKq@mail.python.org> Roundup Robot added the comment: New changeset 8f15a46a8c76 by R David Murray in branch '3.3': #17135: Add note in imp to use importlib for new programs. http://hg.python.org/cpython/rev/8f15a46a8c76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 15:54:33 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 13:54:33 +0000 Subject: [issue17135] imp doc should direct to importlib In-Reply-To: <1360080581.61.0.501686856177.issue17135@psf.upfronthosting.co.za> Message-ID: <1366293273.91.0.21948185283.issue17135@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Kristian. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 15:56:44 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 13:56:44 +0000 Subject: [issue17177] Document/deprecate imp In-Reply-To: <1360526911.57.0.856873084515.issue17177@psf.upfronthosting.co.za> Message-ID: <1366293404.68.0.193498809045.issue17177@psf.upfronthosting.co.za> R. David Murray added the comment: The documentation deprecation has been added as part of issue 17135. Leaving this open to address Ezio's last comment. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 16:01:29 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 18 Apr 2013 14:01:29 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366293689.82.0.301441599894.issue17646@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Okay. Will you upload the latest version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 16:31:32 2013 From: report at bugs.python.org (Stijn Hoop) Date: Thu, 18 Apr 2013 14:31:32 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366295492.5.0.678509795585.issue5004@psf.upfronthosting.co.za> Stijn Hoop added the comment: OK, dumping my current findings here, as I'm still not sure what the expected results should be. First of all, Lib/socket.py calls gethostbyaddr with a name. As in, gethostby _ADDR_ with a name. This works because Modules/socketmodule.c internally uses setipaddr() to resolve the name to an address. setipaddr() does this using a call to getaddrinfo() with hints.ai_family == AF_UNSPEC and no further flags. On my system (confirmed using the test program attached) this results in SIX entries, and this is the part that confused me. Due to virtualization I have a virtual bridge virbr0 configured with an internal IP address 192.168.122.1, as well as my LAN-connected bridge br0 with IP address 131.155.71.8. Both of these addresses are returned in the call to getaddrinfo() (each one 3 times), but NOT ALWAYS IN THE SAME ORDER. And this is the clue as to why python's socket.getfqdn() does not behave consistently. For 192.168.122.1 does not resolve to anything, hence it will return "pclin281". And 131.155.71.8 will backwards resolve to pclin281.win.tue.nl as the PTR record points to that entry. Now, again, I'm not entirely sure what to do here. I agree that this is not a simple bugfix. I also think that, apart from the weirdness of getaddrinfo() return order, socket.getfqdn() is doing it's documented job of returning /an/ FQDN for a given host. But in case of the guaranteed LOCAL canonical hostname, another function is warranted, imho. Does this make sense? For the record, output of a given run on my system: [TUE\shoop at pclin281] <~/tmp> ./test gai canon result 0: pclin281.campus.tue.nl 192.168.122.1 gai canon result 1: (null) 131.155.71.8 gai result 0: (null) 131.155.71.8 gai result 1: (null) 131.155.71.8 gai result 2: (null) 131.155.71.8 gai result 3: (null) 192.168.122.1 gai result 4: (null) 192.168.122.1 gai result 5: (null) 192.168.122.1 ghbn result 0 h_name: pclin281.campus.tue.nl ghbn result 0 h_alias: __NONE__ ghbn result 1 h_name: pclin281.campus.tue.nl ghbn result 1 h_alias: __NONE__ ghbn result 2 h_name: pclin281.campus.tue.nl ghbn result 2 h_alias: __NONE__ ghbn result 3 h_name: pclin281.campus.tue.nl ghbn result 3 h_alias: __NONE__ ghbn result 4 h_name: pclin281.campus.tue.nl ghbn result 4 h_alias: __NONE__ ghbn result 5 h_name: pclin281.campus.tue.nl ghbn result 5 h_alias: __NONE__ ghbn result 6 h_name: pclin281.campus.tue.nl ghbn result 6 h_alias: __NONE__ ghbn result 7 h_name: pclin281.campus.tue.nl ghbn result 7 h_alias: __NONE__ ghbn result 8 h_name: pclin281.campus.tue.nl ghbn result 8 h_alias: __NONE__ ghbn result 9 h_name: pclin281.campus.tue.nl ghbn result 9 h_alias: __NONE__ ---------- Added file: http://bugs.python.org/file29921/python5004-test.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 16:32:54 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 14:32:54 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366295574.67.0.575651476723.issue16624@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch doesn't apply cleanly on Windows. Trying to sort this with TortoiseHg has left me completely flummoxed so can I leave this with the OP to provide a new patch? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 16:36:59 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 14:36:59 +0000 Subject: [issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 In-Reply-To: <1351070553.1.0.217274613803.issue16308@psf.upfronthosting.co.za> Message-ID: <1366295819.98.0.115976534719.issue16308@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, just with limited amounts of attention to spare :( This is a rather difficult situation, since it appears we inadvertently changed a behavior. Fortunately it was in a feature release. Unfortunately a new parameter to make a subparser required again can't be done in a bug fix release. There seem to be two ways to handle this: (1) accept the new feature. Then the bug fix should be to make the traceback not happen, and we should update the docs to mention the new behavior as added in 3.3. Then we change issue 9253 to be about adding the required to subparsers in 3.4 with a default of False. (2) treat this as a bug. In that case the bug fix would be to restore the old required=True behavior, and making them optional again is an enhancement for 3.4 covered by issue 9253 as is. The issue with (1) is that the discussion in #9253 concluded that the previous default behavior was "safer" for users. In either case, we need a unit test that tests the behavior. I think we need input either from Steven or from other Python core devs on which way to go, because I can't make up my mind :) A post to python-dev may be in order, since we haven't heard anything from Steven for a while now. ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 16:52:46 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 14:52:46 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366296765.98.0.649446694906.issue5004@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, a new function was a thought that had crossed my mind as well. getfqdnbyname, maybe? Or gethostnamefqdn? Then deprecate calling getfqdn without an argument. I agree that gethostbyaddr accepting a non-IP is weird. I have no idea why it was implemented that way, much less why it is *used* that way. It's been that way for a long time, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 16:57:49 2013 From: report at bugs.python.org (Jeffrey Armstrong) Date: Thu, 18 Apr 2013 14:57:49 +0000 Subject: [issue12641] Remove -mno-cygwin from distutils In-Reply-To: <1311699751.35.0.569127767575.issue12641@psf.upfronthosting.co.za> Message-ID: <1366297069.37.0.218005487504.issue12641@psf.upfronthosting.co.za> Changes by Jeffrey Armstrong : ---------- nosy: +Jeffrey.Armstrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 17:03:51 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 18 Apr 2013 15:03:51 +0000 Subject: [issue17789] Fix test discovery for test_random.py Message-ID: <1366297431.16.0.642469069527.issue17789@psf.upfronthosting.co.za> New submission from Zachary Ware: This one had subclassing issues, and SystemRandom_TestBasicOps was being skipped by exclusion from the list of tests passed to support.run_unittest, so it's been converted to a skip decorator. ---------- components: Tests files: test_random_discovery.diff keywords: patch messages: 187257 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_random.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29922/test_random_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 17:16:07 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 15:16:07 +0000 Subject: [issue1626300] 'Installing Python Modules' does not work for Windows Message-ID: <1366298167.89.0.489011860357.issue1626300@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is any more work needed on this issue or can it be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 17:18:13 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 18 Apr 2013 15:18:13 +0000 Subject: [issue17790] Fix test discovery for test_set.py Message-ID: <1366298293.17.0.875965063337.issue17790@psf.upfronthosting.co.za> New submission from Zachary Ware: Just subclassing and test_main in this one. ---------- components: Tests files: test_set_discovery.diff keywords: patch messages: 187259 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_set.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29923/test_set_discovery.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 17:25:31 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 15:25:31 +0000 Subject: [issue14555] clock_gettime/settime/getres: Add more clock identifiers In-Reply-To: <1334183358.11.0.0329195703165.issue14555@psf.upfronthosting.co.za> Message-ID: <1366298731.77.0.437072604807.issue14555@psf.upfronthosting.co.za> Mark Lawrence added the comment: If nothing else the patch will need updating to show versionadded as 3.4 instead of 3.3. ---------- nosy: +BreamoreBoy versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 17:42:27 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 15:42:27 +0000 Subject: [issue15721] PEP 3121, 384 Refactoring applied to tkinter module In-Reply-To: <1345287224.98.0.204885883161.issue15721@psf.upfronthosting.co.za> Message-ID: <1366299747.27.0.892185251579.issue15721@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is any more work needed on this issue or can it be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 17:51:10 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 15:51:10 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1366300270.03.0.38483174046.issue16445@psf.upfronthosting.co.za> Mark Lawrence added the comment: It looks as if this issue can be closed as a fix has been committed. However a new issue will be needed if the advice offered in msg181839 is followed. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 18:05:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Apr 2013 16:05:07 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366301107.21.0.42035611003.issue17742@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I run my own benchmarks and don't see any regression besides a random noise. Actually I see even speed up for some cases: ./python -m timeit -s "a = '\x80'*10000" "a.encode()" Before patch: 29.8 usec per loop, after patch: 21.5 usec per loop. This is just a compiler's caprice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 18:10:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Apr 2013 16:10:33 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366301433.83.0.23541935257.issue17760@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I responded very cautiously to #17776 in part (but not only) because I had the impression that Ezio's view was the general consensus of other developers. Antoine, since that is wrong or at least not complete right, could you record at least your +1 there? My other reason for caution is ignorance of how gettext operates, beyond the use of _(...) to wrap strings. Hence I asked several questions on #17776 about gettext and the proposed patch. Answers there from someone, but especially another core developer, with knowledge and experience would be appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 18:19:03 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Apr 2013 16:19:03 +0000 Subject: [issue1626300] 'Installing Python Modules' does not work for Windows Message-ID: <1366301943.25.0.0497557604794.issue1626300@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I consider it ?ric's decision. 3.3 on Windows comes with the new py launcher. That might be incorporated into the docs if it has not. That might also be a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 18:38:10 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Apr 2013 16:38:10 +0000 Subject: [issue17776] IDLE Internationalization In-Reply-To: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> Message-ID: <1366303090.15.0.468921969095.issue17776@psf.upfronthosting.co.za> Ned Deily added the comment: Also, IDLE makes use of features provided by Tk and those vary by platform. In some cases, IDLE uses some Tk-supplied default menus and menu items. So internationalization of IDLE would need to investigate and make use of Tk i18n features on all supported platforms. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 18:46:44 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Apr 2013 16:46:44 +0000 Subject: [issue1626300] 'Installing Python Modules' does not work for Windows Message-ID: <1366303604.77.0.627294361337.issue1626300@psf.upfronthosting.co.za> ?ric Araujo added the comment: I consider documentation for the py launched a distinct issue. The original complaint here was fixed, the part about packaging does not apply anymore, so I will close this. If one of the changed instructions still does not work (e.g. ?setup.py build? does not work), please reopen. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 18:48:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Apr 2013 16:48:23 +0000 Subject: [issue17776] IDLE Internationalization In-Reply-To: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> Message-ID: <1366303703.91.0.108532355274.issue17776@psf.upfronthosting.co.za> Antoine Pitrou added the comment: +1 for internationalizing IDLE. Any decent GUI app is internationalized these days, even developer tools. Re: gettext, its semantics and API are a bit of a PITA, but it's basically the standard for internationalization of FLOSS projects. There are all kind of tools to help edit gettext localization files. Re: how to organize translation work, Olivier Berger already answered on idle-dev, I believe. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 19:14:41 2013 From: report at bugs.python.org (Glenn Linderman) Date: Thu, 18 Apr 2013 17:14:41 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366305281.81.0.0697370278189.issue14191@psf.upfronthosting.co.za> Glenn Linderman added the comment: Paul, your comments are interesting, but your proposed patch doesn't actually solve the problem. So here I am typing away at my command prompt, and I type in a couple optional parameters I know I'll need and start on the sequence of positional ones, and half way through I remember "oh, I need another optional paremeter" so I type it in next before I forget, and then go on with the positional ones. No prior Unix-style argument parsing mechanism that I have ever seen or heard of would be confused by that, but argparse is. This bug is about providing a facility in argparse that supports intermixing optional parameters into strings of positional parameters, just like all prior Unix-style argument parsing mechanisms, so that an application can be ported to use argparse without breaking command lines that their users have stored in command files. Otherwise argparse is not an upgrade path for an application, yet optparse has been deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 19:33:56 2013 From: report at bugs.python.org (Glenn Linderman) Date: Thu, 18 Apr 2013 17:33:56 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366306436.14.0.0105250870337.issue14191@psf.upfronthosting.co.za> Glenn Linderman added the comment: I should clarify, before someone jumps in: some particular applications do implement restrictions on order of optional and positional arguments; I'm aware of that. getopt easily supported application defined order restrictions, because it processed arguments sequentially, and the processing loop was user code. optparse, as has been pointed out, parses the optionals, and leaves a single list of positionals, combined from between all the optionals, for the user code to process in any manner, but would actually make it harder for user code to implement order restrictions. argparse goes the other way, taking over all the user parsing (which is a good thing), but not providing sufficient features to implement flexible mixing of optional and positional arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 19:37:14 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Apr 2013 17:37:14 +0000 Subject: [issue17741] event-driven XML parser In-Reply-To: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> Message-ID: <3Zs6vY5tMZzShF@mail.python.org> Roundup Robot added the comment: New changeset f903cf864191 by Antoine Pitrou in branch 'default': Issue #17741: Add ElementTree.IncrementalParser, an event-driven parser for non-blocking applications. http://hg.python.org/cpython/rev/f903cf864191 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 19:37:23 2013 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 18 Apr 2013 17:37:23 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366306643.08.0.104537407589.issue16624@psf.upfronthosting.co.za> Zack Weinberg added the comment: Here is a new patch vs latest trunk. ---------- Added file: http://bugs.python.org/file29924/issue16624-v34a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 19:37:35 2013 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 18 Apr 2013 17:37:35 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366306655.72.0.669868202788.issue16624@psf.upfronthosting.co.za> Changes by Zack Weinberg : Removed file: http://bugs.python.org/file28247/issue16624-v34.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 19:42:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Apr 2013 17:42:10 +0000 Subject: [issue17741] event-driven XML parser In-Reply-To: <1366058982.04.0.43047381217.issue17741@psf.upfronthosting.co.za> Message-ID: <1366306930.17.0.561858978442.issue17741@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you, Eli. Now committed :) ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 19:49:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Apr 2013 17:49:39 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366307379.71.0.99841580168.issue17742@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have added some comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 20:00:17 2013 From: report at bugs.python.org (Philip Jenvey) Date: Thu, 18 Apr 2013 18:00:17 +0000 Subject: [issue17442] code.InteractiveInterpreter doesn't display the exception cause In-Reply-To: <1363468664.92.0.794606977989.issue17442@psf.upfronthosting.co.za> Message-ID: <1366308017.14.0.436486938475.issue17442@psf.upfronthosting.co.za> Philip Jenvey added the comment: PyPy's fixed this here: https://bitbucket.org/pypy/pypy/commits/1341a432e134 The tests just need to be adapted to the stdlib test suite ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 20:08:45 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 18:08:45 +0000 Subject: [issue16037] httplib: header parsing is not delimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1366308525.94.0.658507083119.issue16037@psf.upfronthosting.co.za> Mark Lawrence added the comment: Patches LGTM but I suggest TooManyHeaders instead of TooMuchHeaders. I've tried the 3.2 patch against the latest default repo on Windows Vista and it applies cleanly. All tests passed so looks as if this could be committed. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 20:19:57 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Apr 2013 18:19:57 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366309197.54.0.261053983877.issue16624@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that it will be better not introduce a new argument, but reuse stdin. Just allow io.BytesIO (or perhaps even any file object) be specified as stdin. The change will be straightforward: if isinstance(stdin, io.BytesIO): inputdata = stdin.read() stdin = PIPE Or more general: if not(stdin is None or stdin in (PIPE, DEVNULL) or isinstance(stdin, int)): try: stdin.fileno() except (AttributeError, UnsupportedOperation, OSError): inputdata = stdin.read() stdin = PIPE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 20:32:43 2013 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 18 Apr 2013 18:32:43 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366309963.0.0.403244183907.issue16624@psf.upfronthosting.co.za> Zack Weinberg added the comment: > I think that it will be better not introduce a new argument, but reuse stdin. Just allow io.BytesIO (or perhaps even any file object) be specified as stdin. If we were designing from scratch I might agree, but we aren't. Principle of least astonishment says that the API here should match `subprocess.communicate`, and that has separate `stdin=FILE` and `input=STRING` arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 20:39:34 2013 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 18 Apr 2013 18:39:34 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366310374.0.0.393633376502.issue16624@psf.upfronthosting.co.za> Zack Weinberg added the comment: Note also that allowing `stdin=` in a clean fashion would require rather more surgery than you suggest, because a filelike can produce an infinite stream of data, and people would expect that to work when the subprocess only reads a finite prefix; making it *actually* work would involve teaching communicate() to take a filelike and copy blocks into the pipe. I have no *objection* to that change but I think it is too much mission creep for this proposal. With the present design, where stdin= has to be something for which fileno() is defined, and input= has to be a string (hence of finite length), no one is going to expect something to work that won't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 20:48:50 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 18:48:50 +0000 Subject: [issue6386] importing yields unexpected results when initial script is a symbolic link In-Reply-To: <1246356344.6.0.218965497612.issue6386@psf.upfronthosting.co.za> Message-ID: <1366310930.78.0.86168257341.issue6386@psf.upfronthosting.co.za> Mark Lawrence added the comment: It will be difficult to take this forward owing to the problem description in msg89914 being limited to "importing from normal files in the same directory does not work". Plus any problems back then may well have been fixed due to the reworking of the import mechanism by somebody who apparently has spent 10 years as a Python core developer. Congratulations :) ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 21:23:17 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 18 Apr 2013 19:23:17 +0000 Subject: [issue6386] importing yields unexpected results when initial script is a symbolic link In-Reply-To: <1246356344.6.0.218965497612.issue6386@psf.upfronthosting.co.za> Message-ID: <1366312997.18.0.614175348142.issue6386@psf.upfronthosting.co.za> Brett Cannon added the comment: In case someone wants to reproduce: mkdir pkg echo "import tester" > pkg/symlinked.py ln -s pkg/symlinked.py linked.py echo "print('HIT')" > tester.py That fails because Python assumes you are in the pkg directory, not the directory you started execution. This makes sense to me. If you used a hard link then this isn't a problem. Python treats a symlink as a redirect, which means it works where the redirect tells it to and doesn't try to confuse things by considering 2 different locations to be the cwd for imports. Closing as "won't fix" since I think it would be more confusing to support both a symlink directory and the cwd. ---------- assignee: -> brett.cannon resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 21:25:18 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 19:25:18 +0000 Subject: [issue12762] EnvironmentError_str contributes to unportable code In-Reply-To: <1313514546.35.0.211291095895.issue12762@psf.upfronthosting.co.za> Message-ID: <1366313118.34.0.770142711677.issue12762@psf.upfronthosting.co.za> Mark Lawrence added the comment: It doesn't bother me that Python programmers can write unportable code, what with consenting adults and all that. Further the implementation of PEP 3151 in 3.3 allows specific exceptions to be caught, e.g. FileNotFoundError. I can't see anybody allowing the exception number being changed to the symbolic string or even omitted completely, so I'd recommend this is closed unless there's an extremely good reason not to do so. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 21:27:49 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 19:27:49 +0000 Subject: [issue14364] Argparse incorrectly handles '--' In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1366313269.6.0.999773460192.issue14364@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Michele could you provide a patch for this? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 21:46:19 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Apr 2013 19:46:19 +0000 Subject: [issue17791] PC/pyconfig.h defines PREFIX macro Message-ID: <1366314379.89.0.227357780835.issue17791@psf.upfronthosting.co.za> New submission from Christian Heimes: The pyconfig.h file of the Windows build environment defines at least two macros without a Py/PY prefix: PC/pyconfig.h:#define PREFIX "" PC/pyconfig.h:#define EXEC_PREFIX "" This has caused multiple issues in the past. For example libexpat uses PREFIX, too. When I was working on my XML patches it took me about half an hour to fix the build on Windows. PyLucence's JCC has run into the same issue, too. http://mail-archives.apache.org/mod_mbox/lucene-pylucene-dev/201304.mbox/browser Can we change the name of PREFIX to PY_PREFIX nad EXEC_PREFIX to PY_EXEC_PREFIX? ---------- components: Build, Windows messages: 187284 nosy: christian.heimes, loewis priority: normal severity: normal stage: needs patch status: open title: PC/pyconfig.h defines PREFIX macro type: compile error versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 21:48:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Apr 2013 19:48:37 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366314517.66.0.176175249463.issue16624@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I partially agree with you. We must copy blocks in communicate(). Your patch is great, but I doubt that there is a best feature. If we teach communicate() to work with file-like objects, this feature will exceed your suggestion and 'input' parameter of check_output() will be redundant. Are you want to implement a more powerful feature? If not, I will commit your patch. But I hope that before the 3.4 release we will replace it with a more powerful feature. Mark, can you please run subprocesses tests on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 21:58:47 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 18 Apr 2013 19:58:47 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1366315127.41.0.896855265653.issue17633@psf.upfronthosting.co.za> Changes by Phil Connell : Removed file: http://bugs.python.org/file29679/zipimport_ns.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 21:58:51 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 18 Apr 2013 19:58:51 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1366315131.31.0.383678564574.issue17633@psf.upfronthosting.co.za> Changes by Phil Connell : Removed file: http://bugs.python.org/file29696/test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 22:00:50 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 18 Apr 2013 20:00:50 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1366315250.37.0.376343040075.issue17633@psf.upfronthosting.co.za> Phil Connell added the comment: The attached patch is ready for review. ---------- Added file: http://bugs.python.org/file29925/issue17633.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 22:14:27 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 18 Apr 2013 20:14:27 +0000 Subject: [issue15852] typos in curses argument error messages In-Reply-To: <1346622102.83.0.795568790125.issue15852@psf.upfronthosting.co.za> Message-ID: <1366316067.64.0.620717975176.issue15852@psf.upfronthosting.co.za> Phil Connell added the comment: The patch looks correct and complete, and still patches and passes the tests. So, as far as I can see, this can be committed. ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 22:17:19 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Apr 2013 20:17:19 +0000 Subject: [issue16000] test_curses should use unittest In-Reply-To: <1348263086.74.0.172285441847.issue16000@psf.upfronthosting.co.za> Message-ID: <1366316239.05.0.344707135729.issue16000@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +zach.ware versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 22:20:06 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 20:20:06 +0000 Subject: [issue12762] EnvironmentError_str contributes to unportable code In-Reply-To: <1313514546.35.0.211291095895.issue12762@psf.upfronthosting.co.za> Message-ID: <1366316406.11.0.61057518941.issue12762@psf.upfronthosting.co.za> R. David Murray added the comment: The enum module that is likely to land in 3.4 will allow us to fix this. We can discuss whether we want to just display the name, or both the name and the value. Omitting it would indeed be bad, IMO. ---------- nosy: +r.david.murray stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 22:23:12 2013 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 18 Apr 2013 20:23:12 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366316592.23.0.995982119834.issue16624@psf.upfronthosting.co.za> Zack Weinberg added the comment: My position is: * input= should be supported in check_output(), for consistency with communicate(). * I like the idea of making stdin= support file-like objects which don't have a fileno, in both communicate() and everything that calls it, but that does not belong in this issue, I do not have time to code it myself, and, again, it should be *in addition to*, not *instead of*, supporting input= in check_output(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 22:38:16 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 20:38:16 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366317496.91.0.98451125922.issue16624@psf.upfronthosting.co.za> R. David Murray added the comment: Since it is a new feature either way, we can add stdin support and deprecate the input= argument of communicate. But we can also go with the input= for check_output now, and see if anyone steps up to do the bigger patch before 3.4 hits beta. Which is what I hear Serhiy suggesting. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 22:40:11 2013 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 18 Apr 2013 20:40:11 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366317611.87.0.529159155084.issue16624@psf.upfronthosting.co.za> Zack Weinberg added the comment: ??? communicate() has always had input= AFAIK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 22:55:16 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Apr 2013 20:55:16 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366318516.27.0.390918042443.issue16624@psf.upfronthosting.co.za> R. David Murray added the comment: Yes. IIUC are talking about possibly replacing it with a more powerful feature. We wouldn't actually remove it, but we would recommend using the new feature instead, thus making the fact that check_output doesn't have it irrelevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 23:03:27 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 18 Apr 2013 21:03:27 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1366319007.8.0.51378306763.issue16355@psf.upfronthosting.co.za> Phil Connell added the comment: Here's a patch that updates getcomments to match the behaviour of getsource, raising OSError if the source file can't be found and TypeError when passed a built-in. Since this is a backwards-incompatible change, presumably it can only be applied to 3.4. This is ready for review. ---------- keywords: +patch nosy: +pconnell Added file: http://bugs.python.org/file29926/issue16355.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 23:08:36 2013 From: report at bugs.python.org (Zack Weinberg) Date: Thu, 18 Apr 2013 21:08:36 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366319316.68.0.312049021145.issue16624@psf.upfronthosting.co.za> Zack Weinberg added the comment: OK, I get that, but what I'm saying is I think input= is still desirable even if stdin= becomes more powerful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 23:12:27 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 18 Apr 2013 21:12:27 +0000 Subject: [issue17633] zipimport's handling of namespace packages is incorrect In-Reply-To: <1365070223.85.0.365511954484.issue17633@psf.upfronthosting.co.za> Message-ID: <1366319547.11.0.780256242166.issue17633@psf.upfronthosting.co.za> Phil Connell added the comment: Updated patch with markups suggested by Serhiy. ---------- Added file: http://bugs.python.org/file29927/issue17633-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 23:13:06 2013 From: report at bugs.python.org (Nick Sloan) Date: Thu, 18 Apr 2013 21:13:06 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366319586.71.0.910037146335.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: Any feedback on this latest patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 23:18:09 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Apr 2013 21:18:09 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366319889.43.0.500430353817.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: Benchmark script, should be used with: https://bitbucket.org/haypo/misc/src/tip/python/benchmark.py ---------- Added file: http://bugs.python.org/file29928/bench_encoders.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 23:40:44 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Thu, 18 Apr 2013 21:40:44 +0000 Subject: [issue14398] bz2.BZ2DEcompressor.decompress fail on large files In-Reply-To: <1332605719.75.0.496276331472.issue14398@psf.upfronthosting.co.za> Message-ID: <1366321244.81.0.537778148823.issue14398@psf.upfronthosting.co.za> Nadeem Vawda added the comment: An oversight on my part, I think. I'll add tests for 3.x this weekend. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 18 23:52:59 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 21:52:59 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366321979.34.0.901973706195.issue16624@psf.upfronthosting.co.za> Mark Lawrence added the comment: Tests rerun on Windows and were fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:13:07 2013 From: report at bugs.python.org (Martin Morrison) Date: Thu, 18 Apr 2013 22:13:07 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366323187.32.0.417345127531.issue17646@psf.upfronthosting.co.za> Martin Morrison added the comment: Latest upload has all of the agreed markups from the review. ---------- Added file: http://bugs.python.org/file29929/issue17646-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:20:02 2013 From: report at bugs.python.org (Martin Morrison) Date: Thu, 18 Apr 2013 22:20:02 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366323602.27.0.140968938426.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: Raised http://bz.selenic.com/show_bug.cgi?id=3894 against Mercurial for them to workaround issue14596. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:25:56 2013 From: report at bugs.python.org (Martin Morrison) Date: Thu, 18 Apr 2013 22:25:56 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366323956.59.0.460024471183.issue17618@psf.upfronthosting.co.za> Martin Morrison added the comment: Attached a minor tweak over the last diff - I'd forgotten to fix the Struct handling inside the Mercurial implementation as well. All other comments still apply to this diff. ---------- Added file: http://bugs.python.org/file29930/issue17618-5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:26:42 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Apr 2013 22:26:42 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366324002.67.0.758875910328.issue17732@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch, I left comments on rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:28:47 2013 From: report at bugs.python.org (Martin Morrison) Date: Thu, 18 Apr 2013 22:28:47 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366324127.88.0.768756628167.issue17468@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:38:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Apr 2013 22:38:26 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366324706.83.0.524298422897.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: New version of the patch: - address most (all?) Serhiy's remarks - _PyBytesWriter_PrepareInternal() always use min_size, not only when overallocate is 1 - add more comments Performances are almost the same than without the patch. It looks like they are a little bit better. ---------- Added file: http://bugs.python.org/file29931/bytes_writer-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:42:53 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Apr 2013 22:42:53 +0000 Subject: [issue17177] Document/deprecate imp In-Reply-To: <1360526911.57.0.856873084515.issue17177@psf.upfronthosting.co.za> Message-ID: <1366324973.01.0.670258898008.issue17177@psf.upfronthosting.co.za> STINNER Victor added the comment: If the imp module is marked as deprecated, it would help to explain how to port code from imp to importlib. As it was done for os.spawn(), platform.popen(), etc. I'm using imp.load_source() in my setup.py to load a version.py file which only contains constants, to be able to build my module even if executing the module fails (ex: because of a runtime dependency). I don't know how to change my code to use imp.load_source(). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:43:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Apr 2013 22:43:17 +0000 Subject: [issue17177] Document/deprecate imp In-Reply-To: <1360526911.57.0.856873084515.issue17177@psf.upfronthosting.co.za> Message-ID: <1366324997.07.0.275237057285.issue17177@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't know how to change my code to use imp.load_source(). Woops, I mean "to use importlib". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:46:27 2013 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 18 Apr 2013 22:46:27 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1366325187.33.0.0739242677491.issue3778@psf.upfronthosting.co.za> Mark Lawrence added the comment: I don't think this is worth the bother. I've checked my registry and the only entry under HKLM\SOFTWARE\Python is PythonCore, under this are the following. 2.6 Help Pythonwin Reference C:\Python26\Lib\site-packages\PyWin32.chm Modules 2.7 Help Pythonwin Reference C:\Python27\Lib\site-packages\PyWin32.chm Modules 3.1 Modules 3.2 Modules 3.3 Help Main Python Documentation C:\Python33\Doc\python331.chm Install Path Install Group Python 3.3 Modules PythonPath C:\Python33\Lib;C:\Python33\DLLs Only 3.3 is live on my machine. Clearly the pythonwin keys aren't our responsibility. It's hardly a lot of data anyway so why worry about it? Yes I'm aware that it's good practice to clean up after yourself but in this case is it really worth the effort? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 00:57:24 2013 From: report at bugs.python.org (Martin Morrison) Date: Thu, 18 Apr 2013 22:57:24 +0000 Subject: [issue11182] remove unused undocumented pydoc.Scanner class In-Reply-To: <1297405755.94.0.782663220355.issue11182@psf.upfronthosting.co.za> Message-ID: <1366325844.89.0.0436872194993.issue11182@psf.upfronthosting.co.za> Martin Morrison added the comment: Attached patch does exactly as described. Seems to be unused, and still passes all pydoc tests. ---------- keywords: +patch nosy: +isoschiz Added file: http://bugs.python.org/file29932/issue11182.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 01:13:43 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 18 Apr 2013 23:13:43 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366326823.41.0.780643923491.issue17646@psf.upfronthosting.co.za> Benjamin Peterson added the comment: What's this "f_invisible" thing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 01:20:46 2013 From: report at bugs.python.org (Martin Morrison) Date: Thu, 18 Apr 2013 23:20:46 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366327246.67.0.6326101911.issue17646@psf.upfronthosting.co.za> Changes by Martin Morrison : Removed file: http://bugs.python.org/file29929/issue17646-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 01:22:32 2013 From: report at bugs.python.org (Martin Morrison) Date: Thu, 18 Apr 2013 23:22:32 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366327352.62.0.40871354298.issue17646@psf.upfronthosting.co.za> Martin Morrison added the comment: Sorry, that is an unrelated change I was experimenting with, which I accidentally forgot to take out. Please see the new uploaded diff. ---------- Added file: http://bugs.python.org/file29933/issue17646-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 01:22:37 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Apr 2013 23:22:37 +0000 Subject: [issue11182] remove unused undocumented pydoc.Scanner class In-Reply-To: <1297405755.94.0.782663220355.issue11182@psf.upfronthosting.co.za> Message-ID: <1366327356.99.0.50983710255.issue11182@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 01:47:51 2013 From: report at bugs.python.org (Martin Morrison) Date: Thu, 18 Apr 2013 23:47:51 +0000 Subject: [issue17062] An os.walk inspired replacement for pkgutil.walk_packages In-Reply-To: <1359371828.89.0.768628623008.issue17062@psf.upfronthosting.co.za> Message-ID: <1366328871.48.0.905725844245.issue17062@psf.upfronthosting.co.za> Martin Morrison added the comment: I threw together a function that implements this. The only variation from the proposed signature was adding the onerror argument supported by the other similar functions in the module. ---------- keywords: +patch nosy: +isoschiz Added file: http://bugs.python.org/file29934/issue17062.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 01:53:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Apr 2013 23:53:34 +0000 Subject: [issue11182] remove unused undocumented pydoc.Scanner class In-Reply-To: <1297405755.94.0.782663220355.issue11182@psf.upfronthosting.co.za> Message-ID: <3ZsHFn3fGhzSWf@mail.python.org> Roundup Robot added the comment: New changeset 465cb5ce5a7e by Ezio Melotti in branch 'default': #11182: remove the unused and undocumented pydoc.Scanner class. Patch by Martin Morrison. http://hg.python.org/cpython/rev/465cb5ce5a7e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 01:55:22 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 18 Apr 2013 23:55:22 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target Message-ID: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: As described here: http://www.wefearchange.org/2013/04/python-3-language-gotcha-and-short.html the following code will produce an UnboundLocalError when the exception is triggered: def bad(): e = None try: do_something() except KeyError as e: print('ke') except ValueError as e: print('ve') print(e) The reason is that the exception handling machinery del's `e` from the local namespace in order to break circular references caused by __traceback__. The ULE is pretty mysterious and certainly not helpful for figuring out what's going wrong (the blog post above describes how long it took me to find it ;). Can we do better? What if instead of del'ing the target, we set it to None? We wouldn't get a ULE but the fact that print(e) would print None might be just as mysterious. Any other ideas? (BTW, there's likely nothing to be done for Python < 3.4.) ---------- messages: 187313 nosy: barry priority: normal severity: normal status: open title: Unhelpful UnboundLocalError due to del'ing of exception target versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 01:55:43 2013 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Apr 2013 23:55:43 +0000 Subject: [issue11182] remove unused undocumented pydoc.Scanner class In-Reply-To: <1297405755.94.0.782663220355.issue11182@psf.upfronthosting.co.za> Message-ID: <1366329343.12.0.23603589268.issue11182@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:01:42 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 00:01:42 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366329702.67.0.181119159683.issue17792@psf.upfronthosting.co.za> Ezio Melotti added the comment: Maybe we could raise a warning when the deleted name already exists in the local namespace? (FWIW I knew about the fact that the name gets deleted, and still managed to get bitten by it a couple of times.) ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:11:46 2013 From: report at bugs.python.org (Hank Christian) Date: Fri, 19 Apr 2013 00:11:46 +0000 Subject: [issue17793] Invitation to connect on LinkedIn Message-ID: <1882930326.14999090.1366330303995.JavaMail.app@ela4-app0129.prod> New submission from Hank Christian: LinkedIn ------------ Python, I'd like to add you to my professional network on LinkedIn. - Henry Henry Christian ADJUNCT PROFESSOR at Central Texas College Greater Los Angeles Area Confirm that you know Henry Christian: https://www.linkedin.com/e/-3qcne3-hfols9uw-6g/isd/10674146693/f8KKDSuG/?hs=false&tok=0bzd0NdaLbulI1 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-3qcne3-hfols9uw-6g/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I4172161560_1/?hs=false&tok=07YV1ohYLbulI1 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. ---------- messages: 187316 nosy: hankchristian priority: normal severity: normal status: open title: Invitation to connect on LinkedIn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:13:08 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 00:13:08 +0000 Subject: [issue17793] Invitation to connect on LinkedIn Message-ID: <1366330388.62.0.334460159486.issue17793@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- Removed message: http://bugs.python.org/msg187316 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:13:26 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 00:13:26 +0000 Subject: [issue17793] spam Message-ID: <1366330406.27.0.0958710896648.issue17793@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> invalid status: open -> closed title: Invitation to connect on LinkedIn -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:16:38 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 00:16:38 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366330598.82.0.964437993934.issue16624@psf.upfronthosting.co.za> R. David Murray added the comment: Why? What is the use case that it serves better? I'm not saying there isn't one, but one isn't occurring to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:16:54 2013 From: report at bugs.python.org (Martin Morrison) Date: Fri, 19 Apr 2013 00:16:54 +0000 Subject: [issue3693] Obscure array.array error message In-Reply-To: <1219801896.33.0.491668230509.issue3693@psf.upfronthosting.co.za> Message-ID: <1366330614.97.0.116343520366.issue3693@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:21:29 2013 From: report at bugs.python.org (Martin Morrison) Date: Fri, 19 Apr 2013 00:21:29 +0000 Subject: [issue1647489] zero-length match confuses re.finditer() Message-ID: <1366330889.76.0.110330305297.issue1647489@psf.upfronthosting.co.za> Martin Morrison added the comment: This is still an issue today: >>> import re >>> [m.groups() for m in re.finditer(r'(^z*)|(\w+)', 'abc')] [('', None), (None, 'bc')] ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:21:50 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 19 Apr 2013 00:21:50 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329702.67.0.181119159683.issue17792@psf.upfronthosting.co.za> Message-ID: <20130418202146.22484233@anarchist> Barry A. Warsaw added the comment: On Apr 19, 2013, at 12:01 AM, Ezio Melotti wrote: > >Maybe we could raise a warning when the deleted name already exists in the >local namespace? Ideally, I think a SyntaxError if you could detect a previously bound name in the namespace being used as an exception target. -Barry ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:37:12 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 00:37:12 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366331832.28.0.193111194427.issue17792@psf.upfronthosting.co.za> R. David Murray added the comment: And what if it weren't a print statement? An error is better than a "randomly" changed value, I think. I'm really not sure there is anything we can do here, beyond Ezio's warning suggestion. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:37:22 2013 From: report at bugs.python.org (Carlos Ferreira) Date: Fri, 19 Apr 2013 00:37:22 +0000 Subject: [issue17794] Priority Queue Message-ID: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> New submission from Carlos Ferreira: I'm using Priority Queues and followed the Python documentation for a simple example. >From Queue documentation in Python 3.3 http://docs.python.org/3.3/library/queue.html " The lowest valued entries are retrieved first (the lowest valued entry is the one returned by sorted(list(entries))[0]). A typical pattern for entries is a tuple in the form: (priority_number, data). " Then I tried this simple code. >>> pq = PriorityQueue() >>> pq.put_nowait((0, {'a':1})) >>> pq.put_nowait((0, {'a':2})) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.3/queue.py", line 187, in put_nowait return self.put(item, block=False) File "/usr/lib/python3.3/queue.py", line 146, in put self._put(item) File "/usr/lib/python3.3/queue.py", line 230, in _put heappush(self.queue, item) TypeError: unorderable types: dict() < dict() Is this a normal behaviour? I'm not sure if this should be declared as a bug... Instead of sticking to the first argument that indicates the priority, the heapq algorithm checks the second field and tries to order the dictionaries. I solved this annoyance by adding a third field, the object ID. Since the object ID is actually its address in memory, every object will have a different ID. Also, since the queue entries will have the same priority (zero), the id value is used to order the tuples in the heap queue. >>> pq = PriorityQueue() >>> a = {'a':1} >>> b = {'a':2} >>> pq.put_nowait((0, id(a), a)) >>> pq.put_nowait((0, id(b), b)) ---------- components: Interpreter Core messages: 187321 nosy: Claymore priority: normal severity: normal status: open title: Priority Queue type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:40:49 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 00:40:49 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366332049.56.0.800319714603.issue17792@psf.upfronthosting.co.za> R. David Murray added the comment: This used to raise a SyntaxError. See issue 4617. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:42:24 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Apr 2013 00:42:24 +0000 Subject: [issue5492] Error on leaving IDLE with quit() or exit() under Linux In-Reply-To: <1237121077.76.0.63532373748.issue5492@psf.upfronthosting.co.za> Message-ID: <1366332144.47.0.161481383867.issue5492@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.4 fresh build, Win 7: ^z now disabled, as apparently intended. Without the patch ^d or window close button [x] quits Idle cleanly. >>> import idlelib.idle # ^D or [X] in Idle >>> With the patch, Idle disappears but console displays error messages. This is an unacceptible regression; something is not right. Sorry ;-). >>> import idlelib.idle # ^D in idle >>> invalid command name "53165560callit" while executing "53165560callit" ("after" script) invalid command name "51796472callit" while executing "51796472callit" ("after" script) >>> import idlelib.idle # [X] in Idle >>> invalid command name "52980280callit" while executing "52980280callit" ("after" script) Without or with patch, quit() or exit brings up TK box (?) The program is still running! Do you want to kill it? [OK] [Cancel] Did this always happen? [Cancel] causes traceback (not good, regression?) Traceback (most recent call last): File "", line 1, in quit() File "D:\Python\dev\cpython\lib\site.py", line 356, in __call__ raise SystemExit(code) SystemExit: None [OK] gives clean exit >>> import idlelib.idle # quit(), [ok] in idle >>> Same with 3.3 with from download from repository but without fresh python build (as pcbuild fails). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:49:14 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 19 Apr 2013 00:49:14 +0000 Subject: [issue4617] SyntaxError when free variable name is also an exception target In-Reply-To: <1228911523.24.0.570670634565.issue4617@psf.upfronthosting.co.za> Message-ID: <1366332554.33.0.781119032956.issue4617@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:49:23 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 00:49:23 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366332563.11.0.207688654408.issue17794@psf.upfronthosting.co.za> R. David Murray added the comment: It is a bug of some sort. A doc bug if nothing else. This is probably due to the fact that everything was sortable in python2, and the doc and/or code hasn't been updated to account for the fact that many things aren't in Python3. ---------- nosy: +r.david.murray, rhettinger versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 02:51:25 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Apr 2013 00:51:25 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366332685.06.0.785280333249.issue17646@psf.upfronthosting.co.za> Benjamin Peterson added the comment: patching file Lib/traceback.py patch: **** malformed patch at line 94: @@ -50,25 +90,7 @@ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 03:03:24 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 19 Apr 2013 01:03:24 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366331832.28.0.193111194427.issue17792@psf.upfronthosting.co.za> Message-ID: <20130418210216.28432550@anarchist> Barry A. Warsaw added the comment: On Apr 19, 2013, at 12:37 AM, R. David Murray wrote: >And what if it weren't a print statement? An error is better than a >"randomly" changed value, I think. I'm really not sure there is anything we >can do here, beyond Ezio's warning suggestion. Right. The point is, is it more helpful to have an unexpected value in the local (e.g. None, which in fact may not be *totally* unexpected) or an mystical exception? ;) A warning would be fine. I just want to give programmers some help in trying to figure out why their code is wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 03:29:05 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Apr 2013 01:29:05 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366334945.22.0.940431599914.issue17792@psf.upfronthosting.co.za> Nick Coghlan added the comment: It seems to me that this kind of dubious-but-legal code is what http://docs.python.org/3/library/exceptions.html#SyntaxWarning is designed to handle. Something like "SyntaxWarning: implicitly deleted exception variable referenced after end of except clause". ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 03:33:05 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 01:33:05 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366335185.17.0.975615280276.issue17792@psf.upfronthosting.co.za> R. David Murray added the comment: It occurs to me that one of the problems here is that the UnboundLocalError only occurs when the except clause is executed. Do you think it would be helpful and acceptable (in 3.4, as it is a behavior change) to have the 'as' variable *always* deleted at the end of the try/except block? Then you would always get the UnboundLocalError, instead of it mysteriously appearing only when the except was executed. Granted it is a bit weird, but then so is the variable getting deleted in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 03:36:29 2013 From: report at bugs.python.org (paul j3) Date: Fri, 19 Apr 2013 01:36:29 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366335389.12.0.0604379330527.issue14191@psf.upfronthosting.co.za> paul j3 added the comment: Glenn Take a look at http://bugs.python.org/issue15427 I took a stab at changing the documentation, including recommending parse_known_args when porting optparse uses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 03:50:35 2013 From: report at bugs.python.org (Glenn Linderman) Date: Fri, 19 Apr 2013 01:50:35 +0000 Subject: [issue15427] Describe use of args parameter of argparse.ArgumentParser.parse_args In-Reply-To: <1342995154.12.0.902919829048.issue15427@psf.upfronthosting.co.za> Message-ID: <1366336235.91.0.469878649634.issue15427@psf.upfronthosting.co.za> Glenn Linderman added the comment: These docs changes seem reasonable, from a side-by-side view (I didn't attempt to look at the formatted results of applying the patch), to better document the current behavior. ---------- nosy: +v+python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 04:27:30 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 02:27:30 +0000 Subject: [issue11078] Have test___all__ check for duplicates In-Reply-To: <1296489333.39.0.726513534716.issue11078@psf.upfronthosting.co.za> Message-ID: <1366338450.21.0.286890129648.issue11078@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached an updated patch that also uses subtests to keep running all tests even in case of failure. The patch also intentionally breaks a few __all__ to show how it works -- these changes should clearly be removed once the patch gets committed. ---------- nosy: +ezio.melotti stage: needs patch -> patch review versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file29935/issue11078.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 04:34:45 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 02:34:45 +0000 Subject: [issue17778] Fix test discovery for test_multiprocessing.py In-Reply-To: <1366218082.59.0.595129290582.issue17778@psf.upfronthosting.co.za> Message-ID: <1366338885.46.0.0167879751353.issue17778@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch doesn't seem to apply cleanly on 3.3 (and on default too). ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 04:39:01 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Apr 2013 02:39:01 +0000 Subject: [issue17779] Fix test discovery for test_osx_env.py In-Reply-To: <1366223356.18.0.930448045627.issue17779@psf.upfronthosting.co.za> Message-ID: <3ZsLwh4thdzSbw@mail.python.org> Roundup Robot added the comment: New changeset f5d31084fbbd by Ezio Melotti in branch '3.3': #17779: test_osx_env now works with unittest test discovery. Patch by Zachary Ware. http://hg.python.org/cpython/rev/f5d31084fbbd New changeset 4ea9a8e5ec21 by Ezio Melotti in branch 'default': #17779: merge with 3.3. http://hg.python.org/cpython/rev/4ea9a8e5ec21 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 04:40:54 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 02:40:54 +0000 Subject: [issue17777] Unrecognized string literal escape sequences give SyntaxErrors In-Reply-To: <1366213055.37.0.161368185198.issue17777@psf.upfronthosting.co.za> Message-ID: <1366339254.42.0.502086220416.issue17777@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy stage: -> needs patch type: behavior -> enhancement versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 04:46:21 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Apr 2013 02:46:21 +0000 Subject: [issue17789] Fix test discovery for test_random.py In-Reply-To: <1366297431.16.0.642469069527.issue17789@psf.upfronthosting.co.za> Message-ID: <3ZsM583Q5pzSbG@mail.python.org> Roundup Robot added the comment: New changeset 678564fc0962 by Ezio Melotti in branch '3.3': #17789: test_random now works with unittest test discovery. Patch by Zachary Ware. http://hg.python.org/cpython/rev/678564fc0962 New changeset ac352d7d8058 by Ezio Melotti in branch 'default': #17789: merge with 3.3. http://hg.python.org/cpython/rev/ac352d7d8058 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 04:46:51 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 02:46:51 +0000 Subject: [issue17789] Fix test discovery for test_random.py In-Reply-To: <1366297431.16.0.642469069527.issue17789@psf.upfronthosting.co.za> Message-ID: <1366339611.1.0.730397259738.issue17789@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 04:56:37 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 02:56:37 +0000 Subject: [issue17779] Fix test discovery for test_osx_env.py In-Reply-To: <1366223356.18.0.930448045627.issue17779@psf.upfronthosting.co.za> Message-ID: <1366340197.17.0.0878597847498.issue17779@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 04:59:30 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Apr 2013 02:59:30 +0000 Subject: [issue17790] Fix test discovery for test_set.py In-Reply-To: <1366298293.17.0.875965063337.issue17790@psf.upfronthosting.co.za> Message-ID: <3ZsMNL1YPhzSpb@mail.python.org> Roundup Robot added the comment: New changeset ef100be2e8ba by Ezio Melotti in branch '3.3': #17790: test_set now works with unittest test discovery. Patch by Zachary Ware. http://hg.python.org/cpython/rev/ef100be2e8ba New changeset 8a0b3ece5c28 by Ezio Melotti in branch 'default': #17790: merge with 3.3. http://hg.python.org/cpython/rev/8a0b3ece5c28 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 05:00:08 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 03:00:08 +0000 Subject: [issue17790] Fix test discovery for test_set.py In-Reply-To: <1366298293.17.0.875965063337.issue17790@psf.upfronthosting.co.za> Message-ID: <1366340408.78.0.942036031948.issue17790@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 05:15:03 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Apr 2013 03:15:03 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366341303.81.0.956797096691.issue17792@psf.upfronthosting.co.za> Nick Coghlan added the comment: I don't think we want to mess with the control flow, as that would be even weirder and may interact strangely with else and finally clauses. A SyntaxWarning would be unconditional (so it doesn't matter whether or not the exception is triggered at run time), happens at compile time (so developers will see it), but won't be triggered when loading from a cached bytecode file (so end users typically won't see it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 05:37:52 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 03:37:52 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366123345.09.0.872714866587.issue17760@psf.upfronthosting.co.za> Message-ID: <1366342672.37.0.300364988403.issue17760@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I strongly disagree with Ezio's argumentation here. If Kate and Firefox > are internationalized, IDLE can very well be internationalized too. The target is different though (especially the target of Firefox). Kate might be used mainly by developers, but it's also used by non-developers and it's probably translated also because all the KDE programs are. Mercurial would be a better example against my point. The problem is that the students don't understand English menus (among a number of other English things). The two possible solutions are: 1) translate the menus to e.g. French so that the students can understand them; 2) teach enough English to the students to understand the menus. The first solution might make students' life a bit easier at first, but it's just a short-term solution -- they will still have to deal with English in a number of other places (keywords, functions, modules, error messages, documentation). The second solution adds a bit more overhead at first, but that will pay off pretty soon. It also stems from the assumption that learning English is something that they will have to do (especially if they want to become developers). I'm not strongly opposed to internationalize IDLE. If people think that it's a good idea and are willing to invest their time doing it, I'm not going to stop them, but I reckon that this might cause a few problems whose cost, IMHO, outweighs the aforementioned short-term advantage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 05:51:25 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 03:51:25 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1366343485.77.0.589958171619.issue16355@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: needs patch -> patch review versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 05:51:55 2013 From: report at bugs.python.org (Glenn Linderman) Date: Fri, 19 Apr 2013 03:51:55 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366343515.53.0.375956654023.issue14191@psf.upfronthosting.co.za> Glenn Linderman added the comment: Docs look good as mentioned there, for the current behavior, although it would be good to improve the behavior. Note that I have supplied a wrapper (t18a.py) (if it hasn't bit-rotted for 3.4, I'm still using 3.3) that provides the needed functionality. The problem is, that I have no clue how to modify the internals of argparse to allow it to simply be a method of the current argparse class. One could achieve the goal by renaming the current argparse class to _argparse, and renaming my wrapper class to be the "real" argparse, and that would work, but would seem to be inefficient. It would be nice if someone could move the needed functionality, a new API called parse_intermixed_args, already approved by msg166175, that does the same thing as my wrapper does, but without the wrapper class. This would be a cure to the problem, and it could be tested against my wrapper class by comparison to ensure the needed functionality is provided. I'd be glad to help with testing and understanding the requirements, but don't have time to figure out the internals of argparse at present. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 06:53:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 04:53:22 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366347202.2.0.0516230987643.issue17792@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached a sketchy proof of concept. It only checks for locals, but it should probably check for globals too. Does the approach make sense? ---------- keywords: +patch nosy: +benjamin.peterson type: -> enhancement Added file: http://bugs.python.org/file29936/issue17792.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 07:09:46 2013 From: report at bugs.python.org (paul j3) Date: Fri, 19 Apr 2013 05:09:46 +0000 Subject: [issue14364] Argparse incorrectly handles '--' In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1366348186.74.0.843647710748.issue14364@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 07:35:21 2013 From: report at bugs.python.org (paul j3) Date: Fri, 19 Apr 2013 05:35:21 +0000 Subject: [issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 In-Reply-To: <1351070553.1.0.217274613803.issue16308@psf.upfronthosting.co.za> Message-ID: <1366349721.69.0.871586491815.issue16308@psf.upfronthosting.co.za> paul j3 added the comment: I submitted a patch to http://bugs.python.org/issue9253 The reason why subparser became optional in the latest release is that a old test for missing positionals was phased out, and new one added. Subparsers have always had a default 'required=False', but the old test did not actually pay attention to that attribute. It is easy to change the default attribute, but that ends up exposing a bug in the new test (trying to ','.join[...,None,...]). My patch corrects that, and exposes the 'required' attribute. It also has doc changes and test additions. I could rewrite it so it does not change the API or the doc. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 08:20:51 2013 From: report at bugs.python.org (paul j3) Date: Fri, 19 Apr 2013 06:20:51 +0000 Subject: [issue14364] Argparse incorrectly handles '--' In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1366352451.54.0.555664737561.issue14364@psf.upfronthosting.co.za> paul j3 added the comment: The patch that I recently submitted for http://bugs.python.org/issue13922 appears to solve this issue. It only removes the '--' that marked the end of options. With: parser = argparse.ArgumentParser() parser.add_argument('-f','--foo') print(parser.parse_args(['-f--'])) print(parser.parse_args(['--foo=--'])) print(parser.parse_args(['-f', '--'])) I get: Namespace(foo='--') Namespace(foo='--') usage: foodash.py [-h] [-f FOO] foodash.py: error: argument -f/--foo: expected one argument ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 08:33:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 19 Apr 2013 06:33:23 +0000 Subject: [issue17760] No i18n of IDLE's interface in french In-Reply-To: <1366342672.37.0.300364988403.issue17760@psf.upfronthosting.co.za> Message-ID: <1366353194.2550.1.camel@fsol> Antoine Pitrou added the comment: > The target is different though (especially the target of Firefox). > Kate might be used mainly by developers, but it's also used by > non-developers and it's probably translated also because all the KDE > programs are. Mercurial would be a better example against my point. Or Kdevelop, Eclipse, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 08:51:42 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 19 Apr 2013 06:51:42 +0000 Subject: [issue14364] Argparse incorrectly handles '--' In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1366354302.44.0.884758516847.issue14364@psf.upfronthosting.co.za> Michele Orr? added the comment: wow, I was just writing the unittests, thanks paul. Shall I continue? I don't see any test case on tip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 08:58:32 2013 From: report at bugs.python.org (Mike Lundy) Date: Fri, 19 Apr 2013 06:58:32 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets Message-ID: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> New submission from Mike Lundy: The changed merged from http://bugs.python.org/issue16168 causes a regression in SysLogHandler behavior. The socktype of /dev/log is dependent on syslog configuration, and the fallback behavior (trying SOCK_DGRAM and then SOCK_STREAM if the former failed) was very useful. A better fix for this would preserve the fallback behavior in cases where the caller has not specifically requested a socktype. I've attached a patch with one such approach. ---------- components: Library (Lib) files: 0001-Restore-SysLogHandler-fallback-for-AF_UNIX-sockets.patch keywords: patch messages: 187347 nosy: Mike.Lundy priority: normal severity: normal status: open title: backwards-incompatible change in SysLogHandler with unix domain sockets type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29937/0001-Restore-SysLogHandler-fallback-for-AF_UNIX-sockets.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 09:30:49 2013 From: report at bugs.python.org (LCID Fire) Date: Fri, 19 Apr 2013 07:30:49 +0000 Subject: [issue17796] No mimetype guessed for tar.xz url Message-ID: <1366356649.95.0.33781199343.issue17796@psf.upfronthosting.co.za> New submission from LCID Fire: mimetypes.guess_type( "http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.36/libxml++-2.36.0.tar.xz"), strict=False ) gives (None, None) ---------- components: Library (Lib) messages: 187348 nosy: lcid-fire priority: normal severity: normal status: open title: No mimetype guessed for tar.xz url type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 09:38:17 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 19 Apr 2013 07:38:17 +0000 Subject: [issue13922] argparse handling multiple "--" in args improperly In-Reply-To: <1328132556.72.0.92385645061.issue13922@psf.upfronthosting.co.za> Message-ID: <1366357097.55.0.927757522055.issue13922@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: +maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 10:12:09 2013 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 19 Apr 2013 08:12:09 +0000 Subject: [issue14364] Argparse incorrectly handles '--' In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1366359129.55.0.226485477837.issue14364@psf.upfronthosting.co.za> Michele Orr? added the comment: Yes, http://bugs.python.org/file29845/dbldash.patch seems to fix this. Attaching the unittests, and noisying on your issue. ---------- keywords: +patch Added file: http://bugs.python.org/file29938/issue14364.test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 11:06:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 19 Apr 2013 09:06:47 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366362407.29.0.362345246679.issue17468@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 11:09:27 2013 From: report at bugs.python.org (Stijn Hoop) Date: Fri, 19 Apr 2013 09:09:27 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366362567.43.0.264841986692.issue5004@psf.upfronthosting.co.za> Stijn Hoop added the comment: So after a good nights sleep: does it not make sense to use the canonical hostname iff the name argument is not present / empty? Otherwise, fall back to the documented steps? That way extra API is avoided, and I can't think of a case where you would rather have my weird results vs "the output of hostname -f". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 11:39:59 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 19 Apr 2013 09:39:59 +0000 Subject: [issue17778] Fix test discovery for test_multiprocessing.py In-Reply-To: <1366218082.59.0.595129290582.issue17778@psf.upfronthosting.co.za> Message-ID: <1366364399.42.0.325090148462.issue17778@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 12:21:38 2013 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 19 Apr 2013 10:21:38 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366366898.73.0.439301366875.issue17795@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 14:18:32 2013 From: report at bugs.python.org (Mateusz Loskot) Date: Fri, 19 Apr 2013 12:18:32 +0000 Subject: [issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program Message-ID: <1366373912.56.0.138468709297.issue17797@psf.upfronthosting.co.za> New submission from Mateusz Loskot: In pythonrun.c, there is function initstdio() with the following test: static int initstdio(void) { ... /* Set sys.stdin */ fd = fileno(stdin); /* Under some conditions stdin, stdout and stderr may not be connected * and fileno() may point to an invalid file descriptor. For example * GUI apps don't have valid standard streams by default. */ if (fd < 0) { #ifdef MS_WINDOWS std = Py_None; Py_INCREF(std); #else goto error; #endif } else { ... } This function is fails for non-console applications (i.e. MFC) built using Visual C++ 11.0 (Visual Studio 2012), becasue **strangely**, fileno(stdin) == 0, so this test results in false and Python initialisation routines attempt to setup streams. Apparently, fileno(stdin) return value has changed between Visual C++ 10.0 (VS 2010) and 11.0. The VC++ 10.0 reports fileno(stdin) == -2. ---------- components: IO, Interpreter Core messages: 187351 nosy: mloskot priority: normal severity: normal status: open title: Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 14:24:20 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 19 Apr 2013 12:24:20 +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: <1366374260.16.0.387992064749.issue17797@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: And does it cause an issue later? How? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 14:32:45 2013 From: report at bugs.python.org (Mateusz Loskot) Date: Fri, 19 Apr 2013 12:32:45 +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: <1366374765.56.0.979848994033.issue17797@psf.upfronthosting.co.za> Mateusz Loskot added the comment: Yes, it does. In file Modulfileio.c, in function fileio_init, there is this code: if (fd >= 0) { if (check_fd(fd)) goto error; self->fd = fd; self->closefd = closefd; } The check_fd tests: if (!_PyVerify_fd(fd) || (fstat(fd, &buf) < 0 && errno == EBADF)) { The _PyVerify_fd(fd) == 1, but errno is "Bad file descriptor". This eventually leads to Py_InitializeEx failure at: if (initstdio() < 0) Py_FatalError( "Py_Initialize: can't initialize sys standard streams"); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 14:33:04 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Apr 2013 12:33:04 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366374784.8.0.871464610024.issue17468@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Generators exit using GeneratorExit, which you could possible catch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 14:33:06 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 12:33:06 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1366374786.19.0.715302978915.issue5004@psf.upfronthosting.co.za> R. David Murray added the comment: That is an interesting proposal, yes. I suppose someone that needs the getaddrinfo semantics for something other than the local host can just call it directly. Now, do we add the fact that we are doing this to the current alogarithmic documention? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 14:34:09 2013 From: report at bugs.python.org (Mateusz Loskot) Date: Fri, 19 Apr 2013 12:34:09 +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: <1366374849.28.0.0247408982626.issue17797@psf.upfronthosting.co.za> Mateusz Loskot added the comment: > In file Modulfileio.c, I messed the path and filename above I meant: In file Modules/_io/fileio.c, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 14:48:16 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 12:48:16 +0000 Subject: [issue17796] No mimetype guessed for tar.xz url In-Reply-To: <1366356649.95.0.33781199343.issue17796@psf.upfronthosting.co.za> Message-ID: <1366375696.74.0.877902223286.issue17796@psf.upfronthosting.co.za> R. David Murray added the comment: Adding xz was treated as an enhancement in issue 16316. Our thinking about applying these types of changes as bug fixes has evolved a bit, so I think we can consider backporting it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 14:49:12 2013 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 19 Apr 2013 12:49:12 +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: <1366375752.75.0.6001149864.issue17797@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Maybe check_fd(fd) could be used in initstdio as well. Can you check whether it's the same for the other files? What are the values for fileno(stdout) and fileno(stderr)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 15:51:43 2013 From: report at bugs.python.org (=?utf-8?b?QW5zc2kgS8Okw6RyacOkaW5lbg==?=) Date: Fri, 19 Apr 2013 13:51:43 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366379503.63.0.859016462475.issue17468@psf.upfronthosting.co.za> Anssi K??ri?inen added the comment: True, except GeneratorExit will run at garbage collection time and this will result in reference cycle problems. Checking if there is no except GeneratorExit clause might be too complicated. I still think this is worth a brief note in the gc docs. The gc docs talk only about __del__ methods, and there isn't one defined for the example generator. The generator does have something technically equivalent, but I don't spot any actual __del__ methods in the reference loop. A docs mention will not help much in avoiding this problem, but it will at least make the code behaviour equivalent to documentation. A mention in the gc docs would have helped me when trying to debug the leak in Django. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 15:54:13 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Apr 2013 13:54:13 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366379653.27.0.993663807477.issue17468@psf.upfronthosting.co.za> Benjamin Peterson added the comment: A documentation patch sounds good to me. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: resource usage -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 16:08:40 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Apr 2013 14:08:40 +0000 Subject: [issue17177] Document/deprecate imp In-Reply-To: <1360526911.57.0.856873084515.issue17177@psf.upfronthosting.co.za> Message-ID: <1366380520.3.0.758593222295.issue17177@psf.upfronthosting.co.za> Brett Cannon added the comment: The deprecation warnings for the explicitly deprecated functions already have the instructions on how to port. A note could probably be added to turn on deprecation warnings if one needs help with moving code over. But the deprecation isn't even officially full-on yet. While it's documented as such, not all functionality has moved over to importlib, only bits and pieces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 16:09:25 2013 From: report at bugs.python.org (Mateusz Loskot) Date: Fri, 19 Apr 2013 14:09:25 +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: <1366380565.38.0.815023617781.issue17797@psf.upfronthosting.co.za> Mateusz Loskot added the comment: Replacing if the current test in Python 3.2 if (fd < 0) with if (check_fd(fd) < 0) Seems to be a working solution. I just noticed, that in current Python/pythonrun.c in the repo, there the fd < 0 tests have been replaced with new function is_valid_fd(). But, its semantic is equivalent to fd < 0, so it does not check anything really. Perhaps is_valid_fd could be redefined as check_fd. Here are Visual C++ 11.0 (1700) vs 10.0 differences of fileno return value for all the standard streams int fdi, fdo, fde; fdi = fileno(stdin); fdo = fileno(stdout); fde = fileno(stderr); #if _MSC_VER < 1700 assert(fdi == -2); assert(fdo == -2); assert(fde == -2); #else assert(fdi == 0); assert(fdo == 1); assert(fde == 2); #endif By the way, I assume such sudden change in fileno(std*) behaviour between Visual C++ versions is suspicious, so I also submitted bug report to Visual Studio: https://connect.microsoft.com/VisualStudio/feedback/details/785119/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 16:32:56 2013 From: report at bugs.python.org (Nick Sloan) Date: Fri, 19 Apr 2013 14:32:56 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366381976.49.0.0506251377702.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: Responded to comments with an updated patch. Thanks for all the feedback, and sorry for the silly mistakes. Should have read up more thoroughly on the docs style guide and the terminology. Hopefully the latest patch is ready to go (or at least, nearly so). ---------- Added file: http://bugs.python.org/file29939/distutilsvenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 16:40:55 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 14:40:55 +0000 Subject: [issue17177] Document/deprecate imp In-Reply-To: <1360526911.57.0.856873084515.issue17177@psf.upfronthosting.co.za> Message-ID: <1366382455.3.0.906621179413.issue17177@psf.upfronthosting.co.za> R. David Murray added the comment: Should we back out that module level deprecation notice for the moment, then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 16:57:14 2013 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 19 Apr 2013 14:57:14 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1366383434.86.0.432698904451.issue3778@psf.upfronthosting.co.za> anatoly techtonik added the comment: What is the reason for not following the good practice? Is it so hard to fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 16:59:43 2013 From: report at bugs.python.org (Michael Foord) Date: Fri, 19 Apr 2013 14:59:43 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1366383583.2.0.0254103383549.issue3778@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: -michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 17:09:37 2013 From: report at bugs.python.org (Brian Curtin) Date: Fri, 19 Apr 2013 15:09:37 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1366384177.36.0.651814211314.issue3778@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 17:35:27 2013 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Apr 2013 15:35:27 +0000 Subject: [issue17177] Document/deprecate imp In-Reply-To: <1360526911.57.0.856873084515.issue17177@psf.upfronthosting.co.za> Message-ID: <1366385727.34.0.861887313023.issue17177@psf.upfronthosting.co.za> Brett Cannon added the comment: Nah, consider it motivation for me to get it done in Python 3.4 else I have to back it out before release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:03:24 2013 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 19 Apr 2013 16:03:24 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366387404.87.0.542770090305.issue17468@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adding Guido because this appears to be due to a longstanding difference between the handling of tp_del and most other slots Specifically, the reason for the odd behaviour appears to be that generator objects define tp_del [1] (which is what the cyclic gc *really* looks for), but while defining __del__ in Python will populate tp_del in the type slots, defining tp_del directly in a builtin or extension type doesn't create an exposed __del__ at the Python level (there's no wrapper function identified in the slot definition). So, at the very least, the fact that builtin and extension types can define tp_del without creating a visible __del__ method needs to be documented as a CPython implementation detail. However, I'm not sure we actually have a good *reason* for tp_del failing to generate __del__ automatically - it's been that way since Guido implemented it [2], but Guido's comment in that commit message about not needing a wrapper because types written in C can't define tp_del is clearly no longer accurate. [1] http://hg.python.org/cpython/file/2.7/Objects/genobject.c#l328 [2] http://hg.python.org/cpython/annotate/71dca7c76fa2/Objects/typeobject.c#3955 ---------- nosy: +gvanrossum versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:08:17 2013 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Apr 2013 16:08:17 +0000 Subject: [issue17764] Support http.server passing bind address via commend line argument In-Reply-To: <1366129730.55.0.013246712373.issue17764@psf.upfronthosting.co.za> Message-ID: <1366387697.27.0.309074593269.issue17764@psf.upfronthosting.co.za> Berker Peksag added the comment: I left comments on Rietveld. The patch also needs a documentation update. ---------- nosy: +berker.peksag stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:25:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 19 Apr 2013 16:25:59 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366388759.57.0.180530752584.issue17468@psf.upfronthosting.co.za> Antoine Pitrou added the comment: With the advent of yield-based asynchronous programming, it is going to be problematic if a generator caught in a reference cycle can create a memory leak. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:32:33 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Apr 2013 16:32:33 +0000 Subject: [issue17796] No mimetype guessed for tar.xz url In-Reply-To: <1366356649.95.0.33781199343.issue17796@psf.upfronthosting.co.za> Message-ID: <1366389153.12.0.533875664598.issue17796@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 ---------- nosy: +eric.araujo stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:33:23 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Apr 2013 16:33:23 +0000 Subject: [issue17796] No mimetype guessed for tar.xz url In-Reply-To: <1366356649.95.0.33781199343.issue17796@psf.upfronthosting.co.za> Message-ID: <1366389203.08.0.807909563759.issue17796@psf.upfronthosting.co.za> ?ric Araujo added the comment: Let?s keep using that other bug report. ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Support xz compression in mimetypes module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:33:33 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Apr 2013 16:33:33 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366389213.8.0.127297511455.issue17468@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think the creation of __del__ wrappers for extension types is separate from this issue of generator finalization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:34:32 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Apr 2013 16:34:32 +0000 Subject: [issue16316] Support xz compression in mimetypes module In-Reply-To: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> Message-ID: <1366389272.11.0.285427736367.issue16316@psf.upfronthosting.co.za> ?ric Araujo added the comment: Small changes in registries (mimetypes, html.entities, sometimes webbrowser) are acceptable in stable branches. Can you backport this? ---------- stage: committed/rejected -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:37:42 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Apr 2013 16:37:42 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366389462.5.0.948171251947.issue17468@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes. Hopefully, the async framework using generators can properly can close() on them, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:39:47 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 19 Apr 2013 16:39:47 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1366389462.5.0.948171251947.issue17468@psf.upfronthosting.co.za> Message-ID: <1366389584.2550.3.camel@fsol> Antoine Pitrou added the comment: > Yes. Hopefully, the async framework using generators can properly can > close() on them, though. With yield from-based generators, you don't need a trampoline anymore, so the close() call is now left to the application developers (if I'm not mistaken). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:47:10 2013 From: report at bugs.python.org (Todd Rovito) Date: Fri, 19 Apr 2013 16:47:10 +0000 Subject: [issue7951] Should str.format allow negative indexes when used for __getitem__ access? In-Reply-To: <1266450859.13.0.906832569526.issue7951@psf.upfronthosting.co.za> Message-ID: <1366390030.01.0.101578666188.issue7951@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:54:48 2013 From: report at bugs.python.org (Nick Sloan) Date: Fri, 19 Apr 2013 16:54:48 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366390488.87.0.793965612101.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: Here is another update. It has come to my attention that I missed some options: prefix, exec-prefix, home, user and root These have been added, and the docs and test have been updated to reflect the change. ---------- Added file: http://bugs.python.org/file29940/distutilsvenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 18:58:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Apr 2013 16:58:26 +0000 Subject: [issue17413] format_exception() breaks on exception tuples from trace function In-Reply-To: <1363222594.63.0.566610526845.issue17413@psf.upfronthosting.co.za> Message-ID: <3Zsk0K2xMCzSWG@mail.python.org> Roundup Robot added the comment: New changeset d18df4c90515 by R David Murray in branch '3.3': #17413: make sure settrace funcs get passed exception instances for 'value'. http://hg.python.org/cpython/rev/d18df4c90515 New changeset 6297fcddf912 by R David Murray in branch 'default': Merge #17413: make sure settrace funcs get passed exception instances for 'value'. http://hg.python.org/cpython/rev/6297fcddf912 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 19:01:19 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Apr 2013 17:01:19 +0000 Subject: [issue17413] format_exception() breaks on exception tuples from trace function In-Reply-To: <1363222594.63.0.566610526845.issue17413@psf.upfronthosting.co.za> Message-ID: <1366390879.11.0.602426204345.issue17413@psf.upfronthosting.co.za> R. David Murray added the comment: Benjamin reviewed the patch and pointed out that the settrace state needed to be restored in the test, so I fixed that when I committed it. Thanks Ingrid and Brendan. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 19:39:43 2013 From: report at bugs.python.org (Zachary Ware) Date: Fri, 19 Apr 2013 17:39:43 +0000 Subject: [issue17778] Fix test discovery for test_multiprocessing.py In-Reply-To: <1366218082.59.0.595129290582.issue17778@psf.upfronthosting.co.za> Message-ID: <1366393183.7.0.345439647651.issue17778@psf.upfronthosting.co.za> Zachary Ware added the comment: Hmmm, it looks a couple of things have gone wrong. First, I didn't try the patch on 3.3, whose test_multiprocessing is significantly different than default's. This appears to be due largely to dd5e98ddcd39, but there have been other changes to only default since then as well. As it turns out, 3.3 passes default's test_multiprocessing, so is there any reason not to backport all of the changes to 3.3 to keep the two the same? FTR, the changesets not backported are (in order): dd5e98ddcd39, 7d69d04522e3, 2dc08789ad3e, and 2966e5a55396. Secondly, the patch doesn't apply to default because a new test was added shortly after I submitted the patch. The only real change to my patch to deal with this is the line numbers of hunk 2, and the removed testcases_other has an extra line removed. Here's a new version of the patch which applies cleanly to default. I'll leave 3.3 for now until it's decided whether or not to backport changes to it. ---------- Added file: http://bugs.python.org/file29941/test_multiprocessing_discovery.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:11:30 2013 From: report at bugs.python.org (Martin Morrison) Date: Fri, 19 Apr 2013 18:11:30 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366395090.92.0.0718789719211.issue17468@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:26:06 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 19 Apr 2013 18:26:06 +0000 Subject: [issue15721] PEP 3121, 384 Refactoring applied to tkinter module In-Reply-To: <1345287224.98.0.204885883161.issue15721@psf.upfronthosting.co.za> Message-ID: <1366395966.06.0.481671310901.issue15721@psf.upfronthosting.co.za> Andrew Svetlov added the comment: No, PEP3121 patch is not ready yet but PEP384 has been applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:27:24 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 19 Apr 2013 18:27:24 +0000 Subject: [issue17785] Use faster URL shortener for perf.py In-Reply-To: <1366242777.62.0.0914691479989.issue17785@psf.upfronthosting.co.za> Message-ID: <1366396044.89.0.110671403567.issue17785@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:27:59 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 19 Apr 2013 18:27:59 +0000 Subject: [issue17780] the test suite should use a TEMPDIR in the build directory, not the source directory In-Reply-To: <1366223766.74.0.431919060709.issue17780@psf.upfronthosting.co.za> Message-ID: <1366396079.67.0.793508504428.issue17780@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:31:10 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 19 Apr 2013 18:31:10 +0000 Subject: [issue17758] test_site fails when the user does not have a home directory In-Reply-To: <1366120279.38.0.306129828747.issue17758@psf.upfronthosting.co.za> Message-ID: <1366396270.16.0.646900450249.issue17758@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:32:51 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 19 Apr 2013 18:32:51 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <1366396371.98.0.591029137301.issue17729@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:43:35 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 19 Apr 2013 18:43:35 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <1366397015.49.0.275825402901.issue17729@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: I would rather the page be removed, at least from the official docs. I wonder how useful it actually is, and as already pointed, it really feels outdated (and Apache is not kool no more). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:46:20 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 19 Apr 2013 18:46:20 +0000 Subject: [issue15992] Strict aliasing violations in Objects/unicodeobject.c In-Reply-To: <1348172219.51.0.84674051024.issue15992@psf.upfronthosting.co.za> Message-ID: <1366397180.16.0.75451065505.issue15992@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:46:32 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 19 Apr 2013 18:46:32 +0000 Subject: [issue17123] Add OCSP support to ssl module In-Reply-To: <1359994472.8.0.804183286731.issue17123@psf.upfronthosting.co.za> Message-ID: <1366397192.03.0.0427153185776.issue17123@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:46:48 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 19 Apr 2013 18:46:48 +0000 Subject: [issue12489] email.errors.HeaderParseError if base64url is used In-Reply-To: <1309790300.23.0.111625308862.issue12489@psf.upfronthosting.co.za> Message-ID: <1366397208.01.0.767652082058.issue12489@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:49:21 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 19 Apr 2013 18:49:21 +0000 Subject: [issue16394] Reducing tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1366397361.86.0.149204845579.issue16394@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:49:41 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Apr 2013 18:49:41 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <1366397381.77.0.0555511579023.issue17729@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:52:14 2013 From: report at bugs.python.org (Eric Snow) Date: Fri, 19 Apr 2013 18:52:14 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366397534.97.0.0957565682113.issue17792@psf.upfronthosting.co.za> Eric Snow added the comment: FWIW this has come up before: http://mail.python.org/pipermail/python-dev/2012-October/122504.html and relatedly: issue16429 ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:57:24 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Apr 2013 18:57:24 +0000 Subject: [issue17705] Fill Character cannot be \0 In-Reply-To: <1365785695.21.0.22745237494.issue17705@psf.upfronthosting.co.za> Message-ID: <1366397844.48.0.753689959944.issue17705@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 20:59:27 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Apr 2013 18:59:27 +0000 Subject: [issue17714] str.encode('base64') add trailing new line character. It is not documented. In-Reply-To: <1365867569.46.0.547710519327.issue17714@psf.upfronthosting.co.za> Message-ID: <1366397967.78.0.921167612602.issue17714@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 21:02:38 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Apr 2013 19:02:38 +0000 Subject: [issue17718] boolop constant checking for if/while In-Reply-To: <1365873477.58.0.16753210186.issue17718@psf.upfronthosting.co.za> Message-ID: <1366398158.04.0.551982607836.issue17718@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 21:10:21 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Apr 2013 19:10:21 +0000 Subject: [issue17718] boolop constant checking for if/while In-Reply-To: <1365873477.58.0.16753210186.issue17718@psf.upfronthosting.co.za> Message-ID: <1366398621.69.0.166833803027.issue17718@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thank you for the patch. However, I don't think such "optimizations" are particularly useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 21:15:08 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 19 Apr 2013 19:15:08 +0000 Subject: [issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer In-Reply-To: <1300164402.79.0.766591131661.issue11549@psf.upfronthosting.co.za> Message-ID: <1366398908.12.0.165960010903.issue11549@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 21:30:14 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 19 Apr 2013 19:30:14 +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: <1366399814.61.0.158029836829.issue11698@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 21:37:02 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 19 Apr 2013 19:37:02 +0000 Subject: [issue17306] Improve the way abstract base classes are shown in help() In-Reply-To: <1361932149.15.0.421194254516.issue17306@psf.upfronthosting.co.za> Message-ID: <1366400222.79.0.705962637646.issue17306@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 21:38:01 2013 From: report at bugs.python.org (Phil Connell) Date: Fri, 19 Apr 2013 19:38:01 +0000 Subject: [issue16863] Python 2 error in Argparse tutorial In-Reply-To: <1357317464.45.0.840404790237.issue16863@psf.upfronthosting.co.za> Message-ID: <1366400281.42.0.642696841146.issue16863@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 22:02:15 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Apr 2013 20:02:15 +0000 Subject: [issue16394] Reducing tee() memory footprint In-Reply-To: <1351955719.4.0.453680036148.issue16394@psf.upfronthosting.co.za> Message-ID: <1366401735.52.0.358753243819.issue16394@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 22:18:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Apr 2013 20:18:53 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366402733.56.0.391953444227.issue17742@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: _PyBytesWriter and _PyUnicodeWriter have differen use cases. While _PyUnicodeWriter used primary in formatter where resulting size is rarely known and reallocation in decoders usually caused by widening result, _PyBytesWriter is used only in decoders where we usually can estimate a result size or it's upper bound. Resizing happened only in exceptional cases, when error handler called. The patch contains a special case for writing only one bytes object. This is very unlikely case. It happened only when an encoded string contains only one illegal character. I think this case is not worth a complication and obfuscation of the code. I think we should drop readonly attribute and a piece of the code (which looks buggy for me anyway). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 22:38:24 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Apr 2013 20:38:24 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366403904.73.0.653674450465.issue17618@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file29942/issue17618-5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 22:54:58 2013 From: report at bugs.python.org (Martin Morrison) Date: Fri, 19 Apr 2013 20:54:58 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366404898.82.0.132359958058.issue17646@psf.upfronthosting.co.za> Martin Morrison added the comment: How embarrassing - I guess that'll teach me to try to doctor the diff file. :-) I've now regenerated the diff, and re-run all the testing, etc. Apologies for the churn. ---------- Added file: http://bugs.python.org/file29943/issue17646-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 23:24:42 2013 From: report at bugs.python.org (Martin Morrison) Date: Fri, 19 Apr 2013 21:24:42 +0000 Subject: [issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer In-Reply-To: <1300164402.79.0.766591131661.issue11549@psf.upfronthosting.co.za> Message-ID: <1366406682.01.0.50225553229.issue11549@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 23:36:16 2013 From: report at bugs.python.org (Martin Morrison) Date: Fri, 19 Apr 2013 21:36:16 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1366407376.9.0.522699081957.issue16741@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 19 23:51:07 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Apr 2013 21:51:07 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366408267.36.0.43561776908.issue17732@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good, thanks! I assume you also tested it manually? I?ll take care of this for the next release. ---------- nosy: +georg.brandl, larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:02:55 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Apr 2013 22:02:55 +0000 Subject: [issue17735] inspect.findsource raises IndexError In-Reply-To: <1366030340.02.0.51431850328.issue17735@psf.upfronthosting.co.za> Message-ID: <1366408975.04.0.525085745771.issue17735@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- title: inspect.findsource throws IndexError -> inspect.findsource raises IndexError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:03:59 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Apr 2013 22:03:59 +0000 Subject: [issue17745] "packaging" no longer planned to be included In-Reply-To: <1366070463.53.0.324723238706.issue17745@psf.upfronthosting.co.za> Message-ID: <1366409039.12.0.881197425569.issue17745@psf.upfronthosting.co.za> ?ric Araujo added the comment: The role of the PEP was to announce changes; I don?t know if changing it now is useful, as the release is done and its release notes are accurate. ---------- assignee: docs at python -> georg.brandl components: -Distutils, Distutils2, Documentation nosy: +eric.araujo, georg.brandl -alexis, docs at python, tarek versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:05:14 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Apr 2013 22:05:14 +0000 Subject: [issue17761] platform._parse_release_file doesn't close the /etc/lsb-release file, doesn't know about 'Ubuntu' In-Reply-To: <1366123744.99.0.817269180469.issue17761@psf.upfronthosting.co.za> Message-ID: <1366409114.55.0.846828560998.issue17761@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 to with. The patch also includes an unrelated change. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:08:15 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Apr 2013 22:08:15 +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: <1366409295.92.0.29321378313.issue17762@psf.upfronthosting.co.za> ?ric Araujo added the comment: os-release finally provides a cross-OS release file with a specification. I think it should be authoritative, then the lsb-release system (it?s officially a script but many OSes just parse a static file), then OS-specific files. ---------- assignee: -> lemburg nosy: +eric.araujo, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:09:05 2013 From: report at bugs.python.org (Martin Morrison) Date: Fri, 19 Apr 2013 22:09:05 +0000 Subject: [issue12535] Chained tracebacks are confusing because the first traceback is minimal In-Reply-To: <1310405583.64.0.419150537523.issue12535@psf.upfronthosting.co.za> Message-ID: <1366409345.52.0.8272056596.issue12535@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:14:07 2013 From: report at bugs.python.org (Martin Morrison) Date: Fri, 19 Apr 2013 22:14:07 +0000 Subject: [issue14805] Support display of both __cause__ and __context__ In-Reply-To: <1336996839.56.0.43377861765.issue14805@psf.upfronthosting.co.za> Message-ID: <1366409647.67.0.42821452192.issue14805@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:24:41 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Apr 2013 22:24:41 +0000 Subject: [issue12535] Chained tracebacks are confusing because the first traceback is minimal In-Reply-To: <1310405583.64.0.419150537523.issue12535@psf.upfronthosting.co.za> Message-ID: <1366410281.51.0.857679407097.issue12535@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- type: behavior -> enhancement versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:43:30 2013 From: report at bugs.python.org (Todd Rovito) Date: Fri, 19 Apr 2013 22:43:30 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1366411410.2.0.463422588273.issue17642@psf.upfronthosting.co.za> Changes by Todd Rovito : ---------- nosy: +Todd.Rovito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 00:56:01 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Apr 2013 22:56:01 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366412161.16.0.81957650548.issue17646@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Also, this patch seems to break test_zipimport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 02:10:00 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 00:10:00 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366416600.23.0.189941801347.issue17646@psf.upfronthosting.co.za> Martin Morrison added the comment: print_tb() wasn't passing the file argument through to print_list() - now fixed. I also verified none of the other functions had a similar bug. ---------- Added file: http://bugs.python.org/file29944/issue17646-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 02:13:28 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 20 Apr 2013 00:13:28 +0000 Subject: [issue17745] "packaging" no longer planned to be included In-Reply-To: <1366070463.53.0.324723238706.issue17745@psf.upfronthosting.co.za> Message-ID: <1366416808.21.0.507997016544.issue17745@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: There should at least be a mention that 'packaging' is no longer planned to be included, to avoid any confusion/misinformation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 02:48:31 2013 From: report at bugs.python.org (Tomoki Imai) Date: Sat, 20 Apr 2013 00:48:31 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366418911.71.0.386778032832.issue15392@psf.upfronthosting.co.za> Tomoki Imai added the comment: I'm a student thinking of participating in Google Summer of Code. And want to work to create a unittest for IDLE. Using unittest.mock seemed to be good way to test GUI. But there is a problem. There is no unittest.mock in Python2. http://docs.python.org/2/library/unittest.html I think using third party mock seemed to be ok, but not best way. https://pypi.python.org/pypi/mock Because, IDLE is a part of official python. I think relying on third party module is not good. Of cource, I would forcus on non-GUI unittest. But GUI-test would be needed. ---------- nosy: +Tomoki.Imai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:10:49 2013 From: report at bugs.python.org (Roger Serwy) Date: Sat, 20 Apr 2013 02:10:49 +0000 Subject: [issue5492] Error on leaving IDLE with quit() or exit() under Linux In-Reply-To: <1237121077.76.0.63532373748.issue5492@psf.upfronthosting.co.za> Message-ID: <1366423849.57.0.901019237914.issue5492@psf.upfronthosting.co.za> Roger Serwy added the comment: Good catch Terry! I've been testing using "python -m idlelib.idle" instead of importing it from an interactive prompt. I'll need to remember to consider that test vector in the future. I figured out why those messages are popping up. The Tk event loop remains running when in the interactive Python REPL due to a PyOS_InputHook driving the Tk loop periodically. Some .after callbacks expire and Tcl tries calling into a Python function that no longer exists. The ColorDelegator's recolorize() and PyShell's poll_subprocess() are the callbacks. (Adding a "print(name, func)" to the after() function in Lib/tkinter/__init__.py revealed the link between the Tcl reference name and the Python reference name.) The extra ColorDelegator call is actually a bug, related to #13495. (I need to expand it that issue to include this new problem.) Two ColorDelegators get loaded, and only one gets its close() method called which properly cancels the .after callback into recolorize. The "orphaned" ColorDelegator still exists in the delegator chain with an active .after callback. Once both those .after callbacks are canceled, then the error messages Terry sees are no longer shown. The rev1 patch includes extra code to handle cancellation of the poll_subprocess .after callback. I'll be posting the multi-color delegator fix to #13495. ---------- dependencies: +IDLE: Regressions - Two ColorDelegator instances loaded and -e no longer edits new files. Added file: http://bugs.python.org/file29945/issue5492_rev1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:16:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Apr 2013 02:16:31 +0000 Subject: [issue9607] Test file 'test_keyword.py' submission for use with keyword.py In-Reply-To: <1281849348.53.0.810648733764.issue9607@psf.upfronthosting.co.za> Message-ID: <3ZsyNG4VnhzSVM@mail.python.org> Roundup Robot added the comment: New changeset 0ad18bb85371 by R David Murray in branch 'default': #9607: Add tests for the keyword module. http://hg.python.org/cpython/rev/0ad18bb85371 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:19:19 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Apr 2013 02:19:19 +0000 Subject: [issue9607] Test file 'test_keyword.py' submission for use with keyword.py In-Reply-To: <1281849348.53.0.810648733764.issue9607@psf.upfronthosting.co.za> Message-ID: <1366424359.73.0.0859293919478.issue9607@psf.upfronthosting.co.za> R. David Murray added the comment: Wow, it sure took me a long time to get back to this. Greg, the test ideas in your patch were great, and I used them all, but I wound up rewriting the actual code to better match the style of our other unit tests, and also to take advantage of some of our test infrastructure that should (I hope) allow the tests to run correctly on Windows as well as unix. Thanks for your work, and sorry it took me so long to do something with it. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: behavior -> enhancement versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:32:06 2013 From: report at bugs.python.org (Roger Serwy) Date: Sat, 20 Apr 2013 02:32:06 +0000 Subject: [issue13495] IDLE: Regressions - Two ColorDelegator instances loaded In-Reply-To: <1322510218.36.0.927250562508.issue13495@psf.upfronthosting.co.za> Message-ID: <1366425126.35.0.784110642657.issue13495@psf.upfronthosting.co.za> Roger Serwy added the comment: I will split the "good_load" flag bug into its own issue. While addressing a bug in #5492, another doubled-up ColorDelegator problem appeared, tracing back to #1586. The dual_delagators patch removes the code which loads the extra color delegators as well as ensures that ResetColorizer loads a color delegator since ispythonsource() now always returns True in a PyShell instance. ---------- assignee: -> roger.serwy title: IDLE: Regressions - Two ColorDelegator instances loaded and -e no longer edits new files. -> IDLE: Regressions - Two ColorDelegator instances loaded versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file29946/dual_delegators.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:40:25 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Apr 2013 02:40:25 +0000 Subject: [issue9607] Test file 'test_keyword.py' submission for use with keyword.py In-Reply-To: <1281849348.53.0.810648733764.issue9607@psf.upfronthosting.co.za> Message-ID: <3Zsyvr418zzST7@mail.python.org> Roundup Robot added the comment: New changeset d499189e7758 by R David Murray in branch 'default': #9607: restore keywords.kwlist after testing it. http://hg.python.org/cpython/rev/d499189e7758 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:45:14 2013 From: report at bugs.python.org (Roger Serwy) Date: Sat, 20 Apr 2013 02:45:14 +0000 Subject: [issue17798] IDLE: can not edit new file names when using -e Message-ID: <1366425914.88.0.469107315169.issue17798@psf.upfronthosting.co.za> New submission from Roger Serwy: This is a split from #13495 as it is truly a separate issue. Here's a partial quote from msg151278: """ IDLE 3 no longer allows for editing of new files from the command line. For example: idle -e /tmp/newfile.py will momentarily flash an editor window before it is closed. This is due to "good_load" not being set. What's worse is that the IDLE process will continue running without having any visible windows open. """ Rather than remove the good_load behavior as was done in an earlier patch in #13495, I added an extra line in the initialization logic so that the editor can edit newly named files while still rejecting files that didn't load properly. ---------- assignee: roger.serwy components: IDLE files: goodload.patch keywords: patch messages: 187399 nosy: roger.serwy, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE: can not edit new file names when using -e type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29947/goodload.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:47:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Apr 2013 02:47:25 +0000 Subject: [issue13262] IDLE opens partially hidden In-Reply-To: <1319538134.39.0.210129529894.issue13262@psf.upfronthosting.co.za> Message-ID: <1366426045.32.0.733442316324.issue13262@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For me, this is currently about the most annoying behavior of IDLE. ---------- nosy: +roger.serwy versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:53:59 2013 From: report at bugs.python.org (Roger Serwy) Date: Sat, 20 Apr 2013 02:53:59 +0000 Subject: [issue13262] IDLE opens partially hidden In-Reply-To: <1319538134.39.0.210129529894.issue13262@psf.upfronthosting.co.za> Message-ID: <1366426439.47.0.301837181173.issue13262@psf.upfronthosting.co.za> Roger Serwy added the comment: Why not change the initial window size from 80x40 to 80x38? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:54:38 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 20 Apr 2013 02:54:38 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366426478.16.0.400911431893.issue17646@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It would be great to have a test for that. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 04:59:21 2013 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Apr 2013 02:59:21 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366426761.56.0.773952068638.issue17468@psf.upfronthosting.co.za> Guido van Rossum added the comment: Unless I'm the only person on earth who can understand this I beg to be left out of this bug. I just don't have the bandwidth right now to look into it. If it's really about GC and __del__ and generators, maybe Tim Peters would be willing to look into it? Or perhaps Neil Schemenauer, who IIRC did a lot of the early work on GC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 05:06:41 2013 From: report at bugs.python.org (Todd Rovito) Date: Sat, 20 Apr 2013 03:06:41 +0000 Subject: [issue7951] Should str.format allow negative indexes when used for __getitem__ access? In-Reply-To: <1266450859.13.0.906832569526.issue7951@psf.upfronthosting.co.za> Message-ID: <1366427201.11.0.159509771521.issue7951@psf.upfronthosting.co.za> Todd Rovito added the comment: Here is a simple patch that simply explains negative indexes and negative slices are not supported for the string format documentation. Perhaps more documentation needs to be created else where to help explain why all collections do not need to support negative indexes and negative slices? If so please let me know and I will create it. But I think this patch at least clarifies for the use case of String format. ---------- keywords: +patch versions: +Python 3.4 -Python 3.2 Added file: http://bugs.python.org/file29948/7951NegativeIndexesForStringFormat3dot4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 05:17:11 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Apr 2013 03:17:11 +0000 Subject: [issue13262] IDLE opens partially hidden In-Reply-To: <1319538134.39.0.210129529894.issue13262@psf.upfronthosting.co.za> Message-ID: <1366427831.84.0.940394617125.issue13262@psf.upfronthosting.co.za> Terry J. Reedy added the comment: That does not work because Idle just moves the window down to compensate. (It seems to take two openings to have that happen.) Even if that worked, I would still ask why I should have to make the window smaller, when I want it larger (44 lines), located where I want it (all visible). Why can't Idle act like a well-behaved Window app? Saving the last Window position and size is fairly common. In any case, Edit windows are opened near the top of the screen, as they ought to be, instead of almost touching the bottom. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 05:23:57 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 20 Apr 2013 03:23:57 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366428237.97.0.503700803179.issue17468@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 05:36:20 2013 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 20 Apr 2013 03:36:20 +0000 Subject: [issue17799] settrace docs are wrong about "c_call" events Message-ID: <1366428980.14.0.538502026896.issue17799@psf.upfronthosting.co.za> New submission from Ned Batchelder: Looking into this Stack Overflow question: http://stackoverflow.com/questions/16115027/pythons-sys-settrace-wont-create-c-call-events Reading the code in c_eval.c and friends, it looks like "c_call" events are never passed to the trace function, only to the profile function. The docs are wrong and should be fixed. The setprofile docs simply point to settrace for details, so the text needs to accommodate both functions' needs. ---------- assignee: docs at python components: Documentation messages: 187406 nosy: docs at python, nedbat priority: low severity: normal status: open title: settrace docs are wrong about "c_call" events versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 08:06:49 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 20 Apr 2013 06:06:49 +0000 Subject: [issue3693] Obscure array.array error message In-Reply-To: <1219801896.33.0.491668230509.issue3693@psf.upfronthosting.co.za> Message-ID: <1366438009.53.0.596200388198.issue3693@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here's a patch to fix the exception. ---------- keywords: +patch Added file: http://bugs.python.org/file29949/fix_array_err_msg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 08:30:49 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Apr 2013 06:30:49 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366439449.19.0.493146773076.issue17468@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'll create a separate issue for the tp_del -> __del__ question, since that's a language design decision that *does* need Guido's input, but doesn't relate to the broader question of generators, cycles and potential memory leaks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 08:38:21 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Apr 2013 06:38:21 +0000 Subject: [issue17800] Expose __del__ when tp_del is populated from C code Message-ID: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> New submission from Nick Coghlan: This came up in issue 17468: currently, populating tp_del from C (as generators now do) doesn't automatically create a __del__ wrapper visible from Python. The rationale given in the initial commit is that there's no need to define a wrapper, since tp_del won't be populated from C code (that will use tp_dealloc instead), but there's now at least one case where it *is* populated from C (generators), which means it behaves *as if* __del__ is defined (since the interpreter actually checks the tp_del slot), but *looks* like __del__ *isn't* defined (since there is no wrapper created). Independent of the memory leak concerns with generators defining tp_del, it would be better if a wrapper function was defined so the existence of the method was at least visible from Python code. ---------- components: Interpreter Core messages: 187409 nosy: ncoghlan priority: low severity: normal stage: needs patch status: open title: Expose __del__ when tp_del is populated from C code type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 08:40:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Apr 2013 06:40:14 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366440014.37.0.173162504598.issue17468@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 17800 is anyone wants to weigh in on the tp_del -> __del__ question (I ended up not adding Guido back to that one either, since the original design was based on an assumption that's now demonstrably false, so it makes sense to update the behaviour) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 09:21:11 2013 From: report at bugs.python.org (C Anthony Risinger) Date: Sat, 20 Apr 2013 07:21:11 +0000 Subject: [issue17801] Tools/scripts/gprof2html.py: `#! /usr/bin/env python32.3` Message-ID: <1366442471.25.0.489918291616.issue17801@psf.upfronthosting.co.za> New submission from C Anthony Risinger: http://hg.python.org/cpython/file/d499189e7758/Tools/scripts/gprof2html.py#l1 ...should be self explanatory. i didn't run into this myself, but i saw that the Archlinux package was fixing it via `sed`, without the customary link to upstream... so here it is ;) ---------- components: Demos and Tools messages: 187411 nosy: C.Anthony.Risinger priority: normal severity: normal status: open title: Tools/scripts/gprof2html.py: `#! /usr/bin/env python32.3` 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 Sat Apr 20 11:44:35 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 20 Apr 2013 09:44:35 +0000 Subject: [issue17800] Expose __del__ when tp_del is populated from C code In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366451075.96.0.964198316226.issue17800@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Would this mean that the destructor could be run more than once (or prematurely)? ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 11:44:53 2013 From: report at bugs.python.org (=?utf-8?b?QW5zc2kgS8Okw6RyacOkaW5lbg==?=) Date: Sat, 20 Apr 2013 09:44:53 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366451093.72.0.532401371988.issue17468@psf.upfronthosting.co.za> Anssi K??ri?inen added the comment: I wonder if it would be better to reword the garbage collection docs to mention that Python can't collect objects if they are part of a reference cycle, and some of the objects in the reference cycle need to run code at gc time. Then mention that such objects include objects with __del__ and also generators if they do have some other blocks than loops in them (for example try or with blocks). To me it seems this issue could be mitigated somewhat by collecting the objects if there is just one object with finalizer code in the cycle. It should be safe to run the single finalizer, then collect the whole cycle, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 12:04:07 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 10:04:07 +0000 Subject: [issue1635741] Interpreter seems to leak references after finalization Message-ID: <1366452247.07.0.892213428463.issue1635741@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz, pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 12:55:57 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 10:55:57 +0000 Subject: [issue17408] second python execution fails when embedding In-Reply-To: <1363183794.27.0.643296851621.issue17408@psf.upfronthosting.co.za> Message-ID: <1366455357.12.0.416990282305.issue17408@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz, pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 12:58:16 2013 From: report at bugs.python.org (Baptiste Mispelon) Date: Sat, 20 Apr 2013 10:58:16 +0000 Subject: [issue17802] html.HTMLParser raises UnboundLocalError: Message-ID: <1366455496.44.0.252693262326.issue17802@psf.upfronthosting.co.za> New submission from Baptiste Mispelon: When trying to parse the string `a&b`, the parser raises an UnboundLocalError: {{{ >>> from html.parser import HTMLParser >>> p = HTMLParser() >>> p.feed('a&b') >>> p.close() Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.3/html/parser.py", line 149, in close self.goahead(1) File "/usr/lib/python3.3/html/parser.py", line 252, in goahead if k <= i: UnboundLocalError: local variable 'k' referenced before assignment }}} Granted, the HTML is invalid, but this error looks like it might have been an oversight. ---------- components: Library (Lib) messages: 187414 nosy: bmispelon priority: normal severity: normal status: open title: html.HTMLParser raises UnboundLocalError: type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 13:13:21 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 11:13:21 +0000 Subject: [issue9634] Add timeout parameter to Queue.join() In-Reply-To: <1282153581.83.0.092560551276.issue9634@psf.upfronthosting.co.za> Message-ID: <1366456401.11.0.33907740697.issue9634@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 13:31:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 11:31:12 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1366451093.72.0.532401371988.issue17468@psf.upfronthosting.co.za> Message-ID: <1366457468.2512.15.camel@fsol> Antoine Pitrou added the comment: > I wonder if it would be better to reword the garbage collection docs > to mention that Python can't collect objects if they are part of a > reference cycle, and some of the objects in the reference cycle need > to run code at gc time. Then mention that such objects include objects > with __del__ and also generators if they do have some other blocks > than loops in them (for example try or with blocks). > > To me it seems this issue could be mitigated somewhat by collecting > the objects if there is just one object with finalizer code in the > cycle. It should be safe to run the single finalizer, then collect the > whole cycle, right? This is tricky because it relies on the fact that the object with finalizer will be collected before any objects the finalizer relies on. For a generator, this means it has to be finalized before its frame object is cleared (otherwise, the finally block can't execute correctly). However, the GC doesn't collect those objects directly. It calls tp_clear on each of them, hoping that tp_clear will break the reference cycle (and at the same time collect some of the objects in the cycle). But it's difficult to influence which objects are collected first. In gcgen.py's case, the reference cycle is comprised of the MyObj instance, the generator, and the generator's frame: `self` (MyObj) -> generator -> frame -> `self` (MyObj) So if `self` is collected first, it will collect the generator before the frame, and the generator's finally block can execute fine. But if the frame is collected first, it will clear itself and it will be too late for the generator's finally block to execute. And if the generator is collected first... well, it can't, as it doesn't have a tp_clear slot; but if it had, that would clear the frame and make the finally block uncallable. One might argue that a generator's tp_clear should call the finally block *before* clearing the frame. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 13:32:30 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Apr 2013 11:32:30 +0000 Subject: [issue17545] os.listdir and os.path.join inconsistent on empty path In-Reply-To: <1364228813.43.0.916487849633.issue17545@psf.upfronthosting.co.za> Message-ID: <1366457550.13.0.515802538985.issue17545@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 13:43:20 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Apr 2013 11:43:20 +0000 Subject: [issue17802] html.HTMLParser raises UnboundLocalError: In-Reply-To: <1366455496.44.0.252693262326.issue17802@psf.upfronthosting.co.za> Message-ID: <1366458200.27.0.65379726617.issue17802@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report. Yes, that's in a complicated bit of error recovery code, and clearly you found a path through it that doesn't have a corresponding test :) ---------- keywords: +easy nosy: +ezio.melotti, r.david.murray stage: -> needs patch type: crash -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 13:47:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 11:47:24 +0000 Subject: [issue17800] Expose __del__ when tp_del is populated from C code In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366458444.78.0.586527571281.issue17800@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sounds reasonable to me. Note that it won't remove the special-casing in gcmodule.c: static int has_finalizer(PyObject *op) { if (PyGen_CheckExact(op)) return PyGen_NeedsFinalizing((PyGenObject *)op); else return op->ob_type->tp_del != NULL; } ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 13:48:08 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 20 Apr 2013 11:48:08 +0000 Subject: [issue17802] html.HTMLParser raises UnboundLocalError: In-Reply-To: <1366455496.44.0.252693262326.issue17802@psf.upfronthosting.co.za> Message-ID: <1366458488.95.0.0518687237159.issue17802@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 13:57:47 2013 From: report at bugs.python.org (Yasuhiro Fujii) Date: Sat, 20 Apr 2013 11:57:47 +0000 Subject: [issue17803] Calling Tkinter.Tk() with a baseName keyword argument throws UnboundLocalError Message-ID: <1366459067.56.0.563805479218.issue17803@psf.upfronthosting.co.za> New submission from Yasuhiro Fujii: Calling Tkinter.Tk() with baseName keyword argument throws UnboundLocalError on Python 2.7.4. A process to reproduce the bug: >>> import Tkinter >>> Tkinter.Tk(baseName="test") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1748, in __init__ if not sys.flags.ignore_environment: UnboundLocalError: local variable 'sys' referenced before assignment A patch to fix the bug: --- Lib/lib-tk/Tkinter.py.orig +++ Lib/lib-tk/Tkinter.py @@ -1736,7 +1736,7 @@ # ensure that self.tk is always _something_. self.tk = None if baseName is None: - import sys, os + import os baseName = os.path.basename(sys.argv[0]) baseName, ext = os.path.splitext(baseName) if ext not in ('.py', '.pyc', '.pyo'): ---------- components: Tkinter messages: 187418 nosy: y-fujii priority: normal severity: normal status: open title: Calling Tkinter.Tk() with a baseName keyword argument throws UnboundLocalError type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 14:19:32 2013 From: report at bugs.python.org (=?utf-8?b?QW5zc2kgS8Okw6RyacOkaW5lbg==?=) Date: Sat, 20 Apr 2013 12:19:32 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366460372.15.0.650901872155.issue17468@psf.upfronthosting.co.za> Anssi K??ri?inen added the comment: I was imagining that the collection should happen in two passes. First check for tp_dels and call them if safe (single tp_del in cycle allowed). Then free the memory. The first pass is already there, it just doesn't collect callable tp_dels. If it would be possible to turn an object into inaccessible state after tp_del was called it would be possible to call multiple tp_dels in a cycle. If the del tries to use already deleted object you will get some sort of runtime exception indicating access of already collected object (another option is to allow access to object which has already had __del__ called, but that seems problematic). Now, both of the above are likely way more complicated to implement than what I imagine. I have very little knowledge of the technical details involved. If I understand correctly your idea was to do something similar to above, but only for generators. The current situation is somewhat ugly. First, I can imagine people wishing to do try-finally or something "with self.lock:" in a generator. These will leak in circular reference cases. The generator case is surprising, so surprising that even experienced programmers will do such mistakes (see the django ticket for one example). Second, from application programmers perspective the fact that __del__ wasn't called is usually similar to having a silent failure in their code - for example this can result in leaking database connections or other resources, not to mention possible problems if one has a "with self.lock:" block in a generator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 14:30:43 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 12:30:43 +0000 Subject: [issue14531] Backtrace should not attempt to open file In-Reply-To: <1333911683.02.0.244330903259.issue14531@psf.upfronthosting.co.za> Message-ID: <1366461043.64.0.613249166257.issue14531@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 14:41:29 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Apr 2013 12:41:29 +0000 Subject: [issue17272] request.full_url: unexpected results on assignment In-Reply-To: <1361512602.9.0.97298415685.issue17272@psf.upfronthosting.co.za> Message-ID: <1366461689.32.0.575841742945.issue17272@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for working on this, Demian. I made some review comments, mostly style things about the tests. There's one substantial comment about the change in behaivor of the full_url property though (before patch it does not include the fragment, after the patch it does). We need to think about the implications of that change in terms of backward compatibility. It makes more sense, but how likely is it to break working code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 15:02:32 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 20 Apr 2013 13:02:32 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366462952.91.0.91054671211.issue17795@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- hgrepos: +183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 15:03:01 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 20 Apr 2013 13:03:01 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366462981.49.0.0126485375494.issue17795@psf.upfronthosting.co.za> Changes by Vinay Sajip : Added file: http://bugs.python.org/file29950/6e46f4e08717.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 15:08:21 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 20 Apr 2013 13:08:21 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366463301.24.0.307287399986.issue17795@psf.upfronthosting.co.za> Vinay Sajip added the comment: I've attached an alternative patch. The default socktype stays as socket.SOCK_DGRAM, but you can specify socktype=None to get the SOCK_DGRAM falling back to SOCK_STREAM behaviour. Can you confirm that this alternative approach works in your environment? (This patch is against the default branch.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 15:14:56 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Apr 2013 13:14:56 +0000 Subject: [issue17803] Calling Tkinter.Tk() with a baseName keyword argument throws UnboundLocalError In-Reply-To: <1366459067.56.0.563805479218.issue17803@psf.upfronthosting.co.za> Message-ID: <1366463696.06.0.550104152012.issue17803@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report and patch. It would be nice to turn that test into a unit test. I've run the test on 3.4; this appears to be a 2.7 only bug. ---------- nosy: +r.david.murray stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 15:19:43 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 20 Apr 2013 13:19:43 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366463983.04.0.0778469066172.issue17468@psf.upfronthosting.co.za> Benjamin Peterson added the comment: In a sense, doing something like "with self.lock" in a generator is already a leak. Even if there wasn't a cycle, collection could be arbitrarily delayed (in partincular on non-CPython VMs). I wonder if making generators context managers which call close() on exit would help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 15:27:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 13:27:23 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1366463983.04.0.0778469066172.issue17468@psf.upfronthosting.co.za> Message-ID: <1366464441.2512.25.camel@fsol> Antoine Pitrou added the comment: Those are two different issues: - not calling the finalizer in a timely manner - never calling the finalizer and creating a memory leak through gc.garbage ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 15:29:54 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 13:29:54 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1366464594.99.0.80449612267.issue14621@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz, pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 15:33:36 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 20 Apr 2013 13:33:36 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366464816.14.0.475507864589.issue17468@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I realize, but if people were responsible and closed their generators, the second one would be as much of a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:01:27 2013 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 20 Apr 2013 14:01:27 +0000 Subject: [issue6359] pyexpat.c calls trace function incorrectly for exceptions In-Reply-To: <1246229003.36.0.107970043042.issue6359@psf.upfronthosting.co.za> Message-ID: <1366466487.04.0.308314983207.issue6359@psf.upfronthosting.co.za> Ned Batchelder added the comment: Attached a patch which simply removes the code that invokes the trace function. ---------- keywords: +patch Added file: http://bugs.python.org/file29951/6539.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:06:35 2013 From: report at bugs.python.org (koobs) Date: Sat, 20 Apr 2013 14:06:35 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1366466795.39.0.554842331373.issue17192@psf.upfronthosting.co.za> koobs added the comment: These break what was addressed in #11729 for default, 3,x and 3.3. 2.7 seems to have made it through unscathed. I'm not sure where or how the old code was introduced, but the clang fix has been upstreamed and is correct in the pure libffi 3.0.13 sources Failure to build ctypes can be seen here: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%2Bclang%203.x/builds/1246/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%2Bclang%203.x/builds/1245/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%2Bclang%203.3/builds/538/steps/test/logs/stdio ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:27:32 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 20 Apr 2013 14:27:32 +0000 Subject: [issue17800] Expose __del__ when tp_del is populated from C code In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366468052.4.0.102370042015.issue17800@psf.upfronthosting.co.za> Benjamin Peterson added the comment: What exactly would calling such a wrapper do? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:28:35 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 14:28:35 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1366426478.16.0.400911431893.issue17646@psf.upfronthosting.co.za> Message-ID: <5172A611.6020904@ensoft.co.uk> Martin Morrison added the comment: On 20/04/2013 03:54, Benjamin Peterson wrote: > It would be great to have a test for that. :) I was afraid you'd say that. ;-) I'll look at adding test cases to cover the functions not currently covered (seems most of the print functions aren't, and all of the 'stack' functions aren't). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:29:43 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 14:29:43 +0000 Subject: [issue17800] Expose __del__ when tp_del is populated from C code In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366468183.63.0.22562155018.issue17800@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:33:04 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Apr 2013 14:33:04 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1366468384.26.0.870343811908.issue17192@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:38:57 2013 From: report at bugs.python.org (koobs) Date: Sat, 20 Apr 2013 14:38:57 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1366468737.29.0.967002613894.issue17656@psf.upfronthosting.co.za> koobs added the comment: heads-up: Tests are still failing on FreeBSD (gcc & clang) buildbots: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%202.7/builds/472/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%2Bclang%202.7/builds/468/steps/test/logs/stdio ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:47:58 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 20 Apr 2013 14:47:58 +0000 Subject: [issue17800] Expose __del__ when tp_del is populated from C code In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366469278.32.0.908511275236.issue17800@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:55:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Apr 2013 14:55:34 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366469734.15.0.287079498013.issue17468@psf.upfronthosting.co.za> Nick Coghlan added the comment: We can't make ordinary generators innately context managers, as it makes the error too hard to detect when you accidentally leave out @contextmanager when using a generator to write a custom one. You can already use contextlib.closing to forcibly close them when appropriate, so providing a decorator to implicitly map __exit__ to close wouldn't really save much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 16:57:44 2013 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 20 Apr 2013 14:57:44 +0000 Subject: [issue968063] Add fileinput.islastline() Message-ID: <1366469863.98.0.431678744301.issue968063@psf.upfronthosting.co.za> Mark Lawrence added the comment: The latest patch still applies cleanly, can we have it reviewed please. ---------- nosy: +BreamoreBoy versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 17:12:14 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 20 Apr 2013 15:12:14 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366470734.49.0.846688620401.issue17792@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Ezio, the problem with your patch is that it also gives a warning on this code, which is totally safe: def good(): exc = None try: bar(int(sys.argv[1])) except KeyError as e: print('ke') exc = e except ValueError as e: print('ve') exc = e print(exc) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 17:12:20 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Apr 2013 15:12:20 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366470740.88.0.874457532153.issue17468@psf.upfronthosting.co.za> Nick Coghlan added the comment: To get back to Anssi's original suggestion... I think Anssi's proposal to allow finalisation to be skipped for try/except/else is legitimate. It's only finally clauses that we try to guarantee will execute, there's no such promise implied for ordinary except clauses. We *don't care* if the generator *would* have caught the thrown GeneratorExit, we only care about ensuring that finally blocks are executed (including those implied by with statements). So if there aren't any finally clauses or with statements in the block stack, we should be able to just let the generator and frame get collected (as Anssi suggested), without trying to allow execution to complete. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 17:27:33 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Apr 2013 15:27:33 +0000 Subject: [issue17800] Expose __del__ when tp_del is populated from C code In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366471653.17.0.421604195514.issue17800@psf.upfronthosting.co.za> Nick Coghlan added the comment: Calling __del__ explicitly shouldn't be any worse than doing the same thing for any other type implemented in Python (or, in the case of generators, calling close() multiple times). What I'm mostly interested in is the "can this type cause uncollectable cycles" introspection aspect. However, as Antoine noted, generators are an interesting special case because the GC is able to *skip* finalising them in some cases, so exposing __del__ isn't right for them either (as that suggests they will *always* be uncollectable in a cycle, when that isn't the case). So now I'm wondering if a better answer may be to generalise the current generator special case to a "__needsdel__" protocol: provide a __del__ method, but always make it possible for the GC to skip it when it wouldn't do anything (e.g. if you've already called close() explicitly). PyGenerator_NeedsFinalizing would then become the __needsdel__ impl for generators, and we could lose the special casing in the GC code. From Python, you could detect the three cases through: __del__ only: can cause uncollectable cycles __del__and __needsdel__: can cause uncollectable cycles, but it depends on the instance state Neither: can't cause uncollectable cycles ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 17:44:12 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 20 Apr 2013 15:44:12 +0000 Subject: [issue17800] Expose __del__ when tp_del is populated from C code In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366472652.1.0.281343699595.issue17800@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I don't understand why we need to invent a protocol for this. The gc module already has methods and members for introspecting the collection. I don't think the gen special casing currently needs to be generalized. (What would use it?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 17:53:29 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 15:53:29 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1366470740.88.0.874457532153.issue17468@psf.upfronthosting.co.za> Message-ID: <1366473206.2623.1.camel@fsol> Antoine Pitrou added the comment: > We *don't care* if the generator *would* have caught the thrown > GeneratorExit, we only care about ensuring that finally blocks are > executed (including those implied by with statements). So if there > aren't any finally clauses or with statements in the block stack, we > should be able to just let the generator and frame get collected (as > Anssi suggested), without trying to allow execution to complete. That's a good point. I'm also contemplating that the generator close() could be done from the *frame*'s tp_clear, which would sidestep the issue of collect order entirely: the finally block doesn't actually need the generator to execute, it only needs the frame and its locals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 18:01:18 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 20 Apr 2013 16:01:18 +0000 Subject: [issue17800] Add gc.needs_finalizing() to check if an object needs finalising In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366473678.19.0.447520568548.issue17800@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, I've figured out that rather than exposing __del__ if tp_del is populated, or generalising the generator special case, the simplest way to make this info accessible is to be able to ask the *garbage collector* if it thinks an object needs finalising. That actually makes this a pretty easy issue (as C issues go) - it's just a matter of exposing http://hg.python.org/cpython/file/default/Modules/gcmodule.c#l525 (has_finalizer) as gc.needs_finalizing. It will be easier once #17468 is done though, since that will make it clearer what the documentation should say. ---------- dependencies: +Generator memory leak keywords: +easy title: Expose __del__ when tp_del is populated from C code -> Add gc.needs_finalizing() to check if an object needs finalising _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 18:21:09 2013 From: report at bugs.python.org (Alex Leach) Date: Sat, 20 Apr 2013 16:21:09 +0000 Subject: [issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8 In-Reply-To: <1364240036.0.0.495843553762.issue17547@psf.upfronthosting.co.za> Message-ID: <1366474869.53.0.288690678179.issue17547@psf.upfronthosting.co.za> Alex Leach added the comment: The configure.ac patch works for me, on x86_64 Arch Linux. I just updated to GCC-4.8.0 and came across an overwhelming number of these warnings when compiling extension modules. Thanks for the simple fix David. Tested on hg branch 2.7; the testsuite completes without error. ---------- nosy: +Alex.Leach versions: -Python 2.6, Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 19:21:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Apr 2013 17:21:53 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <3ZtLSx19CgzNwL@mail.python.org> Roundup Robot added the comment: New changeset 97834382c6cc by Antoine Pitrou in branch 'default': Issue #16694: Add a pure Python implementation of the operator module. http://hg.python.org/cpython/rev/97834382c6cc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 19:22:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 17:22:45 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1366478565.35.0.504374331367.issue16694@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've now commited the latest patch. Thank you very much, Zachary! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 19:40:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Apr 2013 17:40:57 +0000 Subject: [issue17409] resource.setrlimit doesn't respect -1 In-Reply-To: <1363187915.96.0.919342054358.issue17409@psf.upfronthosting.co.za> Message-ID: <3ZtLtw4jDkzSB8@mail.python.org> Roundup Robot added the comment: New changeset 186f6bb3e46a by R David Murray in branch '3.3': #17409: Document RLIM_INFINITY and use it to clarify the setrlimit docs. http://hg.python.org/cpython/rev/186f6bb3e46a New changeset 9c4db76d073e by R David Murray in branch '2.7': #17409: Document RLIM_INFINITY and use it to clarify the setrlimit docs. http://hg.python.org/cpython/rev/9c4db76d073e New changeset f1d95b0ab66e by R David Murray in branch 'default': Merge #17409: Document RLIM_INFINITY and use it to clarify the setrlimit docs. http://hg.python.org/cpython/rev/f1d95b0ab66e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 19:41:52 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Apr 2013 17:41:52 +0000 Subject: [issue17409] resource.setrlimit doesn't respect -1 In-Reply-To: <1363187915.96.0.919342054358.issue17409@psf.upfronthosting.co.za> Message-ID: <1366479712.45.0.778491849422.issue17409@psf.upfronthosting.co.za> R. David Murray added the comment: There being no objection :) I've committed the patch. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 19:48:44 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 20 Apr 2013 17:48:44 +0000 Subject: [issue16942] urllib still doesn't support persistent connections In-Reply-To: <1357978376.78.0.27832756308.issue16942@psf.upfronthosting.co.za> Message-ID: <1366480124.88.0.742826347127.issue16942@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Agree with Demian Brecht. This issue is being closed in when two issues cover the requirements discussed here. * issue# 16901 - For Enhancing FileCookieJar * issue# 9740 - For supporting persistant HTTP 1.1 connections. (:-( on me) ---------- nosy: +orsenthil resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> In http.cookiejar.FileCookieJar() the .load() and .revert() methods don't work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 19:55:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Apr 2013 17:55:41 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366480541.35.0.687589558731.issue17646@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could print_exception() in Lib/idlelib/run.py reuse new traceback functions? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 19:57:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Apr 2013 17:57:07 +0000 Subject: [issue14805] Support display of both __cause__ and __context__ In-Reply-To: <1336996839.56.0.43377861765.issue14805@psf.upfronthosting.co.za> Message-ID: <1366480627.95.0.481606309167.issue14805@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And don't forget about print_exception() in Lib/idlelib/run.py. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 20:08:06 2013 From: report at bugs.python.org (Paul Price) Date: Sat, 20 Apr 2013 18:08:06 +0000 Subject: [issue17409] resource.setrlimit doesn't respect -1 In-Reply-To: <1363187915.96.0.919342054358.issue17409@psf.upfronthosting.co.za> Message-ID: <1366481286.5.0.232507392707.issue17409@psf.upfronthosting.co.za> Paul Price added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 20:09:09 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 20 Apr 2013 18:09:09 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1366481349.32.0.886973209358.issue9682@psf.upfronthosting.co.za> R. David Murray added the comment: The message in both branches of the if talk about empty labels, which is probably my fault since I got the sense of the if wrong in my suggestion. One of them should be about the label being too long. The one that should be the 'empty' message also doesn't read right to my eyes. As I said I think it should be something like: '"empty label in %r" % result.decode()'. Also, in looking at the module code, there are several other places where the size check and simple message are used. In all of these cases the string has already been confirmed to be (or converted to, in the case of the punycoding) ASCII. So we can abstract this check into a function and call it from all those locations. Do you want to update the patch accordingly, Mike? It will need more tests. ---------- assignee: loewis -> type: enhancement -> behavior versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 20:30:01 2013 From: report at bugs.python.org (Mike Lundy) Date: Sat, 20 Apr 2013 18:30:01 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366482601.15.0.294391922052.issue17795@psf.upfronthosting.co.za> Mike Lundy added the comment: It doesn't fix it unless I change the configuration (and in some cases the code) for every SyslogHandler across all of our projects, plus every single library we use. Google around For "SysLogHandler /dev/log socktype" and then compare with "SysLogHandler /dev/log". You won't find many hits where people set socktype, because people knew that SyslogHandler just Did The Right Thing when presented with an AF_UNIX. That has been the behavior since the logging module was introduced in 2.3. I'm just asking that you preserve the default behavior that has existed since python 2.3- that was the purpose of my patch. I'm not tied to how I implemented it (I mean, it is kind of ugly) but I believe preserving the behavior is important, and I also believe that it will break less code than what is currently there (because, after all, socktype was only introduced in 2.7, the SysLogHandler doesn't care if it's None, and subclasses couldn't have relied on it in the AF_UNIX case because the original fallback didn't update it) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 20:32:39 2013 From: report at bugs.python.org (Alex Leach) Date: Sat, 20 Apr 2013 18:32:39 +0000 Subject: [issue4934] tp_del and tp_version_tag undocumented In-Reply-To: <1231869285.41.0.170645063597.issue4934@psf.upfronthosting.co.za> Message-ID: <1366482759.49.0.330968043051.issue4934@psf.upfronthosting.co.za> Alex Leach added the comment: I've just ran into tp_version_tag, when running the boost python testsuite and wondered what it was... Since upgrading to GCC 4.8, I've started to get a lot more warnings with Python extensions, e.g.:- boost/python/opaque_pointer_converter.hpp:122:14: warning: missing initializer for member ?_typeobject::tp_version_tag? [-Wmissing-field-initializers] In this instance the testsuite was made to compile with the '-Wextra' flag. The fix was pretty simple; add another zero to the opaque_pointer_convert struct. I have used the following preprocessor macro to test whether or not to do this. Would this be a good way to test for the addition? #if PY_VERSION_HEX >= 0x02060000 0, /* tp_version_tag */ #endif Cheers, Alex ---------- nosy: +Alex.Leach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 21:16:46 2013 From: report at bugs.python.org (Philip Jenvey) Date: Sat, 20 Apr 2013 19:16:46 +0000 Subject: [issue14805] Support display of both __cause__ and __context__ In-Reply-To: <1336996839.56.0.43377861765.issue14805@psf.upfronthosting.co.za> Message-ID: <1366485406.07.0.470052337647.issue14805@psf.upfronthosting.co.za> Philip Jenvey added the comment: and the code module (after #17442 is resolved) ---------- nosy: +pjenvey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 21:26:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Apr 2013 19:26:41 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1366486001.94.0.642445078057.issue17656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:00:05 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Apr 2013 20:00:05 +0000 Subject: [issue17785] Use faster URL shortener for perf.py In-Reply-To: <1366242777.62.0.0914691479989.issue17785@psf.upfronthosting.co.za> Message-ID: <3ZtPzS32pnzR1h@mail.python.org> Roundup Robot added the comment: New changeset 1488e1f55f61 by Alexandre Vassalotti in branch 'default': Issue #17785: Use a faster URL shortener for perf.py http://hg.python.org/benchmarks/rev/1488e1f55f61 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:00:47 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 20 Apr 2013 20:00:47 +0000 Subject: [issue17785] Use faster URL shortener for perf.py In-Reply-To: <1366242777.62.0.0914691479989.issue17785@psf.upfronthosting.co.za> Message-ID: <1366488047.62.0.0448889187359.issue17785@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:05:23 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Apr 2013 20:05:23 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1366488323.6.0.156694097497.issue17656@psf.upfronthosting.co.za> Christian Heimes added the comment: it seems like file() can't handle unicode file names on FreeBSD. The FS encoding is 'US-ASCII' on Snakebite's FreeBSD box. > /home/cpython/users/christian.heimes/2.7/Lib/zipfile.py(1078)_extract_member() -> with self.open(member, pwd=pwd) as source, \ (Pdb) self.open(member, pwd=pwd) (Pdb) n > /home/cpython/users/christian.heimes/2.7/Lib/zipfile.py(1079)_extract_member() -> file(targetpath, "wb") as target: (Pdb) file(targetpath, "wb") *** UnicodeEncodeError: 'ascii' codec can't encode characters in position 47-48: ordinal not in range(128) (Pdb) sys.getfilesystemencoding() 'US-ASCII' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:28:11 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Apr 2013 20:28:11 +0000 Subject: [issue17720] pickle.py's load_appends should call append() on objects other than lists In-Reply-To: <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za> Message-ID: <3ZtQbv0pCNzPVn@mail.python.org> Roundup Robot added the comment: New changeset 37139694aed0 by Alexandre Vassalotti in branch '3.3': Isuse #17720: Fix APPENDS handling in the Python implementation of Unpickler http://hg.python.org/cpython/rev/37139694aed0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:30:03 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 20 Apr 2013 20:30:03 +0000 Subject: [issue17720] pickle.py's load_appends should call append() on objects other than lists In-Reply-To: <1365876289.91.0.454785839611.issue17720@psf.upfronthosting.co.za> Message-ID: <1366489803.8.0.994843956689.issue17720@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:33:23 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 20:33:23 +0000 Subject: [issue17804] streaming struct unpacking Message-ID: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> New submission from Antoine Pitrou: For certain applications, you want to unpack repeatedly the same pattern. This came in issue17618 (base85 decoding), where you want to unpack a stream of bytes as 32-bit big-endian unsigned ints. The solution adopted in issue17618 patch (struct.Struct("!{}I")) is clearly suboptimal. I would suggest something like a iter_unpack() function which would repeatedly yield tuples until the bytes object is over. ---------- components: Library (Lib) messages: 187455 nosy: mark.dickinson, meador.inge, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: streaming struct unpacking type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:37:55 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 20:37:55 +0000 Subject: [issue17530] pprint could use line continuation for long bytes literals In-Reply-To: <1364067577.46.0.261047534718.issue17530@psf.upfronthosting.co.za> Message-ID: <1366490275.67.0.613399841673.issue17530@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I hadn't noticed that pretty-printing a single string didn't add the parentheses as desired: >>> pprint.pprint("abcd " * 6, width=15) 'abcd abcd ' 'abcd abcd ' 'abcd abcd ' On the other hand, the added parentheses aren't needed when inside a container (line continuations will work without them). (and of course the same rules should apply to bytes objects :-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:39:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 20:39:07 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366490347.67.0.987515209321.issue17804@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (my initial intuition here was to use memoryview.cast() but it doesn't support non-native formats) ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 22:41:18 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 20 Apr 2013 20:41:18 +0000 Subject: [issue17787] Optimize pickling function dispatch in hot loops. In-Reply-To: <1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> Message-ID: <1366490478.43.0.605666472008.issue17787@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Are you asking why do we need to call both PyMemoTable_Get and memo_get? Or, why do we fetching the memo was moved to the save functions? For the former, there is no real reason. The extra call could be removed though profiling doesn't show this call as a hot spot. If the latter, we need this because the patch allow save(), which is where the memo was fetched, to be skipped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:08:48 2013 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Apr 2013 21:08:48 +0000 Subject: [issue17801] Tools/scripts/gprof2html.py: `#! /usr/bin/env python32.3` In-Reply-To: <1366442471.25.0.489918291616.issue17801@psf.upfronthosting.co.za> Message-ID: <3ZtRVl4yQDzRKs@mail.python.org> Roundup Robot added the comment: New changeset 0c308d65d7bc by Ned Deily in branch '2.7': Issue #17801: fix shebang line of gprof2html.py http://hg.python.org/cpython/rev/0c308d65d7bc New changeset 354e4d096c34 by Ned Deily in branch '3.3': Issue #17801: fix shebang line of gprof2html.py http://hg.python.org/cpython/rev/354e4d096c34 New changeset 47f392d6547d by Ned Deily in branch 'default': Issue #17801: fix shebang line of gprof2html.py http://hg.python.org/cpython/rev/47f392d6547d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:10:02 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Apr 2013 21:10:02 +0000 Subject: [issue17801] Tools/scripts/gprof2html.py: `#! /usr/bin/env python32.3` In-Reply-To: <1366442471.25.0.489918291616.issue17801@psf.upfronthosting.co.za> Message-ID: <1366492202.64.0.126887988642.issue17801@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report! ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:18:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Apr 2013 21:18:05 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1366492685.04.0.119849418636.issue17656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which skips test_extract_unicode_filenames if no Unicode filesystem semantics on this platform. ---------- Added file: http://bugs.python.org/file29952/test_extract_unicode_filenames_skip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:18:08 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 21:18:08 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1366480541.35.0.687589558731.issue17646@psf.upfronthosting.co.za> Message-ID: <0CC88CCD-B117-41AE-929E-BC9BD41EA042@ensoft.co.uk> Martin Morrison added the comment: On 20 Apr 2013, at 18:55, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > Could print_exception() in Lib/idlelib/run.py reuse new traceback functions? Actually, cleaning up code like that in Idle and the code module and import.c was what I was aiming to solve when I stumbled upon the duplication in traceback.py - once this patch is in, I plan to raise a separate issue with my suggestion for that clean up. To answer your question directly, the changes I've made here don't solve the problem, no. More invasive changes are required, which is why I raised this cleanup portion of my change separately (on the assumption this change alone wouldn't be controversial, but my wider change might be). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:25:20 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Apr 2013 21:25:20 +0000 Subject: [issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8 In-Reply-To: <1364240036.0.0.495843553762.issue17547@psf.upfronthosting.co.za> Message-ID: <1366493120.18.0.474390797895.issue17547@psf.upfronthosting.co.za> Ned Deily added the comment: Dave, any reason this shouldn't go into the imminent 2.7.5 and 3.3.2 releases? ---------- nosy: +ned.deily stage: patch review -> commit review versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:26:47 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 20 Apr 2013 21:26:47 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366493207.31.0.480566333349.issue17795@psf.upfronthosting.co.za> Vinay Sajip added the comment: Does that mean that if I just change the default back to socktype=None, that will be good enough? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:36:53 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 21:36:53 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366493813.35.0.626997906858.issue17804@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch (still lacking docs). Comments welcome. ---------- keywords: +patch Added file: http://bugs.python.org/file29953/iter_unpack.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:37:44 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 21:37:44 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366493864.97.0.100963977919.issue17804@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:41:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 21:41:39 +0000 Subject: [issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8 In-Reply-To: <1364240036.0.0.495843553762.issue17547@psf.upfronthosting.co.za> Message-ID: <1366494099.01.0.577308657983.issue17547@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, georg.brandl, larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:44:09 2013 From: report at bugs.python.org (Takafumi Arakaki) Date: Sat, 20 Apr 2013 21:44:09 +0000 Subject: [issue17805] No such class: multiprocessing.pool.AsyncResult Message-ID: <1366494249.42.0.0654021028594.issue17805@psf.upfronthosting.co.za> New submission from Takafumi Arakaki: Document mentions AsyncResult but there is no such class. http://docs.python.org/2/library/multiprocessing.html#multiprocessing.pool.AsyncResult You can check it by simply running: python -c 'from multiprocessing.pool import AsyncResult' I think it means ApplyResult so I made a patch (attached). Note that there managers.py also uses name 'AsyncResult': % hg grep AsyncResult Doc/library/multiprocessing.rst:83232:.. class:: AsyncResult Lib/multiprocessing/managers.py:81039: 'apply_async': 'AsyncResult', Lib/multiprocessing/managers.py:81039: 'map_async': 'AsyncResult', Lib/multiprocessing/managers.py:81039: 'starmap_async': 'AsyncResult', Lib/multiprocessing/managers.py:81039:SyncManager.register('AsyncResult', create_method=False) Probably renaming them would be better? ---------- assignee: docs at python components: Documentation files: ApplyResult.patch keywords: patch messages: 187466 nosy: docs at python, tkf priority: normal severity: normal status: open title: No such class: multiprocessing.pool.AsyncResult 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/file29954/ApplyResult.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:45:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Apr 2013 21:45:25 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366494325.28.0.316789385437.issue17804@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps we need not iter_unpack(), but a grouper (some sort of)? def grouper(seq, size): for i in range(0, len(seq), size): yield seq[i: i + size] unpack = struct.Struct('!I').unpack for chunk in grouper(data, 4): word, = unpack(chunk) ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:53:11 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 21:53:11 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366494791.84.0.998988914179.issue17804@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, according to a quick benchmark, iter_unpack() is 3x to 6x faster than the grouper() + unpack() recipe. (it's also a bit more user-friendly) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 20 23:54:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 21:54:06 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366494846.9.0.886780259159.issue17804@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, here is the benchmark script. ---------- Added file: http://bugs.python.org/file29955/bench_unpack.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:01:15 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 22:01:15 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366493865.01.0.0658316297389.issue17804@psf.upfronthosting.co.za> Message-ID: <21C84581-42B1-4212-AB79-724A780BF077@ensoft.co.uk> Martin Morrison added the comment: I like the idea of this. Two comments: - I'm no expert on the C API, but in s_iter_unpack do you not need to check for failure of PyType_GenericAlloc before calling PyObject_GetBuffer? - I'm not a fan of separate iter_ functions (and there seemed to be a general move away from them elsewhere in Python3; obviously here we have to maintain backwards compat though). Perhaps a boolean keyword "asiter" arg to the regular unpack() instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:07:18 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Apr 2013 22:07:18 +0000 Subject: [issue17805] No such class: multiprocessing.pool.AsyncResult In-Reply-To: <1366494249.42.0.0654021028594.issue17805@psf.upfronthosting.co.za> Message-ID: <1366495638.79.0.980915959209.issue17805@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +sbt versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:14:12 2013 From: report at bugs.python.org (Martin Morrison) Date: Sat, 20 Apr 2013 22:14:12 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <21C84581-42B1-4212-AB79-724A780BF077@ensoft.co.uk> Message-ID: Martin Morrison added the comment: On 20 Apr 2013, at 23:01, Martin Morrison wrote: > - I'm not a fan of separate iter_ functions (and there seemed to be a general move away from them elsewhere in Python3; obviously here we have to maintain backwards compat though). Perhaps a boolean keyword "asiter" arg to the regular unpack() instead? Thinking about this more, the functionality is probably too radically different to overload the same function, so I withdraw the suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:15:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 22:15:32 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <21C84581-42B1-4212-AB79-724A780BF077@ensoft.co.uk> Message-ID: <1366496130.3773.1.camel@fsol> Antoine Pitrou added the comment: > - I'm no expert on the C API, but in s_iter_unpack do you not need to > check for failure of PyType_GenericAlloc before calling > PyObject_GetBuffer? Yes, good catch. > - I'm not a fan of separate iter_ functions (and there seemed to be a > general move away from them elsewhere in Python3; obviously here we > have to maintain backwards compat though). Perhaps a boolean keyword > "asiter" arg to the regular unpack() instead? We generally consider it bad API design when a parameter changes the return *type* of the function. "iter_unpack" may not be terrific as a name but it describes the semantics quite clearly (and it's not too annoying to type). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:19:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Apr 2013 22:19:15 +0000 Subject: [issue17787] Optimize pickling function dispatch in hot loops. In-Reply-To: <1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> Message-ID: <1366496355.4.0.28405198032.issue17787@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the explanation. I guess I don't like the code duplication that this patch adds. Perhaps a macro hiding the "memo_get" code blocks? Also, adding your explanation as a comment would be nice too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:24:35 2013 From: report at bugs.python.org (Phil Connell) Date: Sat, 20 Apr 2013 22:24:35 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366496675.05.0.844997512091.issue17804@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:36:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Apr 2013 22:36:13 +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: <1366497373.81.0.803335398807.issue17762@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:37:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Apr 2013 22:37:58 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1366497478.38.0.793196611027.issue17656@psf.upfronthosting.co.za> STINNER Victor added the comment: I guess that test_extract_unicode_filenames_skip.patch will not fix the failing test. The test fails because u"\xf6.txt" cannot be encoded to sys.getfilesystemencoding() (which is ASCII on the FreeBSD buildbot). You should test u"\xf6.txt". You should move the try/except inside the function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:48:36 2013 From: report at bugs.python.org (kent) Date: Sat, 20 Apr 2013 22:48:36 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1366498116.68.0.917013332539.issue16754@psf.upfronthosting.co.za> Changes by kent : ---------- nosy: +Thekent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 00:57:46 2013 From: report at bugs.python.org (Mike Lundy) Date: Sat, 20 Apr 2013 22:57:46 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366498666.04.0.718219955386.issue17795@psf.upfronthosting.co.za> Mike Lundy added the comment: On top of your patch? Yeah, I think so. (I wrote it the way I did so it could handle syslog configuration changes, but that's kind of an uncommon case). Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 01:09:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Apr 2013 23:09:12 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366499352.67.0.722121923281.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: > The patch contains a special case for writing only one bytes object. > This is very unlikely case. The patch only modify a few functions to make them use the new _PyBytesWriter API. Other functions can use it. A few examples: - PyBytes_FromObject() - binascii: binascii_rledecode_hqx() - bz2, lzma and zlib modules - marshal and pickle modules - datetime.datetime.strftime() - Python/compile.c: assemble_lnotab() - more Unicode decoders But I agree that the readonly "hack" can be removed from _PyBytesWriter API since the bytes type has no format method (no bytes%args nor bytes.format(args)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 01:23:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Apr 2013 23:23:41 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366500221.32.0.0699469197309.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are some bugs in ascii85 end base85 implementations (see in Rietveld for details). Besides, ascii85 implementation was too slow. I've prepared a patch that corrects errors and speeds up encoding and decoding. Microbenchmarks: ./python -m timeit -r 1 -n 1 -s "from base64 import a85encode as encode; data = open('python', 'rb').read(1000001)" "encode(data)" ./python -m timeit -r 1 -n 1 -s "from base64 import b85encode as encode; data = open('python', 'rb').read(1000001)" "encode(data)" ./python -m timeit -r 1 -n 1 -s "from base64 import a85encode as encode, a85decode as decode; data = encode(open('python', 'rb').read(1000001))" "decode(data)" ./python -m timeit -r 1 -n 1 -s "from base64 import b85encode as encode, b85decode as decode; data = encode(open('python', 'rb').read(1000001))" "decode(data)" Old patch New patch a85encode 8.4 sec 1.13 sec b85encode 1.35 sec 1.09 sec a85decode 9.28 sec 3.29 sec b85decode 3.17 sec 2.37 sec ---------- Added file: http://bugs.python.org/file29956/issue17618-fast.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 02:11:05 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 00:11:05 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366503065.11.0.63424010186.issue17742@psf.upfronthosting.co.za> R. David Murray added the comment: It may eventually get one, though. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 02:58:54 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Apr 2013 00:58:54 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1366505934.13.0.336457431425.issue17670@psf.upfronthosting.co.za> Ned Deily added the comment: Another round based on comments. I also just noticed that the current doc incorrectly claims that tabs are replaced by *zero* or more spaces. Return a copy of the string where all tab characters are replaced by one or more spaces, depending on the current column and the given tab size. Tab positions occur every *tabsize* characters (default is 8, giving tab positions at columns 0, 8, 16 and so on). To expand the string, the current column is set to zero and the string is examined character by character. If the character is a tab (``\t``), one or more space characters are inserted in the result until the current column is equal to the next tab position. (The tab character itself is not copied.) If the character is a newline (``\n``) or return (``\r``), it is copied and the current column is reset to zero. Any other character is copied unchanged and the current column is incremented by one regardless of how the character is represented when printed. >>> '01\t012\t0123\t01234'.expandtabs() '01 012 0123 01234' >>> '01\t012\t0123\t01234'.expandtabs(4) '01 012 0123 01234' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 02:59:11 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Apr 2013 00:59:11 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366505951.16.0.756352211056.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: > It may eventually get one, though. If a use case for the "read-only hack" comes, the hack can be added again later. It's better to start with something simple and extend it with new use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 03:04:30 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Apr 2013 01:04:30 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1366506270.8.0.239266627189.issue17670@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file29957/issue17670_doc_rev_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 03:19:14 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 21 Apr 2013 01:19:14 +0000 Subject: [issue17806] Add keyword args support to str/bytes.expandtabs() Message-ID: <1366507154.61.0.217389659931.issue17806@psf.upfronthosting.co.za> New submission from Ezio Melotti: The attached patch adds keyword args support to str/bytes.expandtabs(): >>> 'a\tb'.expandtabs(tabsize=8) 'a b' >>> b'a\tb'.expandtabs(tabsize=8) b'a b' ---------- assignee: ezio.melotti components: Interpreter Core files: expandtabs.diff keywords: patch messages: 187481 nosy: ezio.melotti priority: normal severity: normal stage: patch review status: open title: Add keyword args support to str/bytes.expandtabs() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29958/expandtabs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 03:37:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 01:37:32 +0000 Subject: [issue17807] Generator cleanup without tp_del Message-ID: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za> New submission from Antoine Pitrou: This experimental patch proposes to defer generator cleanup to the frame itself. In this scheme, the generator frame's tp_clear throws the GeneratorExit if necessary, so as to call cleanup code. The generator doesn't have any tp_del anymore, as it is now impossible to resurrect a generator (the frame, though, can be resurrected; I have to add a test for that). The net effect is that generators caught in a reference cycle can always be reclaimed, and their cleanup code is run in a valid frame. ---------- components: Interpreter Core files: gen2.patch keywords: patch messages: 187482 nosy: benjamin.peterson, ncoghlan, pitrou priority: normal severity: normal stage: patch review status: open title: Generator cleanup without tp_del type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29959/gen2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 03:38:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 01:38:59 +0000 Subject: [issue17468] Generator memory leak In-Reply-To: <1363638865.27.0.0312549957802.issue17468@psf.upfronthosting.co.za> Message-ID: <1366508339.16.0.942284107462.issue17468@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've opened issue17807 for an alternative generator cleanup scheme which solves the present issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 03:40:41 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 01:40:41 +0000 Subject: [issue17807] Generator cleanup without tp_del In-Reply-To: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za> Message-ID: <1366508441.34.0.984250879404.issue17807@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file29959/gen2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 03:40:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 01:40:48 +0000 Subject: [issue17807] Generator cleanup without tp_del In-Reply-To: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za> Message-ID: <1366508448.86.0.350131961812.issue17807@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file29960/gen2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 03:55:14 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 21 Apr 2013 01:55:14 +0000 Subject: [issue3693] Obscure array.array error message In-Reply-To: <1219801896.33.0.491668230509.issue3693@psf.upfronthosting.co.za> Message-ID: <1366509314.38.0.738117239477.issue3693@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: needs patch -> commit review versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 04:03:28 2013 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Apr 2013 02:03:28 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366509808.92.0.502616719861.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not completly satisfied of bytes_writer-2.patch. Most encoders work directly on a pointer (char*). If I want to keep the code using pointers (because it is efficient), I have to resynchronize the writer and the pointer before and after calling writer methods. Here is a new patch implementing a different approach, closer to the current code. The patch version 3 has no "pos" attribute: the "position" is now a pointer (str). So encoders can just use this pointer instead of their own pointer. I expect that replacing "*p++ = c;" with "*writer.str++ = c;" would not add an important overhead, especially because writer is a local variable, and str is the first attribute of the structure. I hope that the machine code will be exactly the same. ---------- Added file: http://bugs.python.org/file29961/bytes_writer-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 04:07:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 21 Apr 2013 02:07:40 +0000 Subject: [issue17717] Set up nasm from external.bat In-Reply-To: <1365870872.82.0.912332979443.issue17717@psf.upfronthosting.co.za> Message-ID: <1366510060.09.0.645593541827.issue17717@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +terry.reedy, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 04:14:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 21 Apr 2013 02:14:40 +0000 Subject: [issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords In-Reply-To: <1366031212.38.0.552798611166.issue17736@psf.upfronthosting.co.za> Message-ID: <1366510480.53.0.522805261311.issue17736@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +eli.bendersky stage: -> patch review versions: -Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 04:30:02 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 02:30:02 +0000 Subject: [issue17807] Generator cleanup without tp_del In-Reply-To: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za> Message-ID: <1366511402.62.0.921255814443.issue17807@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch with added tests. ---------- Added file: http://bugs.python.org/file29962/gen3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 04:57:33 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sun, 21 Apr 2013 02:57:33 +0000 Subject: [issue17808] No code example for Event object in threading module Message-ID: <1366513053.37.0.736959521672.issue17808@psf.upfronthosting.co.za> New submission from Andriy Mysyk: Documentation for Event objects in threading module could be more clear with a code example. http://docs.python.org/3.4/library/threading.html#event-objects ---------- messages: 187486 nosy: amysyk priority: normal severity: normal status: open title: No code example for Event object in threading module type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 04:58:48 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sun, 21 Apr 2013 02:58:48 +0000 Subject: [issue17808] No code example for Event object in threading module In-Reply-To: <1366513053.37.0.736959521672.issue17808@psf.upfronthosting.co.za> Message-ID: <1366513128.11.0.673864997971.issue17808@psf.upfronthosting.co.za> Andriy Mysyk added the comment: I will create a code example by the end of Sunday, April 21. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 05:33:02 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sun, 21 Apr 2013 03:33:02 +0000 Subject: [issue17808] No code example for Event object in threading module In-Reply-To: <1366513053.37.0.736959521672.issue17808@psf.upfronthosting.co.za> Message-ID: <1366515182.77.0.692754126407.issue17808@psf.upfronthosting.co.za> Andriy Mysyk added the comment: See the patch with a code example attached. ---------- assignee: -> docs at python components: +Documentation keywords: +patch nosy: +docs at python Added file: http://bugs.python.org/file29963/bug17808.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 05:36:20 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sun, 21 Apr 2013 03:36:20 +0000 Subject: [issue17808] No code example for Event object in threading module In-Reply-To: <1366513053.37.0.736959521672.issue17808@psf.upfronthosting.co.za> Message-ID: <1366515380.5.0.899163704229.issue17808@psf.upfronthosting.co.za> Andriy Mysyk added the comment: Example added to threading.rst For example, the following code demonstrates a controlled thread termination using an event object. The event is used to request the termination of several threads. import threading import time stopevent = threading.Event() class TestThread(threading.Thread): def run(self): """ main control loop """ print ("Thread ", self.ident, " starts") count = 0 while not stopevent.is_set(): count += 1 stopevent.wait(1.0) print ("loop ", count, "in thread ", self.ident) print ("Thread ", self.ident, " ends") for i in range (2): testthread = TestThread() testthread.start() time.sleep (3) stopevent.set() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 06:08:43 2013 From: report at bugs.python.org (Zachary Ware) Date: Sun, 21 Apr 2013 04:08:43 +0000 Subject: [issue17717] Set up nasm from external.bat In-Reply-To: <1365870872.82.0.912332979443.issue17717@psf.upfronthosting.co.za> Message-ID: <1366517323.83.0.0342514427663.issue17717@psf.upfronthosting.co.za> Zachary Ware added the comment: Could you elaborate on what you mean to be done? All I've ever had to do was run the nasm installer and add the install location to PATH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 06:44:58 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 21 Apr 2013 04:44:58 +0000 Subject: [issue17807] Generator cleanup without tp_del In-Reply-To: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za> Message-ID: <1366519498.29.0.942044951043.issue17807@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just a couple of minor comments on review. Everything else I looked for (including the path where a generator failing to stop during frame deallocation leads to reporting an unraisable exception) seemed fine. One aspect I find interesting is that we've had other patches which proposed reducing the level of poking around generators needed to do inside frame objects by moving (some of) that state to the generators. This patch goes the other way, by moving the related cleanup functionality into the frame objects. I think that's actually a reasonable option - the frame is always going to be involved at some point in order to actually execute the cleanup code, so our only real chance to break the cycle is to eliminate the generator's involvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 06:48:14 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 21 Apr 2013 04:48:14 +0000 Subject: [issue17800] Add gc.needs_finalizing() to check if an object needs finalising In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366519694.54.0.205435838951.issue17800@psf.upfronthosting.co.za> Nick Coghlan added the comment: Antoine came up with a scheme (see issue 17807) that should eliminate the tp_del implementation from generator objects by moving the cleanup code to the frame deallocation. This will restore Guido's original assumption that types implemented in C won't need to provide tp_del, so this proposal becomes obsolete. ---------- dependencies: -Generator memory leak resolution: -> out of date superseder: -> Generator cleanup without tp_del _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 06:50:36 2013 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 21 Apr 2013 04:50:36 +0000 Subject: [issue17800] Add gc.needs_finalizing() to check if an object needs finalising In-Reply-To: <1366439901.03.0.82185599108.issue17800@psf.upfronthosting.co.za> Message-ID: <1366519836.63.0.631990867026.issue17800@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex, fijall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 07:37:29 2013 From: report at bugs.python.org (koobs) Date: Sun, 21 Apr 2013 05:37:29 +0000 Subject: [issue17809] FAIL: test_expanduser when $HOME ends with / Message-ID: <1366522649.21.0.891133291523.issue17809@psf.upfronthosting.co.za> New submission from koobs: test_expanduser in test.test_posixpath.PosixPathTest fails when the users $HOME ends with "/" ====================================================================== FAIL: test_expanduser (test.test_posixpath.PosixPathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd/build/Lib/test/test_posixpath.py", line 264, in test_expanduser self.assertEqual(posixpath.expanduser("~"), home) AssertionError: '/usr/home/buildbot' != '/usr/home/buildbot/' - /usr/home/buildbot + /usr/home/buildbot/ ? + ---------------------------------------------------------------------- Test failures can be seen in the following FreeBSD 9-STABLE buildbots on all branches except 2.7: 3.x - http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%203.x/builds/1256/steps/test/logs/stdio 3.3 - http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%203.3/builds/546/steps/test/logs/stdio 3.2 - http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%203.2/builds/490/steps/test/logs/stdio It is also reproducible outside of the buildbot environment using fresh Python 3.3.1 sources with default build configuration (see attached expanduser.log) Commenting out Lib/test/test_posixpath.py#l264 results in the test passing ---------- components: Library (Lib), Tests files: expanduser.log messages: 187494 nosy: koobs priority: normal severity: normal status: open title: FAIL: test_expanduser when $HOME ends with / versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29964/expanduser.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 08:46:22 2013 From: report at bugs.python.org (koobs) Date: Sun, 21 Apr 2013 06:46:22 +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: <1366526782.87.0.815601462037.issue15745@psf.upfronthosting.co.za> koobs added the comment: There's some work that's been in the FreeBSD bleachers since Jul 2012 to add futimens() and utimensat(), with some recent activity: RFC: futimens(2) and utimensat(2) - Jul 2012 http://lists.freebsd.org/pipermail/freebsd-arch/2012-February/012409.html RFC: futimens(2) and utimensat(2) - Jan 2013 http://lists.freebsd.org/pipermail/freebsd-arch/2013-January/013903.html I've also recently been made aware of a vfs.timestamp_precision sysctl and tested adjusting it from it's default of 0 -> 3, without success: sysctl -d vfs.timestamp_precision vfs.timestamp_precision: File timestamp precision (0: seconds, 1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, 3+: sec + ns (max. precision)) I'll do my best at this end to encourage the above implementation to be committed and request merges to other branches of FreeBSD (likely just 9-STABLE) In the meantime however, what can be done in the short-term to either tweak the tests so they pass or account for the difference in implementations? The current test failures on the buildbots make it difficult at best to ensure core developers are being notified or exposed to other regressions and issues that have cropped up in recent months. ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 08:48:58 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 21 Apr 2013 06:48:58 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) Message-ID: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti: I have restarted the work on PEP 3154. Stefan Mihaila had begun an implementation as part of the Google Summer of Code 2012. Unfortunately, he hit multiple roadblocks which prevented him to finish his work by the end of the summer. He previously shown interest in completing his implementation. However he got constrained by time and never resumed his work. So I am taking over the implementation of the PEP. I have decided to go forward with a brand new code, using Stefan's work only as a guide. At the moment, I have completed about half of the PEP---missing only support for calling __new__ with keyword arguments and the use of new qualified name for referring objects. Design-wise, there is still a few things that we should discuss. For example, I think Stefan's idea, which is not specified in the PEP, to eliminate PUT opcodes is interesting. His proposal was to emit an implicit PUT opcode after each object pickled and make the Pickler and Unpickler classes agree on the scheme. A drawback of this implicit scheme is we cannot be selective about which object we save in the memo during unpickling. That means, for example, we won't be able to make pickletools.optimize work with protocol 4 to reduce the memory footprint of the unpickling process. This scheme also alters the meaning of all previously defined opcodes because of the implicit PUTs, which is sort of okay because we are changing protocol. Alternatively, we could use an explicit scheme by defining new "fat" opcodes, for the built-in types we care about, which includes memoization. This scheme would a bit more flexible however it would also be slightly more involved implementation-wise. In any case, I will run benchmarks to see if either schemes are worthwhile. ---------- assignee: alexandre.vassalotti components: Library (Lib) hgrepos: 184 messages: 187496 nosy: alexandre.vassalotti, pitrou priority: high severity: normal stage: needs patch status: open title: Implement PEP 3154 (pickle protocol 4) type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 08:56:16 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 21 Apr 2013 06:56:16 +0000 Subject: [issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila In-Reply-To: <1344890920.23.0.695633734046.issue15642@psf.upfronthosting.co.za> Message-ID: <1366527376.86.0.654237370406.issue15642@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I have started a new implementation of PEP 3154 since Stefan hasn't been active on his. Moving the discussion to Issue #17810. ---------- dependencies: -Unbinding of methods resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed superseder: -> Implement PEP 3154 (pickle protocol 4) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 08:57:47 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 21 Apr 2013 06:57:47 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366527467.87.0.955206119165.issue17810@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- dependencies: +Unbinding of methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 10:22:21 2013 From: report at bugs.python.org (Phil Connell) Date: Sun, 21 Apr 2013 08:22:21 +0000 Subject: [issue17807] Generator cleanup without tp_del In-Reply-To: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za> Message-ID: <1366532541.83.0.85522450191.issue17807@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +isoschiz, pconnell -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 10:44:11 2013 From: report at bugs.python.org (Phil Connell) Date: Sun, 21 Apr 2013 08:44:11 +0000 Subject: [issue17807] Generator cleanup without tp_del In-Reply-To: <1366508251.45.0.78173664702.issue17807@psf.upfronthosting.co.za> Message-ID: <1366533851.42.0.156404710105.issue17807@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 11:08:02 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 21 Apr 2013 09:08:02 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366535282.43.0.342697986595.issue17810@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 11:54:32 2013 From: report at bugs.python.org (=?utf-8?q?Damien_Mari=C3=A9?=) Date: Sun, 21 Apr 2013 09:54:32 +0000 Subject: [issue17776] IDLE Internationalization In-Reply-To: <1366207983.79.0.104817094716.issue17776@psf.upfronthosting.co.za> Message-ID: <1366538072.32.0.490408104134.issue17776@psf.upfronthosting.co.za> Damien Mari? added the comment: Here is a new patch featuring: _ a setting to disable idle i18n _ a documentation Things needed: _ taking into account Windows (where IDLE is mainly used) _ a much in-depth translation of the interface: Context-menu, dialogs, ... _ unit-testing it To test it by yourself without touching your /usr/share/local you can modify the binddomain() (in i18n.py) to another dir: Like " gettext.bindtextdomain('idlelib',"/home/you/your_trans_dir/") " And put in this dir the "en" dir in the tar file. The .mo generation is explained in the module documentation. So, here is a tar archive with: _ a screenshot of the patch in action _ the patch _ the trans dir to try it by yourself _ the .po file (thanks to Olivier Berger) ---------- Added file: http://bugs.python.org/file29965/patch.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 13:04:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 11:04:12 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366542252.57.0.729979730082.issue17810@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- keywords: +patch Added file: http://bugs.python.org/file29966/9f1be171da08.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 13:23:56 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Apr 2013 11:23:56 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366543436.95.0.426092084487.issue17804@psf.upfronthosting.co.za> Mark Dickinson added the comment: This seems like an attractive idea. There's definitely a need for repeated unpacking with the same pattern, and I agree that putting the repetition into the pattern is suboptimal (not least from the point of view of caching structs). One thing that feels a bit unorthogonal is that this is doing two things at once: both allowing for repetition of a pattern, and also adding the lazy iteration. I'd guess that there's also a use-case for allowing repetition but not returning an iterator; but then that's easily covered by list(iter_unpack). +1 from me. Hmm; the name. 'iterunpack'? 'iter_unpack'? 'unpack_stream'? 'unpack_all'? Would we want something similar for packing, too? I guess that's effectively covered by b''.join(s.pack(item) for item in ...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 13:27:37 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 11:27:37 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366543657.42.0.133406683761.issue17810@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you for reviving this :) A couple of questions: - why ADDITEM in addition to ADDITEMS? I don't think single-element sets are an important use case (as opposed to, say, single-element tuples) - what is the purpose of STACK_GLOBAL? I would say memoization of common names but you pass memoize=False > For example, I think Stefan's idea, which is not specified in the > PEP, to eliminate PUT opcodes is interesting. His proposal was to > emit an implicit PUT opcode after each object pickled and make the > Pickler and Unpickler classes agree on the scheme. Are the savings worth it? I've tried pickletools.optimize() on two objects: - a typical data dict (http.client.responses). The pickle length decreases from 1155 to 1063 (8% shrink); unpickling is faster by 4%. - a Logger object (logging.getLogger("foobar"). The pickle length decreases from 427 to 389 (9% shrink); unpickling is faster by 2%. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 14:41:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 12:41:45 +0000 Subject: [issue17808] No code example for Event object in threading module In-Reply-To: <1366513053.37.0.736959521672.issue17808@psf.upfronthosting.co.za> Message-ID: <1366548105.28.0.870372031484.issue17808@psf.upfronthosting.co.za> Antoine Pitrou added the comment: An example should generally show something interesting or non-obvious, which isn't the case here. IMHO an Event is simple enough to use that it doesn't need an example; furthermore, the example you are proposing doesn't really showcase anything interesting, functionally :-) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 15:23:59 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 21 Apr 2013 13:23:59 +0000 Subject: [issue17065] Fix sporadic buildbot failures for test_winreg In-Reply-To: <1359393546.73.0.336232098313.issue17065@psf.upfronthosting.co.za> Message-ID: <1366550639.43.0.872367028788.issue17065@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Not to sound needy, but could the patch be looked into being integrated soon? This problem had only occurred once or twice a month however it has caused failures three times just in the last week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 15:42:31 2013 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 21 Apr 2013 13:42:31 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1366551750.99.0.463553738037.issue17670@psf.upfronthosting.co.za> Eli Bendersky added the comment: LGTM! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 16:12:51 2013 From: report at bugs.python.org (Mike Milkin) Date: Sun, 21 Apr 2013 14:12:51 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1366553571.51.0.26906295823.issue9682@psf.upfronthosting.co.za> Mike Milkin added the comment: Sure ill modify the patch, thanks for the feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 16:14:47 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Apr 2013 14:14:47 +0000 Subject: [issue17065] Fix sporadic buildbot failures for test_winreg In-Reply-To: <1359393546.73.0.336232098313.issue17065@psf.upfronthosting.co.za> Message-ID: <3ZttGZ56fBz7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 0882960fa6df by R David Murray in branch '3.3': #17065: Use process-unique key for winreg test. http://hg.python.org/cpython/rev/0882960fa6df New changeset c7806d1b09eb by R David Murray in branch 'default': Merge #17065: Use process-unique key for winreg test. http://hg.python.org/cpython/rev/c7806d1b09eb New changeset c0cb78bedc2b by R David Murray in branch '2.7': #17065: Use process-unique key for winreg test. http://hg.python.org/cpython/rev/c0cb78bedc2b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 16:16:00 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 14:16:00 +0000 Subject: [issue17065] Fix sporadic buildbot failures for test_winreg In-Reply-To: <1359393546.73.0.336232098313.issue17065@psf.upfronthosting.co.za> Message-ID: <1366553760.27.0.389382423893.issue17065@psf.upfronthosting.co.za> R. David Murray added the comment: Not being a windows dev I couldn't easily test the patch, so hopefully this commit won't break the buildbots :) ---------- nosy: +r.david.murray resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 16:45:55 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 21 Apr 2013 14:45:55 +0000 Subject: [issue17065] Fix sporadic buildbot failures for test_winreg In-Reply-To: <1359393546.73.0.336232098313.issue17065@psf.upfronthosting.co.za> Message-ID: <1366555555.79.0.885583529419.issue17065@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Thank you! There are no failures due to the patch and now its just a wait and see if test_winreg will misbehave again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 16:50:36 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 14:50:36 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366555836.8.0.700669693221.issue17810@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 16:56:59 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 14:56:59 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366556219.04.0.0255235084915.issue17804@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Well, according to a quick benchmark, iter_unpack() is 3x to 6x faster than the grouper() + unpack() recipe. > (it's also a bit more user-friendly) Yes, It's mainly because a grouper written on Python. When it will be implemented in C, the difference will be less. This function will be useful beside struct. Note that in my patch for issue17618 struct.Struct("!{}I") is not used. As for extending Struct, what you think about a more powerful feature? About a method which returns not an iterator, but an iterable and indexable sequence. Here is a sample Python implementation. ---------- Added file: http://bugs.python.org/file29967/struct_array_view.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 16:59:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 14:59:07 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366556219.04.0.0255235084915.issue17804@psf.upfronthosting.co.za> Message-ID: <1366556344.2543.3.camel@fsol> Antoine Pitrou added the comment: > Yes, It's mainly because a grouper written on Python. When it will be > implemented in C, the difference will be less. This function will be > useful beside struct. I'm not against adding useful C tools to itertools, but you may have to convince Raymond ;) > As for extending Struct, what you think about a more powerful feature? > About a method which returns not an iterator, but an iterable and > indexable sequence. Here is a sample Python implementation. I'll take a look, but the question is how complex a C implementation would be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 17:00:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 15:00:40 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366556440.49.0.556472505598.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Link to the previous attempt: issue15642. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 17:19:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 15:19:27 +0000 Subject: [issue16231] pickle persistent_id return value In-Reply-To: <1350225017.39.0.976217955919.issue16231@psf.upfronthosting.co.za> Message-ID: <1366557567.38.0.943121928741.issue16231@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It was fixed for Python 3 in 0ae50aa7d97c. Should it be fixed in 2.7 too or close the issue as won't fix? Note that cPickle tests the return value of persistent_id only for None. ---------- nosy: +alexandre.vassalotti, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 18:16:10 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 16:16:10 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366560970.44.0.278349507425.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Memoization consumes memory during pickling. For now every memoized object requires memory for: dict's entity; an id() integer object; a 2-element tuple; a pickle's index (an integer object). It's about 80 bytes on 32-bit platform (and twice as this on 64-bit). For data which contains a lot of floats it can be cumbersome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 18:34:56 2013 From: report at bugs.python.org (Tomoki Imai) Date: Sun, 21 Apr 2013 16:34:56 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366562096.74.0.982375643091.issue17348@psf.upfronthosting.co.za> Tomoki Imai added the comment: NO,this thread should not be closed! This is IDLE Bug.I found, IDLE has issue in using unicode literal. In normal interpreter in console. >>> u"?????" u'\u3053\u3093\u306b\u3061\u306f' In IDLE. >>> u"?????" u'\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\xe3\x81\xaf' I take a look IDLE codes, found bug in IDLE. In idlelib/PyShell.py. def runsource(self, source): "Extend base class method: Stuff the source in the line cache first" filename = self.stuffsource(source) self.more = 0 self.save_warnings_filters = warnings.filters[:] warnings.filterwarnings(action="error", category=SyntaxWarning) print(source,len(source)) if isinstance(source, types.UnicodeType): from idlelib import IOBinding try: source = source.encode(IOBinding.encoding) except UnicodeError: self.tkconsole.resetoutput() self.write("Unsupported characters in input\n") return try: print(source,len(source)) # InteractiveInterpreter.runsource() calls its runcode() method, # which is overridden (see below) return InteractiveInterpreter.runsource(self, source, filename) finally: if self.save_warnings_filters is not None: warnings.filters[:] = self.save_warnings_filters self.save_warnings_filters = None This codes change u"?????" to u'\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\xe3\x81\xaf' I commented out following lines. if isinstance(source, types.UnicodeType): from idlelib import IOBinding try: source = source.encode(IOBinding.encoding) except UnicodeError: self.tkconsole.resetoutput() self.write("Unsupported characters in input\n") return And now works. Not well tested, I'll do unittest in GSoC (if I can). ---------- components: +IDLE -Unicode keywords: +patch nosy: +Tomoki.Imai type: -> behavior Added file: http://bugs.python.org/file29968/PyShell.py.20130422.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 18:38:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 16:38:47 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366562327.82.0.146401498319.issue17618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As for interface, I think 'adobe' flag should be false by default. It makes encoder simpler. ascii85 encoder in Go's standard library doesn't wrap nor add Adobe's brackets. btoa/atob functions looks redundant as we can just use a85encode/a85decoder with appropriate options. Perhaps we should get rid from 'adobe' flag in a85decode and autodetect it. And perhaps to do the same with other a85decode's options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 19:06:42 2013 From: report at bugs.python.org (Martin Morrison) Date: Sun, 21 Apr 2013 17:06:42 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1366562327.82.0.146401498319.issue17618@psf.upfronthosting.co.za> Message-ID: <2514D251-7C65-4823-B70C-1B61653CE6F8@ensoft.co.uk> Martin Morrison added the comment: On 21 Apr 2013, at 17:38, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > As for interface, I think 'adobe' flag should be false by default. It makes encoder simpler. ascii85 encoder in Go's standard library doesn't wrap nor add Adobe's brackets. btoa/atob functions looks redundant as we can just use a85encode/a85decoder with appropriate options. Perhaps we should get rid from 'adobe' flag in a85decode and autodetect it. And perhaps to do the same with other a85decode's options. The problem with autodetecting is that it makes it impossible for an application to use this library to verify that something is encoded in a specific way. Explicit is better than implicit. Otherwise, your changes look good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 19:19:06 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 17:19:06 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366560970.44.0.278349507425.issue17810@psf.upfronthosting.co.za> Message-ID: <1366564742.2543.6.camel@fsol> Antoine Pitrou added the comment: > Memoization consumes memory during pickling. For now every memoized > object requires memory for: > > dict's entity; > an id() integer object; > a 2-element tuple; > a pickle's index (an integer object). > > It's about 80 bytes on 32-bit platform (and twice as this on 64-bit). As far as I understand, Alexandre doesn't propose to suppress memoization, only to make it implicit. Therefore the memory overhead would be the same (but the pickle would have less opcodes). > For data which contains a lot of floats it can be cumbersome. Apparently, floats don't get memoized: >>> pickletools.dis(pickle.dumps([1.0, 2.0])) 0: \x80 PROTO 3 2: ] EMPTY_LIST 3: q BINPUT 0 5: ( MARK 6: G BINFLOAT 1.0 15: G BINFLOAT 2.0 24: e APPENDS (MARK at 5) 25: . STOP ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 19:47:19 2013 From: report at bugs.python.org (Malte Swart) Date: Sun, 21 Apr 2013 17:47:19 +0000 Subject: [issue17764] Support http.server passing bind address via commend line argument In-Reply-To: <1366129730.55.0.013246712373.issue17764@psf.upfronthosting.co.za> Message-ID: <1366566439.9.0.00730077573591.issue17764@psf.upfronthosting.co.za> Malte Swart added the comment: I have updated the patch and added a paragraph for this option to the documentation. Shall I add this issue to the changelog list for python 3.4.0 alpha 1? ---------- Added file: http://bugs.python.org/file29969/http-server-bind-arg2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 21:20:29 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 21 Apr 2013 19:20:29 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366572029.16.0.702842134316.issue17795@psf.upfronthosting.co.za> Changes by Vinay Sajip : Added file: http://bugs.python.org/file29970/cd970801b061.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 21:23:24 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 21 Apr 2013 19:23:24 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366572204.24.0.181227686899.issue17795@psf.upfronthosting.co.za> Vinay Sajip added the comment: Okay, I made the change to default socktype=None. Please try out the latest patch (ideally on all Python versions you can test with) to confirm it's OK. Then I can apply to 2.7/3.2/3.3/default. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 22:02:01 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 20:02:01 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366574521.83.0.658790463108.issue17348@psf.upfronthosting.co.za> R. David Murray added the comment: I believe you have indeed understood what the original poster was reporting. However, those lines date back a long time (2002 or earlier). They exist in Python2 only, and there they have a purpose, so they can't just be deleted. My guess is the problem is a conflict between the locale setting and the encoding used when the character string is input into IDLE. For me, if I cut and paste that string into the idle shell in python2, it shows up as the unicode escape characters (meaning IDLE is doing the correct conversion at input time on my system). In Python3 it looks the same, except that the echoed output shows the expected glyphs instead of the unicode escapes as it does in Python2, which is as expected. My only locale setting, by the way, is LC_CTYPE=en_US.UTF-8. What is your setting? I don't know if there is a better way for idle to behave in the modern era or not. Perhaps it should be using utf-8 by default instead of the locale? Do you know how (and in what charset) your system is generating the characters you type into idle? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 22:03:10 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 20:03:10 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366574590.29.0.684403748517.issue17348@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: Unicode - encoding seems to be lost for inputs of unicode chars -> Unicode - encoding seems to be lost for inputs of unicode chars in IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 22:07:55 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Apr 2013 20:07:55 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <3Zv2623qwVz7Lkk@mail.python.org> Roundup Robot added the comment: New changeset 6a02d2af814f by Ned Deily in branch '2.7': Issue #17670: Provide an example of expandtabs() usage. http://hg.python.org/cpython/rev/6a02d2af814f New changeset 5b6ccab52a4d by Ned Deily in branch '3.3': Issue #17670: Provide an example of expandtabs() usage. http://hg.python.org/cpython/rev/5b6ccab52a4d New changeset 1a6cb6d8591a by Ned Deily in branch 'default': Issue #17670: merge from 3.3 http://hg.python.org/cpython/rev/1a6cb6d8591a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 22:08:57 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Apr 2013 20:08:57 +0000 Subject: [issue17670] Improve str.expandtabs() doc In-Reply-To: <1365463591.17.0.891545615286.issue17670@psf.upfronthosting.co.za> Message-ID: <1366574937.43.0.0530112582696.issue17670@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 22:16:09 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 20:16:09 +0000 Subject: [issue17764] Support http.server passing bind address via commend line argument In-Reply-To: <1366129730.55.0.013246712373.issue17764@psf.upfronthosting.co.za> Message-ID: <1366575369.55.0.82476556526.issue17764@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for proposing this and working on it Malte. Could you please submit a contributor agreement? (http://www.python.org/psf/contrib). We will add the Misc/NEWS entry when we commit the patch; that file changes so rapidly that any patch to it quickly becomes outdated. You could add an entry to Doc/whatsnew/3.4, though, if you were so moved. If not we'll add that too when we commit. For the doc patch, I think the first sentence would be clearer if it said "By default the server binds to all available interfaces." I'll probably tweak a couple other words for better English phrasing when I commit it, as well. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 22:28:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 21 Apr 2013 20:28:59 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1366576139.15.0.336149098706.issue17742@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The last patch increases the size of the code substantially. I'm still wondering what the benefits are. $ hg di --stat Include/bytesobject.h | 90 ++++++++++++++ Misc/NEWS | 3 + Objects/bytesobject.c | 144 ++++++++++++++++++++++ Objects/stringlib/codecs.h | 109 ++++------------ Objects/unicodeobject.c | 267 ++++++++++++++++------------------------- 5 files changed, 368 insertions(+), 245 deletions(-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 22:30:35 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 20:30:35 +0000 Subject: [issue17403] Robotparser fails to parse some robots.txt In-Reply-To: <1363085904.54.0.398684856881.issue17403@psf.upfronthosting.co.za> Message-ID: <1366576235.23.0.193484485923.issue17403@psf.upfronthosting.co.za> R. David Murray added the comment: Lucaz pointed out on IRC that the problem is that the current robotparser is implementing an outdated robots.txt standard. He may work on fixing that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 22:31:25 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 20:31:25 +0000 Subject: [issue17403] Robotparser fails to parse some robots.txt In-Reply-To: <1363085904.54.0.398684856881.issue17403@psf.upfronthosting.co.za> Message-ID: <1366576285.43.0.594366333583.issue17403@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:14:50 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 21 Apr 2013 21:14:50 +0000 Subject: [issue15575] Tutorial is unclear on multiple imports of a module. In-Reply-To: <1344363062.87.0.467457264308.issue15575@psf.upfronthosting.co.za> Message-ID: <3Zv3bG1jNSz7LjZ@mail.python.org> Roundup Robot added the comment: New changeset 9df9931fae96 by R David Murray in branch '3.3': #15575: Clarify tutorial description of when modules are executed. http://hg.python.org/cpython/rev/9df9931fae96 New changeset dac847938326 by R David Murray in branch 'default': #15575: Clarify tutorial description of when modules are executed. http://hg.python.org/cpython/rev/dac847938326 New changeset a1421d28393b by R David Murray in branch '2.7': #15575: Clarify tutorial description of when modules are executed. http://hg.python.org/cpython/rev/a1421d28393b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:17:06 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 21:17:06 +0000 Subject: [issue15575] Tutorial is unclear on multiple imports of a module. In-Reply-To: <1344363062.87.0.467457264308.issue15575@psf.upfronthosting.co.za> Message-ID: <1366579026.92.0.890066956701.issue15575@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, James. I wound up going with a different wording for the "elaboration": since the concept of running a python file as a script is mentioned just a bit earlier, I added a parenthetical that the statements are also executed if the module is run as a script. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:24:28 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 21 Apr 2013 21:24:28 +0000 Subject: [issue17811] Improve os.readv() and os.writev() documentation and docstring Message-ID: <1366579468.26.0.0312151391842.issue17811@psf.upfronthosting.co.za> New submission from Nikolaus Rath: The os.writev and os.readv functions are currently documented as: os.writev(fd, buffers) Write the contents of buffers to file descriptor fd, where buffers is an arbitrary sequence of buffers. Returns the total number of bytes written. os.readv(fd, buffers) Read from a file descriptor into a number of writable buffers. buffers is an arbitrary sequence of writable buffers. Returns the total number of bytes read. This is rather confusing, mostly because it's not clear what can be passed as *buffer* (since buffer objects don't exist in Python 3 anymore), and (as a consequence) how the input will be distributed among the list of buffers. Reading the code, it seems to me that any object that implements the buffer protocol would be fine, but that still doesn't help much in practice. From the memoryview documentation, I can infer that `bytes` implements the buffer protocol, but is also immutable, so how can something be written into it? I'd be happy to write a patch to the documentation, but someone would need to explain to me first what kind of buffers are actually acceptable (and I suspect this will be different for readv and writev). ---------- assignee: docs at python components: Documentation messages: 187526 nosy: Nikratio, docs at python priority: normal severity: normal status: open title: Improve os.readv() and os.writev() documentation and docstring type: enhancement versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:34:19 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 21:34:19 +0000 Subject: [issue17812] Quadratic complexity in b32encode Message-ID: <1366580059.45.0.527459222954.issue17812@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: b32encode accumulates encoded data in a bytes object and this operation has quadratic complexity. Here is a patch, which fixes this issue by accumulating in a list. ---------- components: Library (Lib) files: base32_fix.patch keywords: patch messages: 187527 nosy: pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Quadratic complexity in b32encode type: performance versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29971/base32_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:34:51 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 21 Apr 2013 21:34:51 +0000 Subject: [issue17811] Improve os.readv() and os.writev() documentation and docstring In-Reply-To: <1366579468.26.0.0312151391842.issue17811@psf.upfronthosting.co.za> Message-ID: <1366580091.86.0.836671070005.issue17811@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Here's a first attempt at improvement based on my guess: os.writev(fd, buffers) Write the contents of buffers to file descriptor fd, where buffers is an arbitrary sequence of buffers. In this context, a buffer may be any Python object that provides a Memory View, i.e. that may be used to instantiate a `memoryview` object (e.g. a bytes or bytearray object). writev writes the contents of each memory view to the file descriptor and returns the total number of bytes written. os.readv(fd, buffers) Read from a file descriptor into a number of writable buffers. buffers is an arbitrary sequence of writable buffers. In this context, a buffer may be any Python object that provides a writeable Memory View, i.e. that may be used to instantiate a `memoryview` object whose `read_only` attribute is false (for example, a bytearray object). Writeable memory views have a fixed size, and readv will transfer data into each buffer until it is full and then move on to the next buffer in the sequence to hold the rest of the data. readv returns the total number of bytes read (which may be less than the total capacity of all the buffers). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:42:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 21:42:00 +0000 Subject: [issue17812] Quadratic complexity in b32encode In-Reply-To: <1366580059.45.0.527459222954.issue17812@psf.upfronthosting.co.za> Message-ID: <1366580520.97.0.557756164543.issue17812@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And here are other patch, which not only fixes an issue with quadratic complexity, but optimize b32encode and b32decode about 2.5 times. Microbenchmarks: ./python -m timeit -r 1 -n 10 -s "from base64 import b32encode as encode; data = open('python', 'rb').read(1000001)" "encode(data)" ./python -m timeit -r 1 -n 1 -s "from base64 import b32encode as encode, b32decode as decode; data = encode(open('python', 'rb').read(1000001))" "decode(data)" Results: First patch Second patch b32encode 1.25 sec 486 msec b32decode 2.08 sec 835 msec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:42:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 21:42:54 +0000 Subject: [issue17812] Quadratic complexity in b32encode In-Reply-To: <1366580059.45.0.527459222954.issue17812@psf.upfronthosting.co.za> Message-ID: <1366580574.77.0.722842693839.issue17812@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file29972/base32_optimize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:44:15 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 21 Apr 2013 21:44:15 +0000 Subject: [issue17811] Improve os.readv() and os.writev() documentation and docstring In-Reply-To: <1366579468.26.0.0312151391842.issue17811@psf.upfronthosting.co.za> Message-ID: <1366580655.82.0.810794582071.issue17811@psf.upfronthosting.co.za> R. David Murray added the comment: Well, the documentation is technically precise. I'd even managed to forget that buffer objects existed in Python2 :) As you observed, in Python3 a buffer is something that implements the buffer protocol. What I would do is link the word 'buffer' to http://docs.python.org/3/c-api/buffer.html. Perhaps mentioning bytes and bytearray as examples of read-only and writeable buffers would be worthwhile, but they are mentioned in the first paragraph of that section so it may not be necessary. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 21 23:53:22 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 21 Apr 2013 21:53:22 +0000 Subject: [issue17811] Improve os.readv() and os.writev() documentation and docstring In-Reply-To: <1366579468.26.0.0312151391842.issue17811@psf.upfronthosting.co.za> Message-ID: <1366581202.71.0.821284747699.issue17811@psf.upfronthosting.co.za> Nikolaus Rath added the comment: What section do you mean? bytearray is not mentioned anywhere in http://docs.python.org/3.4/library/os.html. I think the problem with just linking to the C API section is that it doesn't help people that are only using pure Python. You can't look at a Python object and tell whether it implements the buffer protocol or not. Therefore, I think it would be important to give at least a reference to memoryview as the Python equivalent of the buffer protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 00:05:07 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 21 Apr 2013 22:05:07 +0000 Subject: [issue17813] lzma and bz2 decompress methods lack max_size attribute Message-ID: <1366581907.51.0.777368903496.issue17813@psf.upfronthosting.co.za> New submission from Nikolaus Rath: The zlib Decompress.decompress has a max_length parameter that limits the size of the returned uncompressed data. The lzma and bz2 decompress methods do not have such a parameter. Therefore, it is not possible to decompress untrusted lzma or bz2 data without becoming susceptible to a DoS attack, as the attacker can force allocation of gigantic buffers by sending just a tiny amount of compressed data: $ dd if=/dev/zero bs=128k count=10k | bzip2 -9 > nasty.bz2 10240+0 records in 10240+0 records out 1342177280 bytes (1.3 GB) copied, 11.0892 s, 121 MB/s $ dir nasty.bz2 -rw-rw-r-- 1 nikratio nikratio 977 Apr 21 14:58 nasty.bz2 It would be great if the lzma and bz2 decompressor methods could also get a max_length parameters to make this situation less threatening. ---------- components: Library (Lib) messages: 187532 nosy: Nikratio priority: normal severity: normal status: open title: lzma and bz2 decompress methods lack max_size attribute type: behavior versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 00:05:19 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 21 Apr 2013 22:05:19 +0000 Subject: [issue17813] lzma and bz2 decompress methods lack max_size parameter In-Reply-To: <1366581907.51.0.777368903496.issue17813@psf.upfronthosting.co.za> Message-ID: <1366581919.93.0.460926792146.issue17813@psf.upfronthosting.co.za> Changes by Nikolaus Rath : ---------- title: lzma and bz2 decompress methods lack max_size attribute -> lzma and bz2 decompress methods lack max_size parameter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 00:09:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Apr 2013 22:09:34 +0000 Subject: [issue17813] lzma and bz2 decompress methods lack max_size parameter In-Reply-To: <1366581907.51.0.777368903496.issue17813@psf.upfronthosting.co.za> Message-ID: <1366582174.82.0.573510452869.issue17813@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> duplicate superseder: -> gzip, bz2, lzma: add option to limit output size _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 00:30:05 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 21 Apr 2013 22:30:05 +0000 Subject: [issue14398] bz2.BZ2DEcompressor.decompress fail on large files In-Reply-To: <1332605719.75.0.496276331472.issue14398@psf.upfronthosting.co.za> Message-ID: <1366583405.1.0.477469290063.issue14398@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Hmm, so actually most of the bugs fixed in 2.7 and 3.2 weren't present in 3.3 and 3.4, and those versions already had tests equivalent to the tests I added for 2.7/3.2. As for the changes that I did make to 3.3/3.4: - two of the three cover cases that only occur if the output data is larger than ~32GiB. Even if we have a buildbot with enough memory for it (which I don't think we do), actually running such tests would take forever and then some. - the third is for a condition that's actually pretty much impossible to trigger - grow_buffer() has to be called on a buffer that is already at least 8*((size_t)-1)/9 bytes long. On a 64-bit system this is astronomically large, while on a 32-bit system the OS will probably have reserved more than 1/9th of the virtual address space for itself, so it won't be possible to allocate a large enough buffer. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 01:04:35 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 21 Apr 2013 23:04:35 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1347884562.79.0.801674791772.issue15955@psf.upfronthosting.co.za> Message-ID: <1366585475.05.0.848948505443.issue15955@psf.upfronthosting.co.za> Nikolaus Rath added the comment: The lack of output size limiting has security implications as well. Without being able to limit the size of the uncompressed data returned per call, it is not possible to decompress untrusted lzma or bz2 data without becoming susceptible to a DoS attack, as the attacker can force allocation of gigantic buffers by sending just a tiny amount of compressed data. ---------- nosy: +Nikratio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 01:14:46 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 21 Apr 2013 23:14:46 +0000 Subject: [issue17814] Popen.stdin/stdout/stderr documentation should mention object type Message-ID: <1366586086.38.0.427506521088.issue17814@psf.upfronthosting.co.za> New submission from Nikolaus Rath: The subprocess documentation currently just says that Popen.stdin et all are "file objects", which is linked to the glossary entry. This isn't very helpful, as it doesn't tell whether the streams are bytes or text streams. Suggested patch: diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -677,21 +677,29 @@ .. attribute:: Popen.stdin - If the *stdin* argument was :data:`PIPE`, this attribute is a :term:`file - object` that provides input to the child process. Otherwise, it is ``None``. + If the *stdin* argument was :data:`PIPE`, this attribute is a + :class:`io.BufferedWriter` (if the *universal_newlines* argument + was False) or :class:`io.TextIOWrapper` (if the + *universal_newlines* argument was True) object that provides input + to the child process. Otherwise, it is ``None``. .. attribute:: Popen.stdout - If the *stdout* argument was :data:`PIPE`, this attribute is a :term:`file - object` that provides output from the child process. Otherwise, it is ``None``. + If the *stdout* argument was :data:`PIPE`, this attribute is a + :class:`io.BufferedReader` (if the *universal_newlines* argument + was False) or :class:`io.TextIOWrapper` (if the + *universal_newlines* argument was True) object that provides output + from the child process. Otherwise, it is ``None``. .. attribute:: Popen.stderr - If the *stderr* argument was :data:`PIPE`, this attribute is a :term:`file - object` that provides error output from the child process. Otherwise, it is - ``None``. + If the *stderr* argument was :data:`PIPE`, this attribute is a + :class:`io.BufferedReader` (if the *universal_newlines* argument + was False) or :class:`io.TextIOWrapper` (if the + *universal_newlines* argument was True) object that provides output + from the child process. Otherwise, it is ``None``. .. attribute:: Popen.pid ---------- assignee: docs at python components: Documentation messages: 187535 nosy: Nikratio, docs at python priority: normal severity: normal status: open title: Popen.stdin/stdout/stderr documentation should mention object type type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 01:19:34 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 21 Apr 2013 23:19:34 +0000 Subject: [issue17814] Popen.stdin/stdout/stderr documentation should mention object type In-Reply-To: <1366586086.38.0.427506521088.issue17814@psf.upfronthosting.co.za> Message-ID: <1366586374.52.0.106573366001.issue17814@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think the specific classes are an implementation detail, but mentioning if the file object is a bytes or text stream seems reasonable. (Also it's better if you attach patches, instead of pasting them in the message.) ---------- nosy: +ezio.melotti stage: -> needs patch versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 01:19:42 2013 From: report at bugs.python.org (Tomoki Imai) Date: Sun, 21 Apr 2013 23:19:42 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366586382.36.0.964994952434.issue17348@psf.upfronthosting.co.za> Tomoki Imai added the comment: Thanks. I noticed Terry used python3 to confirm this problem... I am Japanese, but using English environment. Here is my locale settings. And I'm using Linux. konomi:tomoki% locale LANG=en_US.utf8 LC_CTYPE=en_US.UTF-8 LC_NUMERIC="en_US.utf8" LC_TIME="en_US.utf8" LC_COLLATE="en_US.utf8" LC_MONETARY="en_US.utf8" LC_MESSAGES="en_US.utf8" LC_PAPER="en_US.utf8" LC_NAME="en_US.utf8" LC_ADDRESS="en_US.utf8" LC_TELEPHONE="en_US.utf8" LC_MEASUREMENT="en_US.utf8" LC_IDENTIFICATION="en_US.utf8" LC_ALL= All strings used internally should be unicode type. In Japan, many many charset is here.(cp932,euc-jp,...). And, they causes problems in Python2 without converting it to unicode type. Remember, unicode type and "utf-8" is not same. When I type into Tkinter's Entry and get Entry's value,it returned me unicode. And deleted code converts unicode to str type. They are unified in Python3.(unicode become str,and str become byte). So, these lines are not in Python3 codes. I typed these strings using "Input Method"(am using uim). https://code.google.com/p/uim/ But, I don't know how uim generate these characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 01:27:50 2013 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 21 Apr 2013 23:27:50 +0000 Subject: [issue17814] Popen.stdin/stdout/stderr documentation should mention object type In-Reply-To: <1366586086.38.0.427506521088.issue17814@psf.upfronthosting.co.za> Message-ID: <1366586870.18.0.0965102273717.issue17814@psf.upfronthosting.co.za> Nikolaus Rath added the comment: I think it would also be rather important to know if the streams are buffered or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 01:56:10 2013 From: report at bugs.python.org (Jayakrishnan) Date: Sun, 21 Apr 2013 23:56:10 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366588570.32.0.245509704478.issue15392@psf.upfronthosting.co.za> Jayakrishnan added the comment: The aimed versions for this unit test frame work is python 3.3, 3.4. So as Nick said, unittest.mock may have no issues on this. As you said 3rd party modules seems not a better way.But the link you provided ( https://pypi.python.org/pypi/mock ) says .. "mock is now part of the Python standard library, available as unittest.mock in Python 3.3 onwards." And yes, GUI testings While I was writting my proposal on this project Todd.Rovito mentioned me " .. you should still complete some GUI tests so future developers will have a model. " ---------- nosy: +JayKrish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 02:21:49 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Mon, 22 Apr 2013 00:21:49 +0000 Subject: [issue17808] No code example for Event object in threading module In-Reply-To: <1366513053.37.0.736959521672.issue17808@psf.upfronthosting.co.za> Message-ID: <1366590109.11.0.274482877795.issue17808@psf.upfronthosting.co.za> Andriy Mysyk added the comment: Thank you for the feedback, Antoine. The example shows how to essentially kill threads through an event facilitated request, something that I consider to be useful and non-obvious. I trust that you and others will make the right decision and will keep your feedback in mind for any future patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 02:43:32 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Apr 2013 00:43:32 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366591412.88.0.3239825364.issue17348@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it does seem to me that there is something wrong here. Your fix may even be correct, but I'd hesitate to apply it without someone understanding why those lines were added in the first place. (I *think* they were added by Martin von Loewis, but I'm not 100% sure since the commit was part of a block of changes by different authors and I'm just guessing based on the comment on the commit.) I'm reopening the issue. I'll have to leave it to the idle team (or you) to figure out what the correct fix is that doesn't break anything :) ---------- nosy: +roger.serwy resolution: invalid -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 03:26:52 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Apr 2013 01:26:52 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366594012.32.0.0356144768575.issue17348@psf.upfronthosting.co.za> Terry J. Reedy added the comment: When discussing problematical behavior, one should specify OS and exact Python version, including bugfix number. If at all possible, one should use the latest bugfix release with all released bugfixes. 2.7.3 came out 10+ months before the original report. I do not presume without evidence that it has the same behavior as the 2.7.2. The recently released 2.7.4 has another year of bugfixes, so it might also behave differently. Looking again at the original report, I see that the false issue of lost encoding obscured to me a real problem: ord(u'?') is 8364, not 128. Does 2.7.4 make the same error for that input? What does it do with u"?????"? (Note, on the Windows console, both keying and viewing unicode chars is problematical, apparently more so that with the *nix consoles. If I could not paste, u"?????", I would most likely just key u'\u3053\u3093\u306b\u3061\u306f'.) I believe the underlying problem is that a Python 2 program is a stream of bytes while a Python 3 program is a stream of unicode codepoints. So in Python 2, a unicode literal has to be encoded to bytes before being decoded back to unicode codepoints in a unicode string object. David, I presume this is why you say we cannot just toss out the encoding to bytes. I presume that you are also suggesting that the encoding and subsequent decoding are done with different codecs because of locale issues. Might IOBinding.encoding be miscalculated? For ascii codepoints, the encoding and decoding is typically a null operation. This means that \u#### escapes, as opposed to non-ascii codepoints, should not get mangled before being interpreted during the creation of the unicode object. Using such escapes is one solution to the problem. Another is to use Python 3. That *is* the generic answer to many Python 2.x unicode problems. In 3.3.1: >>> u"?????" '?????' problem solved ;-). In other words, fixing 2.7-only unicode bugs has fairly low priority in general. However, if there is an easy fix here that Roger thinks is safe, it can be applied. ---------- resolution: -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 04:31:17 2013 From: report at bugs.python.org (John Ehresman) Date: Mon, 22 Apr 2013 02:31:17 +0000 Subject: [issue17717] Set up nasm from external.bat In-Reply-To: <1365870872.82.0.912332979443.issue17717@psf.upfronthosting.co.za> Message-ID: <1366597877.68.0.144235361091.issue17717@psf.upfronthosting.co.za> John Ehresman added the comment: What I'd like is for external to set up all the dependencies needed to build python and run the test suite. Yes, nasm can be downloaded and set up separately, but that's true of all of the libraries that external.bat downloads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 04:45:27 2013 From: report at bugs.python.org (Mike Lundy) Date: Mon, 22 Apr 2013 02:45:27 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <1366598727.86.0.987960252441.issue17795@psf.upfronthosting.co.za> Mike Lundy added the comment: I've tested in our full dev setup, and it seems to work fine; I've also tested on my laptop, no problems there either. Unfortunately, that's python 2.7.4 in both cases. I don't really have a python3 setup I can bump up to test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 04:56:14 2013 From: report at bugs.python.org (Jayakrishnan) Date: Mon, 22 Apr 2013 02:56:14 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366599374.38.0.619005020547.issue15392@psf.upfronthosting.co.za> Jayakrishnan added the comment: There is a need of a proper design in whether to put tests in test sub directory or to create idlelib/test directory. For my GSoc proposal initial draft, I suggested to start with Put tests in test/test_idle directory (like test/test_email would be the best practice). Test for the presence of idle and skip if idle is not available. Move the existing,pending tests for idle ( http://bugs.python.org/file27613/issue16226_test.patch , http://bugs.python.org/file24075/test_idlelib.py,....) into this directory. (which my patch 15392_idletestframework_1.patch did for me) Considering the point terry.reedy mentioned, "Adding test/test_idle will not be too much use until issue #10652 is resolved so it would actually run with -m test", my view is, the issue #10652 on this message is on a healthy patch review, so it would actually run with -m test in near-future Expecting your suggestions on this design decisions. ---------- keywords: +patch Added file: http://bugs.python.org/file29973/15392_idletestframework_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 05:17:42 2013 From: report at bugs.python.org (Tomoki Imai) Date: Mon, 22 Apr 2013 03:17:42 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366600662.37.0.214342769552.issue17348@psf.upfronthosting.co.za> Tomoki Imai added the comment: Sorry.I forgot to note my environment. I'm using Arch Linux. $ uname -a Linux manaka 3.8.7-1-ARCH #1 SMP PREEMPT Sat Apr 13 09:01:47 CEST 2013 x86_64 GNU/Linux And python version is here. $ python --version Python 2.7.4 IDLE's version is same, 2.7.4 downloaded from following link. http://www.python.org/download/releases/2.7.4/ In IDLE,I repeated original author's attempts. Python 2.7.4 (default, Apr 6 2013, 19:20:36) [GCC 4.8.0] on linux2 Type "copyright", "credits" or "license()" for more information. >>> c = u'?' >>> ord(c) Traceback (most recent call last): File "", line 1, in ord(c) TypeError: ord() expected a character, but string of length 3 found >>> c.encode('utf-8') '\xc3\xa2\xc2\x82\xc2\xac' >>> c u'\xe2\x82\xac' >>> print c ??? >>> c = u'\u20ac' >>> ord(c) 8364 >>> c.encode('utf-8') '\xe2\x82\xac' >>> c u'\u20ac' >>> print c ? >>> I have a problem.But it is different from original. After my fix. Python 2.7.4 (default, Apr 6 2013, 19:20:36) [GCC 4.8.0] on linux2 Type "copyright", "credits" or "license()" for more information. >>> c = u'?' >>> ord(c) 8364 >>> c.encode('utf-8') '\xe2\x82\xac' >>> c u'\u20ac' >>> print c ? >>> It works. Using unicode escape is one solution. But, we Japanese can type u'?????' just in 10 or 5 key types. And other people who use unicode literals for their language have same situation. Why IDLE users (probably beginner) use such workaround ? Of cource, using Python3 is best way. All beginner should start from Python3 now. But, there are people including me who have to use python2 because of libraries . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 06:41:51 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Apr 2013 04:41:51 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366605711.79.0.327802857531.issue17348@psf.upfronthosting.co.za> Ned Deily added the comment: I think this is another case where confusion is introduced by the behavior of Python 2 interactive mode with regard to encodings. In 2.x Python/pythonrun.c, depending on a number of factors the interactive loop will try to set a more useful encoding on stdin, stdout, and stderr for any of them assigned to a terminal (isatty) This is why the examples using the interpreter (not IDLE) work when the locale env variables (LANG, et al) are set to one that supports Unicode (like "en_US.utf8"). If you changed them to a non-Unicode locale (like "C") and ran the interpreter examples, they wouldn't work. Even clearer, if you used a Unicode-aware text editor to write the examples to files without a # -*- coding: utf-8 -*- directive and tried to run them with /usr/bin/python2.7, you'd get a syntax error. I suspect the issue here is that 2.x IDLE PyShell does not exactly mimic the behavior of the interpreter interactive loop about setting encodings for std*. A side issue is the limitation of Tk's support of non-BMP characters; because of that, it may not possible to fully mimic the interactive interpreter. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 06:46:23 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Apr 2013 04:46:23 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366605983.75.0.901849856063.issue17348@psf.upfronthosting.co.za> Ned Deily added the comment: Also see Issue15809 in which Martin proposed the same patch but then explained why it isn't totally correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 06:50:19 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Apr 2013 04:50:19 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366606219.04.0.822529806779.issue17348@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- Removed message: http://bugs.python.org/msg187547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 07:32:39 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Apr 2013 05:32:39 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366608759.11.0.924707781455.issue17348@psf.upfronthosting.co.za> R. David Murray added the comment: For those of us without fancy input methods, I was able to see the same problem using a simple non-ascii letter (an accented a: ?. You will note that my stdin encoding ought to be utf-8, so I'm not sure why it fails (but I didn't check that). Removing the lines in question makes it work, but as Martin says in the referenced issue I won't be surprised if that breaks working with a file that has a non-utf8 coding cookie. If Martin sees no way to make it work in Python2 it makes it pretty unlikely we'll find a fix :(. ---------- resolution: invalid -> stage: committed/rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 11:14:27 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Apr 2013 09:14:27 +0000 Subject: [issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets In-Reply-To: <1366354712.85.0.15970946625.issue17795@psf.upfronthosting.co.za> Message-ID: <3ZvMYZ30rpz7LlB@mail.python.org> Roundup Robot added the comment: New changeset 32a5de0e91d5 by Vinay Sajip in branch '2.7': Issue #17795: Reverted backwards-incompatible change in SysLogHandler with Unix domain sockets. http://hg.python.org/cpython/rev/32a5de0e91d5 New changeset d03784713786 by Vinay Sajip in branch '3.3': Issue #17795: Reverted backwards-incompatible change in SysLogHandler with Unix domain sockets. http://hg.python.org/cpython/rev/d03784713786 New changeset 9c0a677dbbc0 by Vinay Sajip in branch 'default': Closes #17795: Reverted backwards-incompatible change in SysLogHandler with Unix domain sockets. http://hg.python.org/cpython/rev/9c0a677dbbc0 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 11:40:56 2013 From: report at bugs.python.org (Ilya Konkov) Date: Mon, 22 Apr 2013 09:40:56 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366623656.72.0.815384046642.issue17732@psf.upfronthosting.co.za> Changes by Ilya Konkov : ---------- nosy: +eruart _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 12:00:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 10:00:33 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1366624833.72.0.722009413836.issue15809@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The problem (as I understand it) is that if Martin's patch fixes an unicode literals, it breaks a string literals. LC_ALL=ru_RU.cp1251 LANG=ru_RU.cp1251 ./python Lib/idlelib/idle.py >>> print u'????' ???? >>> print '????' ???????? Here is a different patch, which fixes unicode strings and preserve byte strings. >>> print u'????' ???? >>> print '????' ???? ---------- nosy: +kbk, roger.serwy Added file: http://bugs.python.org/file29974/idle_compile_coding_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 12:01:27 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 10:01:27 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366624887.14.0.867068939364.issue17348@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> duplicate superseder: -> IDLE console uses incorrect encoding. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 12:54:26 2013 From: report at bugs.python.org (Mher Movsisyan) Date: Mon, 22 Apr 2013 10:54:26 +0000 Subject: [issue17403] Robotparser fails to parse some robots.txt In-Reply-To: <1363085904.54.0.398684856881.issue17403@psf.upfronthosting.co.za> Message-ID: <1366628066.96.0.192717308538.issue17403@psf.upfronthosting.co.za> Mher Movsisyan added the comment: Can you share the link of the new robots.txt standard? I may help to implement it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 13:02:21 2013 From: report at bugs.python.org (Martin Morrison) Date: Mon, 22 Apr 2013 11:02:21 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <1366628541.51.0.511772962378.issue17646@psf.upfronthosting.co.za> Martin Morrison added the comment: Attached another diff, which includes new test cases to cover all functions that weren't covered before - expect print_last. I couldn't see a way of getting sys.last_* set to test that function (it seems to require an "unhandled exception"). However, the function is a simple wrapper around print_exception, and I have tested it manually in the interactive interpreter. ---------- Added file: http://bugs.python.org/file29975/issue17646-5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 13:46:58 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 11:46:58 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366631218.08.0.989069718586.issue17804@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I'm not against adding useful C tools to itertools, but you may have to convince Raymond ;) C implementation speeds up the benchmark only 1.5x. Granting the fact that this idiom is used in stdlib less than two dozens times (without tests and iobench), I do not think more this is a worthful idea. > I'll take a look, but the question is how complex a C implementation would be. Definitely it will be more complex than for iter_unpack. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 14:29:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Apr 2013 12:29:02 +0000 Subject: [issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords In-Reply-To: <1366031212.38.0.552798611166.issue17736@psf.upfronthosting.co.za> Message-ID: <3ZvRt5435xzSjm@mail.python.org> Roundup Robot added the comment: New changeset 041960bf92fe by Eli Bendersky in branch '3.3': Issue #17736: fix misleading comment in _elementtree.c http://hg.python.org/cpython/rev/041960bf92fe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 14:29:32 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Apr 2013 12:29:32 +0000 Subject: [issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords In-Reply-To: <1366031212.38.0.552798611166.issue17736@psf.upfronthosting.co.za> Message-ID: <3ZvRtg5tmZz7Lms@mail.python.org> Roundup Robot added the comment: New changeset 3bfe8327612a by Eli Bendersky in branch 'default': Issue #17736: fix misleading comment in _elementtree.c http://hg.python.org/cpython/rev/3bfe8327612a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 14:32:38 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 22 Apr 2013 12:32:38 +0000 Subject: [issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords In-Reply-To: <1366031212.38.0.552798611166.issue17736@psf.upfronthosting.co.za> Message-ID: <1366633958.76.0.836601924364.issue17736@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 14:39:17 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Apr 2013 12:39:17 +0000 Subject: [issue17403] Robotparser fails to parse some robots.txt In-Reply-To: <1363085904.54.0.398684856881.issue17403@psf.upfronthosting.co.za> Message-ID: <1366634357.36.0.128932949456.issue17403@psf.upfronthosting.co.za> R. David Murray added the comment: I haven't a clue, that was part of the research I was going to do but haven't done yet (and probably won't for now...I'll wait to see if you or Lukaz pick it up first :). I see he didn't nosy himself on the issue yet, though, so I've done that. Maybe he'll respond. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 14:44:58 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Apr 2013 12:44:58 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1366634698.55.0.577028533766.issue15809@psf.upfronthosting.co.za> R. David Murray added the comment: I've combined the nosy lists and will close the other issue. Serhiy, what if the source already has a coding cookie line? ---------- nosy: +Pradyun.Gedam, Tomoki.Imai, ned.deily, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 14:45:51 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Apr 2013 12:45:51 +0000 Subject: [issue17348] Unicode - encoding seems to be lost for inputs of unicode chars in IDLE In-Reply-To: <1362394177.55.0.407970210278.issue17348@psf.upfronthosting.co.za> Message-ID: <1366634751.89.0.724431976265.issue17348@psf.upfronthosting.co.za> R. David Murray added the comment: Serhiy has proposed a patch on the older issue, closing this one since it is a duplicate. ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 15:16:24 2013 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 22 Apr 2013 13:16:24 +0000 Subject: [issue17403] Robotparser fails to parse some robots.txt In-Reply-To: <1363085904.54.0.398684856881.issue17403@psf.upfronthosting.co.za> Message-ID: <1366636584.55.0.57701637202.issue17403@psf.upfronthosting.co.za> ?ukasz Langa added the comment: robotparser implements http://www.robotstxt.org/orig.html, there's even a link to this document at http://docs.python.org/3/library/urllib.robotparser.html. As mher points out, there's a newer version of that spec formed as RFC: http://www.robotstxt.org/norobots-rfc.txt. It introduces Allow, specifies how percentage encoding should be treated and how to handle expiration. Moreover, there is a de facto standard agreed by Google, Yahoo and Microsoft in 2008, documented by their respective blog posts: http://googlewebmastercentral.blogspot.com/2008/06/improving-on-robots-exclusion-protocol.html http://www.ysearchblog.com/2008/06/03/one-standard-fits-all-robots-exclusion-protocol-for-yahoo-google-and-microsoft/ http://www.bing.com/blogs/site_blogs/b/webmaster/archive/2008/06/03/robots-exclusion-protocol-joining-together-to-provide-better-documentation.aspx For reference, there are two third-party robots.txt parsers out there implementing these extensions: - https://pypi.python.org/pypi/reppy - https://pypi.python.org/pypi/robotexclusionrulesparser We need to decide how to incorporate those new features while maintaining backwards compatibility concerns. ---------- assignee: -> lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 15:29:16 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 22 Apr 2013 13:29:16 +0000 Subject: [issue17403] Robotparser fails to parse some robots.txt In-Reply-To: <1363085904.54.0.398684856881.issue17403@psf.upfronthosting.co.za> Message-ID: <1366637356.31.0.148879290969.issue17403@psf.upfronthosting.co.za> Senthil Kumaran added the comment: My suggestion for this issue is going ahead with patch2 of Mher. It does a simple normalization and does the right thing. The case in the question is an empty query string and behavior or Allow and Disallow for that and patch addresses that. (I don't know why this *bug* was not detected earlier) Robotparser implements the updated one ( www.robotstxt.org/norobots-rfc.txt) - You can check for Allow string verification in both code and tests. That said, if updating robotparser further to more compliant with many cases which the 3rd party modules adhere, +1 to that. I suggest that be taken as a different issue and not be confused with this bug. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 15:30:24 2013 From: report at bugs.python.org (Tomoki Imai) Date: Mon, 22 Apr 2013 13:30:24 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366637424.58.0.865835276419.issue15392@psf.upfronthosting.co.za> Tomoki Imai added the comment: Oh, no support for Python2? I think, it is too old, but still needs bug-fix supports. IDLE for Python2 is really buggy. For example, unicode problems in my environment. http://bugs.python.org/issue17348 It might be GUI related problem. By the way, your proposal seemed good to me. My proposal is almost same. Using unittest module, make directory such as idlelib/test and write unittest there. But I want to include Python2 and GUI support. (So, there are unittset.mock problem) Of cource, it is very import to concentrate on one thing (i.e Python3). I cannot deside whether to drop Python2 support now. I considered PEP 434 premit me writing unittest for Python2. http://www.python.org/dev/peps/pep-0434/ How do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 16:04:35 2013 From: report at bugs.python.org (Nick Sloan) Date: Mon, 22 Apr 2013 14:04:35 +0000 Subject: [issue17732] distutils.cfg Can Break venv In-Reply-To: <1365963032.26.0.766714843383.issue17732@psf.upfronthosting.co.za> Message-ID: <1366639475.62.0.728466023195.issue17732@psf.upfronthosting.co.za> Nick Sloan added the comment: ?ric, Fixed the mention of packages, and made a frozenset of ignore_options. Think this thing is ready to go. I have tested it, and it does the trick. Thanks for helping me get this patch merged in. ---------- Added file: http://bugs.python.org/file29976/distutilsvenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 16:14:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 14:14:25 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1366640065.56.0.52720171821.issue15809@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A coding cookie line will be ignored. Note that this affects only very obscure case when you are pasting a multiline code with a coding cookie line into IDLE shell (this is only way to get a coding cookie line in the shell). Running a file does not pass through runsource(). runsource() used only for a code entered in the shell (may be Martin or Roger correct me if I wrong) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 16:22:15 2013 From: report at bugs.python.org (Stefan Mihaila) Date: Mon, 22 Apr 2013 14:22:15 +0000 Subject: [issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila In-Reply-To: <1344890920.23.0.695633734046.issue15642@psf.upfronthosting.co.za> Message-ID: <1366640535.51.0.497031671572.issue15642@psf.upfronthosting.co.za> Stefan Mihaila added the comment: Hello. I apologize once again for not finalizing my work, but once I have started my final year of faculty and a job, I have been busy pretty much all the time. I would really like to finish this as I've really enjoyed working on it, and everything on PEP 3154 and some other stuff has already been implemented. The only remaining part was finalizing the code review and fixing some memory leaks that gave me some headaches at the time. I would really appreciate if you could give me a few more days before deciding to start a new implementation from scratch. I'll get to fixing those memory leaks in the next couple of days and then the code review can be finalized. Would this be acceptable to you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 17:15:08 2013 From: report at bugs.python.org (Theodoros Ikonomou) Date: Mon, 22 Apr 2013 15:15:08 +0000 Subject: [issue17815] itertools.combinations example is overly complicated Message-ID: <1366643708.73.0.241168668546.issue17815@psf.upfronthosting.co.za> New submission from Theodoros Ikonomou: I find the code presented as equivalent for itertools.combinations is overly complex. I think we can change it to something easier like the following: def combinations(iterable, r): i, size = 0, len(iterable) while i + r - 1 < size: subindex = i+1 while subindex + r - 2 < size: yield (iterable[i],) + tuple(iterable[subindex:subindex+r-1]) subindex += r - 1 i += 1 ---------- assignee: docs at python components: Documentation messages: 187566 nosy: Theodoros.Ikonomou, docs at python priority: normal severity: normal status: open title: itertools.combinations example is overly complicated type: behavior 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 Apr 22 17:21:48 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Apr 2013 15:21:48 +0000 Subject: [issue9607] Test file 'test_keyword.py' submission for use with keyword.py In-Reply-To: <1281849348.53.0.810648733764.issue9607@psf.upfronthosting.co.za> Message-ID: <1366644108.89.0.106189542817.issue9607@psf.upfronthosting.co.za> ?ric Araujo added the comment: Just wanted to note that addCleanup is smarter than many core devs think: self.addCleanup(lambda: setattr(keyword, 'kwlist', oldlist)) self.addCleanup(setattr, keyword, 'kwlist', oldlist) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 17:30:52 2013 From: report at bugs.python.org (Theodoros Ikonomou) Date: Mon, 22 Apr 2013 15:30:52 +0000 Subject: [issue17815] itertools.combinations example is overly complicated In-Reply-To: <1366643708.73.0.241168668546.issue17815@psf.upfronthosting.co.za> Message-ID: <1366644652.33.0.151607127528.issue17815@psf.upfronthosting.co.za> Changes by Theodoros Ikonomou : ---------- resolution: -> postponed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 17:32:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 15:32:15 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1366644735.14.0.220880176975.issue15809@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: An interactive Python console ignores a coding cookie line too. $ cat test.py # -*- coding: koi8-r -*- print repr('????'), '????', repr(u'????'), u'????' $ LC_ALL=ru_RU.cp1251 LANG=ru_RU.cp1251 ./python test.py '\xe9\xf6\xf3\xea' ???? u'\u0418\u0416\u0421\u0419' ???? $ LC_ALL=ru_RU.cp1251 LANG=ru_RU.cp1251 ./python Python 2.7.4+ (2.7:0f31f38e8a17+, Apr 13 2013, 21:06:36) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> # -*- coding: koi8-r -*- ... print repr('????'), '????', repr(u'????'), u'????' '\xe9\xf6\xf3\xea' ???? u'\u0439\u0446\u0443\u043a' ???? ('\xe9\xf6\xf3\xea' is '????' in cp1251 and '????' in koi8-r) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 18:15:27 2013 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Apr 2013 16:15:27 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366647327.61.0.715659491847.issue15392@psf.upfronthosting.co.za> R. David Murray added the comment: I think the issue of whether/how to test Python2 idle should be discussed on idle-dev. One strategy is to make the tests backward compatible (so no mock). Another possible strategy is to have an extra bit of test framework for IDLE in 2.7 that copies the tests and mock from another location in order to run tests against 2.7. That is, the tests wouldn't be an official part of the 2.7 repro and would not be run by the buildbots. The reason for doing that would be to allow the Python3 tests to be as rich as possible while still doing some testing on 2.7. But that's just a thought experiment, as I said I think the full strategy should be hashed out on idle-dev (I'm not a member of that list :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 18:41:04 2013 From: report at bugs.python.org (Nils Bruin) Date: Mon, 22 Apr 2013 16:41:04 +0000 Subject: [issue17816] Weak*Dictionary KeyErrors during callbacks Message-ID: <1366648864.21.0.829843721965.issue17816@psf.upfronthosting.co.za> New submission from Nils Bruin: The following program is a little dependent on memory layout but will usually generate lots of Exception KeyError: (A(9996),) in ignored messages in Python 2.7. import weakref class A(object): def __init__(self,n): self.n=n def __repr__(self): return "A(%d)"%self.n def mess(n): D=weakref.WeakValueDictionary() L=[A(i) for i in range(n)] for i in range(n-1): j=(i+10)%n D[L[i]]=L[j] return D D=mess(10000) D.clear() The reason is that on D.clear() all entries are removed from D before actually deleting those entries. Once the entries are deleted one-by-one, sometimes the removal of a key will result in deallocation of that key, which may be a not-yet-deleted ex-value of the dictionary as well. The callback triggers on the weakref, but the dict itself was already emptied, so nothing is found. I've checked and on Python 3.2.3 this problem does not seem to occur. I haven't checked the Python source to see how Python 3 behaves differently and whether that behaviour would be easy to backport to fix this bug in 2.7. ---------- components: Library (Lib) messages: 187570 nosy: Nils.Bruin priority: normal severity: normal status: open title: Weak*Dictionary KeyErrors during callbacks versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 18:44:58 2013 From: report at bugs.python.org (Zachary Ware) Date: Mon, 22 Apr 2013 16:44:58 +0000 Subject: [issue17717] Set up nasm from external.bat In-Reply-To: <1365870872.82.0.912332979443.issue17717@psf.upfronthosting.co.za> Message-ID: <1366649098.71.0.568694572349.issue17717@psf.upfronthosting.co.za> Zachary Ware added the comment: I agree it would be nice, but I'm not sure how easy or practical it would be to implement, particularly making sure that NASM is on the PATH. And besides, at some point, we have to draw the line between what we can reasonably do for a user and what we can reasonably expect a user to do for themselves. That line falls at minimum after installation of Visual C++ 2010, which would be nearly impossible to properly install from a batch script, and is currently also after installation of NASM and Perl, which are both optional anyway--you can build Python without NASM, you'll just have build errors and won't have SSL support. I think that's a reasonable place to keep the line: short of trying to install external programs for the user. I think it would be good to have a nice error/warning message in build.bat if NASM (or MSVC++, for that matter) can't be found, possibly with a URL pointing to where to look for an installer. Something along the lines of: """ where nasm >nul 2>&1 if %ERRORLEVEL% == 1 ( echo NASM not found on PATH. It can be downloaded from www.nasm.us set /P _continue=Continue without NASM? (y/n) if %_continue% == n exit /B 1 else echo Continuing... ) """ Does that come anywhere close to scratching your itch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 19:06:31 2013 From: report at bugs.python.org (Volker Braun) Date: Mon, 22 Apr 2013 17:06:31 +0000 Subject: [issue17816] Weak*Dictionary KeyErrors during callbacks In-Reply-To: <1366648864.21.0.829843721965.issue17816@psf.upfronthosting.co.za> Message-ID: <1366650391.04.0.802647513648.issue17816@psf.upfronthosting.co.za> Volker Braun added the comment: This is http://bugs.python.org/issue7105. The patch from there could easily be backported, I think. ---------- nosy: +vbraun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 19:21:52 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Apr 2013 17:21:52 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <3ZvZMz3RlbzSG4@mail.python.org> Roundup Robot added the comment: New changeset 5c45d0ca984f by Serhiy Storchaka in branch 'default': Issue #16624: `subprocess.check_output` now accepts an `input` argument, http://hg.python.org/cpython/rev/5c45d0ca984f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 19:23:51 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 17:23:51 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1366651431.73.0.230559287093.issue16624@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Zack for you patch. Thanks Mark for testing. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 19:57:22 2013 From: report at bugs.python.org (=?utf-8?q?Ricardo_Gonz=C3=A1lez?=) Date: Mon, 22 Apr 2013 17:57:22 +0000 Subject: =?utf-8?q?=5Bissue17817=5D_=C2=BFBug_Python_2=2E7=2E4_and_version_3=2E3?= =?utf-8?b?LjE/?= Message-ID: <1366653442.82.0.335522989154.issue17817@psf.upfronthosting.co.za> New submission from Ricardo Gonz?lez: Hello, There seems to be a bug in versions 2.7.4 and 3.3.1 by typing the following error in IDLE (Python GUI) Windows 8 64 bit: Python 2.7.4 (default, Apr 6 2013, 19:55:15) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> exit() >>> modules Traceback (most recent call last): File "", line 1, in modules NameError: name 'modules' is not defined >>> help() Welcome to Python 2.7! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/2.7/tutorial/ . Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, or topics, type "modules", "keywords", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as "spam", type "modules spam". help> Traceback (most recent call last): File "", line 1, in help() File "C:\Python27\lib\site.py", line 467, in __call__ return pydoc.help(*args, **kwds) File "C:\Python27\lib\pydoc.py", line 1751, in __call__ self.interact() File "C:\Python27\lib\pydoc.py", line 1763, in interact request = self.getline('help> ') File "C:\Python27\lib\pydoc.py", line 1774, in getline return raw_input(prompt) File "C:\Python27\lib\idlelib\PyShell.py", line 1347, in readline raise ValueError("read from closed file") ValueError: read from closed file >>> quit Use quit() or Ctrl-Z plus Return to exit >>> quit() >>> Pressing Ctrl-Z is not closed and if we write exit() or quit() either, this happens in both 2.7.4 and 3.3.1 versions. Regards. ---------- components: IDLE, Windows messages: 187575 nosy: Ricardo priority: normal severity: normal status: open title: ?Bug Python 2.7.4 and version 3.3.1? type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 20:05:48 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 22 Apr 2013 18:05:48 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366653948.9.0.962817156997.issue15301@psf.upfronthosting.co.za> Larry Hastings added the comment: Can I get an LGTM? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 20:09:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 18:09:20 +0000 Subject: =?utf-8?q?=5Bissue17817=5D_=C2=BFBug_Python_2=2E7=2E4_and_version_3=2E3?= =?utf-8?b?LjE/?= In-Reply-To: <1366653442.82.0.335522989154.issue17817@psf.upfronthosting.co.za> Message-ID: <1366654160.76.0.247077469878.issue17817@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Those bugs likely were fixed in issue17585 and issue14735 last week. ---------- nosy: +kbk, roger.serwy, serhiy.storchaka, terry.reedy versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 20:23:53 2013 From: report at bugs.python.org (Nils Bruin) Date: Mon, 22 Apr 2013 18:23:53 +0000 Subject: [issue17816] Weak*Dictionary KeyErrors during callbacks In-Reply-To: <1366648864.21.0.829843721965.issue17816@psf.upfronthosting.co.za> Message-ID: <1366655033.02.0.0531526540173.issue17816@psf.upfronthosting.co.za> Nils Bruin added the comment: Have you tried if the fix at issue7105 solves the problem? I don't see the patch there introduce a `clear` method override for WeakValueDictionary or WeakKeyDictionary. The one for WeakSet still calls self.data.clear(), which for dictionaries would still result in the problem in this ticket (but not for WeakSet, because clearing a WeakSet shouldn't decref anything other than the weak references stored in the underlying set). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 20:33:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 18:33:40 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366655620.35.0.725699110247.issue15301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New tests needed (with Decimal and Fraction). And what is purpose of changing Py_TYPE(o) to o->ob_type? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 20:39:06 2013 From: report at bugs.python.org (Phil Connell) Date: Mon, 22 Apr 2013 18:39:06 +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: <1366655946.63.0.0905150554337.issue7475@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 21:07:19 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 22 Apr 2013 19:07:19 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366657639.57.0.903968340396.issue15301@psf.upfronthosting.co.za> Larry Hastings added the comment: Latest patch incorporating Serihy's comments. ---------- Added file: http://bugs.python.org/file29977/larry.chown.unsigned.uid.gid.4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 21:10:17 2013 From: report at bugs.python.org (Larry Hastings) Date: Mon, 22 Apr 2013 19:10:17 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366657817.13.0.272538318054.issue15301@psf.upfronthosting.co.za> Larry Hastings added the comment: Whoops, meant to throw in a Fraction too. Added that. Also hoisted the imports out of the function call, just to be a good guy. ---------- Added file: http://bugs.python.org/file29978/larry.chown.unsigned.uid.gid.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 21:10:29 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Apr 2013 19:10:29 +0000 Subject: [issue17717] Set up nasm from external.bat In-Reply-To: <1365870872.82.0.912332979443.issue17717@psf.upfronthosting.co.za> Message-ID: <1366657829.94.0.972980382714.issue17717@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 21:26:41 2013 From: report at bugs.python.org (Thomas Barlow) Date: Mon, 22 Apr 2013 19:26:41 +0000 Subject: [issue17802] html.HTMLParser raises UnboundLocalError: In-Reply-To: <1366455496.44.0.252693262326.issue17802@psf.upfronthosting.co.za> Message-ID: <1366658801.2.0.27800078033.issue17802@psf.upfronthosting.co.za> Thomas Barlow added the comment: Just adding a patch here with a few unit tests to demonstrate the issue, comments here are welcome. This is my first patch, I believe I have put the tests in the correct place. It appears the problem only occurs if there is an incomplete XML entity where a sequence of valid characters (for an XML entity's name) lead to the end-of-file. The test case for "a&b " passes, as it detects the space as an illegal character for the entity name. ---------- keywords: +patch nosy: +Thomas.Barlow Added file: http://bugs.python.org/file29979/issue17802-unittest.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 21:35:25 2013 From: report at bugs.python.org (Paul Hoffman) Date: Mon, 22 Apr 2013 19:35:25 +0000 Subject: [issue3132] implement PEP 3118 struct changes In-Reply-To: <1213741832.59.0.0620778602246.issue3132@psf.upfronthosting.co.za> Message-ID: <1366659325.35.0.227157003765.issue3132@psf.upfronthosting.co.za> Paul Hoffman added the comment: Following up on http://mail.python.org/pipermail/python-ideas/2011-March/009656.html, I would like to request that struct also handle half-precision floats directly. It's a short change, and half-precision floats are becoming much more popular in applications. Adding this to struct would also maybe need to change math.isinf and math.isnan, but maybe not. ---------- nosy: +paulehoffman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 21:37:34 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Mon, 22 Apr 2013 19:37:34 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple Message-ID: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> New submission from Claudiu.Popa: Hello! Given the fact that issue 17487 was accepted, I think that is a good idea for aifc.Aifc_read/Aifc_write.getparams to return a namedtuple as well, so that both modules will behave consistently with each other. I've attached a patch for this. Thanks in advance! ---------- components: Library (Lib) files: aifc.patch keywords: patch messages: 187584 nosy: Claudiu.Popa priority: normal severity: normal status: open title: aifc.Aifc_read/Aifc_write.getparams can return a namedtuple type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29980/aifc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 21:57:31 2013 From: report at bugs.python.org (Paul Melis) Date: Mon, 22 Apr 2013 19:57:31 +0000 Subject: [issue10513] sqlite3.InterfaceError after commit In-Reply-To: <1290515734.43.0.643837241692.issue10513@psf.upfronthosting.co.za> Message-ID: <1366660651.56.0.107235780683.issue10513@psf.upfronthosting.co.za> Paul Melis added the comment: Here's a patch that removes the pysqlite_do_all_statements(self, ACTION_RESET, 0); call. It also adds the sqlite error code to one of the exceptions raised, as the error message is misleading in case the ACTION_RESET is left in (I forgot what sqlite error is actually raised in that case). I've been using this patch for some while now with 2.7.3 and it fixes similar problems as noted in this thread. ---------- keywords: +patch nosy: +paulmelis Added file: http://bugs.python.org/file29981/bug10513.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 21:57:51 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Apr 2013 19:57:51 +0000 Subject: [issue11714] threading.Semaphore does not use try...finally In-Reply-To: <1301429285.55.0.524593153571.issue11714@psf.upfronthosting.co.za> Message-ID: <3Zvdqy4lYQz7LkH@mail.python.org> Roundup Robot added the comment: New changeset 2253b8a18bbf by Serhiy Storchaka in branch '2.7': Issue #11714: Use 'with' statements to assure a Semaphore releases a http://hg.python.org/cpython/rev/2253b8a18bbf New changeset af30c5cb248f by Serhiy Storchaka in branch '3.3': Issue #11714: Use 'with' statements to assure a Semaphore releases a http://hg.python.org/cpython/rev/af30c5cb248f New changeset a26df2d03989 by Serhiy Storchaka in branch 'default': Issue #11714: Use 'with' statements to assure a Semaphore releases a http://hg.python.org/cpython/rev/a26df2d03989 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 22:02:09 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Apr 2013 20:02:09 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366660929.56.0.705689157106.issue15392@psf.upfronthosting.co.za> Terry J. Reedy added the comment: When I opened this last July, I intentionally left off 2.7 for multiple reasons. 1. I knew that the new-in-3.3 mock module would probably be needed for some types of testing. (As for 3.2: at that time, I expected 3.2.4 to be released in September or October, just after 3.3.0, as would have been normal.) 2. 2.7 is yesterday's horse. I hope we fix disabling bugs before maintenance stops. I do not expect all new features to be backported. I personally have no motivation to do so if a patch does not apply cleanly, or nearly so. Also, I knew that a full test suite would not happen instantly and that 2.7 maintenance would probably be tapering off by the time one was fully in place. 3. My experience with calltips #12510: I fixed IDLE closing bugs for all versions. I did not backport all the text display improvements; the 2.7 code was different partly due to dealing with old-style classes. I did not backport the new tests I added in msg162510 and msg165057. They depend matching exact texts. They will need to be changed again when calltips are adjusted to the new multiline signatures in builtin-function docstrings. The will probably need to be changed if calltips are changed to use the new-in-3.3 signature objects. There are proposed 3.4 changes for compiling C functions that might impact calltips. 4. There was no PEP 434 ;-). While *I* considered the relaxed backport policy to be the defacto policy then, it *was* a bit fuzzy, and others disagreed. With the PEP accepted, I am more open to backporting at least some tests if someone else (like Tomoki) does most of the additional work. (I plan to start with this issue when my development machine is back from repairs and proper set up again.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 22:05:03 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Apr 2013 20:05:03 +0000 Subject: [issue11714] threading.Semaphore does not use try...finally In-Reply-To: <1301429285.55.0.524593153571.issue11714@psf.upfronthosting.co.za> Message-ID: <1366661103.99.0.228310049438.issue11714@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for the patch. 'try/finally' can't be replaced by 'with' statements in the _Event class because a conditional variable should be reinitialized in _reset_internal_locks() after fork. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 22:14:27 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 22 Apr 2013 20:14:27 +0000 Subject: [issue3132] implement PEP 3118 struct changes In-Reply-To: <1213741832.59.0.0620778602246.issue3132@psf.upfronthosting.co.za> Message-ID: <1366661667.62.0.534227075002.issue3132@psf.upfronthosting.co.za> Mark Dickinson added the comment: Paul: there's already an open issue for adding float16 to the struct module: see issue 11734. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 22:16:02 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 22 Apr 2013 20:16:02 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1366661762.59.0.168615117778.issue11734@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'll take a look at the numerics. ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 22:18:40 2013 From: report at bugs.python.org (Paul Hoffman) Date: Mon, 22 Apr 2013 20:18:40 +0000 Subject: [issue3132] implement PEP 3118 struct changes In-Reply-To: <1213741832.59.0.0620778602246.issue3132@psf.upfronthosting.co.za> Message-ID: <1366661920.71.0.463807460021.issue3132@psf.upfronthosting.co.za> Paul Hoffman added the comment: Whoops, never mind. Thanks for the pointer to 11734. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 22:22:04 2013 From: report at bugs.python.org (Paul Hoffman) Date: Mon, 22 Apr 2013 20:22:04 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1366662124.41.0.320343952403.issue11734@psf.upfronthosting.co.za> Paul Hoffman added the comment: Just another voice for seeing this put in a deployed version of Python. Half-precision floats are becoming more common in applications. Question: does adding this affect math.isnan and math.isinf? ---------- nosy: +paulehoffman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 22:50:11 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Apr 2013 20:50:11 +0000 Subject: [issue10513] sqlite3.InterfaceError after commit In-Reply-To: <1290515734.43.0.643837241692.issue10513@psf.upfronthosting.co.za> Message-ID: <1366663811.16.0.426778702213.issue10513@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 23:10:53 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 22 Apr 2013 21:10:53 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <1366665053.86.0.110146478321.issue17729@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I suggest just dropping this HOWTO. It was written to contrast using Python with using only a low-level language such as C. Today there may still be some people arguing over whether to use a low-level or high-level language, but I think the idea of using high-level languages has certainly won out. An advocacy howto written today would be completely different. Today we're more likely to write an advocacy micro website instead of a howto, so we should just discard this document. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 22 23:25:36 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 22 Apr 2013 21:25:36 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <1366665936.16.0.417630119207.issue17729@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: That's great to hear, especially coming from the author. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 00:00:47 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Apr 2013 22:00:47 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366509808.92.0.502616719861.issue17742@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: "I expect that replacing "*p++ = c;" with "*writer.str++ = c;" would not add an important overhead, especially because writer is a local variable, and str is the first attribute of the structure. I hope that the machine code will be exactly the same." I ran some benchmarks: performances are better in some cases, but worse in other cases. Performances are worse for simple loop like: while (collstart++ _______________________________________ From report at bugs.python.org Tue Apr 23 00:29:53 2013 From: report at bugs.python.org (paul j3) Date: Mon, 22 Apr 2013 22:29:53 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366669793.78.0.628838614105.issue14191@psf.upfronthosting.co.za> paul j3 added the comment: The attached file has a 'parse_intermixed_args()' that has the same API as 'parse_known_args()'. It follows the two parse step model args, remaining_args = optionals.parse_known_args() args, extras = positionals.parse_known_args(remaining_args, args) except that the 'optionals parser' is self with the positional arguments 'deactivated' by setting their nargs to 0. Similarly the 'positionals parser' is self with the optional arguments set to 'required=false'. Here it is in a standalone test module illustrating its functionality and limitations. I could provide a patch, but this form might easier to test in your own code. When used to run test_argparse.py, it had problems in the cases where the distinction between positionals and optionals is blurred. For example, PARSER and REMAINDER are supposed to grab everything that follows regardless of what it looks like. I choose to fall back on a single 'parse_know_args' call. Raising an error would the alternative. Similarly, a mutually exclusive group that includes a positional is difficult to handle. Again I fall back on the single step. So the two issues to be discussed are: - does it provide the desired freedom to mix optionals and positionals? - in the difficult cases, should it punt, or raise an error? ---------- Added file: http://bugs.python.org/file29982/test_intermixed.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 00:42:13 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Apr 2013 22:42:13 +0000 Subject: [issue12238] Readline module loading in interactive mode In-Reply-To: <1307015860.03.0.129842780518.issue12238@psf.upfronthosting.co.za> Message-ID: <1366670533.92.0.441271524589.issue12238@psf.upfronthosting.co.za> STINNER Victor added the comment: We may add a command line option and/or an environment variable to not add the current directory to sys.path. Changing the current behaviour may break many applications / use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 00:45:37 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Apr 2013 22:45:37 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1366670737.67.0.39945001222.issue16499@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 00:46:17 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Apr 2013 22:46:17 +0000 Subject: [issue12238] Readline module loading in interactive mode In-Reply-To: <1307015860.03.0.129842780518.issue12238@psf.upfronthosting.co.za> Message-ID: <1366670777.41.0.943562355935.issue12238@psf.upfronthosting.co.za> STINNER Victor added the comment: > We may add a command line option and/or an environment variable to not add the current directory to sys.path. Oh, this is exactly what the issue #16499 proposes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 02:22:35 2013 From: report at bugs.python.org (Antonio Cavallo) Date: Tue, 23 Apr 2013 00:22:35 +0000 Subject: [issue17819] removes need for CONFIG_SITE external configuration Message-ID: <1366676555.13.0.0940928027778.issue17819@psf.upfronthosting.co.za> New submission from Antonio Cavallo: This patch introduces two new options (--enable-ptmx, --enable-ptc) to the configure script. In cross compile the actual code requires an external config.site config file to set the result values for the AC_CHECK_FILE macros on /dev/ptmx, /dev/ptc. These flags forces (if given) the result of the AC_CHECK_FILE macros: if the flags aren't given then the AC_CHECK_FILE tests are run as normal providing an error message when in cross compile mode (explicit behavior). (patch applied on revision 251c5b4bb05d) ---------- components: Build, Cross-Build files: configure.ac.patch keywords: patch messages: 187599 nosy: cavallo71 priority: normal severity: normal status: open title: removes need for CONFIG_SITE external configuration type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29983/configure.ac.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 03:02:44 2013 From: report at bugs.python.org (Mike Milkin) Date: Tue, 23 Apr 2013 01:02:44 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1366678964.96.0.374423279373.issue9682@psf.upfronthosting.co.za> Mike Milkin added the comment: There are a few of interesting parts. 1.) I noticed that the ToASCII class is not tested. 2.) I had some unreachable branches due to concatenation of constant variable ace_prefix. 3) I also found it weird that we only check the max of labels[-1], but decided to perserve the original functionality. ---------- Added file: http://bugs.python.org/file29984/Issue9682.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 03:03:24 2013 From: report at bugs.python.org (Mike Milkin) Date: Tue, 23 Apr 2013 01:03:24 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1366679004.61.0.353565520585.issue9682@psf.upfronthosting.co.za> Changes by Mike Milkin : Removed file: http://bugs.python.org/file29850/Issue9682-full.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 03:04:23 2013 From: report at bugs.python.org (Mike Milkin) Date: Tue, 23 Apr 2013 01:04:23 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1366679063.61.0.109304392387.issue9682@psf.upfronthosting.co.za> Changes by Mike Milkin : Removed file: http://bugs.python.org/file29984/Issue9682.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 03:04:37 2013 From: report at bugs.python.org (Mike Milkin) Date: Tue, 23 Apr 2013 01:04:37 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1366679077.89.0.588049793704.issue9682@psf.upfronthosting.co.za> Changes by Mike Milkin : Added file: http://bugs.python.org/file29985/Issue9682-42213.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 03:10:02 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 23 Apr 2013 01:10:02 +0000 Subject: =?utf-8?q?=5Bissue17817=5D_=C2=BFBug_Python_2=2E7=2E4_and_version_3=2E3?= =?utf-8?b?LjE/?= In-Reply-To: <1366653442.82.0.335522989154.issue17817@psf.upfronthosting.co.za> Message-ID: <1366679402.0.0.852884965835.issue17817@psf.upfronthosting.co.za> Roger Serwy added the comment: Ricardo, you are correct that 2.7.4 and 3.3.1 have these bugs but they have been fixed, as shown by Serhiy. Unfortunately, these fixes won't be released for a while but they exist as patches and in version control. I am closing this issue as a duplicate of #17585. ---------- resolution: -> duplicate status: open -> closed superseder: -> IDLE - regression with exit() and quit() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 03:32:37 2013 From: report at bugs.python.org (Meador Inge) Date: Tue, 23 Apr 2013 01:32:37 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366680757.31.0.151680172412.issue17804@psf.upfronthosting.co.za> Meador Inge added the comment: This seems reasonable to me to. So +1. Small bikeshed on the name: I think 'unpack_iter' would be more consistent with what is already there, e.g. 'unpack' and 'unpack_from'. In fact, when experimenting with this patch I found myself typing 'unpack_iter' several times. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 03:50:11 2013 From: report at bugs.python.org (Nils Bruin) Date: Tue, 23 Apr 2013 01:50:11 +0000 Subject: [issue17816] Weak*Dictionary KeyErrors during callbacks In-Reply-To: <1366648864.21.0.829843721965.issue17816@psf.upfronthosting.co.za> Message-ID: <1366681811.76.0.777574795054.issue17816@psf.upfronthosting.co.za> Nils Bruin added the comment: I think the difference in behaviour between Py3 and Py2 is coming from: http://hg.python.org/cpython/file/a26df2d03989/Objects/dictobject.c#l1275 which first clears all values before removing any keys. For a WeakValueDictionary that means all the weakrefs are neutralized before the can be activated. I don't quite understand how Py3 manages to avoid problems for a WeakKeyDictionary, but apparently it does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 05:09:19 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Tue, 23 Apr 2013 03:09:19 +0000 Subject: [issue17820] Nothing about editors in "Key Resources" Message-ID: <1366686559.8.0.839057541832.issue17820@psf.upfronthosting.co.za> New submission from Guilherme Sim?es: In devguide/setup#editors-and-tools we have: "For editors and tools which the core developers have felt some special comment is needed for coding in Python, see Key Resources." Since emacs and other tools are mentioned in "Additional Resources" instead I think the link to "Key Resources" should be replaced by a link to "Additional Resources". ---------- components: Devguide messages: 187604 nosy: Guilherme.Sim?es, Todd.Rovito, eric.araujo, ezio.melotti, georg.brandl priority: normal severity: normal status: open title: Nothing about editors in "Key Resources" type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 05:52:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Apr 2013 03:52:36 +0000 Subject: [issue17820] Nothing about editors in "Key Resources" In-Reply-To: <1366686559.8.0.839057541832.issue17820@psf.upfronthosting.co.za> Message-ID: <3ZvrMl2jGRz7Ljr@mail.python.org> Roundup Robot added the comment: New changeset df85ed024e96 by Ned Deily in branch 'default': Issue #17820: Provide more appropriate link in devguide editor section. http://hg.python.org/devguide/rev/df85ed024e96 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 05:53:55 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Apr 2013 03:53:55 +0000 Subject: [issue17820] Nothing about editors in "Key Resources" In-Reply-To: <1366686559.8.0.839057541832.issue17820@psf.upfronthosting.co.za> Message-ID: <1366689235.23.0.676327434352.issue17820@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the suggestion! ---------- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 06:22:54 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 23 Apr 2013 04:22:54 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1366690974.9.0.713429392294.issue15809@psf.upfronthosting.co.za> Roger Serwy added the comment: Here's a tangentially related issue: #14326 IDLE doesn't handle pasting multi-line code properly (issue3559), IDLE2 will silently ignore code after the first executable statement. IDLE3 may give an error. Can't we just make IDLE's shell default to UTF-8? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 07:33:00 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 05:33:00 +0000 Subject: [issue17802] html.HTMLParser raises UnboundLocalError: In-Reply-To: <1366455496.44.0.252693262326.issue17802@psf.upfronthosting.co.za> Message-ID: <1366695180.11.0.87211999283.issue17802@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the patch Thomas! Starting from your work I made an updated patch that fixes the bug, but at the same time the tests revealed another possible issue. In case of invalid character references, HTMLParser still calls handle_entityref instead of reporting them as 'data'. Not sure what the preferable behavior should be though, but anyway this is a separate issue. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file29986/issue17802.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 08:07:54 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Apr 2013 06:07:54 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366680757.31.0.151680172412.issue17804@psf.upfronthosting.co.za> Message-ID: <1366697271.2518.0.camel@fsol> Antoine Pitrou added the comment: > Small bikeshed on the name: I think 'unpack_iter' would be more > consistent with what is already there, e.g. 'unpack' and 'unpack_from'. > In fact, when experimenting with this patch I found myself typing > 'unpack_iter' several times. I thought so, but "unpack_iter" would mean we are unpacking an iterator, while we are unpacking *as* an iterator (like iterkeys() and friends in Python 2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 08:26:07 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Apr 2013 06:26:07 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <3Zvvms5ZDyz7LmZ@mail.python.org> Roundup Robot added the comment: New changeset 2ddfa8dbed1d by Ezio Melotti in branch '2.7': #17729: remove the outdated Advocacy HOWTO, as suggested by the author. http://hg.python.org/cpython/rev/2ddfa8dbed1d New changeset a4804e0d4479 by Ezio Melotti in branch '3.3': #17729: remove the outdated Advocacy HOWTO, as suggested by the author. http://hg.python.org/cpython/rev/a4804e0d4479 New changeset f9a58f0203b6 by Ezio Melotti in branch 'default': #17729: merge with 3.3. http://hg.python.org/cpython/rev/f9a58f0203b6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 08:27:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 06:27:29 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <1366698449.74.0.111764728024.issue17729@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 08:47:30 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Tue, 23 Apr 2013 06:47:30 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <1366699650.23.0.430520040359.issue17729@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: the index file also needed changing; see attached ---------- Added file: http://bugs.python.org/file29987/diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 08:58:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Apr 2013 06:58:19 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <3ZvwV25Dhlz7Lq0@mail.python.org> Roundup Robot added the comment: New changeset 990c1bd26ef1 by Ezio Melotti in branch '2.7': #17729: remove the Advocacy HOWTO from the index. http://hg.python.org/cpython/rev/990c1bd26ef1 New changeset a4d294539f2e by Ezio Melotti in branch '3.3': #17729: remove the Advocacy HOWTO from the index. http://hg.python.org/cpython/rev/a4d294539f2e New changeset ceb1ee4bc214 by Ezio Melotti in branch 'default': #17729: merge with 3.3. http://hg.python.org/cpython/rev/ceb1ee4bc214 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 08:58:40 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 06:58:40 +0000 Subject: [issue17729] advocacy howto improvements In-Reply-To: <1365935079.06.0.131915757823.issue17729@psf.upfronthosting.co.za> Message-ID: <1366700320.47.0.577693082659.issue17729@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for noticing that and for the patch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 09:16:17 2013 From: report at bugs.python.org (paul j3) Date: Tue, 23 Apr 2013 07:16:17 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1366701377.48.0.597656816502.issue9849@psf.upfronthosting.co.za> paul j3 added the comment: This nargs test using the formater applies only when the container has a help formatter. That is true for a ArgumentParser, but not for an argument_group. group = parser.add_argument_group('g') group.add_argument('bar', nargs='test') does not raise an error. format_help will produce an error: ... File "./argparse.py", line 585, in _format_args formats = ['%s' for _ in range(action.nargs)] TypeError: 'str' object cannot be interpreted as an integer while parse_args produces the error: ... File "./argparse.py", line 2200, in _get_nargs_pattern nargs_pattern = '(-*%s-*)' % '-*'.join('A' * nargs) TypeError: can't multiply sequence by non-int of type 'str' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 09:19:41 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Apr 2013 07:19:41 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1366701581.86.0.674139729939.issue11734@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't see how math.isnan or math.isinf would be affected: we're not proposing to make a float16 Python type, so math.isnan would never encounter a float16 value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 09:30:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 07:30:22 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366702222.16.0.985105096545.issue15392@psf.upfronthosting.co.za> Ezio Melotti added the comment: If things are fixed/added/improved on 3.x, there should be tests for them, and if they are backported on 2.7, tests should be backported as well. If mock makes testing easier, I think it would be acceptable to use it and then have IDLE devs install a 2.7 mock and use it to run all the tests. The tests on 2.7 could use skip decorators to be skipped if mock is missing, without having to keep these tests separate from the rest. If necessary a script to install mock on 2.7 could be provided, and possibly used by the buildbots too. This means that the initial framework should be backported, otherwise it won't be possible to backport any of tests that are going to use it. FWIW the attached patch should use unittest.main() instead of test_main+run_unittest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 10:08:28 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Apr 2013 08:08:28 +0000 Subject: [issue14326] IDLE - allow shell to support different locales In-Reply-To: <1331838921.21.0.772661396628.issue14326@psf.upfronthosting.co.za> Message-ID: <1366704508.64.0.940323110469.issue14326@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +IDLE console uses incorrect encoding. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 10:12:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Apr 2013 08:12:00 +0000 Subject: [issue15809] IDLE console uses incorrect encoding. In-Reply-To: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za> Message-ID: <1366704720.02.0.520489355664.issue15809@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Here's a tangentially related issue: #14326 Yes, this issue looks as a prerequisite for it. > IDLE doesn't handle pasting multi-line code properly (issue3559), IDLE2 will silently ignore code after the first executable statement. IDLE3 may give an error. Well, then the patch doesn't introduce a significant regression. > Can't we just make IDLE's shell default to UTF-8? This is easy. Just set IOBinding.encoding to "utf-8". But I'm not sure we don't lost something in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 10:14:53 2013 From: report at bugs.python.org (Glenn Linderman) Date: Tue, 23 Apr 2013 08:14:53 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366704893.04.0.909320745004.issue14191@psf.upfronthosting.co.za> Glenn Linderman added the comment: Very nice, Paul. I tested that with some of my applications, and some of my test cases. All of them initially failed, because you have parse_intermixed_args returning parameters like parse_known_args instead of like parse_args. Now I can understand that might be a little confusing in msg166175, but note that the implementation is "like" a call to parse_known_args followed by a call to parse_args... strongly implying that the return should be like parse_args. After tweaking your implementation in that regard, then I was able to get all the same applications and test cases to pass, although I haven't tried all my applications and all my test cases, as yet. Your techniques for disabling particular parameters are pretty clever. I think the difficult cases should raise an error. Firstly, parse_intermixed_args is intended to be for functional compatibility with optparse functionality, which doesn't support the difficult cases, therefore use of the difficult cases would require additional restrictions on the allowed order of options on the command line, beyond what optparse supports... this would be an application interface change, and as part of that interface change, should such happen, the flexibility of intermixing optionals and positionals can be restricted. Secondly, if an understanding of how to define the use parse_intermixed_args with one or more of the difficult cases is reached, replacing an error case with a functional case is possible, but replacing one silent functionality with a different one is a backwards compatibility problem. Throwing an error avoids limiting a future definition of these cases. The freedom of mixing optionals and positionals that would available in the now deprecated optparse does seem to be restored by this patch. I look forward to seeing a revised patch, this is a very promising solution to this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 10:43:16 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Apr 2013 08:43:16 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366706596.44.0.281651506759.issue17532@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch, Guilherme. While the patch does restore the Options menu for Edit windows, a similar change is needed in idlelib/PyShell.py to also restore the menu for the shell window. I will refresh the patch or include it in the changes for Issue17654 which will change how and where the menus are customized for OS X. ---------- assignee: -> ned.deily stage: -> patch review versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 10:44:33 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 23 Apr 2013 08:44:33 +0000 Subject: [issue16231] pickle persistent_id return value In-Reply-To: <1350225017.39.0.976217955919.issue16231@psf.upfronthosting.co.za> Message-ID: <1366706673.61.0.668578252931.issue16231@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I think it should be fixed though it is not a high-priority issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 11:01:28 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Apr 2013 09:01:28 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366707688.27.0.153055634769.issue15392@psf.upfronthosting.co.za> Nick Coghlan added the comment: +1 for Ezio's suggestion regarding tests that need the mock module. To simplify backporting you may want to do something like the following in a helper module: try: import unittest.mock as mock except ImportError: try: import mock except ImportError: mock = None Then the individual test files would retrieve the mock attribute from the helper module and check it with the skip decorators in the tests that needed mocks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 11:03:21 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Tue, 23 Apr 2013 09:03:21 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1366707801.92.0.176643199092.issue17818@psf.upfronthosting.co.za> Changes by Claudiu.Popa : Added file: http://bugs.python.org/file29988/aifc_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 11:12:46 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Tue, 23 Apr 2013 09:12:46 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366708366.91.0.433610889174.issue17532@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: I didn't restore the menu in the shell window because it would be empty then. Perhaps a better alternative is to automatically remove any empty menu. That way if someone inserted a new option in the menu in the future it would show automatically in the MacOS version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 11:19:59 2013 From: report at bugs.python.org (Philippe Rouquier) Date: Tue, 23 Apr 2013 09:19:59 +0000 Subject: [issue17821] Different division results with / and // operators with large numbers Message-ID: <1366708799.03.0.595068408513.issue17821@psf.upfronthosting.co.za> New submission from Philippe Rouquier: Hi, the following statement yields different results in python2 and python3: 284397269195572115652769428988866694680//17 - int(284397269195572115652769428988866694680/17) In python3 it yields: 309657313492949847071 In python2 it yields: OL Python2's result seems to be correct as (284397269195572115652769428988866694680//17) and (int(284397269195572115652769428988866694680/17)) should return the same result (as far as I understand). With smaller numbers, this difference in results does not appear with python3. Note: I noticed this, while working on RSA; 284397269195572115652769428988866694680 is (p-1)(q-1) and 17 is e. I just mention this in case it could help. I used linux version 3.3.3.0 and 2.7.3 for the tests on a 64 bits processor. Sorry if I am missing something here. ---------- components: Interpreter Core messages: 187623 nosy: Philippe.Rouquier priority: normal severity: normal status: open title: Different division results with / and // operators with large numbers type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 11:25:08 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 09:25:08 +0000 Subject: [issue17821] Different division results with / and // operators with large numbers In-Reply-To: <1366708799.03.0.595068408513.issue17821@psf.upfronthosting.co.za> Message-ID: <1366709108.66.0.945643610355.issue17821@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 11:55:58 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 23 Apr 2013 09:55:58 +0000 Subject: [issue17821] Different division results with / and // operators with large numbers In-Reply-To: <1366708799.03.0.595068408513.issue17821@psf.upfronthosting.co.za> Message-ID: <1366710958.44.0.931678834373.issue17821@psf.upfronthosting.co.za> Richard Oudkerk added the comment: In Python 3 "/" gives float division, whereas in Python 2 it is integer division, the same as "//". ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 12:01:33 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 23 Apr 2013 10:01:33 +0000 Subject: [issue17821] Different division results with / and // operators with large numbers In-Reply-To: <1366708799.03.0.595068408513.issue17821@psf.upfronthosting.co.za> Message-ID: <1366711293.92.0.4631010906.issue17821@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Just to clarify, if you use float division then you get rounding errors. 309657313492949847071 is a rounding error: >>> x = 284397269195572115652769428988866694680//17 >>> x - int(float(x)) 309657313492949847071L ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 13:26:02 2013 From: report at bugs.python.org (Philippe Rouquier) Date: Tue, 23 Apr 2013 11:26:02 +0000 Subject: [issue17821] Different division results with / and // operators with large numbers In-Reply-To: <1366708799.03.0.595068408513.issue17821@psf.upfronthosting.co.za> Message-ID: <1366716362.96.0.0516560527805.issue17821@psf.upfronthosting.co.za> Philippe Rouquier added the comment: Does your comment mean that this is bug should be closed as notabug since anyone wanting to avoid such rounding error should use // operator? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 13:37:04 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 11:37:04 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366717024.94.0.588845364624.issue17792@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached a new patch that improves the following things: * added some tests; * the code in the previous message is now handled correctly; * the patch now raises a proper SyntaxWarning; There are still several problems though: * it doesn't work for the global namespace. Is there a way to know if we are inside a function or not? * the patch leaks, and I couldn't figure out where the leak is; * I tried to include the name of the variable in the warning, but: - PyErr_WarnExplicit wants a const char* as msg and doesn't support formatting; - It doesn't seem possible to use other PyErr_Warn* functions here; - Using PyUnicode_FromFormat() works, but then I don't know how to convert the result to const char* (I used PyObject_REPR(), but that is probably wrong; PyUnicode_AS_DATA() might work but is deprecated; the PyUnicode_nBYTE_DATA() functions return a Py_UCSn*); * more testcases are needed While compiling I got this warning: ./setup.py:330: SyntaxWarning: "name 'why' is already defined but implicitly deleted after end of except clause" except ImportError as why: This comes from a code like: try: foo() except Exception as why: pass try: bar() except Exception as why: pass and in this case there shouldn't be any warning. A possible way to fix this is to keep a "whitelist" of locals that are first defined as an except target, but then it will still break if there's a `why = ...` between the two try/except and it's starting to get too complicated... ---------- Added file: http://bugs.python.org/file29989/issue17792-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 13:47:14 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 23 Apr 2013 11:47:14 +0000 Subject: [issue17821] Different division results with / and // operators with large numbers In-Reply-To: <1366708799.03.0.595068408513.issue17821@psf.upfronthosting.co.za> Message-ID: <1366717634.03.0.76853368478.issue17821@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Yes. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 13:50:53 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 23 Apr 2013 11:50:53 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <3Zw2zc2yYNz7LlS@mail.python.org> Roundup Robot added the comment: New changeset a389700fbc74 by Ronald Oussoren in branch '2.7': Ensure that plistlib doesn't corrupt deeply nested datastructures http://hg.python.org/cpython/rev/a389700fbc74 New changeset 6a8cb4875ac6 by Ronald Oussoren in branch '3.3': Ensure that plistlib doesn't corrupt deeply nested datastructures http://hg.python.org/cpython/rev/6a8cb4875ac6 New changeset e0c0bcd60033 by Ronald Oussoren in branch 'default': (3.3->default) Ensure that plistlib doesn't corrupt deeply nested datastructures http://hg.python.org/cpython/rev/e0c0bcd60033 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 13:51:27 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Apr 2013 11:51:27 +0000 Subject: [issue17353] Plistlib outputs empty data tags when deeply nested In-Reply-To: <1362429215.6.0.797287296233.issue17353@psf.upfronthosting.co.za> Message-ID: <1366717887.73.0.114831431813.issue17353@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:05:43 2013 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 23 Apr 2013 12:05:43 +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: <1366718743.44.0.808720144415.issue7475@psf.upfronthosting.co.za> Florent Xicluna added the comment: Another rant, because it matters to many of us: http://lucumr.pocoo.org/2012/8/11/codec-confusion/ IMHO, the solution to restore str.decode and bytes.encode and return TypeError for improper use is probably the most obvious for the average user. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:15:06 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 12:15:06 +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: <1366719306.11.0.453481599629.issue7475@psf.upfronthosting.co.za> Ezio Melotti added the comment: -1 I see encoding as the process to go from text to bytes, and decoding the process to go from bytes to text, so (ab)using these terms for other kind of conversions is not an option IMHO. Anyway I think someone should write a PEP and list the possible options and their pro and cons, and then a decision can be taken on python-dev. FTR in Python 2 you can use decode for bytes->text, text->text, bytes->bytes, and even text->bytes: u'DEADBEEF'.decode('hex') '\xde\xad\xbe\xef' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:30:22 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Apr 2013 12:30:22 +0000 Subject: [issue17496] OS X test for Tk availability in runtktests.py doesn't work In-Reply-To: <1363809005.08.0.908370147082.issue17496@psf.upfronthosting.co.za> Message-ID: <1366720222.43.0.805571997342.issue17496@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch start wish and stops it by sending the 'exit' command. With the patch I can run the tk tests without getting a skip. I cannot easily test if the patch also does the right thing on buildbots, but have high hopes. I did check that just starting 'wish' on a machine where I don't have console access causes a crash (OSX 10.5, nobody on the console, I logged on through SSH). Open issues with my patch: * The check uses whatever version wish is on the PATH, which may or may not be related to the version of Tk that python is linked to. It might be better to explicitly use /usr/bin/wish, as that one is known to be native port of Tk (not X11) and is known to crash. * Not tested if the patch causes a Skip when running tests without GUI access. ---------- keywords: +easy stage: -> needs patch type: -> behavior Added file: http://bugs.python.org/file29990/issue-17496.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:42:11 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Apr 2013 12:42:11 +0000 Subject: [issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations In-Reply-To: <1361489513.5.0.894275569557.issue17269@psf.upfronthosting.co.za> Message-ID: <1366720931.85.0.95009919234.issue17269@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've updated the patch: it now contains a testcase (although the getaddrinfo tests are stretching the definition of the word, the new test only checks that the function doesn't crash) ---------- Added file: http://bugs.python.org/file29991/issue17269-with-tests.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:42:27 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Apr 2013 12:42:27 +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: <1366720947.48.0.171944614469.issue7475@psf.upfronthosting.co.za> R. David Murray added the comment: transform/untransform has approval-in-principle, adding encode/decode to the type that doesn't have them has been explicitly (and repeatedly :) rejected. (I don't know about anybody else, but at this point I have written code that assumes that if an object has an 'encode' method, calling it will get me a bytes, and vice versa with 'decode'...an assumption I know is not "safe", but that I feel is useful duck typing in the contexts in which I used it.) Nick wants a PEP, other people have said a PEP isn't necessary. What is certainly necessary is for someone to pick up the ball and run with it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:45:47 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Apr 2013 12:45:47 +0000 Subject: [issue12958] test_socket failures on Mac OS X In-Reply-To: <1315719643.71.0.858357749479.issue12958@psf.upfronthosting.co.za> Message-ID: <1366721147.29.0.604858200437.issue12958@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Not sure what changed, but these tests are reported as failures when I run 'make test' and not as expected failures. ---------- nosy: +ronaldoussoren versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:54:04 2013 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 23 Apr 2013 12:54:04 +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: <1366721644.3.0.727646834547.issue7475@psf.upfronthosting.co.za> Florent Xicluna added the comment: I am not a native english speaker, but it seems that the common usage of encode/decode is wider than the restricted definition applied for Python 3.3: Some examples: * RFC 4648 specifies "Base16, Base32, and Base64 Data Encodings" http://tools.ietf.org/html/rfc4648 * About rot13: "the same code can be used for encoding and decoding" http://www.catb.org/~esr/jargon/html/R/rot13.html * The Huffman coding is "an entropy encoding algorithm" (used for DEFLATE) http://en.wikipedia.org/wiki/Huffman_coding * RFC 2616 lists (zlib's) deflate or gzip as "encoding transformations" http://tools.ietf.org/html/rfc2616#section-3.5 However, I acknowledge that there are valid reasons to choose a different verb too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:55:09 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Apr 2013 12:55:09 +0000 Subject: [issue12958] test_socket failures on Mac OS X In-Reply-To: <1315719643.71.0.858357749479.issue12958@psf.upfronthosting.co.za> Message-ID: <1366721709.07.0.669215957383.issue12958@psf.upfronthosting.co.za> R. David Murray added the comment: Ronald: in 3.4 only? If so I wonder if the subtests patch had an unintended side effect...I'm pretty sure it touched the expected failure machinery somehow. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 14:59:21 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 12:59:21 +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: <1366721961.53.0.52000761101.issue7475@psf.upfronthosting.co.za> Ezio Melotti added the comment: While not strictly necessary, a PEP would be certainly useful and will help reaching a consensus. The PEP should provide a summary of the available options (transform/untransforms, reintroducing encode/decode for bytes/str, maybe others), their intended behavior (e.g. is type(x.transform()) == type(x) always true?), and possible issues (e.g. Should some transformations be limited to str or bytes? Should rot13 work with both transform and untransform?). Even if we all agreed on a solution, such document would still be useful IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 15:04:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Apr 2013 13:04:52 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366722292.93.0.302750760982.issue17792@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > - Using PyUnicode_FromFormat() works, but then I don't know how to convert the result to const char* PyUnicode_AsUTF8() ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 15:09:48 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 13:09:48 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1366722588.44.0.0516529093539.issue17792@psf.upfronthosting.co.za> Ezio Melotti added the comment: I considered that, but is it guaranteed that the output encoding is UTF-8? What if the warning is printed on a Windows console that uses cp1252? I also considered encoding it and then use PyBytes_AsString, but I was hoping in something simpler (also I'm not sure where to get the right encoding). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 15:13:33 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Tue, 23 Apr 2013 13:13:33 +0000 Subject: [issue17822] Save on Close windows (IDLE) Message-ID: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> New submission from Guilherme Sim?es: After changing the contents of a file in an Editor Window and closing without saving the "Save on Close" window pops up. On both MacOS and Linux the user can't do anything on the Editor Window anymore, but on Windows, not only can the user continue to write it is possible to try to close the window again. Each time the user attempts to close the editor the "Save on Close" window appears one more time. Also, when you have 2 such windows if you say 'no' then,no matter what the answer to the second window is, IDLE crashes. I'm not sure but this seems to me to be a Tk problem. Attached is a simple script that works completely different on different systems showing that this is probably a Tkinter or Tk bug. I tested this on Mac with Python 2.7, 3.3, 3.4 and Tk 8.5.13. On Linux I tested with Python 3.2 and Tk 8.5.11 and on Windows with Python 3.3 and Tk 8.5.11. ---------- components: IDLE, Tkinter, Windows files: askyesnocancel.py messages: 187641 nosy: Guilherme.Sim?es, Todd.Rovito, gpolo, roger.serwy, terry.reedy priority: normal severity: normal status: open title: Save on Close windows (IDLE) type: crash versions: Python 3.3 Added file: http://bugs.python.org/file29992/askyesnocancel.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 15:22:41 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Apr 2013 13:22:41 +0000 Subject: [issue12958] test_socket failures on Mac OS X In-Reply-To: <1315719643.71.0.858357749479.issue12958@psf.upfronthosting.co.za> Message-ID: <1366723361.49.0.388691423293.issue12958@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Yes, only on 3.4: ====================================================================== ERROR: testFDPassSeparate (test.test_socket.RecvmsgSCMRightsStreamTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/ronald/Projects/python/rw/default/Lib/test/test_socket.py", line 261, in _tearDown raise exc File "/Users/ronald/Projects/python/rw/default/Lib/test/test_socket.py", line 273, in clientRun test_func() File "/Users/ronald/Projects/python/rw/default/Lib/test/test_socket.py", line 2644, in _testFDPassSeparate array.array("i", [fd1]))]), File "/Users/ronald/Projects/python/rw/default/Lib/test/test_socket.py", line 1790, in sendmsgToServer *(args + self.sendmsg_to_server_defaults[len(args):])) OSError: [Errno 22] Invalid argument (And simular for the other 3 marked socket tests) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 15:28:23 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Apr 2013 13:28:23 +0000 Subject: [issue12958] test_socket failures on Mac OS X In-Reply-To: <1315719643.71.0.858357749479.issue12958@psf.upfronthosting.co.za> Message-ID: <1366723703.76.0.896571193676.issue12958@psf.upfronthosting.co.za> Nick Coghlan added the comment: It's entirely possible the hack in test_socket (where it catches unittest._ExpectedFailure to suppress the issues in the tearDown code after the test fails) were invalidated by the subtest changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 15:46:22 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Apr 2013 13:46:22 +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: <1366724782.97.0.981396638748.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: +1 for someone stepping up to write a PEP on this if they would like to see the situation improved in 3.4. transform/untransform has at least one core developer with an explicit -1 on the proposal at the moment (me). We *definitely* need a generic object->object convenience API in the codecs module (codecs.decode, codecs.encode). I even accept that those two functions could be worthy of elevation to be new builtin functions. I'm *far* from convinced that awkwardly named methods that only handle str->object, bytes->object and bytearray->object are a good idea. Should memoryview gain transform/untransform methods as well? transform/untransform as proposed aren't even inverse operations, since they don't swap the valid input and output types (that is, transform is str/bytes/bytearray to arbitrary objects, while untransform is *also* str/bytes/bytearray to arbitrary objects. Inverses can't have a domain/range mismatch like that). Those names are also ambiguous about which one corresponds to "encoding" and which to "decoding". encode() and decode(), whether as functions in the codecs module or as builtins, have no such issue. Personally, the more I think about it, the more I'm in favour of adding encode and decode as builtin functions for 3.4. If you want arbitrary object->object conversions, use the builtins, if you want strict str->bytes or bytes/bytearray->str use the methods. Python 3 has been around long enough now, and Python 3.2 and 3.3 are sufficiently well known that I think we can add the full power builtins without people getting confused. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 16:24:56 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Apr 2013 14:24:56 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366722588.44.0.0516529093539.issue17792@psf.upfronthosting.co.za> Message-ID: <201304231724.41197.storchaka@gmail.com> Serhiy Storchaka added the comment: > I considered that, but is it guaranteed that the output encoding is UTF-8? PyErr_WarnExplicit() calls PyUnicode_FromString() which made an inverse decoding from UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 16:37:54 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Apr 2013 14:37:54 +0000 Subject: [issue12958] test_socket failures on Mac OS X In-Reply-To: <1315719643.71.0.858357749479.issue12958@psf.upfronthosting.co.za> Message-ID: <1366727874.83.0.893255701097.issue12958@psf.upfronthosting.co.za> Ronald Oussoren added the comment: FWIW I've filed a bug report about the behavior of sendmsg with Apple, the RADAR number is 13716133. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 16:41:20 2013 From: report at bugs.python.org (Kyle Simpson) Date: Tue, 23 Apr 2013 14:41:20 +0000 Subject: [issue12825] Missing and incorrect link to a command line option. In-Reply-To: <1314089351.88.0.463176028953.issue12825@psf.upfronthosting.co.za> Message-ID: <1366728080.06.0.616102589185.issue12825@psf.upfronthosting.co.za> Kyle Simpson added the comment: I can't reproduce this issue for v2.7.2 anymore, and none of the other versions have this problem. Is it possible to regenerate the online docs for v2.7.2 before closing this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 16:41:42 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Apr 2013 14:41:42 +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: <1366728102.34.0.306043083196.issue7475@psf.upfronthosting.co.za> R. David Murray added the comment: I was visualizing transform/untransform as being restricted to buffertype->bytes and stringtype->string, which at least for binascii-type transforms is all the modules support. After all, you don't get to choose what type of object you get back from encode or decode. A more generalized transformation (encode/decode) utility is also interesting, but how many non-string non-bytes transformations do we actually support? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 16:50:34 2013 From: report at bugs.python.org (Matt Clarke) Date: Tue, 23 Apr 2013 14:50:34 +0000 Subject: [issue17310] Ctypes callbacks shows problem on Windows Python (64bit) In-Reply-To: Message-ID: Matt Clarke added the comment: It seems that any argument greater than 8 bytes is automatically converted to a references. Thus, changing to using ctypes.POINTER works. For example: callback_t = ctypes.CFUNCTYPE(None, ctypes.POINTER(myst_args)) Quite a simple solution in the end. Is it worth documenting this on the ctypes page? Thanks for your help, Matt On 18 March 2013 15:19, Matt Clarke wrote: > > Matt Clarke added the comment: > > Hi Amaury. > > They are both 12 bytes. > > Matt > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 16:55:55 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Apr 2013 14:55:55 +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: <1366728955.72.0.784422005178.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: If transform is a method, how do you plan to accept arbitrary buffer supporting types as input? This is why I mentioned memoryview: it doesn't provide decode(), but there's no good reason you should have to copy the data from the view before decoding it. Similarly, you shouldn't have to make an unaltered copy before creating a compressed (or decompressed) copy. With codecs.encode and codecs.decode as functions, supporting memoryview as an input for bytes->str decoding, binary->bytes encoding (e.g. gzip compression) and binary->bytes decoding (e.g. gzip decompression) is trivial. Ditto for array.array and anything else that supports the buffer protocol. With transform/untransform as methods? No such luck. And once you're using functions rather than methods, it's best to define the API as object -> object, and leave any type constraints up to the individual codecs (with the error handling improved to provide more context and a more meaningful exception type, as I described earlier in the thread) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 17:02:13 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Apr 2013 15:02:13 +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: <1366729333.32.0.406752137934.issue7475@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with you. transform/untransform are parallel to encode/decode, and I wouldn't expect them to exist on any type that didn't support either encode or decode. They are convenience methods, just as encode/decode are. I am also probably not invested enough in it to write the PEP :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 17:42:31 2013 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Apr 2013 15:42:31 +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: <1366731751.42.0.951319015881.issue7475@psf.upfronthosting.co.za> Guido van Rossum added the comment: str.decode() and bytes.encode() are not coming back. Any proposal had better take into account the API design rule that the *type* of a method's return value should not depend on the *value* of one of the arguments. (The Python 2 design failed this test, and that's why we changed it.) It is however fine to let the return type depend on one of the argument *types*. So e.g. bytes.transform(enc) -> bytes and str.transform(enc) -> str are fine. And so are e.g. transform(bytes, enc) -> bytes and transform(str, enc) -> str. But a transform() taking bytes that can return either str or bytes depending on the encoding name would be a problem. Personally I don't think transformations are so important or ubiquitous so as to deserve being made new bytes/str methods. I'd be happy with a convenience function, for example transform(input, codecname), that would have to be imported from somewhere (maybe the codecs module). My guess is that in almost all cases where people are demanding to say e.g. x = y.transform('rot13') the codec name is a fixed literal, and they are really after minimizing the number of imports. Personally, disregarding the extra import line, I think x = rot13.transform(y) looks better though. Such custom APIs also give the API designer (of the transformation) more freedom to take additional optional parameters affecting the transformation, offer a set of variants, or a richer API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 17:45:14 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 23 Apr 2013 15:45:14 +0000 Subject: [issue12535] Chained tracebacks are confusing because the first traceback is minimal In-Reply-To: <1310405583.64.0.419150537523.issue12535@psf.upfronthosting.co.za> Message-ID: <1366731914.82.0.525559780146.issue12535@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 17:50:12 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Apr 2013 15:50:12 +0000 Subject: [issue17272] request.full_url: unexpected results on assignment In-Reply-To: <1361512602.9.0.97298415685.issue17272@psf.upfronthosting.co.za> Message-ID: <1366732212.83.0.632747555463.issue17272@psf.upfronthosting.co.za> R. David Murray added the comment: Senthil, are you saying (in the review) that we should treat the current return value of full_url as a bug, and fix it in maintenance releases? It is certainly true that its value does not match the documentation. Ah. I see that get_full_url used to have the same bug before you fixed it in 3.1. So I guess I agree with you :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 18:02:05 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 23 Apr 2013 16:02:05 +0000 Subject: [issue12825] Missing and incorrect link to a command line option. In-Reply-To: <1314089351.88.0.463176028953.issue12825@psf.upfronthosting.co.za> Message-ID: <1366732925.24.0.113370623413.issue12825@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the update. The docs under /release/x.y.z are snapshots from that release, so they are not continuously regenerated. If the current /2 and /2.7 docs are good, this can be closed. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 18:23:52 2013 From: report at bugs.python.org (Paul Hoffman) Date: Tue, 23 Apr 2013 16:23:52 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1366734232.47.0.218156352478.issue11734@psf.upfronthosting.co.za> Paul Hoffman added the comment: Mark: >I don't see how math.isnan or math.isinf would be affected: we're not proposing to make a float16 Python type, so math.isnan would never encounter a float16 value. I was assuming that this proposal would also make this part of class 'float' just like the other floats returned from struct. Otherwise, you will get goofy cases where someone has to special-case what they get from struct. import math, struct FullInfinityAsInt = 0x7f800000 ThisFloat = (struct.unpack("f", struct.pack("I", FullInfinityAsInt)))[0] print("The type is " + str(type(ThisFloat))) if math.isinf(ThisFloat): print("This is an infiniity") else: print("This is not an infinity") This should work similarly for the new half-precision, I would think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 19:10:38 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Apr 2013 17:10:38 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1366737038.37.0.983364313307.issue17822@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What behavior on which system to you consider to be buggy? On 3.3.1, Win 7, all seems fine. By selecting Windows as a component, you imply that something is wrong on Windows. "on Windows, not only can the user continue to write[(if the user Cancels),] it is possible to try to close the window again. Each time the user attempts to close the editor the "Save on Close" window appears one more time." This is what should happen. "Also, when you have 2 such windows if you say 'no' then,no matter what the answer to the second window is, IDLE crashes." I do not see this. 'with Python 3.3': 3.3 is a version of the language. 3.3.0 and 3.3.1 are two different patch releases. Did you use the latter, which has several Idle improvements? When discussing bugs, we need to be specific as to releases used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 19:27:15 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Apr 2013 17:27:15 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1366738035.09.0.0518889463417.issue11734@psf.upfronthosting.co.za> Mark Dickinson added the comment: Paul: your example works because struct.unpack('f', packed_stuff)[0] returns a regular Python float, backed by C double---i.e., exactly the same type that's returned by struct.unpack('d', packed_stuff)[0]. In effect, the single-precision C value is computed and then converted to a double-precision C value (a lossless conversion) before being wrapped in a Python float as usual. There's no dedicated float32 type, and math.isnan and math.isinf don't have to be aware of anything other than normal Python floats. float16 packing and unpacking would work the same way: on packing, a Python float would be converted to the closest float16 value and then serialised to a pair of bytes; on unpacking, that pair of bytes is (at least conceptually) converted to a float16 value and then to the corresponding float64 value, wrapped up in a Python float. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 19:28:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 23 Apr 2013 17:28:48 +0000 Subject: [issue17618] base85 encoding In-Reply-To: <1364909015.82.0.0760723886219.issue17618@psf.upfronthosting.co.za> Message-ID: <1366738128.22.0.591156435915.issue17618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The problem with autodetecting is that it makes it impossible for an > application to use this library to verify that something is encoded in > a specific way. Explicit is better than implicit. Agreed. Also, you generally known what format your data is in. Otherwise, how do you know that it is base85 rather than, say, base64 or uuencode? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 19:38:31 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 23 Apr 2013 17:38:31 +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: <1366738711.01.0.275889982987.issue7475@psf.upfronthosting.co.za> Georg Brandl added the comment: FWIW, I'm not interested in seeing this added anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 19:41:25 2013 From: report at bugs.python.org (Paul Hoffman) Date: Tue, 23 Apr 2013 17:41:25 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1366738885.29.0.396671311163.issue11734@psf.upfronthosting.co.za> Paul Hoffman added the comment: I *think* what you are saying is that there will be no float16 type, but the result of struct.unpack('eorwhatever', packed_stuff)[0] will be the same as struct.unpack('f', packed_stuff)[0], yes? If so, that's what I wanted. I don't want a new float16; I want the output of unpacking a half-precision to be the same as unpacking the other two. I didn't see a statement like that earlier in the thread, but I could have missed it. Or maybe this was covered in msg132976? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 20:11:54 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Apr 2013 18:11:54 +0000 Subject: [issue17823] 2to3 fixers for Message-ID: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Quoting Victor Stinner from msg106669: """ It's maybe possible for write some 2to3 fixers for the following examples: "...".encode("base64") => base64.b64encode("...") "...".encode("rot13") => do nothing (but display a warning?) "...".encode("zlib") => zlib.compress("...") "...".encode("hex") => base64.b16encode("...") "...".encode("bz2") => bz2.compress("...") "...".decode("base64") => base64.b64decode("...") "...".decode("rot13") => do nothing (but display a warning?) "...".decode("zlib") => zlib.decompress("...") "...".decode("hex") => base64.b16decode("...") "...".decode("bz2") => bz2.decompress("...") """ Unfortunately I don't know where is the syntax for writing fixers. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 187662 nosy: benjamin.peterson, serhiy.storchaka priority: normal severity: normal status: open title: 2to3 fixers for type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 20:12:25 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Apr 2013 18:12:25 +0000 Subject: [issue17823] 2to3 fixers for In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1366740745.53.0.943611663271.issue17823@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 20:13:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Apr 2013 18:13:33 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1366740813.87.0.944272620648.issue17823@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: 2to3 fixers for -> 2to3 fixers for missing codecs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 20:16:02 2013 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 23 Apr 2013 18:16:02 +0000 Subject: [issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8 In-Reply-To: <1366493120.18.0.474390797895.issue17547@psf.upfronthosting.co.za> Message-ID: <1366740979.4329.40.camel@surprise> Dave Malcolm added the comment: On Sat, 2013-04-20 at 21:25 +0000, Ned Deily wrote: > Ned Deily added the comment: > > Dave, any reason this shouldn't go into the imminent 2.7.5 and 3.3.2 releases? I was trying to think of one; the only reason I can think of is if there are any compilers out there that don't recognize "-Wformat", or have different behaviors for this test. That said, if "-Wformat" breaks the compile, then the configure test should fail, and thus all should be well. So I can't think of any issue (famous last words...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 20:25:45 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 23 Apr 2013 18:25:45 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1366741545.8.0.253456576086.issue17822@psf.upfronthosting.co.za> R. David Murray added the comment: Interesting that you consider Windows working as expected, Terry. I thought save/close dialogs were generally modal; but, then, I avoid GUIs whenever possible so I could easily be wrong :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 20:38:18 2013 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 23 Apr 2013 18:38:18 +0000 Subject: [issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8 In-Reply-To: <1366740979.4329.40.camel@surprise> Message-ID: <1366742315.4329.49.camel@surprise> Dave Malcolm added the comment: BTW, is that GCC format checking code available anywhere? Am I right in thinking that it was an out-of-tree patch to GCC, from the pre-plugin days? [My cpychecker code adds some similar checking, but it doesn't use this attribute] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 21:07:04 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 23 Apr 2013 19:07:04 +0000 Subject: [issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible In-Reply-To: <1362781994.31.0.121984055749.issue17386@psf.upfronthosting.co.za> Message-ID: <1366744024.4.0.429156761496.issue17386@psf.upfronthosting.co.za> Zachary Ware added the comment: After finally finding a way to check the status of the pushd stack, I found a bug in my patch whereby an extra directory is left on the pushd stack at the end of each run. As such, the version 5 patch changes from using 'goto end' to using 'exit /B !ERRORLEVEL!', along with some other changes related to that change. Also, because of that change, error handling is made a little easier, so I've changed around some of the messages and the conditions for printing them. Everything still seems to work. For anyone testing this patch, I would suggest using the command "prompt $+%PROMPT%" if "$+" is not already part of your prompt. This will add a '+' character to the beginning of your prompt for every dir on the pushd stack. ---------- Added file: http://bugs.python.org/file29993/win_doc_make.v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 21:24:53 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Apr 2013 19:24:53 +0000 Subject: [issue10951] gcc 4.6 warnings In-Reply-To: <1295474318.57.0.129834114348.issue10951@psf.upfronthosting.co.za> Message-ID: <1366745093.9.0.992539104172.issue10951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about backporting this fixes to 2.7? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 21:26:47 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 23 Apr 2013 19:26:47 +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: <1366745207.49.0.141431223703.issue7475@psf.upfronthosting.co.za> Gregory P. Smith added the comment: consensus here appears to be "bad idea... don't do this." ---------- nosy: +gregory.p.smith priority: high -> normal resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 23:22:13 2013 From: report at bugs.python.org (paul j3) Date: Tue, 23 Apr 2013 21:22:13 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366752133.34.0.173016193352.issue14191@psf.upfronthosting.co.za> paul j3 added the comment: Yes, http://bugs.python.org/msg166175 does use 'parse_args' in the second call. But I think things would be more flexible if we had a second function: def parse_???(self, args=None, namespace=None): args, argv = self.parse_intermixed_args(args, namespace) if argv: msg = _('unrecognized arguments: %s') self.error(msg % ' '.join(argv)) return args But then what would a be a good pair of names? parse??? and parse_intermixed_args versus parse_intermixed_args and parse_known_intermixed_args or something else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 23:37:53 2013 From: report at bugs.python.org (Martin Morrison) Date: Tue, 23 Apr 2013 21:37:53 +0000 Subject: [issue13533] Would like Py_Initialize to play friendly with host app In-Reply-To: <1323099394.97.0.36914155274.issue13533@psf.upfronthosting.co.za> Message-ID: <1366753073.95.0.685485973165.issue13533@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz, pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 23 23:46:42 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Apr 2013 21:46:42 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1366745207.49.0.141431223703.issue7475@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: No, transform/untransform as methods are a bad idea, but these *codecs* should definitely come back. The minimal change needed for that to be feasible is to give errors raised during encoding and decoding more context information (at least the codec name and error mode, and switching to the right kind of error). MAL also stated on python-dev that codecs.encode and codecs.decode already exist, so it should just be a matter of documenting them properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 00:00:21 2013 From: report at bugs.python.org (Martin Morrison) Date: Tue, 23 Apr 2013 22:00:21 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1366754421.09.0.512116613811.issue9141@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz, pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 00:01:11 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Apr 2013 22:01:11 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1366754471.03.0.735950017103.issue17822@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Because model is normal (as far as I know) I did not understand that 'continue to write' meant doing so without hitting [Cancel] ;-). I might consider being able to do so a feature *if* the dialog were the only one ever created and if subsequent attempts to close merely shifted focus back to the dialog. However, after shifting focus back to the edit window without hitting [Cancel] and hitting [X] again, I get a *duplicate* "Save on Close" dialog. This is a bug somewhere. I get this duplication on 2.7.4a1 and 3.4a0 also. Only the last dialog created works to close the window. On 3.3, after closing the edit window with the last dialog [No], I can duplicate the unexpected Idle exit by selecting any of the 3 choices in the previous dialog. This is a second and more serious bug. I do not see this with 2.7. When I run 3.3 Idle from the console interpreter with 'import idlelib.idle', the Shell window does not close, mimicking 2.7. The console displays ''' Exception in Tkinter callback Traceback (most recent call last): File "C:\Python33\lib\tkinter\__init__.py", line 1475, in __call__ return self.func(*args) File "C:\Python33\lib\idlelib\EditorWindow.py", line 996, in close reply = self.maybesave() File "C:\Python33\lib\idlelib\EditorWindow.py", line 993, in maybesave return self.io.maybesave() File "C:\Python33\lib\idlelib\IOBinding.py", line 331, in maybesave self.text.focus_set() AttributeError: 'NoneType' object has no attribute 'focus_set' ''' Running 2.7 shows the same message. So this AttributeError seems not to be the exception causing Idle 3.3 to quit when run otherwise. ---------- versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 00:04:30 2013 From: report at bugs.python.org (Martin Morrison) Date: Tue, 23 Apr 2013 22:04:30 +0000 Subject: [issue16427] Faster hash implementation In-Reply-To: <1352291929.32.0.895096534658.issue16427@psf.upfronthosting.co.za> Message-ID: <1366754670.98.0.784267286775.issue16427@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 00:11:24 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Apr 2013 22:11:24 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1366755084.74.0.783106029956.issue17822@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If I open Command Prompt, and start Idle with C:\Python\Python33>python -m idlelib I get the same attribute error without the Shell window closing. Perhaps not having a console to write the traceback to closes 3.3 but not 2.7. Peculiar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 00:19:41 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 23 Apr 2013 22:19: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: <1366755581.49.0.688844375686.issue7475@psf.upfronthosting.co.za> Gregory P. Smith added the comment: okay, but i don't personally find any of these to be good ideas as "codecs" given they don't have anything to do with translating between bytes<->unicode. ---------- resolution: wont fix -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 00:33:02 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Apr 2013 22:33:02 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1366756382.55.0.308533442692.issue17822@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A different console message, Shell window not closed Python 3.4.0a0 (default:bcfb6888fb8d, Apr 18 2013, 19:47:33) >>> import idlelib.idle Exception in Tkinter callback Traceback (most recent call last): File "\cpython\lib\tkinter\__init__.py", line 1475, in __call__ return self.func(*args) File "\cpython\lib\idlelib\EditorWindow.py", line 1002, in close reply = self.maybesave() File "\cpython\lib\idlelib\EditorWindow.py", line 999, in maybesa ve return self.io.maybesave() File "\cpython\lib\idlelib\IOBinding.py", line 324, in maybesave self.save(None) File "\cpython\lib\idlelib\IOBinding.py", line 338, in save if self.writefile(self.filename): File "\cpython\lib\idlelib\IOBinding.py", line 370, in writefile self.fixlastline() File \cpython\lib\idlelib\IOBinding.py", line 426, in fixlastlin e c = self.text.get("end-2c") AttributeError: 'NoneType' object has no attribute 'get' There is, of course, no 3.4 installation icon for starting Idle without a console. However D:\Python\dev\cpython\PCbuild>pythonw_d -m idlelib No message, Shell closes. D:\Python\dev\cpython\PCbuild>python_d -m idlelib ... AttributeError: 'NoneType' object has no attribute 'focus_set' Message (different from other method of starting), Shell does not close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 00:57:45 2013 From: report at bugs.python.org (Demian Brecht) Date: Tue, 23 Apr 2013 22:57:45 +0000 Subject: [issue17272] request.full_url: unexpected results on assignment In-Reply-To: <1361512602.9.0.97298415685.issue17272@psf.upfronthosting.co.za> Message-ID: <1366757865.88.0.591605241202.issue17272@psf.upfronthosting.co.za> Demian Brecht added the comment: As suggested by Senthil, I've broken this up into two patches: One that implements this reusable Request (this one) and one that implements the new (consistent) behaviour, in having full_url return the fragment. I will also add a bug/patch requesting the deprecation of get_full_url as it will simply be a passthrough to full_url. ---------- Added file: http://bugs.python.org/file29994/request_17272.1.reusable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 00:58:03 2013 From: report at bugs.python.org (Demian Brecht) Date: Tue, 23 Apr 2013 22:58:03 +0000 Subject: [issue17272] request.full_url: unexpected results on assignment In-Reply-To: <1361512602.9.0.97298415685.issue17272@psf.upfronthosting.co.za> Message-ID: <1366757883.6.0.745189117788.issue17272@psf.upfronthosting.co.za> Changes by Demian Brecht : Added file: http://bugs.python.org/file29995/request_17272.2.full_url_w_fragment.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 01:07:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 23 Apr 2013 23:07:32 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1366755581.49.0.688844375686.issue7475@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: The codecs module is generic, text encodings are just the most common use case (hence the associated method API). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 01:32:46 2013 From: report at bugs.python.org (Larry Hastings) Date: Tue, 23 Apr 2013 23:32:46 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366759966.23.0.167528983025.issue15301@psf.upfronthosting.co.za> Larry Hastings added the comment: Serhiy: Oh, I get it, your critique was about the "Note:" part at the bottom. It would have been helpful if you had inserted your feedback there, instead of at the top. Yeah, you're right, the note was incorrect. I considered adding a note saying that the code was wrong if sizeof(uid_t) > sizeof(long) but thought better of it ;-) New patch attached. ---------- Added file: http://bugs.python.org/file29996/larry.chown.unsigned.uid.gid.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 02:12:12 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Wed, 24 Apr 2013 00:12:12 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1366762332.6.0.528464301923.issue17822@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: >From what I could see the problem is that in MacOS askyesnocancel stops the user from interacting with all windows and in Windows it stops the interaction only in the root window (even when the parameter 'master' is used, as is the case in IDLE). Since the root window in IDLE is hidden askyesnocancel doesn't do anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 02:25:03 2013 From: report at bugs.python.org (James Pye) Date: Wed, 24 Apr 2013 00:25:03 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1366763103.41.0.287001953406.issue1195571@psf.upfronthosting.co.za> James Pye added the comment: Thinking about this again.. perhaps a better approach would be to force the embedder to define the symbol in their binary. That is, libpython.x doesn't define Py_FatalError. The binary that links in libpython defines it. (and a "me too" on Jonathan's comments.. for pg-python, abort() is not desirable.) ---------- nosy: +James.Pye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 02:38:42 2013 From: report at bugs.python.org (Martin Morrison) Date: Wed, 24 Apr 2013 00:38:42 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1366763922.75.0.867581159586.issue1195571@psf.upfronthosting.co.za> Changes by Martin Morrison : ---------- nosy: +isoschiz, pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 03:11:55 2013 From: report at bugs.python.org (Glenn Linderman) Date: Wed, 24 Apr 2013 01:11:55 +0000 Subject: [issue14191] argparse doesn't allow optionals within positionals In-Reply-To: <1330843053.88.0.983162018395.issue14191@psf.upfronthosting.co.za> Message-ID: <1366765915.74.0.990934702291.issue14191@psf.upfronthosting.co.za> Glenn Linderman added the comment: Yes, a second function would give more flexibility. Due to the "approval" in msg166175 to use the name parse_intermixed_args for the functionality described there, it would probably be best to use that name for that functionality. So then we are left naming your current function something else. parse_known_intermixed_args certainly is descriptive, and fits the naming conventions of the other methods in the class. Quite long, unfortunately... but then I doubt it will get used much. I am using parse_intermixed_args regularly (via my wrapper class), and it is quite long enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 04:59:30 2013 From: report at bugs.python.org (Gustavo Niemeyer) Date: Wed, 24 Apr 2013 02:59:30 +0000 Subject: [issue17824] pty.spawn handles errors improperly Message-ID: <1366772370.17.0.184801312009.issue17824@psf.upfronthosting.co.za> New submission from Gustavo Niemeyer: This simple script will spawn N Python interpreters that aren't properly collected due to the improper error handling: import pty for i in range(N): try: pty.spawn(["/non-existent"]) except: pass ---------- components: Library (Lib) messages: 187681 nosy: niemeyer priority: normal severity: normal status: open title: pty.spawn handles errors improperly type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 05:55:20 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 24 Apr 2013 03:55:20 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1366775720.94.0.657640360689.issue17804@psf.upfronthosting.co.za> Raymond Hettinger added the comment: iter_unpack() is closer to how we name other iter variants, so I think you ought to stick with that. The other names are too creative (and hence less guessable). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 06:38:39 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 24 Apr 2013 04:38:39 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1366778319.57.0.834156299077.issue17822@psf.upfronthosting.co.za> Roger Serwy added the comment: IDLE crashing is due to issue13582. We should maybe focus on that issue in the near future as it has become a common theme in many bug reports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 06:46:13 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 24 Apr 2013 04:46:13 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1366778773.14.0.972423553821.issue17822@psf.upfronthosting.co.za> Roger Serwy added the comment: I clicked submit too soon. The attached patch inhibits closing of the Editor when the dialog box appears. It also sets the parent argument so that Tkinter on Windows actually presents a modal dialog box. What's happening is the the dialog box enters a nested Tk eventloop which allows the editor window to be closed by the window manager via clicking "X". That re-enters the maybesave dialog. The first one unwinds and closes the editor window, setting its internal references to None. The initial maybesave resumes execution with the rug pulled out from beneath its feet and raises errors. ---------- keywords: +patch type: crash -> behavior Added file: http://bugs.python.org/file29997/inhibit_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 06:49:51 2013 From: report at bugs.python.org (Roger Serwy) Date: Wed, 24 Apr 2013 04:49:51 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366778991.84.0.336687730801.issue17532@psf.upfronthosting.co.za> Roger Serwy added the comment: The Options menu will become populated as soon as other extensions get included into IDLE, such as issue6143. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 08:22:54 2013 From: report at bugs.python.org (paul j3) Date: Wed, 24 Apr 2013 06:22:54 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1366784574.22.0.727329343544.issue9849@psf.upfronthosting.co.za> paul j3 added the comment: This patch adds a value test for nargs during add_argument. The core of the new test is in ArgumentParser._check_argument. add_argument() now calls ArgumentParser._check_argument(), which calls _format_args(). If it gets a TypeError, it raises a metavar ValueError as before. But if it gets an ValueError, it raises an ArgumentError. An argument group gets the _check_argument method from its container. This way, check_argument() works for both parsers and groups. HelpFormater _format_args() now raises a ValueError if the nargs is not an integer (or one of the recognized strings). What kind of error should we produce when there is a problem with nargs? An ArgumentError has the advantage that it includes the action name. But the metavar tuple test was coded to raise ValueError. Plus the test_argparse.py TestInvalidArgumentConstructors class tests all check for TypeError or ValueError. I have kept the metavar tuple case as ValueError. That way, test_argparse.py runs without a change. I still need to add tests for invalid string nargs values. And I think the case could be made for returning ArgumentValue errors. ---------- keywords: +patch Added file: http://bugs.python.org/file29998/nargswarn.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 08:26:51 2013 From: report at bugs.python.org (paul j3) Date: Wed, 24 Apr 2013 06:26:51 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1366784811.51.0.763244188634.issue9849@psf.upfronthosting.co.za> paul j3 added the comment: The attached test_nargswarn.py file tests the argparse.py patch. It tries out various nargs values, both for parsers, groups, and mutually exclusive groups. I intend to recast these to work in test_argparse.py ---------- Added file: http://bugs.python.org/file29999/test_nargswarn.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 08:29:19 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Wed, 24 Apr 2013 06:29:19 +0000 Subject: [issue17532] IDLE: Always include "Options" menu on MacOSX In-Reply-To: <1364074890.28.0.799485456817.issue17532@psf.upfronthosting.co.za> Message-ID: <1366784959.58.0.923674543461.issue17532@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: Since extensions are probably going to be included into IDLE soon I'm attaching a version of the patch that also changes PyShell.py. ---------- Added file: http://bugs.python.org/file30000/17532MenuOptions-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 09:03:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Apr 2013 07:03:22 +0000 Subject: [issue15301] os.chown: OverflowError: Python int too large to convert to C long In-Reply-To: <1341800139.98.0.546402243809.issue15301@psf.upfronthosting.co.za> Message-ID: <1366787002.69.0.43606064812.issue15301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, it is what I had in mean. Sorry for indistinctness. As far as you change _fd_converter() it will be good to add also a test for float/decimal/fractional fd. Otherwise the patch LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 09:46:22 2013 From: report at bugs.python.org (Florent Xicluna) Date: Wed, 24 Apr 2013 07:46:22 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch Message-ID: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> New submission from Florent Xicluna: I noticed a difference between computation of column offset for SyntaxError and IndentationError (a subclass of SyntaxError). It is slightly confusing. def report(exc): print('lineno %s, offset %s' % (exc.lineno, exc.offset)) raise try: exec('except IOError:') except Exception as e: report(e) try: exec(' open(filepath)') except Exception as e: report(e) ** OUTPUT ** lineno 1, offset 6 Traceback (most recent call last): File "", line 4, in File "", line 2, in File "", line 1 except IOError: ^ SyntaxError: invalid syntax lineno 1, offset 4 Traceback (most recent call last): File "", line 4, in File "", line 2, in File "", line 1 open(filepath) ^ IndentationError: unexpected indent ** Analysis ** Case (1): offset is 6, and caret is below column 5 for SyntaxError Case (2): offset is 4, and caret is below column 4 for IndentationError ---------- messages: 187690 nosy: flox priority: normal severity: normal status: open title: Indentation.offset and SyntaxError.offset mismatch type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 11:09:26 2013 From: report at bugs.python.org (Yongzhi Pan) Date: Wed, 24 Apr 2013 09:09:26 +0000 Subject: [issue12634] Random Remarks in class documentation In-Reply-To: <1311575810.71.0.0727071558423.issue12634@psf.upfronthosting.co.za> Message-ID: <1366794566.95.0.150137708472.issue12634@psf.upfronthosting.co.za> Yongzhi Pan added the comment: It may be worth to noting that when creating property attribute using the property decorator, we may tend to name the method using nouns, like here: http://docs.python.org/2/library/functions.html#property This is when I once overided data attribute with method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 12:00:08 2013 From: report at bugs.python.org (Michael Foord) Date: Wed, 24 Apr 2013 10:00:08 +0000 Subject: [issue17826] Setting a side_effect on mock from create_autospec doesn't work Message-ID: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za> New submission from Michael Foord: >>> from unittest.mock import create_autospec >>> def f(): pass ... >>> m = create_autospec(f) >>> m.side_effect = [1, 2] >>> m() Traceback (most recent call last): File "", line 1, in File "", line 3, in f File "/compile/py3k-cpython/Lib/unittest/mock.py", line 872, in __call__ return _mock_self._mock_call(*args, **kwargs) File "/compile/py3k-cpython/Lib/unittest/mock.py", line 931, in _mock_call result = next(effect) TypeError: 'list' object is not an iterator ---------- assignee: michael.foord components: Library (Lib) messages: 187692 nosy: michael.foord priority: normal severity: normal stage: needs patch status: open title: Setting a side_effect on mock from create_autospec doesn't work type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 12:48:06 2013 From: report at bugs.python.org (Alex Leach) Date: Wed, 24 Apr 2013 10:48:06 +0000 Subject: [issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8 In-Reply-To: <1366742315.4329.49.camel@surprise> Message-ID: Alex Leach added the comment: I don't think I can tell you anything you don't know already, but ... On Tue, 23 Apr 2013 19:38:18 +0100, Dave Malcolm wrote: > BTW, is that GCC format checking code available anywhere? Is this what you mean? http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/c-family/c-format.c?annotate=193304&pathrev=193304 I got taken straight there from the link you sent, above... > > Am I right in thinking that it was an out-of-tree patch to GCC, from the > pre-plugin days? No idea.. GCC plugins have been around for several years now, though and the patch was only introduced in November. If this patch was applied to any past GCC distributions, I'm sure someone else would have been overwhelmed with warnings and would have mentioned something before now. Either way, it looks like the patch is going to stay. In case you hadn't seen it already, the invoke.texi source file probably has the most descriptive changes:- http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/doc/invoke.texi?r1=193304&r2=193303&pathrev=193304 KR, Alex ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 12:58:10 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Apr 2013 10:58:10 +0000 Subject: [issue17813] lzma and bz2 decompress methods lack max_size parameter In-Reply-To: <1366581907.51.0.777368903496.issue17813@psf.upfronthosting.co.za> Message-ID: <1366801090.93.0.595905721138.issue17813@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 13:36:39 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 24 Apr 2013 11:36:39 +0000 Subject: [issue10951] gcc 4.6 warnings In-Reply-To: <1295474318.57.0.129834114348.issue10951@psf.upfronthosting.co.za> Message-ID: <1366803399.42.0.95927232708.issue10951@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't mind them being backported, in the spirit of supporting newer tools well in 2.7. OTOH, I don't see it as necessary, either. 2.7 will eventually be phased out, and then it doesn't matter how much warnings it produces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 13:43:01 2013 From: report at bugs.python.org (yaccz) Date: Wed, 24 Apr 2013 11:43:01 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1366803781.71.0.561709357453.issue16499@psf.upfronthosting.co.za> Changes by yaccz : ---------- nosy: +yaccz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 13:43:33 2013 From: report at bugs.python.org (yaccz) Date: Wed, 24 Apr 2013 11:43:33 +0000 Subject: [issue12238] Readline module loading in interactive mode In-Reply-To: <1307015860.03.0.129842780518.issue12238@psf.upfronthosting.co.za> Message-ID: <1366803813.4.0.756825431735.issue12238@psf.upfronthosting.co.za> Changes by yaccz : ---------- nosy: +yaccz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 13:45:23 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 24 Apr 2013 11:45: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: <1366803923.93.0.189136886201.issue7475@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't see any point in merely bringing the codecs back, without any convenience API to use them. If I need to do import codecs result = codecs.getencoder("base64").encode(data) I don't think people would actually prefer this over import base64 result = base64.encodebytes(data) I't (IMO) only the convenience method (.encode) that made people love these codecs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 14:20:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Apr 2013 12:20:46 +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: <1366806046.83.0.51376866392.issue7475@psf.upfronthosting.co.za> Ezio Melotti added the comment: IMHO it's also a documentation problem. Once people figure out that they can't use encode/decode anymore, it's not immediately clear what they should do instead. By reading the codecs docs[0] it's not obvious that it can be done with codecs.getencoder("...").encode/decode, so people waste time finding a solution, get annoyed, and blame Python 3 because it removed a simple way to use these codecs without making clear what should be used instead. FWIW I don't care about having to do an extra import, but indeed something simpler than codecs.getencoder("...").encode/decode would be nice. [0]: http://docs.python.org/3/library/codecs.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 14:46:11 2013 From: report at bugs.python.org (Tomoki Imai) Date: Wed, 24 Apr 2013 12:46:11 +0000 Subject: [issue15392] Create a unittest framework for IDLE In-Reply-To: <1342673080.97.0.671694156374.issue15392@psf.upfronthosting.co.za> Message-ID: <1366807571.8.0.417102054145.issue15392@psf.upfronthosting.co.za> Tomoki Imai added the comment: I have already posted idle_dev mailing list (and, no one replied :P). I think, Ezio's suggestion is good if we will work for Python2. Using unittest.mock and mock to support Python2 and Python3. My proposal for GSoC is here. Making very initial version for Python2 and Python3 and, complete Python3 version and, backport it in the end. I'll set backporting for Python2 as optional work. My main goal is to make unittest for Python3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 15:43:13 2013 From: report at bugs.python.org (Alan Hourihane) Date: Wed, 24 Apr 2013 13:43:13 +0000 Subject: [issue17226] libintl should also check for libiconv In-Reply-To: <1361203207.64.0.112739633546.issue17226@psf.upfronthosting.co.za> Message-ID: <1366810993.82.0.846790157501.issue17226@psf.upfronthosting.co.za> Alan Hourihane added the comment: Bumping. How does Jeffrey's patch look folks ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 15:43:13 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Apr 2013 13:43:13 +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: <1366810993.66.0.854145251684.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: It turns out MAL added the convenience API I'm looking for back in 2004, it just didn't get documented, and is hidden behind the "from _codecs import *" call in the codecs.py source code: http://hg.python.org/cpython-fullhistory/rev/8ea2cb1ec598 So, all the way from 2.4 to 2.7 you can write: from codecs import encode result = encode(data, "base64") It works in 3.x as well, you just need to add the "_codec" to the end to account for the missing aliases: >>> encode(b"example", "base64_codec") b'ZXhhbXBsZQ==\n' >>> decode(b"ZXhhbXBsZQ==\n", "base64_codec") b'example' Note that the convenience functions omit the extra checks that are part of the methods (although I admit the specific error here is rather quirky): >>> b"ZXhhbXBsZQ==\n".decode("base64_codec") Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.2/encodings/base64_codec.py", line 20, in base64_decode return (base64.decodebytes(input), len(input)) File "/usr/lib64/python3.2/base64.py", line 359, in decodebytes raise TypeError("expected bytes, not %s" % s.__class__.__name__) TypeError: expected bytes, not memoryview I'me going to create some additional issues, so this one can return to just being about restoring the missing aliases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 15:45:40 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Apr 2013 13:45:40 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode Message-ID: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> New submission from Nick Coghlan: The codecs module has long offered encode() and decode() convenience functions (since 2004: http://hg.python.org/cpython-fullhistory/rev/8ea2cb1ec598), but they're not documented (except through docstrings). We should fix that. >From the docstrings: ========== encode(obj, [encoding[,errors]]) -> object Encodes obj using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a ValueError. Other possible values are 'ignore', 'replace' and 'xmlcharrefreplace' as well as any other name registered with codecs.register_error that can handle ValueErrors. ========== decode(obj, [encoding[,errors]]) -> object Decodes obj using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a ValueError. Other possible values are 'ignore' and 'replace' as well as any other name registered with codecs.register_error that is able to handle ValueErrors. ========== Note that the difference between the convenience functions in the codecs module and the methods on str, bytes and bytearray is that the latter have additional type checks to limit their usage to text encodings. str.encode expects a str->bytes conversion, while bytes.decode and bytearray.decode both expect the codec to produce a str object. codecs.encode and codecs.decode are both arbitrary object->object conversions, limited only by whatever the chosen codec supports. ---------- assignee: docs at python components: Documentation messages: 187700 nosy: docs at python, ncoghlan priority: normal severity: normal status: open title: Document codecs.encode and codecs.decode versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 15:47:10 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 24 Apr 2013 13:47:10 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1366806046.83.0.51376866392.issue7475@psf.upfronthosting.co.za> Message-ID: <5177E25D.1090602@egenix.com> Marc-Andre Lemburg added the comment: Just copying some details here about codecs.encode() and codec.decode() from python-dev: """ Just as reminder: we have the general purpose encode()/decode() functions in the codecs module: import codecs r13 = codecs.encode('hello world', 'rot-13') These interface directly to the codec interfaces, without enforcing type restrictions. The codec defines the supported input and output types. """ As Nick found, these aren't documented, which is a documentation bug (I probably forgot to add documentation back then). They have been in Python since 2004: http://hg.python.org/cpython-fullhistory/rev/8ea2cb1ec598 These API are nice for general purpose codec work and that's why I added them back in 2004. For the codecs in question, it would still be nice to have a more direct way to access them via methods on the types that you typically use them with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 15:49:34 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Apr 2013 13:49:34 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1366811374.85.0.447355025548.issue17827@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 15:53:35 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Apr 2013 13:53:35 +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: <1366811615.29.0.831559803696.issue7475@psf.upfronthosting.co.za> Ezio Melotti added the comment: > It works in 3.x as well, you just need to add the "_codec" to the end > to account for the missing aliases: FTR this is because of ff1261a14573 (see #10807). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 15:56:24 2013 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Apr 2013 13:56:24 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1366811784.01.0.655596542094.issue17825@psf.upfronthosting.co.za> R. David Murray added the comment: Well, that would be because the invalid indent is detected when the 'o' is encountered, whereas the invalid syntax is detected when the 't' completes the keyword 'except'. I don't think there is a bug here. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:09:58 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Apr 2013 14:09:58 +0000 Subject: [issue17828] More informative error handling when encoding and decoding Message-ID: <1366812598.92.0.4116744942.issue17828@psf.upfronthosting.co.za> New submission from Nick Coghlan: Passing the wrong types to codecs can currently lead to rather confusing exceptions, like: ==================== >>> b"ZXhhbXBsZQ==\n".decode("base64_codec") Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.2/encodings/base64_codec.py", line 20, in base64_decode return (base64.decodebytes(input), len(input)) File "/usr/lib64/python3.2/base64.py", line 359, in decodebytes raise TypeError("expected bytes, not %s" % s.__class__.__name__) TypeError: expected bytes, not memoryview ==================== >>> codecs.decode("example", "utf8") Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.2/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) TypeError: 'str' does not support the buffer interface ==================== This situation could be improved by having the affected APIs use the exception chaining system to wrap these errors in a more informative exception that also display information on the codec involved. Note that UnicodeEncodeError and UnicodeDecodeError are not appropriate, as those are specific to text encoding operations, while these new wrappers will apply to arbitrary codecs, regardless of whether or not they use the unicode error handlers. Furthermore, for backwards compatibility with existing exception handling, it is probably necessary to limit ourselves to specific exception types and ensure that the wrapper exceptions are subclasses of those types. These new wrappers would have __cause__ set to the exception raised by the codec, but emit a message more along the lines of the following: ============== codecs.DecodeTypeError: encoding='utf8', details="TypeError: 'str' does not support the buffer interface" ============== Wrapping TypeError and ValueError should cover most cases, which would mean four new exception types in the codecs module: Raised by codecs.decode, bytes.decode and bytearray.decode: * codecs.DecodeTypeError * codecs.DecodeValueError Raised by codecs.encode, str.encode: * codecs.EncodeTypeError * codecs.EncodeValueError Instances of UnicodeError wouldn't be wrapped, since they already contain codec information. ---------- components: Library (Lib) messages: 187704 nosy: ncoghlan priority: normal severity: normal status: open title: More informative error handling when encoding and decoding versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:11:28 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Apr 2013 14:11:28 +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: <1366812688.43.0.255422338282.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 17827 covers adding documentation for codecs.encode and codecs.decode Issue 17828 covers adding exception handling improvements for all encoding and decoding operations ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:11:54 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Apr 2013 14:11:54 +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: <1366812714.89.0.79600256632.issue17828@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:15:32 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Apr 2013 14:15:32 +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: <1366812932.88.0.71407050457.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: There may also be some specific improvement to be made to str.encode, bytes.decode and bytearray.decode in relation to the additional type checks they do to enforce the appropriate input and output types (see the bizarre "expected bytes, not memoryview" example) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:22:38 2013 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 24 Apr 2013 14:22:38 +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: <1366813358.15.0.11980856979.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: For me, the killer argument *against* a method based API is memoryview (and, equivalently, array.array). It should be possible to use those as inputs for the bytes->bytes codecs, and once you endorse codecs.encode and codecs.decode for that use case, it's hard to justify adding more exclusive methods to the already broad bytes and bytearray APIs (particularly given the problems with conveying direction of conversion unambiguously). By contrast, I think "the codecs functions are generic while the str, bytes and bytearray methods are specific to text encodings" is something we can explain fairly easily, thus allowing the aliases mentioned in this issue to be restored for use with the codecs module functions. To avoid reintroducing the quirky errors described in issue 10807, the encoding and decoding error messages should first be improved as discussed in issue 17828. ---------- dependencies: +More informative error handling when encoding and decoding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:22:41 2013 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Apr 2013 14:22:41 +0000 Subject: [issue15106] Potential Bug in errors.c In-Reply-To: <1340120572.84.0.94173614856.issue15106@psf.upfronthosting.co.za> Message-ID: <1366813361.58.0.490578819665.issue15106@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Interpreter Core -None nosy: +ezio.melotti, serhiy.storchaka versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:23:57 2013 From: report at bugs.python.org (Florent Xicluna) Date: Wed, 24 Apr 2013 14:23:57 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1366813437.39.0.773809844821.issue17827@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:24:49 2013 From: report at bugs.python.org (Florent Xicluna) Date: Wed, 24 Apr 2013 14:24:49 +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: <1366813489.26.0.0300223720442.issue17828@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 16:51:53 2013 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 24 Apr 2013 14:51:53 +0000 Subject: [issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8 In-Reply-To: Message-ID: <1366815129.27351.33.camel@surprise> Dave Malcolm added the comment: On Wed, 2013-04-24 at 10:48 +0000, Alex Leach wrote: > Alex Leach added the comment: > > I don't think I can tell you anything you don't know already, but ... > > On Tue, 23 Apr 2013 19:38:18 +0100, Dave Malcolm > wrote: > > > BTW, is that GCC format checking code available anywhere? > > Is this what you mean? > > http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/c-family/c-format.c?annotate=193304&pathrev=193304 > > I got taken straight there from the link you sent, above... [snip] > Am I right in thinking that it was an out-of-tree patch to GCC, from the > > pre-plugin days? > Sorry that I was a bit vague. GCC's __attribute((format(i, j, k))__ takes 3 parameters. The first parameter is a string code naming the mini-language expressing valid format strings and their mapping to the types that follow in the varargs. I was asking about the string code "PyArg_ParseTuple" used in the CPython configure test: the link above is the implementation of GCC's builtin format string codes: and AFAIK the only ones it "knows" about there are the ones in static const format_kind_info format_types_orig[] = in the above file (lines 808-873 of gcc/c-family/c-format.c) which are codes for printf, fprintf, various internal gcc APIs, NSString, scanf, strftime, and strfmon. i.e. I believe that the "PyArg_ParseTuple" code is from some 3rd party patch to GCC that never made it into GCC mainline. Does this code still exist anywhere? [Not that this has any bearing on this bug and the proposed patch: I'm a big fan of compiler attributes, and wouldn't want to remove them from the API.] Hope the above makes sense ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 17:06:00 2013 From: report at bugs.python.org (Ghislain Hivon) Date: Wed, 24 Apr 2013 15:06:00 +0000 Subject: [issue17829] csv.Sniffer.snif doesn't set up the dialect properly for a csv created with dialect=csv.excel_tab and containing quote (") char Message-ID: <1366815960.68.0.342437673136.issue17829@psf.upfronthosting.co.za> New submission from Ghislain Hivon: When sniffing the dialect of a file created with the csv module with dialect=csv.excel_tab and one of the row contain a quote ("), the delimiter is set to ' ' instead of '\t'. ---------- files: csv_sniffing_excel_tab.py messages: 187709 nosy: GhislainHivon priority: normal severity: normal status: open title: csv.Sniffer.snif doesn't set up the dialect properly for a csv created with dialect=csv.excel_tab and containing quote (") char type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file30001/csv_sniffing_excel_tab.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 17:29:10 2013 From: report at bugs.python.org (Zachary Ware) Date: Wed, 24 Apr 2013 15:29:10 +0000 Subject: [issue17830] Fix test_keyword on Windows, clean up addCleanup Message-ID: <1366817350.3.0.0113666626192.issue17830@psf.upfronthosting.co.za> New submission from Zachary Ware: (Copying the nosy list from issue9607) test_keyword has a couple of failures on Windows, all due to newline issues--see for example http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/1845/steps/test/logs/stdio. test_keywords_py_without_markers_produces_error looks for a line ending with '\n', but Windows ends it with '\r\n'. test_real_grammar_and_keyword_file, on the other hand, doesn't fail on my machine, due to the hg eol extension being enabled, but the cause of failure is filecmp.cmp working only in binary mode and paying no attention to line endings. The attached patch fixes both failures, with and without the eol extension, by using a private _compare_files function instead of filecmp.cmp. The private function makes use of universal newlines to avoid issue. Also, all instances of ``self.addCleanup(lambda ...)`` have had the lambda removed as suggested by ?ric Araujo in msg187567. ---------- components: Tests files: test_keyword_cleanup.diff keywords: patch messages: 187710 nosy: benjamin.peterson, eric.araujo, gregmalcolm, r.david.murray, zach.ware priority: normal severity: normal status: open title: Fix test_keyword on Windows, clean up addCleanup type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file30002/test_keyword_cleanup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 17:35:15 2013 From: report at bugs.python.org (Berker Peksag) Date: Wed, 24 Apr 2013 15:35:15 +0000 Subject: [issue16316] Support xz compression in mimetypes module In-Reply-To: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> Message-ID: <1366817715.24.0.967017367666.issue16316@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag resolution: fixed -> Added file: http://bugs.python.org/file30003/issue16316_27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 17:48:12 2013 From: report at bugs.python.org (Nataly Glazyrina) Date: Wed, 24 Apr 2013 15:48:12 +0000 Subject: [issue17831] urllib.URLopener.open breaks ActiveDirectory user Message-ID: <1366818492.16.0.0758533626758.issue17831@psf.upfronthosting.co.za> New submission from Nataly Glazyrina: When I try to open file from ftp by path like 'ftp://domain\user:password at my.path' line 'fullurl = quote(fullurl, safe="%/:=&?~#+!$,;'@()*[]|")' changes 'domain\user' to 'domain%5Cuser' and brokes username. As a result - error 530 on login to ftp. ---------- messages: 187711 nosy: Nataly.Glazyrina priority: normal severity: normal status: open title: urllib.URLopener.open breaks ActiveDirectory user _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 17:48:44 2013 From: report at bugs.python.org (Nataly Glazyrina) Date: Wed, 24 Apr 2013 15:48:44 +0000 Subject: [issue17831] urllib.URLopener.open breaks ActiveDirectory user In-Reply-To: <1366818492.16.0.0758533626758.issue17831@psf.upfronthosting.co.za> Message-ID: <1366818524.45.0.15748002281.issue17831@psf.upfronthosting.co.za> Changes by Nataly Glazyrina : ---------- components: +Library (Lib) versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 17:51:03 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 15:51:03 +0000 Subject: [issue17832] pythonrun.c:_print_total_refs missing prototype Message-ID: <1366818663.02.0.0958577482623.issue17832@psf.upfronthosting.co.za> Changes by David Edelsohn : ---------- components: Interpreter Core nosy: David.Edelsohn priority: normal severity: normal status: open title: pythonrun.c:_print_total_refs missing prototype type: compile error versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 18:43:15 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 24 Apr 2013 16:43:15 +0000 Subject: [issue17831] urllib.URLopener.open breaks ActiveDirectory user In-Reply-To: <1366818492.16.0.0758533626758.issue17831@psf.upfronthosting.co.za> Message-ID: <1366821795.7.0.0291855436265.issue17831@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Can you give the full snippet that you are trying. I assume you are using urllib2? Also If you give the same URL to your other clients like browser, does the resolution happen properly? ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:09:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 18:09:48 +0000 Subject: [issue17832] pythonrun.c:_print_total_refs missing prototype Message-ID: <1366826988.19.0.842621546486.issue17832@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Can you tell us a bit more about the compile / build options you used? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:14:38 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 18:14:38 +0000 Subject: [issue17832] pythonrun.c:_print_total_refs missing prototype In-Reply-To: <1366826988.19.0.842621546486.issue17832@psf.upfronthosting.co.za> Message-ID: <1366827278.98.0.886875540236.issue17832@psf.upfronthosting.co.za> David Edelsohn added the comment: A build warning from the PowerLinux buildbot http://buildbot.python.org/all/builders/PPC64%20PowerLinux%203.x/builds/3/steps/compile/logs/stdio gcc -pthread -c -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -m64 -m64 -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/pythonrun.o Python/pythonrun.c Python/pythonrun.c:39:6: warning: function declaration isn?t a prototype [-Wstrict-prototypes] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:17:28 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 18:17:28 +0000 Subject: [issue17832] pythonrun.c:_print_total_refs missing prototype In-Reply-To: <1366826988.19.0.842621546486.issue17832@psf.upfronthosting.co.za> Message-ID: <1366827448.4.0.142799083274.issue17832@psf.upfronthosting.co.za> David Edelsohn added the comment: CPython configured with --with-pydebug ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:18:02 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 24 Apr 2013 18:18:02 +0000 Subject: [issue17832] pythonrun.c:_print_total_refs missing prototype In-Reply-To: <1366826988.19.0.842621546486.issue17832@psf.upfronthosting.co.za> Message-ID: <3ZwqWt0ZQdzT0H@mail.python.org> Roundup Robot added the comment: New changeset 6eacc6c134a5 by Antoine Pitrou in branch 'default': Issue #17832: fix a compilation warning about a function prototype. http://hg.python.org/cpython/rev/6eacc6c134a5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:19:16 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 18:19:16 +0000 Subject: [issue17832] pythonrun.c:_print_total_refs missing prototype In-Reply-To: <1366826988.19.0.842621546486.issue17832@psf.upfronthosting.co.za> Message-ID: <1366827556.82.0.439609457843.issue17832@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, right. This is fixed now, thanks for reporting. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:32:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 18:32:13 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1361306836.21.0.240059339462.issue17244@psf.upfronthosting.co.za> Message-ID: <1366828333.33.0.840315088479.issue17244@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Test broken on Windows: ====================================================================== FAIL: test_exceptions_propagate (test.test_py_compile.PyCompileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_py_compile.py", line 66, in test_exceptions_propagate py_compile.compile(self.source_path, self.pyc_path) AssertionError: OSError not raised http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/1850/steps/test/logs/stdio ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:33:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 18:33:32 +0000 Subject: [issue9607] Test file 'test_keyword.py' submission for use with keyword.py In-Reply-To: <1281849348.53.0.810648733764.issue9607@psf.upfronthosting.co.za> Message-ID: <1366828412.64.0.677703340429.issue9607@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Tests broken under Windows: ====================================================================== FAIL: test_keywords_py_without_markers_produces_error (test.test_keyword.TestKeywordGeneration) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_keyword.py", line 122, in test_keywords_py_without_markers_produces_error self.assertEqual(stderr, b'target does not contain format markers\n') AssertionError: b'target does not contain format markers\r\n' != b'target does not contain format markers\n' ====================================================================== FAIL: test_real_grammar_and_keyword_file (test.test_keyword.TestKeywordGeneration) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_keyword.py", line 63, in test_real_grammar_and_keyword_file self.assertTrue(filecmp.cmp(KEYWORD_FILE, TEST_PY_FILE)) AssertionError: False is not true http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/1850/steps/test/logs/stdio ---------- assignee: -> r.david.murray nosy: +pitrou status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:35:30 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 18:35:30 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux Message-ID: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> New submission from David Edelsohn: Verify that "py-bt" indicates threads that are waiting for the GIL ... FAIL FAIL: test_threads (test.test_gdb.PyBtTests) Verify that "py-bt" indicates threads that are waiting for the GIL ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_gdb.py", line 717, in test_threads self.assertIn('Waiting for the GIL', gdb_output) AssertionError: 'Waiting for the GIL' not found in 'Breakpoint 1 at 0x100ee8b0: file Python/bltinmodule.c, line 967.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib64/libthread_db.so.1".\n[New Thread 0x3fffb14af200 (LWP 1699)]\n[New Thread 0x3fffb0caf200 (LWP 1703)]\n[New Thread 0x3fffabfff200 (LWP 1711)]\n[New Thread 0x3fffab7ff200 (LWP 1730)]\n\nBreakpoint 1, builtin_id (self=, v=42) at Python/bltinmodule.c:967\n967\t return PyLong_FromVoidPtr(v);\n\nThread 5 (Thread 0x3fffab7ff200 (LWP 1730)):\nTraceback (most recent call first):\n File "", line 10, in run\n File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 642, in _bootstrap_inner\n self.run()\n File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 619, in _bootstrap\n self._bootstrap_inner()\n\nThread 4 (Thread 0x3fffabfff200 (LWP 1711)):\nTraceback (most recent call first):\n File "", line 10, in run\n File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 642, in _bootstrap_inner\n self.run()\n File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 619, in _bootstrap\n self._bootstrap_inner()\n\nThread 3 (Thread 0x3fffb0caf200 (LWP 1703)):\nTraceback (most recent call first):\n File "", line 10, in run\n File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 642, in _bootstrap_inner\n self.run()\n File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 619, in _bootstrap\n self._bootstrap_inner()\n\nThread 2 (Thread 0x3fffb14af200 (LWP 1699)):\nTraceback (most recent call first):\n File "", line 10, in run\n File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 642, in _bootstrap_inner\n self.run()\n File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 619, in _bootstrap\n self._bootstrap_inner()\n\nThread 1 (Thread 0x8074e46670 (LWP 1616)):\nTraceback (most recent call first):\n File "", line 18, in \n' ---------- components: Tests messages: 187720 nosy: David.Edelsohn priority: normal severity: normal status: open title: test_gdb broken PPC64 Linux versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:36:05 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 24 Apr 2013 18:36:05 +0000 Subject: [issue9607] Test file 'test_keyword.py' submission for use with keyword.py In-Reply-To: <1281849348.53.0.810648733764.issue9607@psf.upfronthosting.co.za> Message-ID: <1366828565.39.0.65594211103.issue9607@psf.upfronthosting.co.za> Benjamin Peterson added the comment: See #17830 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:43:03 2013 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 24 Apr 2013 18:43:03 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366828983.08.0.777065212598.issue17833@psf.upfronthosting.co.za> Dave Malcolm added the comment: Is this an optimized or a debug build? (aka --with-pydebug) What are the optimization flags passed to the C compiler? ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:52:33 2013 From: report at bugs.python.org (Daniel Wong) Date: Wed, 24 Apr 2013 18:52:33 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module Message-ID: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> New submission from Daniel Wong: heapq already provides a bunch of functions for manipulating lists that preserve (or create) a heap invariant. My change adds two classes for representing heaps. These classes ensure that operations that violate the heap invariant are not possible (through the public interface). The also allow customization via subclassing. ---------- components: Library (Lib) files: heap.patch hgrepos: 185 keywords: patch messages: 187723 nosy: allyourcode priority: normal severity: normal status: open title: Add Heap (and DynamicHeap) classes to heapq module type: enhancement Added file: http://bugs.python.org/file30004/heap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 20:58:26 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 18:58:26 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366829906.64.0.0610695779441.issue17833@psf.upfronthosting.co.za> David Edelsohn added the comment: Unoptimized debug build (configured using --with-pydebug). Buildbot test failure running on gcc110 in GCC Compile Farm (running Fedora). gcc -pthread -c -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -m64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:02:53 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 19:02:53 +0000 Subject: [issue17835] test_io broken on PPC64 Linux Message-ID: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> New submission from David Edelsohn: Unoptimized debug build (configured using --with-pydebug). gcc -pthread -c -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -m64 test_interrupted_write_retry_buffered (test.test_io.CSignalsTest) ... ERROR test_interrupted_write_retry_text (test.test_io.CSignalsTest) ... ERROR test_interrupted_write_retry_buffered (test.test_io.PySignalsTest) ... ERROR test_interrupted_write_retry_text (test.test_io.PySignalsTest) ... ERROR ====================================================================== ERROR: test_interrupted_write_retry_buffered (test.test_io.CSignalsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_io.py", line 3219, in test_interrupted_write_retry_buffered self.check_interrupted_write_retry(b"x", mode="wb") File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_io.py", line 3203, in check_interrupted_write_retry t.join() File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 738, in join raise RuntimeError("cannot join thread before it is started") RuntimeError: cannot join thread before it is started ====================================================================== ERROR: test_interrupted_write_retry_text (test.test_io.CSignalsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_io.py", line 3222, in test_interrupted_write_retry_text self.check_interrupted_write_retry("x", mode="w", encoding="latin1") File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_io.py", line 3203, in check_interrupted_write_retry t.join() File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 738, in join raise RuntimeError("cannot join thread before it is started") RuntimeError: cannot join thread before it is started ====================================================================== ERROR: test_interrupted_write_retry_buffered (test.test_io.PySignalsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_io.py", line 3219, in test_interrupted_write_retry_buffered self.check_interrupted_write_retry(b"x", mode="wb") File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_io.py", line 3203, in check_interrupted_write_retry t.join() File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 738, in join raise RuntimeError("cannot join thread before it is started") RuntimeError: cannot join thread before it is started ====================================================================== ERROR: test_interrupted_write_retry_text (test.test_io.PySignalsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_io.py", line 3222, in test_interrupted_write_retry_text self.check_interrupted_write_retry("x", mode="w", encoding="latin1") File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/test/test_io.py", line 3203, in check_interrupted_write_retry t.join() File "/home/shager/cpython-buildarea/3.x.edelsohn-powerlinux-ppc64/build/Lib/threading.py", line 738, in join raise RuntimeError("cannot join thread before it is started") RuntimeError: cannot join thread before it is started ---------- components: Tests messages: 187725 nosy: David.Edelsohn priority: normal severity: normal status: open title: test_io broken on PPC64 Linux versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:07:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 24 Apr 2013 19:07:16 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1361306836.21.0.240059339462.issue17244@psf.upfronthosting.co.za> Message-ID: <1366830436.05.0.430042888488.issue17244@psf.upfronthosting.co.za> Brett Cannon added the comment: Does os.chmod(self.directory, stat.S_IREAD) not work on directories on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:16:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 19:16:03 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366830963.34.0.757521741233.issue17835@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What does the following say for you? >>> import fcntl, os >>> r, w = os.pipe() >>> fcntl.fcntl(w, 1032) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:20:13 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Apr 2013 19:20:13 +0000 Subject: [issue17826] Setting a side_effect on mock from create_autospec doesn't work In-Reply-To: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za> Message-ID: <1366831213.12.0.834303762151.issue17826@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:21:36 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 19:21:36 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366831296.22.0.531641459387.issue17835@psf.upfronthosting.co.za> David Edelsohn added the comment: >>> import fcntl, os >>> r, w = os.pipe() >>> fcntl.fcntl(w, 1032) 1048576 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:24:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 19:24:58 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366831498.05.0.437092093505.issue17835@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, right. That number is the pipe buffer size (1032 is F_GETPIPE_SZ). It's 65536 here, so when the test tries to write 1 million bytes on a pipe, the write blocks as expected (you can read the comments to understand why the test is doint that). But with a 1 MiB buffer size, the write doesn't block and therefore doesn't have to wait for the auxiliary thread to start and read from the pipe buffer. Something else, what does the following say: >>> r, w = os.pipe() >>> fcntl.fcntl(r, 1031, 1000) ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:25:12 2013 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 24 Apr 2013 19:25:12 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366831512.29.0.281341585467.issue17833@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks. I can't see from that output what's going wrong. Can you apply the following patch, which (I hope) will print more detailed info where the failure happens. ---------- keywords: +patch Added file: http://bugs.python.org/file30005/find-more-information.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:26:26 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 19:26:26 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366831586.13.0.182899004556.issue17835@psf.upfronthosting.co.za> David Edelsohn added the comment: >>> r, w = os.pipe() >>> fcntl.fcntl(r, 1031, 1000) 65536 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:28:22 2013 From: report at bugs.python.org (Tim Golden) Date: Wed, 24 Apr 2013 19:28:22 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1366830436.05.0.430042888488.issue17244@psf.upfronthosting.co.za> Message-ID: <5178324E.2050702@timgolden.me.uk> Tim Golden added the comment: Essentially: no. The permissions system in Windows is very different from that of Unix. The CRT attempts to mimic it, but for things like read-onlyness, it does so by setting the (old-style DOS) attributes. These are only just meaningful for files, and are meaningless for directories. (Or, strictly, have a different meaning since ISTR the Explorer shell uses the readonly bit to indicate that a directory has some special significance). ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From mail at timgolden.me.uk Wed Apr 24 21:28:14 2013 From: mail at timgolden.me.uk (Tim Golden) Date: Wed, 24 Apr 2013 20:28:14 +0100 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1366830436.05.0.430042888488.issue17244@psf.upfronthosting.co.za> References: <1366830436.05.0.430042888488.issue17244@psf.upfronthosting.co.za> Message-ID: <5178324E.2050702@timgolden.me.uk> Essentially: no. The permissions system in Windows is very different from that of Unix. The CRT attempts to mimic it, but for things like read-onlyness, it does so by setting the (old-style DOS) attributes. These are only just meaningful for files, and are meaningless for directories. (Or, strictly, have a different meaning since ISTR the Explorer shell uses the readonly bit to indicate that a directory has some special significance). From report at bugs.python.org Wed Apr 24 21:33:40 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 19:33:40 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366832020.94.0.945292787013.issue17833@psf.upfronthosting.co.za> Changes by David Edelsohn : Added file: http://bugs.python.org/file30006/test_gdb.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:40:29 2013 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 24 Apr 2013 19:40:29 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366832429.83.0.0392919408442.issue17833@psf.upfronthosting.co.za> Dave Malcolm added the comment: Looking at test_gdb.out, the issue is that the threads waiting for the GIL have e.g. this at the top of their backtrace: Thread 2 (Thread 0x3fffb14af200 (LWP 37119)): #0 0x0000008075181ea8 in __pthread_cond_timedwait (cond=0x103ea140 , mutex=0x103ea170 , abstime=0x3fffb14abf68) at pthread_cond_timedwait.c:167 #1 0x00000000100f59f8 in PyCOND_TIMEDWAIT (cond=0x103ea140 , mut=0x103ea170 , us=5000) at /home/dje/src/cpython/Python/condvar.h:103 #2 0x00000000100f5ffc in take_gil (tstate=0x1043b020) at /home/dje/src/cpython/Python/ceval_gil.h:224 i.e. the topmost frame has name "__pthread_cond_timedwait" (two leading underscores. However, the gdb hooks (in Tools/gdb/libpython.py) have: def is_waiting_for_gil(self): '''Is this frame waiting on the GIL?''' # This assumes the _POSIX_THREADS version of Python/ceval_gil.h: name = self._gdbframe.name() if name: return name.startswith('pthread_cond_timedwait') i.e. no underscores, hence that name.startswith conditional doesn't match. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:47:04 2013 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 24 Apr 2013 19:47:04 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366832824.61.0.679137079848.issue17833@psf.upfronthosting.co.za> Dave Malcolm added the comment: Can you try this candidate fix? ---------- Added file: http://bugs.python.org/file30007/possible-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 21:54:58 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 19:54:58 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366833298.5.0.926698158618.issue17833@psf.upfronthosting.co.za> David Edelsohn added the comment: __pthread_cond_timedwait with underscore may be a general GLibc change. The patch fixes the failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 22:29:39 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 24 Apr 2013 20:29:39 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1361306836.21.0.240059339462.issue17244@psf.upfronthosting.co.za> Message-ID: <1366835379.0.0.898643894823.issue17244@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the info, Tim. I'll add a skip decorator to not run under Windows then. ---------- resolution: fixed -> stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 22:34:19 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 24 Apr 2013 20:34:19 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1361306836.21.0.240059339462.issue17244@psf.upfronthosting.co.za> Message-ID: <3ZwtY66LwpzRMX@mail.python.org> Roundup Robot added the comment: New changeset 0803a28dca3c by Brett Cannon in branch 'default': Issue #17244: Windows doesn't let you set permissions on directories. http://hg.python.org/cpython/rev/0803a28dca3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 22:34:38 2013 From: report at bugs.python.org (Brett Cannon) Date: Wed, 24 Apr 2013 20:34:38 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1361306836.21.0.240059339462.issue17244@psf.upfronthosting.co.za> Message-ID: <1366835678.13.0.101065609831.issue17244@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 22:35:15 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 24 Apr 2013 20:35:15 +0000 Subject: [issue17244] py_compile.compile() fails to raise exceptions when writing of target file fails In-Reply-To: <1361306836.21.0.240059339462.issue17244@psf.upfronthosting.co.za> Message-ID: <1366835715.4.0.0351253120535.issue17244@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 22:40:59 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 20:40:59 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366836059.95.0.085419558621.issue17835@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, what does the following patch do for you: diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -3168,7 +3168,7 @@ class SignalsTest(unittest.TestCase): select = support.import_module("select") # A quantity that exceeds the buffer size of an anonymous pipe's # write end. - N = 1024 * 1024 + N = 1024 * 1024 + 1 r, w = os.pipe() fdopen_kwargs["closefd"] = False # We need a separate thread to read from the pipe and allow the @@ -3191,6 +3191,12 @@ class SignalsTest(unittest.TestCase): signal.signal(signal.SIGALRM, alarm1) try: wio = self.io.open(w, **fdopen_kwargs) + if sys.platform.startswith('linux') and fcntl is not None: + # Issue #17835: try to limit pipe size using F_SETPIPE_SZ + pipe_size = fcntl.fcntl(w, 1031, 4096) + if pipe_size >= N: + self.skipTest("can't set pipe size to less than %d bytes: %d" + % (N, pipe_size)) signal.alarm(1) # Expected behaviour: # - first raw write() is partial (because of the limited pipe buffer ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 22:45:41 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 24 Apr 2013 20:45:41 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366836059.95.0.085419558621.issue17835@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: Why not simply increase the amount of data written instead of limiting the pipe size? By the way, there's support.PIPE_MAX_SIZE for that purpose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 22:55:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 20:55:13 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366836913.52.0.0625034156352.issue17835@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Why not simply increase the amount of data written instead of limiting > the pipe size? Hmm, indeed :-) > By the way, there's support.PIPE_MAX_SIZE for that purpose. Hardwired to 3 MB. I wonder if it may broken soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 22:57:19 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 20:57:19 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366837039.62.0.803951848447.issue17835@psf.upfronthosting.co.za> David Edelsohn added the comment: The patch limiting the pipe size resolves the test_io failure. Either of the approaches should work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:06:14 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 24 Apr 2013 21:06:14 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366836913.52.0.0625034156352.issue17835@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: >> Why not simply increase the amount of data written instead of limiting >> the pipe size? > > Hmm, indeed :-) > >> By the way, there's support.PIPE_MAX_SIZE for that purpose. > > Hardwired to 3 MB. I wonder if it may broken soon. On Linux, for non root users, it's limited to 1048576, and can be set to /proc/sys/fs/pipe-max-size. After a quick look at the kernel code, there's apparently no max value (it must be a multiple of the page size, though). I think 3MB should be more than enough, so I suggest to update the test to use support.PIPE_MAX_SIZE. If this breaks up again, then we could set PIPE_MAX_SIZE dynamically, like: r, w = os.pipe() PIPE_MAX_SIZE = 2 * fcntl.fcntl(w, 1032) But F_GETPIPE_SZ is Linux only, and quite recent (since 2.6.35 apparently). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:07:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 21:07:40 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366837660.78.0.528342031414.issue17835@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, here is a new patch updating PIPE_MAX_SIZE with a proper value if possible. ---------- keywords: +patch Added file: http://bugs.python.org/file30008/pipe_max_size.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:13:49 2013 From: report at bugs.python.org (David Edelsohn) Date: Wed, 24 Apr 2013 21:13:49 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366838029.09.0.94554486524.issue17835@psf.upfronthosting.co.za> David Edelsohn added the comment: The PIPE_MAX_SIZE patch also fixes the failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:20:41 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 24 Apr 2013 21:20:41 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366837660.78.0.528342031414.issue17835@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Ok, here is a new patch updating PIPE_MAX_SIZE with a proper value if > possible. The patch is correct, however I think it's a bit overkill, especially since it's Linux only. Choosing a fixed large value (3 or 4 MB) just consumes a bit more memory and should be more than enough. Anyway, this problem also affects all versions from 2.7, so PIPE_MAX_SIZE should be backported there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:27:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 21:27:14 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: Message-ID: <1366838831.6478.2.camel@fsol> Antoine Pitrou added the comment: > The patch is correct, however I think it's a bit overkill, especially > since it's Linux only. > Choosing a fixed large value (3 or 4 MB) just consumes a bit more > memory and should be more than enough. Ok, so let's say 4MB + 1 then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:38:31 2013 From: report at bugs.python.org (Roundup Robot) Date: Wed, 24 Apr 2013 21:38:31 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <3ZwvzB62Clz7Lk7@mail.python.org> Roundup Robot added the comment: New changeset 4b4ed1e11fd0 by Antoine Pitrou in branch '3.3': Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes. http://hg.python.org/cpython/rev/4b4ed1e11fd0 New changeset de35eae9048a by Antoine Pitrou in branch 'default': Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes. http://hg.python.org/cpython/rev/de35eae9048a New changeset 09811ecd5df1 by Antoine Pitrou in branch '2.7': Issue #17835: Fix test_io when the default OS pipe buffer size is larger than one million bytes. http://hg.python.org/cpython/rev/09811ecd5df1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:39:17 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 21:39:17 +0000 Subject: [issue17835] test_io broken on PPC64 Linux In-Reply-To: <1366830173.09.0.170493348126.issue17835@psf.upfronthosting.co.za> Message-ID: <1366839557.68.0.324647760656.issue17835@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This should be fixed now. David, please re-open if the failure still occurs. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:46:46 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 21:46:46 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1366840006.87.0.673468489451.issue17834@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 24 23:50:10 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 24 Apr 2013 21:50:10 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1366840210.8.0.0887382889894.issue17818@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +r.david.murray, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 00:22:43 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Apr 2013 22:22:43 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1366842163.32.0.341504600062.issue17834@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: queue.PriorityQueue? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 01:27:43 2013 From: report at bugs.python.org (Daniel Wong) Date: Wed, 24 Apr 2013 23:27:43 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1366846063.74.0.754955657594.issue17834@psf.upfronthosting.co.za> Daniel Wong added the comment: Hey Serhiy, Are you suggesting that I put my new classes in a new module and rename them? I think it'd be better to keep them in heapq, unless someone intended to add more classes to your proposed queue module, because heap functionality would be spread between two modules (heapq and queue). One could argue that these classes could go in the collections module, but I think sticking to heapq is best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 01:32:01 2013 From: report at bugs.python.org (Andres Riancho) Date: Wed, 24 Apr 2013 23:32:01 +0000 Subject: [issue17836] multiprocessing exceptions with useful traceback Message-ID: <1366846321.84.0.456984505709.issue17836@psf.upfronthosting.co.za> New submission from Andres Riancho: In pool.py, the worker function reads as follows: http://svn.python.org/view/python/trunk/Lib/multiprocessing/pool.py?view=markup """ 68 job, i, func, args, kwds = task 69 try: 70 result = (True, func(*args, **kwds)) 71 except Exception, e: 72 result = (False, e) ... 488 if self._success: 489 return self._value 490 else: 491 raise self._value """ If an exception is raised in the function you sent to the pool, the exception you get has "raise self._value" as the last line; which is correct but useless for debugging. mp_exception_bug.py reproduces this error. This is the output: """ Traceback (most recent call last): File "mp_exception_bug.py", line 8, in print p.map(f, [1,2,3]) File "/usr/lib/python2.7/multiprocessing/pool.py", line 227, in map return self.map_async(func, iterable, chunksize).get() File "/usr/lib/python2.7/multiprocessing/pool.py", line 528, in get raise self._value NameError: global name 'y' is not defined """ As you can imagine, "NameError: global name 'y' is not defined" is not enough in complex projects. If we apply some changes to the pool.py we could get something similar to this: """ Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/pool.py", line 98, in worker result = (True, func(*args, **kwds)) File "/usr/lib/python2.7/multiprocessing/pool.py", line 67, in mapstar return map(*args) File "mp_exception_bug.py", line 4, in f return x*y NameError: global name 'y' is not defined Traceback (most recent call last): File "mp_exception_bug.py", line 8, in print p.map(f, [1,2,3]) File "/usr/lib/python2.7/multiprocessing/pool.py", line 231, in map return self.map_async(func, iterable, chunksize).get() File "/usr/lib/python2.7/multiprocessing/pool.py", line 535, in get raise self._value[0] NameError: global name 'y' is not defined """ The patch is simple but ugly: """ > import sys > import traceback 72c100,102 < result = (False, e) --- > exc_info = sys.exc_info() > tb_string = traceback.format_exc(exc_info[2]) > result = (False, (e, tb_string)) 491c532,535 < raise self._value --- > # Do something with the exception here, the simplest (but ugliest) > # thing to do is to simply print it to the console > print self._value[1] > raise self._value[0] """ Note that I tried to replace the "raise self._value[0]" with a raise with three parameters, being the last one the traceback we get using "exc_info = sys.exc_info()" but sadly it is not possible to pickle tracebacks. I understand that printing is not the best thing to do here, but I wanted to get this discussion started and come to a real solution. Thanks ---------- components: Library (Lib) files: mp_exception_bug.py messages: 187751 nosy: Andres.Riancho priority: normal severity: normal status: open title: multiprocessing exceptions with useful traceback versions: Python 3.5 Added file: http://bugs.python.org/file30009/mp_exception_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 02:32:55 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Apr 2013 00:32:55 +0000 Subject: [issue17836] multiprocessing exceptions with useful traceback In-Reply-To: <1366846321.84.0.456984505709.issue17836@psf.upfronthosting.co.za> Message-ID: <1366849975.83.0.351896594148.issue17836@psf.upfronthosting.co.za> Ned Deily added the comment: (FYI, cpython source is no longer maintained in svn.python.org; the browser link you provided is out-of-date. Current source for the 2.7 branch can be viewed here: http://hg.python.org/cpython/file/2.7/) ---------- nosy: +ned.deily, sbt versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 02:33:40 2013 From: report at bugs.python.org (Ned Deily) Date: Thu, 25 Apr 2013 00:33:40 +0000 Subject: [issue17836] multiprocessing exceptions with useful traceback In-Reply-To: <1366846321.84.0.456984505709.issue17836@psf.upfronthosting.co.za> Message-ID: <1366850020.68.0.560068281891.issue17836@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 04:09:33 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Apr 2013 02:09:33 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1366855773.56.0.909116628555.issue17834@psf.upfronthosting.co.za> R. David Murray added the comment: Serhiy is pointing you to an existing use of heapq in the stdlib. I'm not quite sure what his intent is in pointing it out, though it *might* be to point out that heapq is a primitive, and PriorityQueue already implements a subclassable class using it. I don't personally have any opinion either way on the utility of your proposed classes. I've only ever used PriorityQueue once :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 06:31:58 2013 From: report at bugs.python.org (paul j3) Date: Thu, 25 Apr 2013 04:31:58 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1366864318.5.0.870637145349.issue9849@psf.upfronthosting.co.za> paul j3 added the comment: This is a revision of yesterday's patch. It includes a couple of test cases that check that parser, groups, and exclusive groups all produce the error message. I also changed the metavar tuple case to return an ArgumentError, and changed test_argparse.py accordingly. (this metavar testing was added in http://bugs.python.org/issue9348). This issue overlaps with http://bugs.python.org/issue16970, 'argparse: bad nargs value raises misleading message'. There, though, the focus is more on the error message when nargs=0. While nargs<1 might not make much sense, it technically does not break anything. ---------- Added file: http://bugs.python.org/file30010/nargswarn.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 06:51:28 2013 From: report at bugs.python.org (paul j3) Date: Thu, 25 Apr 2013 04:51:28 +0000 Subject: [issue16970] argparse: bad nargs value raises misleading message In-Reply-To: <1358251791.34.0.358251606196.issue16970@psf.upfronthosting.co.za> Message-ID: <1366865488.78.0.830036964604.issue16970@psf.upfronthosting.co.za> paul j3 added the comment: http://bugs.python.org/issue9849 also deals with nargs values. However there the focus is on string values like '1', not whether an integer value can be 0 or <0. I submitted a patch that moves the nargs testing to a ArgumentParser._check_argument() method. It still depends on _format_args to do the actual testing of nargs. I also make sure that group.add_argument() does this test. Regarding this issue, can nargs=0 or <0? _Store_action objects to 0, not because it causes runtime errors, but because it does not make sense. Code with nargs=-1 runs without error, not consuming a string and returning [], just as a nargs=0 would. In http://bugs.python.org/issue14191 I found it useful to temporarily set nargs=0 to 'turn off' a positional. I would vote for leaving this error message as is: "ValueError: nargs for store actions must be > 0; if you have nothing to store, actions such as store true or store const may be more appropriate" even though the test is actually nargs==0. For normal use the recommendation that nargs>0 makes sense. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 07:37:41 2013 From: report at bugs.python.org (Daniel Wong) Date: Thu, 25 Apr 2013 05:37:41 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1366868261.43.0.0979460781693.issue17834@psf.upfronthosting.co.za> Daniel Wong added the comment: Ah, Serhiy is pointing out that there's already a class named PriorityQueue in the queue module. I didn't know that exists. Now that I've had a chance to look at it, queue.PriorityQueue is like my Heap class, but there are some interesting difference; moreover, I'm also proposing DynamicHeap, which is pretty different from PriorityQueue. Perhaps, I should find a way to augment PriorityQueue so that it supports the interesting features of DynamicHeap? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 07:48:55 2013 From: report at bugs.python.org (Daniel Wong) Date: Thu, 25 Apr 2013 05:48:55 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366868935.18.0.868536503154.issue17794@psf.upfronthosting.co.za> Daniel Wong added the comment: from the peanut gallery: This looks right to me; you are seeing that PriorityQueue is trying to compare dicts, because that's how tuple comparison works: it is lexicographic. Since the first element of the two tuples that you are trying to insert have the same value, comparison of the two tuple reduces to comparing the second elements. Your work around also looks good to me. ---------- components: +Library (Lib) -Interpreter Core nosy: +allyourcode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 08:53:24 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Thu, 25 Apr 2013 06:53:24 +0000 Subject: [issue17837] Support for building on ppc64p7 Message-ID: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: Hi, would it be possible to add ppc64p7 (Power7 optimized) to supported arches in config.sub? It should be as easy as the attached one-liner patch. Thanks. ---------- components: Build files: python-add-support-for-ppc64p7.patch keywords: patch messages: 187758 nosy: bkabrda priority: normal severity: normal status: open title: Support for building on ppc64p7 versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30011/python-add-support-for-ppc64p7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 08:56:24 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Thu, 25 Apr 2013 06:56:24 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE Message-ID: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> New submission from Guilherme Sim?es: Something like: sys.stdin = open('file') works in Python but doesn't in the IDLE shell. After trying to do that, a dialog is open asking if the user wants to kill the program. This happens because the method "close" of the class "PseudoInputFile" (which was created in #17585) is called. ---------- components: IDLE messages: 187759 nosy: Guilherme.Sim?es priority: normal severity: normal status: open title: Can't assign a different value for sys.stdin in IDLE type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 08:59:34 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Thu, 25 Apr 2013 06:59:34 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1366873174.69.0.553567587508.issue17838@psf.upfronthosting.co.za> Changes by Guilherme Sim?es : ---------- nosy: +Todd.Rovito, roger.serwy, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 09:19:52 2013 From: report at bugs.python.org (Phil Connell) Date: Thu, 25 Apr 2013 07:19:52 +0000 Subject: [issue6028] Interpreter aborts when chaining an infinite number of exceptions In-Reply-To: <1242376180.99.0.271687505005.issue6028@psf.upfronthosting.co.za> Message-ID: <1366874392.05.0.255391934943.issue6028@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 09:32:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 07:32:34 +0000 Subject: [issue17839] base64 module should use memoryview Message-ID: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> New submission from Nick Coghlan: The base64 module is currently restricted specifically to bytes and bytearray objects. By using memoryview, it could effectively decode any input type that provides an 8-bit C contiguous view of the underlying data. ---------- components: Library (Lib) messages: 187760 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: base64 module should use memoryview type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 09:34:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 07:34: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: <1366875274.63.0.554760989432.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: I tracked down the proximate cause of the weird exception in the bytes.decode case: the base64 module only accepts bytes and bytearray objects, instead of using memoryview to accept anything that supports the buffer API and provides a C-contiguous 8-bit view of the underlying data. Raised as issue 17839. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 09:40:50 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 07:40:50 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks Message-ID: <1366875650.57.0.151905786577.issue17840@psf.upfronthosting.co.za> New submission from Nick Coghlan: encodings.base64_codec currently uses "assert errors=='strict'" in a few places, since it doesn't actually support any of the Unicode specific error handling modes. This should either be discarded entirely (and document that the error handling mode is irrelevant for this codec), or else turned into a real check that raises ValueError if an unsupported error mode is passed in. I have a slight preference for just ignoring the error mode as irrelevant (since this isn't a text encoding in the normal Unicode serialisation-as-bytes sense). ---------- components: Library (Lib) messages: 187762 nosy: ncoghlan priority: normal severity: normal stage: test needed status: open title: base64_codec uses assert for runtime validity checks type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 09:47:11 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 07:47:11 +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: <1366876031.48.0.968397795128.issue17828@psf.upfronthosting.co.za> Nick Coghlan added the comment: Here's an example of the specific type errors raised by additional checks in the text-encoding specific methods. I believe the main improvement needed here is to mention the encoding name in the exception message: "example".encode("rot_13") Traceback (most recent call last): File "", line 1, in TypeError: encoder did not return a bytes object (type=str) b'BZh91AY&SY\xc1uvK\x00\x00\x01F\x80\x00\x10\x00"\x04\x00\x00\x10 \x000\xcd\x00\xc1\xa0P\xe2\xeeH\xa7\n\x12\x18.\xae\xc9`'.decode("bz2_codec") Traceback (most recent call last): File "", line 1, in TypeError: decoder did not return a str object (type=bytes) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 09:49:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 07:49:12 +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: <1366876152.43.0.537190542503.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: Also adding 17839 as a dependency, since part of the reason the base64 errors in particular are so cryptic is because the base64 module doesn't accept arbitrary PEP 3118 compliant objects as input. ---------- dependencies: +base64 module should use memoryview _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 09:51:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 07:51:29 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1366876289.81.0.473331717408.issue17827@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that in 2.7, these docs should have a ":versionadded: 2.4" marker, while in 3.3 and 3.4, they shouldn't have a version added marker at all. These functions should also get an entry in the 3.4 What's New, even though they're not actually new. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 09:53:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Apr 2013 07:53:34 +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: <1366876414.33.0.813546653703.issue7475@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +2to3 fixers for missing codecs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 10:14:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 08:14:29 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1366877669.67.0.680402596535.issue17823@psf.upfronthosting.co.za> Nick Coghlan added the comment: A more consistent alternative conversion: "...".encode("base64") => codecs.encode("...", "base64_codec") "...".encode("rot13") => codecs.encode("...", "rot_13") "...".encode("zlib") => codecs.encode("...", "zlib_codec") "...".encode("hex") => codecs.encode("...", "hex_codec") "...".encode("bz2") => codecs.encode("...", "bz2_codec") "...".decode("base64") => codecs.decode("...", "base64_codec") "...".decode("rot13") => codecs.decode("...", "rot_13") "...".decode("zlib") => codecs.decode("...", "zlib_codec") "...".decode("hex") => codecs.decode("...", "hex_codec") "...".decode("bz2") => codecs.decode("...", "bz2_codec") ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 10:18:04 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 25 Apr 2013 08:18:04 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366877669.67.0.680402596535.issue17823@psf.upfronthosting.co.za> Message-ID: <5178E6B6.8050007@egenix.com> Marc-Andre Lemburg added the comment: On 25.04.2013 10:14, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > A more consistent alternative conversion: > > "...".encode("base64") => codecs.encode("...", "base64_codec") > "...".encode("rot13") => codecs.encode("...", "rot_13") > "...".encode("zlib") => codecs.encode("...", "zlib_codec") > "...".encode("hex") => codecs.encode("...", "hex_codec") > "...".encode("bz2") => codecs.encode("...", "bz2_codec") > > "...".decode("base64") => codecs.decode("...", "base64_codec") > "...".decode("rot13") => codecs.decode("...", "rot_13") > "...".decode("zlib") => codecs.decode("...", "zlib_codec") > "...".decode("hex") => codecs.decode("...", "hex_codec") > "...".decode("bz2") => codecs.decode("...", "bz2_codec") It would be better to add back the aliases we had for these codecs. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 10:28:01 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 08:28:01 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1366878481.42.0.344530297108.issue17823@psf.upfronthosting.co.za> Nick Coghlan added the comment: Sure, that's what issue 7475 is about, and if we do that, then the fixers can be simplified to just replace the method with the function call for the known set of non-text-model related codecs. However, I also wanted to make a note of what the fixers should look like for a version of the fixer that can provide compatibility with 3.2+ rather than relying on the aliases being restored in 3.4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 10:30:29 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 08:30:29 +0000 Subject: [issue17841] Remove missing aliases from codecs documentation Message-ID: <1366878629.86.0.715834730144.issue17841@psf.upfronthosting.co.za> New submission from Nick Coghlan: The aliases for the bytes-bytes and str-str codecs are not present in 3.3, so the aliases should be removed from the corresponding standard encoding tables in the documentation. http://docs.python.org/3/library/codecs#standard-encodings ---------- messages: 187769 nosy: ncoghlan priority: normal severity: normal status: open title: Remove missing aliases from codecs documentation versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 10:31:07 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 08:31:07 +0000 Subject: [issue17841] Remove missing aliases from codecs documentation In-Reply-To: <1366878629.86.0.715834730144.issue17841@psf.upfronthosting.co.za> Message-ID: <1366878667.3.0.107600755357.issue17841@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 10:31:46 2013 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 25 Apr 2013 08:31:46 +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: <1366878706.05.0.196236648321.issue7475@psf.upfronthosting.co.za> Nick Coghlan added the comment: I also created issue 17841 to cover that that the 3.3 documentation incorrectly states that these aliases still exist, even though they were removed before 3.2 was released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 12:50:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Apr 2013 10:50:14 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument Message-ID: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Most base64 functions accepts str, bytes or bytearray. Lib/tests/test_base64.py tests only bytes (and sometimes str) arguments. At least one test case with bytearray argument needed for every function. ---------- components: Tests keywords: easy messages: 187771 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Add base64 module tests for a bytearray argument type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 12:51:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Apr 2013 10:51:23 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1366887083.87.0.764584762123.issue17839@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add base64 module tests for a bytearray argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:00:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Apr 2013 11:00:00 +0000 Subject: [issue17823] 2to3 fixers for missing codecs In-Reply-To: <1366740714.43.0.637419404969.issue17823@psf.upfronthosting.co.za> Message-ID: <1366887600.23.0.34103070344.issue17823@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > A more consistent alternative conversion: What advantages `codecs.encode("...", "base64_codec")` has comparing with `base64.b64encode("...")`? The latter is at least more portable and powerfull (it allows to specify altchars). I think that main problem with issue 7475 is that people don't think about a different (actually the most obvious) way to do base64 encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:06:08 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Apr 2013 11:06:08 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings Message-ID: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> New submission from Christian Heimes: In ebb8c7d79f52 the file Lib/test/testbz2_bigmem.bz2 was added as test case for bug #14398. The PSRT and webmaster teams have received half a dozen mails which complains about potential harmful content in the Python installers and Python source distribution. Apparently the file triggers a warning in several anti virus programs because it looks like a zip bomb. I suggest that we remove the file from hg and create it on the fly during tests runs. ---------- messages: 187773 nosy: benjamin.peterson, christian.heimes, georg.brandl, larry, michael.foord, nadeem.vawda priority: release blocker severity: normal stage: needs patch status: open title: Lib/test/testbz2_bigmem.bz2 trigger virus warnings type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:28:13 2013 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Apr 2013 11:28:13 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1366889293.13.0.141201923661.issue17843@psf.upfronthosting.co.za> Christian Heimes added the comment: Example: Virus was detected in the content (virus_detected) Content contained "Trojan-ArcBomb.BZip.Agent" virus. Details: Virus: Trojan-ArcBomb.BZip.Agent; File: Python-2.7.4.tar.bz2; Sub File: //T3obr//Python-2.7.4/Lib/test/testbz2_bigmem.bz2; Vendor: Kaspersky Labs; Engine error code: 0x00014005; Engine version: 8.0.1.23; Pattern version: 130425.042500.9895197; Pattern date: 2013.04.25 04:25:00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:29:31 2013 From: report at bugs.python.org (Kushal Das) Date: Thu, 25 Apr 2013 11:29:31 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument In-Reply-To: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> Message-ID: <1366889371.13.0.849237598733.issue17842@psf.upfronthosting.co.za> Kushal Das added the comment: Patch with bytearray based tests. ---------- keywords: +patch nosy: +kushaldas Added file: http://bugs.python.org/file30012/issue17842_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:29:59 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 25 Apr 2013 11:29:59 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1366889399.54.0.0556022419991.issue17838@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Once again, what system and version? The Idle user process is different on *nix and Windows -- python.exe versus pythonw.exe. In normal interactive mode, the interpreter continues to take statements from the console, which seems to be sys.__stdin__, after redirection. Sys.stdin is only used for input() statements and direct sys.stdin reads. Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, ... >>> import sys >>> sys.__stdin__ <_io.TextIOWrapper name='' mode='r' encoding='cp437'> >>> sys.stdin = open('c:/python/mypy/tem.py') >>> sys.stdin <_io.TextIOWrapper name='c:/python/mypy/tem.py' mode='r' encoding='cp1252'> >>> input() 'a, b = 1, 2' >>> input() 'print("{a} apple and {b} bananas".format(**locals()))' # These are the 'current' first two lines of the file. >>> sys.__stdin__ <_io.TextIOWrapper name='' mode='r' encoding='cp437'> With Idle, at least on Windows, sys.__stdin__ is None. If sys.stdin is the only reference to PseudoInputFile, rebinding leads to closure. With no connection to the Shell window, it would be impossible to send statements. >>> import sys >>> sys.stdin >>> sys.__stdin__ >>> However, with 3.3.1 on Windows, I do not reproduce the problem. >>> sys.stdin = open('c:/python/mypy/tem.py') >>> sys.stdin <_io.TextIOWrapper name='c:/python/mypy/tem.py' mode='r' encoding='cp1252'> >>> input() 'a, b = 1, 2' >>> input() 'print("{a} apple and {b} bananas".format(**locals()))' So pythonw.exe seems to keep a reference other than either .stdin or .__stdin__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:36:22 2013 From: report at bugs.python.org (Kushal Das) Date: Thu, 25 Apr 2013 11:36:22 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1366889782.07.0.28213112347.issue17843@psf.upfronthosting.co.za> Changes by Kushal Das : ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:37:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Apr 2013 11:37:22 +0000 Subject: [issue17844] Add link to alternatives for bytes-to-bytes codecs Message-ID: <1366889842.88.0.0886939266057.issue17844@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds link to alternative interfaces for bytes-to-bytes codecs. I.e. base64.b64encode and base64.b64decode for base64_codec. Patch for 2.7 should mention other functions/modules (due to lack of some of them). ---------- assignee: docs at python components: Documentation files: doc_codecs_impl.patch keywords: patch messages: 187777 nosy: docs at python, doerwalter, lemburg, ncoghlan, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add link to alternatives for bytes-to-bytes codecs type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30013/doc_codecs_impl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:43:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Apr 2013 11:43:30 +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: <1366890210.71.0.0484179230508.issue7475@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add link to alternatives for bytes-to-bytes codecs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 13:52:37 2013 From: report at bugs.python.org (Kushal Das) Date: Thu, 25 Apr 2013 11:52:37 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1366890757.75.0.255747632026.issue17839@psf.upfronthosting.co.za> Kushal Das added the comment: Working on this. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 14:45:58 2013 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Apr 2013 12:45:58 +0000 Subject: [issue17272] request.full_url: unexpected results on assignment In-Reply-To: <1361512602.9.0.97298415685.issue17272@psf.upfronthosting.co.za> Message-ID: <3ZxJ6F66wXzP4B@mail.python.org> Roundup Robot added the comment: New changeset 2d4189e9bbe8 by Senthil Kumaran in branch 'default': Issue #17272: Making the urllib.request's Request.full_url a descriptor. Fixes http://hg.python.org/cpython/rev/2d4189e9bbe8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 14:57:17 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Apr 2013 12:57:17 +0000 Subject: [issue17830] Fix test_keyword on Windows, clean up addCleanup In-Reply-To: <1366817350.3.0.0113666626192.issue17830@psf.upfronthosting.co.za> Message-ID: <1366894637.18.0.291662472025.issue17830@psf.upfronthosting.co.za> R. David Murray added the comment: The filecmp test failure is not because of using filecmp. We want a binary comparison: the line endings of the generated file should match the line endings of the input file. So either the _copy_file_without_generated_keywords code is buggy, or this is a real bug in keyword.py. Probably the former. As for addCleanup, I prefer the lambda version. But I'm fine with using the non-lambda version if that is more common in the test suite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 15:19:46 2013 From: report at bugs.python.org (Siddhesh Poyarekar) Date: Thu, 25 Apr 2013 13:19:46 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366895986.19.0.393969285106.issue17833@psf.upfronthosting.co.za> Siddhesh Poyarekar added the comment: It's not a change in glibc. __pthread_cond_timedwait is the internal function name while pthread_cond_timedwait is the exported alias. You're seeing __pthread_cond_timedwait here because either your glibc installation has debug symbols or you have debug info packages installed, which allows gdb to resolve the function name to the internal name. Without glibc debug info you should see just pthread_cond_timedwait@@... or just pthread_cond_timedwait. In any case, I guess you'd be better off just using .find("pthread_cond_timedwait") instead of startswith() since I've also seen this on ppc64, which might break your test again: Thread 2 (Thread 0x3fffb7d1f200 (LWP 5746)): #0 0x00003fffb7f21ec8 in .pthread_cond_timedwait () from /lib64/libpthread.so.0 I'm not entirely sure what the preceding dot means, but it seems to indicate a function call outside the binary in ppc64. ---------- nosy: +Siddhesh.Poyarekar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 15:24:25 2013 From: report at bugs.python.org (David Edelsohn) Date: Thu, 25 Apr 2013 13:24:25 +0000 Subject: [issue17833] test_gdb broken PPC64 Linux In-Reply-To: <1366828530.65.0.489906336326.issue17833@psf.upfronthosting.co.za> Message-ID: <1366896265.76.0.429776721077.issue17833@psf.upfronthosting.co.za> David Edelsohn added the comment: Thanks for explaining the issue with GLibc symbols. The Python test definitely should not fail if debugging symbols are installed. The "dot" symbols should no longer occur with modern PowerLinux installations. They were a carry-over from the AIX ABI on which the PPC64 Linux ABI is based. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 15:32:09 2013 From: report at bugs.python.org (Bernard Lang) Date: Thu, 25 Apr 2013 13:32:09 +0000 Subject: [issue17545] os.listdir and os.path.join inconsistent on empty path In-Reply-To: <1366457550.15.0.506488826138.issue17545@psf.upfronthosting.co.za> Message-ID: <20130425133207.GE6033@datcha.net.datcha.net> Bernard Lang added the comment: Thank you, David. BTW, I sent a message on april 20 to docs at python.org about a bug in the documentation regarding os.readlink(path) on page http://docs.python.org/2/library/os.html and proposing an alternative text. I got no reply. This was not long ago ... should I just wait ? Sorry for asking you ... I know no one else. Regards Bernard * R. David Murray , le 20-04-13, a ?crit: > > Changes by R. David Murray : > > > ---------- > keywords: +easy > stage: -> needs patch > > _______________________________________ > Python tracker > > _______________________________________ -- SVP Ne plus m'?crire ? Bernard.Lang at inria.fr mais ? l'adresse ci-dessous Please No longer write to Bernard.Lang at inria.fr but to the address below Bernard.Lang at datcha.net ,_ /\o \o/ gsm +33 6 6206 1693 http://www.datcha.net/ ^^^^^^^^^^^^^^^^^ tel +33 1 3056 1693 Je n'exprime que mon opinion - I express only my opinion CAGED BEHIND WINDOWS or FREE WITH LINUX ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 15:37:42 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Thu, 25 Apr 2013 13:37:42 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1366897062.23.0.0148364192763.issue17838@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: I forgot to say I tested this in MacOS in the development version. It shouldn't happen in earlier versions because the method "close" of the class "PseudoInputFile" is not there. A quick fix to this bug would be to just remove this method, but then #17585 would have to be reopened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 15:47:56 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 25 Apr 2013 13:47:56 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1366897676.32.0.745142467887.issue17843@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 15:54:08 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 25 Apr 2013 13:54:08 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1366898048.65.0.598059340416.issue17827@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 15:54:44 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 25 Apr 2013 13:54:44 +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: <1366898084.58.0.512682695544.issue17828@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 15:55:00 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 25 Apr 2013 13:55:00 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1366898100.89.0.742900732822.issue17839@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 16:27:21 2013 From: report at bugs.python.org (Roger Serwy) Date: Thu, 25 Apr 2013 14:27:21 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1366900041.1.0.522821467171.issue17838@psf.upfronthosting.co.za> Roger Serwy added the comment: Are you running with or without a subprocess? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 16:41:48 2013 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 25 Apr 2013 14:41:48 +0000 Subject: [issue17272] request.full_url: unexpected results on assignment In-Reply-To: <1361512602.9.0.97298415685.issue17272@psf.upfronthosting.co.za> Message-ID: <1366900908.02.0.568194660054.issue17272@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I have committed the first patch which makes Request.full_url a descriptor. As I was looking at the changes to be introduced by second patch, I noticed that we do not have comprehensive test coverage for .full_url public attribute. All the tests are testing the methods like get_full_url. The change for .full_url not to include fragments was introduced in 63817:bf3359b7ed2e which says that for reasons that HTTP request should not include fragments, it was done. That's correct. Now, I would fear to introduce that bug again with the second patch wherein we inadvertently send a URL with fragment in a HTTP request. To ensure this will not be the case, I think, increase in test coverage, understanding and documenting the exact expectation will be necessary if we have to change Request.full_url behavior. I will be spending a little more time on it. I thought I will write down the points which should be taken care. ---------- assignee: -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 16:43:07 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Apr 2013 14:43:07 +0000 Subject: [issue17830] keyword.py main does not preserve line endings when rewriting keyword file In-Reply-To: <1366817350.3.0.0113666626192.issue17830@psf.upfronthosting.co.za> Message-ID: <1366900987.08.0.648656643148.issue17830@psf.upfronthosting.co.za> R. David Murray added the comment: Or both. Zach, can you try this patch on Windows? I tested it by setting my local keywords.py file to have DOS line endings, and it seems to work correctly. Although this turns out to be a bug, it has never bothered anyone, so I don't have any intent to backport it. ---------- title: Fix test_keyword on Windows, clean up addCleanup -> keyword.py main does not preserve line endings when rewriting keyword file Added file: http://bugs.python.org/file30014/keyword_preserve_nl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 16:56:01 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Apr 2013 14:56:01 +0000 Subject: [issue17545] os.listdir and os.path.join inconsistent on empty path In-Reply-To: <1364228813.43.0.916487849633.issue17545@psf.upfronthosting.co.za> Message-ID: <1366901761.87.0.870045603298.issue17545@psf.upfronthosting.co.za> R. David Murray added the comment: I don't know if the docs team replies to messages or not. I know that issues sometimes get opened up here that refer to emails to that alias. You can open an issue here yourself for the doc bug, if you want to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 17:15:48 2013 From: report at bugs.python.org (Zachary Ware) Date: Thu, 25 Apr 2013 15:15:48 +0000 Subject: [issue17830] keyword.py main does not preserve line endings when rewriting keyword file In-Reply-To: <1366817350.3.0.0113666626192.issue17830@psf.upfronthosting.co.za> Message-ID: <1366902948.61.0.968592742118.issue17830@psf.upfronthosting.co.za> Zachary Ware added the comment: Your patch works for me. And for what it's worth, I agree about not backporting; keywords are frozen and never going to change in 2.7 or 3.3 anyway. I did find one other small bug in test_keyword; running the test via "-m test.test_keyword", test_real_grammar_and_keyword_file was skipped. So I've patched your patch to include a fix; GRAMMAR_FILE is now an absolute path with relative elements derived from test_keyword.__file__ rather than a relative path. ---------- Added file: http://bugs.python.org/file30015/test_keyword_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 18:07:39 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Apr 2013 16:07:39 +0000 Subject: [issue17830] keyword.py main does not preserve line endings when rewriting keyword file In-Reply-To: <1366817350.3.0.0113666626192.issue17830@psf.upfronthosting.co.za> Message-ID: <1366906059.11.0.374385431635.issue17830@psf.upfronthosting.co.za> R. David Murray added the comment: I've committed this (in 58b0e301b78a), but it looks like the email to the tracker hasn't come through yet. I'm going to blithely assume this will fix the buildbot failures, and will reopen it if I'm wrong. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 18:23:05 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Thu, 25 Apr 2013 16:23:05 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1366906985.05.0.775803615045.issue17838@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: Roger, I was running with a subprocess but I tried without one and now it works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 18:34:15 2013 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 25 Apr 2013 16:34:15 +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: <1366907655.36.0.995520144597.issue7475@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 18:54:09 2013 From: report at bugs.python.org (paul j3) Date: Thu, 25 Apr 2013 16:54:09 +0000 Subject: [issue16970] argparse: bad nargs value raises misleading message In-Reply-To: <1358251791.34.0.358251606196.issue16970@psf.upfronthosting.co.za> Message-ID: <1366908849.36.0.425468373418.issue16970@psf.upfronthosting.co.za> paul j3 added the comment: An integer nargs value is only used in one of 2 ways, range(nargs) '%s'*nargs In both a negative value acts the same as a 0. I don't think the original authors though much about 'what if the code user gives a negative value?', because nargs is counting things - the number of expected arguments. For some actions that number is 0. For other some sort of positive integer, or variable numbers like '*','+' make most sense. To some degree nargs is modeled on the regex sequences, '*','+','?','{n}'. '{-1}' does not produce a regex error, though I can't make anything match it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 19:23:09 2013 From: report at bugs.python.org (Kirsten Stevenson) Date: Thu, 25 Apr 2013 17:23:09 +0000 Subject: [issue14555] clock_gettime/settime/getres: Add more clock identifiers In-Reply-To: <1334183358.11.0.0329195703165.issue14555@psf.upfronthosting.co.za> Message-ID: <1366910589.55.0.615751738714.issue14555@psf.upfronthosting.co.za> Kirsten Stevenson added the comment: I have added descriptions for CLOCK_BOOTTIME_ALARM and CLOCK_REALTIME_ALARM to the patch. ---------- nosy: +ransomedheart08 -BreamoreBoy, Jim.Jewett, haypo versions: -Python 3.4 Added file: http://bugs.python.org/file30016/more_clock_ids.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 19:44:34 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Apr 2013 17:44:34 +0000 Subject: [issue17845] Clarify successful build message Message-ID: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> New submission from Brett Cannon: From: Python build finished, but the necessary bits to build these modules were not found: ossaudiodev spwd To find the necessary bits, look in setup.py in detect_modules() for the module's name. To: Python build successfully finished, but the necessary bits to build these optional modules were not found: Notice the addition of "successfully" and "optional". Hopefully this will cause fewer new contributors to get thrown by this message. ---------- components: Build messages: 187794 nosy: brett.cannon priority: normal severity: normal status: open title: Clarify successful build message versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 19:46:24 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Apr 2013 17:46:24 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366911984.5.0.79625456696.issue17845@psf.upfronthosting.co.za> Brett Cannon added the comment: And just FYI, the pre-existing sentence already extends past 80 characters (84), so the new length of 104 shouldn't be a concern. Although we could re-format it into two lines:: Python build finished successfully! The necessary bits to build these optional modules were not found: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 19:46:51 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Apr 2013 17:46:51 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366912011.95.0.0306816917844.issue17845@psf.upfronthosting.co.za> Brett Cannon added the comment: And I would probably go with "finished successfully" instead of "successfully finished". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 19:59:55 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Apr 2013 17:59:55 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366912795.04.0.222993428991.issue17845@psf.upfronthosting.co.za> ?ric Araujo added the comment: Using two lines sounds good, especially if the last one printed is the positive one (?build successful?). Do you think there will be oppotions to backporting this? ---------- nosy: +eric.araujo, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 20:00:44 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Apr 2013 18:00:44 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366912844.43.0.987913596743.issue17845@psf.upfronthosting.co.za> ?ric Araujo added the comment: opposition* :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 20:05:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Apr 2013 18:05:03 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1366913103.6.0.21403187335.issue17837@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 20:24:56 2013 From: report at bugs.python.org (David Edelsohn) Date: Thu, 25 Apr 2013 18:24:56 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1366914296.11.0.0196398316575.issue17837@psf.upfronthosting.co.za> David Edelsohn added the comment: A POWER7 optimized build is fine, but how does recognizing an additional name help? I assume this is just a first step before generating different compiler options based on the name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 20:36:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Apr 2013 18:36:16 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366914976.39.0.204516609414.issue17845@psf.upfronthosting.co.za> Brett Cannon added the comment: Can't backport; someone might be relying on the output to verify their automated build successfully built or something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 20:37:43 2013 From: report at bugs.python.org (Harrison Morgan) Date: Thu, 25 Apr 2013 18:37:43 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366915063.53.0.286622680064.issue17845@psf.upfronthosting.co.za> Harrison Morgan added the comment: As someone trying to get started contributing, I think this change makes it a good deal clearer (although at this point I already know that those modules are optional). The two line version looks better to me. However, "necessary bits" still seems unclear. Would it be going too far to suggest that it gets changed to something like this? Python build finished successfully! The necessary third-party packages to build these optional modules were not found: ---------- nosy: +harrison.morgan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 20:43:42 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Apr 2013 18:43:42 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366915422.82.0.882185625304.issue17845@psf.upfronthosting.co.za> ?ric Araujo added the comment: Brett: You?re right, too bad. Harrison: ?third-party packages? may be ambiguous (Python distributions vs. system dependencies), and ?required? may conflict with ?optional?. I propose: Some optional modules were not built because of missing system files: ... Python interpreter built successfully! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 20:46:13 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Apr 2013 18:46:13 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366915573.29.0.949313618214.issue17845@psf.upfronthosting.co.za> Brett Cannon added the comment: I guess the question is whether all the code is third-party or simply optional on some OS? Don't know the answer off the top of my head. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 20:48:05 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Apr 2013 18:48:05 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366915685.2.0.526945709597.issue17845@psf.upfronthosting.co.za> Brett Cannon added the comment: I personally don't like the message re-ordering. It feels like "oops, you didn't build everything. Hey everything built fine!" It reads like there was a bug and we accidentally interpreted it as a success. And it isn't necessarily system files. I mean sqlite3 is not a system package, it's a DB project that we happen to support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:02:15 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Apr 2013 19:02:15 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366916535.35.0.767821034441.issue17845@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I guess the question is whether all the code is third-party or simply > optional on some OS? Don't know the answer off the top of my head. In my Debian world it?s typical to use only the official repos, there are no third parties (except from the viewpoint of Python). I used ?system? instead of ?third-party? in my proposition. For me on Debian the optional deps really are ?not installed at Python build time? (?not installed by default? or ?optional? doesn?t really make sense, as there are multiple defaults, and 98% of the packages are not required to have a working system). > I personally don't like the message re-ordering. It feels like "oops, you > didn't build everything. Hey everything built fine!" Well I distinguished ?interpreter? and ?optional modules? on purpose, not ?everything?, but I agree it can be a fine distinction when you?re just getting started. Let?s not reorder the messages. > And it isn't necessarily system files. I mean sqlite3 is not a system package Really? If it doesn?t build because sqlite3 header files are not found, then that?s a missing system file to me. (I used ?file? instead of ?package? because not everybody will install deps using the system package manager (if any), but that may be complicating things for no good reason.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:06:55 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Apr 2013 19:06:55 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366916815.7.0.940375974446.issue17845@psf.upfronthosting.co.za> Brett Cannon added the comment: I use homebrew on OS X and have it in a non-standard location which is not a systems directory (e.g. Developer/). When I hear "system", I think /usr, etc. which is not where people necessarily install third-party stuff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:09:34 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Apr 2013 19:09:34 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366916974.5.0.959824091607.issue17794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. It's true that Python 3's comparison rules make PriorityQueue a bit less useful in its current form. One possible workaround could be to introduce an optional "key" argument to the constructor that provides a callable used to map objects added to the queue to their priorities. The default key would map each object to itself, as before, but for a use-case like this one the key could just be lambda x: x[0]. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:17:05 2013 From: report at bugs.python.org (Harrison Morgan) Date: Thu, 25 Apr 2013 19:17:05 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366917425.24.0.538787355263.issue17845@psf.upfronthosting.co.za> Harrison Morgan added the comment: Would "external libraries" work better? It's clearly not referring to Python packages. And could be installed by a system package manager, or by yourself in a non-standard location. Python build finished successfully! The necessary external libraries to build these optional modules were not found: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:50:43 2013 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Apr 2013 19:50:43 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366919443.99.0.437821511243.issue17845@psf.upfronthosting.co.za> Brett Cannon added the comment: "External libraries" works for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:54:24 2013 From: report at bugs.python.org (michael kearney) Date: Thu, 25 Apr 2013 19:54:24 +0000 Subject: [issue17846] Building Python on Windows - Supplementary info Message-ID: <1366919664.94.0.0931557904055.issue17846@psf.upfronthosting.co.za> New submission from michael kearney: This is not a bug per se, though perhaps documentation rewrite might be appropriate. I've been building python for windows for several years now. I have found that it is unnecessarily problematic. Perhaps my expectations are too high. When I started building python, I expected to build a whole stable version of python thing without error. In my experience, it is not true that one can build python on windows by simply loading the .sln file into Visual studio, selecting Debug or Release, and then clicking build. Over time I have worked out steps that allow me to build all bits of python and minimize the aggravation and failures. These steps follow. Hopefully they will help folks to avoid some of the problems I encountered. Perhaps this will attract commentary that will document the way things actually should be done. I would be happy to stand corrected and know that there is a simple single point and click or single line command that would build python on windows. Regardless, here you go. The online directions for downloading the development version source are fine and can be found at http://docs.python.org/devguide/. Mercurial must be installed on your machine. Stable released version source is available on the download page. Python building/rebuilding assumes the existence of subversion, perl, and a version of Visual Studio on your system. If you have all three, skip to step three. Otherwise download and install any of those that are missing. If it is necessary to have on hand multiple versions of python built from scratch, you should isolate them from each other by putting them in a container directory perhaps of the same name. e.g. I use a style like python331/python331, python32/python32 where the subdirectory is the source root directory. I use the upper directory to isolate the external subprojects created by the buildbots described later. If you don't do this, the buildbots of one version can wipe out required subprojects of another version of python. I can assure you this will cause you a lot of confusion until you realize the source of the problem. 0. Download and install at least a subversion client and add the executable to your path. I got mine from Collabnet and here is how it appears in my path "C:\Program Files\CollabNet\Subversion Client" 1. Download and install perl and add the executable to your path I vaguely recall I downloaded ActivePerl Your Perl path will look something like this. C:\Perl\site\bin;C:\Perl\bin 2. Download and install VC++ express and add the bin area to your path Your VC++ bin path will look something like this: C:\Program Files\Microsoft Visual Studio 10.0\VC\bin I use the free version of VC++, which may be the source of all my python build issues. When I load the solution file which you will see later, VC++ complains that the version I have doesn't support various features. It is free though and I am able to work with it. 2 Download and install nasm: There are several downloading sites. This seems to be the latest and greatest. http://www.windows7download.com/win7-nasm/ldyuniel.html 4. Download and build the external subprojects with the buildbots using either: Tools\buildbot\external.bat # for 32 bit processors Tools\buildbot\external-amd64.bat # for 64 bit processors from the root directory or your python distribution. This step will download the correct versions of the external projects for this version of python. There are several projects 4. openssl is used for python on windows ssl rarely succeeds if you proceed to build using "pcbuild.sln: The following steps will resolve many problems if you executing them before building with the .sln file cd into the openssl directory created by the buildbots perl util\mkdef.pl crypto ssl update perl Configure VC-WIN32 --prefix=C:\opt\openssl-1.0.1d ms\do_nasm You may get compilation errors anyway when you attempt to build the .sln file with Visual Studio. The errors I have seen have always been the same type, namely a forced error contained within a block of conditional code. In all cases so far I have been able to comment out the forced error. Most recently I had to comment out code blocks in mdc2.h and idea.h. Historically, the openssl build has not had a "clean" function. This used to cause me a lot of problems if rebuilding was required for whatever reason. I cleaned the project by deleting and letting the buildbot download again what was required. 5. Finally Build python and its internal subprojects open the solution "pcbuild.sln" in Visual Studio (VC++ in my case) - If you have an express version, then ignore the warning select the configuration Release or Debug "Release" builds python.exe "Debug" builds python_d.exe select the platform Win32 or x64 build the solution. Right click "Solution 'pccuild'" and select build - for fresh build clean - to delete all files created for build , i.e. objects, libraries, executable, etc. rebuild - clean and build everything Note that you can clean and build individual subprojects by just right clicking on the subproject and selecting build, clean, or rebuild for that project ---------- messages: 187810 nosy: michael.kearney priority: normal severity: normal status: open title: Building Python on Windows - Supplementary info versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:54:43 2013 From: report at bugs.python.org (David Edelsohn) Date: Thu, 25 Apr 2013 19:54:43 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1366919683.39.0.515195946105.issue17837@psf.upfronthosting.co.za> David Edelsohn added the comment: If I understand correctly, config.sub is imported from upstream FSF project. I do not know how much CPython diverges from the upstream file and merges in local changes. I'm still a little confused about what this patch accomplishes. One can configure with CC or CFLAGS set for POWER7. And one can test for processor feature support macros in the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:57:27 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Apr 2013 19:57:27 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366919847.51.0.955977520336.issue17794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Example patch. Items with equal priority are retrieved in LIFO order. ---------- keywords: +patch Added file: http://bugs.python.org/file30017/issue17794.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:58:33 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Apr 2013 19:58:33 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366919913.68.0.187062228417.issue17794@psf.upfronthosting.co.za> Changes by Mark Dickinson : Added file: http://bugs.python.org/file30018/issue17794.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 21:58:44 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Apr 2013 19:58:44 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366919924.95.0.870789390475.issue17794@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file30017/issue17794.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:02:01 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Apr 2013 20:02:01 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366920121.69.0.376515181329.issue17794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. This looks like a duplicate of #7174. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:10:59 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Apr 2013 20:10:59 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366920659.67.0.225385524278.issue17794@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed patch. ---------- Added file: http://bugs.python.org/file30019/issue17794.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:11:13 2013 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Apr 2013 20:11:13 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366920673.66.0.645359663653.issue17794@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file30018/issue17794.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:24:30 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Apr 2013 20:24:30 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1366921470.17.0.816692515581.issue17838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I confirm this bug. Terry, 3.3.1 doesn't contains this bug. This is a regression introduced by issue17585. A right solution is not easy. We should 1) Remove PseudoInputFile.close. 2) Do not print an exception in Executive.runcode, but transfer it via rpc back to PyShell. 3) In PyShell.runcode receive an exception and process it same way as in non-subprocess mode (note that in non-subrocess mode a messagebox asks "Exit? Do you want to exit altogether?", but in subprocess mode it now asks "Kill? The program is still running! Do you want to kill it?"). The hard part is transferring an exception. ---------- nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:24:46 2013 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Apr 2013 20:24:46 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366921486.4.0.24367243027.issue17845@psf.upfronthosting.co.za> R. David Murray added the comment: I'm afraid that "External libraries" is still misleading. On package-manager-managed linux systems, it is often only the header files that are missing, the libraries are there. It may well be that "necessary bits" is the most informative choice :). With two lines I suppose you could be wordy and say "external libraries and/or header files", but that might take us beyond column 80 again. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:25:58 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 25 Apr 2013 20:25:58 +0000 Subject: [issue17836] multiprocessing exceptions with useful traceback In-Reply-To: <1366846321.84.0.456984505709.issue17836@psf.upfronthosting.co.za> Message-ID: <1366921558.78.0.633966604001.issue17836@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Duplicate of #13831. ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:31:57 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 25 Apr 2013 20:31:57 +0000 Subject: [issue13831] get method of multiprocessing.pool.Async should return full traceback In-Reply-To: <1327006000.05.0.152231015377.issue13831@psf.upfronthosting.co.za> Message-ID: <1366921917.17.0.449945560202.issue13831@psf.upfronthosting.co.za> Richard Oudkerk added the comment: It might be possible to come up with a hack so that when the exception is unpickled in the main process it gets a secondary exception chained to it using __cause__ or __context__ whose stringification contains the stringification of the original traceback. ---------- versions: +Python 3.4 -Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:41:36 2013 From: report at bugs.python.org (Antonio Cavallo) Date: Thu, 25 Apr 2013 20:41:36 +0000 Subject: [issue16347] configure.ac patch In-Reply-To: <1351421553.76.0.859904155942.issue16347@psf.upfronthosting.co.za> Message-ID: <1366922496.67.0.68877387631.issue16347@psf.upfronthosting.co.za> Antonio Cavallo added the comment: I suppose to reduce the noise is better close this, thanks ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 22:56:08 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Thu, 25 Apr 2013 20:56:08 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1366923368.06.0.782043323008.issue17843@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Oh dear. I'll update the test suite over the weekend. In the meanwhile, Christian, can you confirm which versions are affected? The file should only have been included in 2.7 and 3.2. ---------- assignee: -> nadeem.vawda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 25 23:23:00 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 25 Apr 2013 21:23:00 +0000 Subject: [issue17836] multiprocessing exceptions with useful traceback In-Reply-To: <1366846321.84.0.456984505709.issue17836@psf.upfronthosting.co.za> Message-ID: <1366924980.09.0.939380260869.issue17836@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 00:49:40 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Apr 2013 22:49:40 +0000 Subject: [issue17847] Glossary lacks permalinks Message-ID: <1366930179.97.0.982792120174.issue17847@psf.upfronthosting.co.za> New submission from Antoine Pitrou: If you look at http://docs.python.org/dev/glossary.html, the glossary entries don't have a permalink next to them (even though the "Glossary" heading has one). ---------- assignee: georg.brandl components: Documentation messages: 187821 nosy: georg.brandl, pitrou priority: normal severity: normal stage: needs patch status: open title: Glossary lacks permalinks type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 00:49:56 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Apr 2013 22:49:56 +0000 Subject: [issue17847] Glossary lacks permalinks In-Reply-To: <1366930179.97.0.982792120174.issue17847@psf.upfronthosting.co.za> Message-ID: <1366930196.55.0.0855938710589.issue17847@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +eric.araujo, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 01:10:18 2013 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Apr 2013 23:10:18 +0000 Subject: [issue17847] Glossary lacks permalinks In-Reply-To: <1366930179.97.0.982792120174.issue17847@psf.upfronthosting.co.za> Message-ID: <1366931418.58.0.389970078701.issue17847@psf.upfronthosting.co.za> Berker Peksag added the comment: Probably duplicate of issue 15693? ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 01:14:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Apr 2013 23:14:49 +0000 Subject: [issue17712] test_gdb failures In-Reply-To: <1365856245.17.0.785295424505.issue17712@psf.upfronthosting.co.za> Message-ID: <1366931689.22.0.265875446072.issue17712@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file30020/test_gdb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 01:15:24 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Apr 2013 23:15:24 +0000 Subject: [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1366931724.96.0.587805089919.issue15693@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> georg.brandl nosy: +georg.brandl stage: -> patch review type: enhancement -> behavior versions: +Python 3.1, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 01:15:49 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Apr 2013 23:15:49 +0000 Subject: [issue17847] Glossary lacks permalinks In-Reply-To: <1366930179.97.0.982792120174.issue17847@psf.upfronthosting.co.za> Message-ID: <1366931749.66.0.173572335395.issue17847@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, thanks for noticing this. ---------- resolution: -> duplicate status: open -> closed superseder: -> expose glossary link on hover _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 01:16:00 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Apr 2013 23:16:00 +0000 Subject: [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1366931760.4.0.781326170293.issue15693@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 03:02:19 2013 From: report at bugs.python.org (Ben Hoyt) Date: Fri, 26 Apr 2013 01:02:19 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1366938139.88.0.795126557221.issue15535@psf.upfronthosting.co.za> Ben Hoyt added the comment: I just hit this issue in a big way -- would have been nice for this fix to go into Python 2.7.4. :-) It was quite hard to track down (as in, a day or two of debugging :-) because the symptoms didn't point directly to namedtuple. In our setup we pickle/unpickle some big files, and the symptoms we noticed were extremely high memory usage after *un*pickling -- as in, 3x what we were getting before upgrading from Python 2.6. We first tracked it down to unpickling, and then from there narrowed it down to namedtuple. The first "fix" I discovered was that I could use pickletools.optimize() to reduce the memory-usage-after-unpickling back down to sensible levels. I don't know enough about pickle to know exactly why this is -- perhaps fragmentation due to extra unpickling data structures allocated on the heap, that optimize() removes? Here's the memory usage of our Python process after unpickling a ~9MB pickle file (protocol 2) which includes a lot of namedtuples. This is on Python 2.7.4 64-bit. With the original collections.py -- "normal" means un-optimized pickle, "optimized" means run through pickletools.optimize(): Memory usage after loading normal: 106664 KB Memory usage after loading optimized: 31424 KB With collections.py modified so namedtuple's templates include "def __getstate__(self): return None": Memory usage after loading normal: 33676 KB Memory usage after loading optimized: 26392 KB So you can see the Python 2.7 version of namedtuple makes the process use basically 3x the RAM when unpickled (without pickletools.optimize). Note that Python 2.6 does *not* do this (it doesn't define __dict__ or use OrderedDict so doesn't have this issue). And for some Python 3.3(.1) doesn't have the issue either, even though that does define __dict__ and use OrderedDict. I guess Python 3.3 does pickling (or garbage collection?) somewhat differently. You can verify this yourself using the attached unpickletest.py script. Note that I'm running on Windows 7, but I presume this would happen on Linux/OS X too, as this issue has nothing to do with the OS. The script should work on non-Windows OSes, but you have to type in the RAM usage figures manually (using "top" or similar). Note that I'm doing a gc.collect() just before fetching the memory usage figure just in case there's uncollected cyclical garbage floating around, and I didn't want that to affect the measurement. I'm not sure I fully understand the cause (of where all this memory is going), or the fix for that matter. The OrderedDict is being pickled along with the namedtuple instance, because an OrderedDict is returned by __dict__, and pickle uses that. But is that staying in memory on unpickling? Why does optimizing the pickle fix the RAM usage issue to a large extent? In any case, I've made the __getstate__ fix in our code, and that definitely fixes the RAM usage for us. (We're also going to be optimizing our pickles from now on.) ---------- nosy: +benhoyt Added file: http://bugs.python.org/file30021/unpickletest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 04:18:06 2013 From: report at bugs.python.org (Harrison Morgan) Date: Fri, 26 Apr 2013 02:18:06 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366942686.39.0.301039120143.issue17845@psf.upfronthosting.co.za> Harrison Morgan added the comment: Perhaps "necessary bits" really is the best way to put it. Here's one more suggestion, though: Python build finished successfully! External libraries and/or header files needed to build these optional modules were not found: Dropping the definite article and rearranging it to use "needed" instead of "necessary" keeps it at 93 characters, only 9 more than the current message. I'm not sure, but I think the "and/" could be dropped, too. That, at least, gives you something to put into Google. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 04:35:37 2013 From: report at bugs.python.org (Eric Schulz) Date: Fri, 26 Apr 2013 02:35:37 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <1349800735.66.0.856769538072.issue16177@psf.upfronthosting.co.za> Message-ID: <1366943737.25.0.499853021485.issue16177@psf.upfronthosting.co.za> Changes by Eric Schulz : ---------- nosy: +lostdog _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 05:32:47 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Fri, 26 Apr 2013 03:32:47 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <1349800735.66.0.856769538072.issue16177@psf.upfronthosting.co.za> Message-ID: <1366947167.84.0.334640765598.issue16177@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: I couldn't confirm this bug in versions 2.7, 3.3 or 3.4 on the Mac even while using the same user configuration. ---------- nosy: +Guilherme.Sim?es _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 07:48:59 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Apr 2013 05:48:59 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366955339.81.0.0180011133601.issue17794@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm working on this one. Expect a patch shortly. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 07:51:33 2013 From: report at bugs.python.org (Eugene Klimov) Date: Fri, 26 Apr 2013 05:51:33 +0000 Subject: [issue11597] Can't get ConfigParser.write to write unicode strings In-Reply-To: <1300468084.29.0.517380899901.issue11597@psf.upfronthosting.co.za> Message-ID: <1366955493.18.0.965152716153.issue11597@psf.upfronthosting.co.za> Eugene Klimov added the comment: some workaround import configparser import codecs cfg = configparser.ConfigParser() cfg.write(codecs.open('filename','wb+','utf-8')) ---------- nosy: +Eugene.Klimov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 07:52:33 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Apr 2013 05:52:33 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1366955553.66.0.461769836228.issue15535@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 07:55:57 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Apr 2013 05:55:57 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366955757.6.0.751116678355.issue17810@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would like to see Proto4 include an option for compression (zlib,bz2) or somesuch and become self-decompressing upon unpickling. The primary use cases for pickling involve writing to disk or transmitting across a wire -- both use cases benefit from compression (with reduced read/write times). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 07:56:28 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Fri, 26 Apr 2013 05:56:28 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1366955788.27.0.809023616126.issue17837@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: So, to give it a little background: I need this for Fedora builds on ppc64p7. Just the name recognition helps, because the name is passed automatically by rpmbuild to configure (== if not recognized, build fails). So this is basically a way for configure to recognize ppc64p7 as ppc, nothing more. Doing little googling told me that PHP already accepted patch like this [1] (although I know that Python doesn't have to do what other languages do...) [1] https://github.com/php/php-src/commit/52d1add0fe385d0e0d8b1132edd11168eb7fe0e4#config.sub ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 08:19:29 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Apr 2013 06:19:29 +0000 Subject: [issue17845] Clarify successful build message In-Reply-To: <1366911874.8.0.692153365711.issue17845@psf.upfronthosting.co.za> Message-ID: <1366957169.71.0.365439523291.issue17845@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #13472 for a related discussion. ---------- keywords: +easy stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 08:43:42 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 26 Apr 2013 06:43:42 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366958622.95.0.939603903102.issue17810@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > I would like to see Proto4 include an option for compression > (zlib,bz2) or somesuch and become self-decompressing upon unpickling. I don't see what this would bring over explicit compression: - depending on the use case, you may want to use different compression algorithms, e.g. for disk you may want higher compression ratio like bzip2/lzma, but for wire you'd prefer something fast like snappy - supporting multiple compression algorithms and levels would complicate the API - this would probably complicate the code, since you'd have to support optional compression, and have a way to indicate which format is used - that's really mixing two entirely different concepts (serialization vs compression) ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 08:47:15 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 06:47:15 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366958622.95.0.939603903102.issue17810@psf.upfronthosting.co.za> Message-ID: <1366958832.2582.1.camel@fsol> Antoine Pitrou added the comment: > I don't see what this would bring over explicit compression: > - depending on the use case, you may want to use different compression algorithms, e.g. for disk you may want higher compression ratio like bzip2/lzma, but for wire you'd prefer something fast like snappy > - supporting multiple compression algorithms and levels would complicate the API > - this would probably complicate the code, since you'd have to support optional compression, and have a way to indicate which format is used > - that's really mixing two entirely different concepts (serialization vs compression) I agree with Charles-Fran?ois. A feature that may be actually nice to have in the pickle protocol would be some framing, to help with streaming unpickling (right now unpickling a stream can read almost one byte at a time, IIRC). However, that would also make the protocol and the pickler significantly more complex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 09:08:09 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 07:08:09 +0000 Subject: [issue6028] Interpreter aborts when chaining an infinite number of exceptions In-Reply-To: <1242376180.99.0.271687505005.issue6028@psf.upfronthosting.co.za> Message-ID: <1366960089.04.0.384935963613.issue6028@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Closing as won't fix. There is no sane way around the current behaviour. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 09:13:28 2013 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Apr 2013 07:13:28 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366960408.79.0.608986423131.issue17794@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file30019/issue17794.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 09:13:44 2013 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Apr 2013 07:13:44 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1366960424.68.0.0303334292981.issue17794@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 09:24:35 2013 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Apr 2013 07:24:35 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1366961075.42.0.68992269192.issue13355@psf.upfronthosting.co.za> Mark Dickinson added the comment: Raymond: have you had time to look at this yet? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 09:26:50 2013 From: report at bugs.python.org (Kushal Das) Date: Fri, 26 Apr 2013 07:26:50 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1366961210.36.0.0205155656414.issue17839@psf.upfronthosting.co.za> Kushal Das added the comment: A patch with tests update to use memoryview in base64 module. ---------- keywords: +patch Added file: http://bugs.python.org/file30022/issue17839_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 09:30:48 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 26 Apr 2013 07:30:48 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1366961448.48.0.890000354015.issue17810@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 09:32:26 2013 From: report at bugs.python.org (leon zheng) Date: Fri, 26 Apr 2013 07:32:26 +0000 Subject: [issue17848] issue about compile with clang and build a shared lib Message-ID: <1366961546.37.0.678140272964.issue17848@psf.upfronthosting.co.za> New submission from leon zheng: build with prefix point to a arbitrary path, can't find the dynamic lib, and libffi upstream bug: ./configure --prefix=xxx --enable-shared --enable-ipv6 --with-threads CC=clang ---------- components: Build files: mywork.pitch messages: 187838 nosy: matrixsystem priority: normal severity: normal status: open title: issue about compile with clang and build a shared lib type: compile error versions: Python 3.4 Added file: http://bugs.python.org/file30023/mywork.pitch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 10:15:27 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Apr 2013 08:15:27 +0000 Subject: [issue13355] random.triangular error when low = high=mode In-Reply-To: <1320577016.77.0.989776485745.issue13355@psf.upfronthosting.co.za> Message-ID: <1366964127.03.0.824873343906.issue13355@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Soonish ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 13:35:13 2013 From: report at bugs.python.org (Michael Foord) Date: Fri, 26 Apr 2013 11:35:13 +0000 Subject: [issue17826] Setting a side_effect on mock from create_autospec doesn't work In-Reply-To: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za> Message-ID: <1366976113.36.0.466008156956.issue17826@psf.upfronthosting.co.za> Michael Foord added the comment: This illustrates the difference: >>> from mock import Mock, create_autospec >>> some_list = [1, 2, 3] >>> m = Mock() >>> m.side_effect = some_list >>> m.side_effect >>> m2 = create_autospec(lambda: None) >>> m2.side_effect = some_list >>> m2.side_effect [1, 2, 3] When setting a side_effect on a function (created by create_autospec) the side_effect setter is not used - so turning the list into an iterator needs to be done on first use instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 13:46:44 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Apr 2013 11:46:44 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1366976804.26.0.659024687338.issue17839@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 13:54:26 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Apr 2013 11:54:26 +0000 Subject: [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1366977266.87.0.722016557585.issue15693@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 14:27:04 2013 From: report at bugs.python.org (Miroslav Stampar) Date: Fri, 26 Apr 2013 12:27:04 +0000 Subject: [issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper Message-ID: <1366979224.14.0.876475494511.issue17849@psf.upfronthosting.co.za> New submission from Miroslav Stampar: httplib module's auxiliary class LineAndFileWrapper contains a readline() method having no arguments (than self). It's being used in code where commented with "assume it's a Simple-Response from an 0.9 server" as a wrapper for response stream ("self.fp = LineAndFileWrapper(line, self.fp)"). In some cases readline() method requires a size argument (e.g. used with size argument inside HTTPMessage/readheaders(), HTTPResponse/begin(), HTTPResponse/_read_chunked, HTTPConnection/_tunnel, at least in "Python 2.7.1+ (r271:86832, Sep 27 2012, 21:12:17)"). This bug is hard to be reproduced as it requires a little help of "divine intervention". One such exception looks like (reproduced on one user machine): ... conn = urllib2.urlopen(req) File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 401, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 419, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain result = func(*args) File "/usr/share/sqlmap/lib/request/httpshandler.py", line 64, in https_open return self.do_open(HTTPSConnection if ssl else httplib.HTTPSConnection, req) File "/usr/lib/python2.7/urllib2.py", line 1178, in do_open h.request(req.get_method(), req.get_selector(), req.data, headers) File "/usr/lib/python2.7/httplib.py", line 962, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 996, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 958, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 818, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 780, in send self.connect() File "/usr/share/sqlmap/lib/request/httpshandler.py", line 46, in connect sock = create_sock() File "/usr/share/sqlmap/lib/request/httpshandler.py", line 39, in create_sock self._tunnel() File "/usr/lib/python2.7/httplib.py", line 748, in _tunnel line = response.fp.readline(_MAXLINE + 1) TypeError: readline() takes exactly 1 argument (2 given) ---------- components: Library (Lib) messages: 187841 nosy: stamparm priority: normal severity: normal status: open title: Missing size argument in readline() method for httplib's class LineAndFileWrapper 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 Fri Apr 26 14:34:48 2013 From: report at bugs.python.org (Miroslav Stampar) Date: Fri, 26 Apr 2013 12:34:48 +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: <1366979688.22.0.394334806832.issue17849@psf.upfronthosting.co.za> Miroslav Stampar added the comment: Mentioned "divine intervention" could be: 1) Argument strict should be set to 0/False when instantiating HTTPResponse 2) No status should be returned from the backend server (hence the "# assume it's a Simple-Response from an 0.9 server") 3) Any part of response should be read (body, headers, etc.) as HTTPResponse's method begin() uses "self.fp.readline(_MAXLINE + 1)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 14:38:49 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Fri, 26 Apr 2013 12:38:49 +0000 Subject: [issue17721] Help button on preference window doesn't work In-Reply-To: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> Message-ID: <1366979929.26.0.902537562999.issue17721@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: Attached is a patch that removes the Help button from the Preferences window. Maybe it would be nice to have the Help button open a text file describing every possible option, but while this doesn't happen it is better to remove this button. ---------- keywords: +patch Added file: http://bugs.python.org/file30024/Issue17721.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 14:40:31 2013 From: report at bugs.python.org (Kushal Das) Date: Fri, 26 Apr 2013 12:40:31 +0000 Subject: [issue17826] Setting a side_effect on mock from create_autospec doesn't work In-Reply-To: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za> Message-ID: <1366980031.65.0.77595499256.issue17826@psf.upfronthosting.co.za> Kushal Das added the comment: Working on this. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 14:45:40 2013 From: report at bugs.python.org (Kushal Das) Date: Fri, 26 Apr 2013 12:45:40 +0000 Subject: [issue17826] Setting a side_effect on mock from create_autospec doesn't work In-Reply-To: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za> Message-ID: <1366980340.8.0.557819433635.issue17826@psf.upfronthosting.co.za> Kushal Das added the comment: Patch along with a test for the same. ---------- keywords: +patch Added file: http://bugs.python.org/file30025/issue17826_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:09:04 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 26 Apr 2013 13:09:04 +0000 Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK In-Reply-To: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za> Message-ID: <1366981744.46.0.184817503643.issue16133@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I confirm I can reproduce this issue also in pyftpdlib: https://code.google.com/p/pyftpdlib/issues/detail?id=255 Current proposed patch returning '' is not ideal as for asynchat '' is an alias for 'connection lost'. In summary recv() in case of EAGAIN should return None and asynchat.handle_read() should take that into account. Will provide a patch later. ---------- assignee: -> giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:30:34 2013 From: report at bugs.python.org (David Edelsohn) Date: Fri, 26 Apr 2013 13:30:34 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1366983034.28.0.68830078877.issue17837@psf.upfronthosting.co.za> David Edelsohn added the comment: If you look at the top of config.sub it says: # Please send patches with a ChangeLog entry to config-patches at gnu.org. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD I do not know Python's policy on merging these types of patches, but most projects want the patch in the upstream repository from which they import. They do not need to update to the latest, but at least backport the patch from config.sub HEAD instead of diverging and potentially losing the patch with the next update. I do not see your patch there now. I'm surprised that it's not there already if needed for Fedora. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:37:09 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 26 Apr 2013 13:37:09 +0000 Subject: [issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK In-Reply-To: <1349366792.42.0.417654527681.issue16133@psf.upfronthosting.co.za> Message-ID: <1366983429.6.0.411379367236.issue16133@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch is in attachment. I'm a bit worried about Python versions < 3.4 because this kinds of breaks backward compatibility as recv() is not expected to return None but I see no other saner solution. ---------- keywords: +patch Added file: http://bugs.python.org/file30026/issue16133.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:38:25 2013 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Fri, 26 Apr 2013 13:38:25 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1366983505.65.0.987179386004.issue17837@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: Hmm, good point. I'll try to discuss with Fedora people who work on secondary arches. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:40:40 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Apr 2013 13:40:40 +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: <1366983640.37.0.713162725571.issue17849@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report. Looks like it is a fairly rare case, which I suppose is why it hasn't been reported before. If the "could be" turns out to be sufficient, that should be enough for someone to write a test for this. The patch itself should be even easier. ---------- keywords: +easy nosy: +r.david.murray stage: -> needs patch type: -> behavior versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:41:23 2013 From: report at bugs.python.org (David Edelsohn) Date: Fri, 26 Apr 2013 13:41:23 +0000 Subject: [issue17837] Support for building on ppc64p7 In-Reply-To: <1366872804.53.0.68863925041.issue17837@psf.upfronthosting.co.za> Message-ID: <1366983683.98.0.529649401499.issue17837@psf.upfronthosting.co.za> David Edelsohn added the comment: I meant I don't see the equivalent of your patch in the upstream repository, so no one from the Fedora community appears to have contributed something equivalent yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:44:53 2013 From: report at bugs.python.org (Edward K. Ream) Date: Fri, 26 Apr 2013 13:44:53 +0000 Subject: [issue17850] unicode_escape encoding fails for '\\Upsilon' Message-ID: <1366983893.46.0.655183073262.issue17850@psf.upfronthosting.co.za> New submission from Edward K. Ream: On both windows and Linux the following fails on Python 2.7: s = '\\Upsilon' unicode(s,"unicode_escape") UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-7: end of string in escape sequence BTW, the six.py package uses this call. If this call doesn't work, six is broken. ---------- components: Library (Lib) messages: 187852 nosy: Edward.K..Ream priority: normal severity: normal status: open title: unicode_escape encoding fails for '\\Upsilon' type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:47:57 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Apr 2013 13:47:57 +0000 Subject: [issue17850] unicode_escape encoding fails for '\\Upsilon' In-Reply-To: <1366983893.46.0.655183073262.issue17850@psf.upfronthosting.co.za> Message-ID: <1366984077.18.0.0875400057989.issue17850@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is not a bug, \U should be followed by 8 hex digits and it indicates a Unicode codepoint: >>> '\\u0065'.decode('unicode_escape') u'e' >>> '\\U00000065'.decode('unicode_escape') u'e' >>> '\\Upsilon'.decode('unicode_escape') Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 0-7: end of string in escape sequence >>> u'\Upsilon' File "", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-7: end of string in escape sequence >>> u'\U00000065' u'e' ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:51:11 2013 From: report at bugs.python.org (Edward K. Ream) Date: Fri, 26 Apr 2013 13:51:11 +0000 Subject: [issue17850] unicode_escape encoding fails for '\\Upsilon' In-Reply-To: <1366983893.46.0.655183073262.issue17850@psf.upfronthosting.co.za> Message-ID: <1366984271.02.0.732518969963.issue17850@psf.upfronthosting.co.za> Edward K. Ream added the comment: Thanks for your quick reply. If this is not a bug, why does six define six.u as unicode(s,"unicode_escape") for *all* u constants?? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 15:54:43 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Apr 2013 13:54:43 +0000 Subject: [issue17850] unicode_escape encoding fails for '\\Upsilon' In-Reply-To: <1366983893.46.0.655183073262.issue17850@psf.upfronthosting.co.za> Message-ID: <1366984483.97.0.359992856804.issue17850@psf.upfronthosting.co.za> R. David Murray added the comment: Because as Ezio demonstrated, it produces the same result as using the 'u' prefix on the same string. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:08:32 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Apr 2013 14:08:32 +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: <1366985312.1.0.788498851705.issue17849@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Python 3.3 doesn't support HTTP/0.9 and doesn't have LineAndFileWrapper class. ---------- nosy: +christian.heimes, serhiy.storchaka versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:25:03 2013 From: report at bugs.python.org (Roger Serwy) Date: Fri, 26 Apr 2013 14:25:03 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1366986303.85.0.70731476773.issue17838@psf.upfronthosting.co.za> Roger Serwy added the comment: If we remove .close() then we'll need to then have an alternative way to allow "exit()" and "quit()" to actually close IDLE. The RPC proxy already transfers exceptions between the subprocess and the front-end, so we could catch the SystemExit exception and handle it by calling close(). That's perfectably doable, and likely the right way to do it. If anyone wants to write that patch, I'll gladly offer guidance if necessary. Here's a dirty hack that also solves the issue. Garbage collection on the PseudoInputFile for sys.stdin calls .close(). As long as we hold an extra reference to it, it won't close. The attached patch holds an extra reference to sys.stdin in Lib/idlelib/run.py. ---------- keywords: +patch Added file: http://bugs.python.org/file30027/hold_stdin.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:26:16 2013 From: report at bugs.python.org (Edward K Ream) Date: Fri, 26 Apr 2013 14:26:16 +0000 Subject: [issue17850] unicode_escape encoding fails for '\\Upsilon' In-Reply-To: <1366984271.02.0.732518969963.issue17850@psf.upfronthosting.co.za> Message-ID: Edward K Ream added the comment: On Fri, Apr 26, 2013 at 8:51 AM, Edward K. Ream wrote: > > If this is not a bug, why does six define six.u as > unicode(s,"unicode_escape") for *all* u constants?? > Oops. The following works:: s = r'\\Upsilon' unicode(s,"unicode_escape") My apologies for the noise. Edward ---------- nosy: +edreamleo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:30:10 2013 From: report at bugs.python.org (Roger Serwy) Date: Fri, 26 Apr 2013 14:30:10 +0000 Subject: [issue17721] Help button on preference window doesn't work In-Reply-To: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> Message-ID: <1366986610.02.0.211675943216.issue17721@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:40:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Apr 2013 14:40:48 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument In-Reply-To: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> Message-ID: <1366987248.76.0.232518696214.issue17842@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Needed tests for decoders. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:46:58 2013 From: report at bugs.python.org (vila) Date: Fri, 26 Apr 2013 14:46:58 +0000 Subject: [issue11218] pattern=None when following documentation for load_tests and unittest.main() In-Reply-To: <1297758807.39.0.713611114484.issue11218@psf.upfronthosting.co.za> Message-ID: <1366987618.52.0.489744340293.issue11218@psf.upfronthosting.co.za> Changes by vila : ---------- nosy: +vila _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:48:50 2013 From: report at bugs.python.org (vila) Date: Fri, 26 Apr 2013 14:48:50 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py In-Reply-To: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> Message-ID: <1366987730.08.0.980975422421.issue16662@psf.upfronthosting.co.za> Changes by vila : ---------- nosy: +vila _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:52:47 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Apr 2013 14:52:47 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1366987967.34.0.457306433857.issue17839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Not only memoryview should be supported, but any class which supports the buffer protocol and is C-contiguous (i.e. array.array). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:57:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Apr 2013 14:57:22 +0000 Subject: [issue16316] Support xz compression in mimetypes module In-Reply-To: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> Message-ID: <1366988242.71.0.486416635869.issue16316@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Xz-related mimetypes was added because Python 3.3+ supports xz compression. Backporting them to 3.3 makes sense. But backporting to 2.7 is more questionable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 16:59:31 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 14:59:31 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1366988371.35.0.594780927859.issue15535@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I would like to call this a critical regression. Under 2.7 and 3.2, all pickle protocols are affected. Under 3.3 and 3.4, pickle protocols 0 and 1 are affected. (unfortunately, 3.2 doesn't receive bugfixes anymore) ---------- nosy: +benjamin.peterson, pitrou priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 17:03:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 15:03:13 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1366988593.41.0.915803287412.issue17834@psf.upfronthosting.co.za> Antoine Pitrou added the comment: queue.PriorityQueue is a locked class for use in multi-threaded code. That's like saying Queue is a good substitute for list :-) OTOH, the proposed patch raises a lot of warning signs for me. I will wait for a decision on the feature's desirability before making a review. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 17:21:50 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Apr 2013 15:21:50 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1366989710.81.0.283576963447.issue17838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is not important enough. We can defer fixing until a better patch will be proposed. In any case please add an explaining comment to your patch when committing it. Otherwise some future code will depend on self.stdin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 17:41:33 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 15:41:33 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1366990893.91.0.784546837369.issue15535@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl, larry stage: -> needs patch versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 17:52:39 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Apr 2013 15:52:39 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1366991559.18.0.965070777258.issue17834@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >From my multilingual experience I can say that priority queue is very rarely used type of collections (but if it needed it is very usefull). On one hand, Python stdlib already contains one such type, and this type will be good enough in non-performance-critical applications. On other hand, a non-locked implementation using heapq is trivial (just encapsulate a list inside a class), no one will implement it wrong (if do not over-complicate the interface). I don't see the need for yet one priority queue. The presence of two very similar types in the stdlib will lead to confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 19:38:50 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 26 Apr 2013 17:38:50 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1366997930.61.0.740335330993.issue17827@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: So, why place them in What's New? ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 19:51:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Apr 2013 17:51:46 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1366998706.48.0.152610967079.issue17827@psf.upfronthosting.co.za> Ezio Melotti added the comment: To advertise them? It should be explained that they are not new, but that now they are documented and can/should be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 20:45:35 2013 From: report at bugs.python.org (Kushal Das) Date: Fri, 26 Apr 2013 18:45:35 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument In-Reply-To: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> Message-ID: <1367001935.93.0.55648769635.issue17842@psf.upfronthosting.co.za> Kushal Das added the comment: All the decoders create bytes as result, not sure how to assume if the result should be bytes or bytearray. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 21:12:53 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Apr 2013 19:12:53 +0000 Subject: [issue16316] Support xz compression in mimetypes module In-Reply-To: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> Message-ID: <1367003573.44.0.948120369576.issue16316@psf.upfronthosting.co.za> ?ric Araujo added the comment: In my opinion supporting xz in the standard library is totally separate from keeping the mime types registry up to date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 21:26:45 2013 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Apr 2013 19:26:45 +0000 Subject: [issue16316] Support xz compression in mimetypes module In-Reply-To: <1351114845.07.0.378323444057.issue16316@psf.upfronthosting.co.za> Message-ID: <1367004405.71.0.80750235107.issue16316@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with ?ric. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 21:32:45 2013 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 26 Apr 2013 19:32:45 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1367004765.01.0.837116014934.issue17827@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: I was not aware that such things are placed in What's New. I just looked at such a document for 3.3... makes a lot of sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 22:22:38 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Apr 2013 20:22:38 +0000 Subject: [issue17803] Calling Tkinter.Tk() with a baseName keyword argument throws UnboundLocalError In-Reply-To: <1366459067.56.0.563805479218.issue17803@psf.upfronthosting.co.za> Message-ID: <1367007758.3.0.44591043596.issue17803@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Line 35 is "import sys" so sys imports within functions are superfluous, as well as contrary to current guidelines. There is another on 1033. Both were removed before 3.3, so this amounts to a 2.7 backport. It took me a moment to see that the unneeded conditional import is not innocuous, as it localizes 'sys' while sometimes leaving it unbound. Good catch. Yashuhiro, can you sign a PSF contributor license agreement? The electronic version is easy. http://www.python.org/psf/contrib/contrib-form/ We don't really need it for this patch, but we hope to see more from you. A minimal test would be a unittest version of assert isinstance(Tk(baseName="test"), Tk) This mainly tests that no exceptions are raised when the arg is present. The doc may suggest that baseName should have a visible effect on the instance that could be tested. If there is already a 3.x test, it should be backported. If not, anything added to 2.7 should be added to 3.x also. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 22:24:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Apr 2013 20:24:23 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument In-Reply-To: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> Message-ID: <1367007863.57.0.721972114649.issue17842@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The argument should be tested, not the result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 22:28:13 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 20:28:13 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367008093.71.0.0927291871208.issue17810@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A proof of concept hack to enable framing on pickle showed a massive performance increase on streaming unpickling (up to 5x faster with a C file object such as io.BytesIO, up to 150x faster with a pure Python file object such as _pyio.BytesIO). There is a slight slowdown on non-streaming operation, but that could probably be optimized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 23:03:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Apr 2013 21:03:07 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1367010187.9.0.133132925531.issue17804@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think 'iter_unpack' is deceptive and wrong for the following reason. Up to now, 'ixyz' or 'iterxyz' or 'iter_xyz' has meant a version of 'xyz' that presents items one at a time rather than all at once in a collection object (usually in a list). Unpack returns a tuple, but the new function would *not* present the members of the tuple one at time. Instead, it would apply unpack multiple times, yielding multiple tuples. I would call the new thing 'unpack_all' or 'unpacker' (the latter works especially well for an iterator class). An unpacker is a person or machine that repeatedly unpacks. (I was once a bottle unpacker for a college summer job ;-). struct.unpacker(fmt, buffer) Return an iterator that repeatedly unpacks successive buffer slices of size calcsize(fmt) into tuples according to the format string fmt. The buffer length must be an exact multiple of calcsize(fmt)). (? Not clear from text description. Add param to allow remainder?) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 23:40:07 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 21:40:07 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367012407.41.0.979803717367.issue17810@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (note: I've updated PEP 3154 with framing and GLOBAL_STACK) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 23:42:22 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Apr 2013 21:42:22 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367012542.84.0.428648045906.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > A feature that may be actually nice to have in the pickle protocol would be some framing, to help with streaming unpickling (right now unpickling a stream can read almost one byte at a time, IIRC). > However, that would also make the protocol and the pickler significantly more complex. What if just use io.BufferedReader? if not isinstance(file, io.BufferedReader): file = io.BufferedReader(file) (at start of _Unpickler.__init__) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 23:45:14 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 21:45:14 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1367012542.84.0.428648045906.issue17810@psf.upfronthosting.co.za> Message-ID: <1367012712.2558.2.camel@fsol> Antoine Pitrou added the comment: > What if just use io.BufferedReader? > > if not isinstance(file, io.BufferedReader): > file = io.BufferedReader(file) > > (at start of _Unpickler.__init__) Two problems: 1. semantically, it is wrong; the BufferedReader will read bytes beyond the pickle end, so the underlying stream will be desynchronized 2. performance-wise, it doesn't solve the issue either: read() method calls are costly, even on an optimized C object ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 26 23:58:17 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Apr 2013 21:58:17 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367013497.4.0.451648929752.issue17825@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Perhaps Florent is pointing to the fact that for 'except X:', the syntax error is detected at the ' ' at offset 6 but the caret is backed up under the 't' at offset 5*, whereas it is not backed up to the space before ' open'. Which behavior do you propose to change? Since these details of presentation are not documented, I do not consider the current difference a bug. I would not change them in current versions since change could confuse people or software. I suspect there is also danger of making some cases worse. For the same reasons, I would not change in future versions either without good offsetting reason. So I also think this should be closed. On python-list, we tell people that the caret is a starting point for detecting the error, not an absolute pointer. For syntax errors, Idle omits the traceback and highlights in red the presumed error. For the first, it marks the entire word 'except'. For the second, it marks the last whitespace before open. This is equivalent to backing up the caret. * I suspect this backup is special to keywords. For 'except+', both systems also mark the keyword, not the '+'. Either the keyword is misused or is a regular name misspelled. In either case, someone thought it better to point to the keyword than the space or other character after. I agree. So did the Idle author who decided to highlight the keyword rather than the character after it. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 00:20:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Apr 2013 22:20:13 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <3Zy8pN3M8sz7Lm3@mail.python.org> Roundup Robot added the comment: New changeset d232cff25bbd by Antoine Pitrou in branch 'default': Issue #17804: New function ``struct.iter_unpack`` allows for streaming struct unpacking. http://hg.python.org/cpython/rev/d232cff25bbd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 00:21:03 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 26 Apr 2013 22:21:03 +0000 Subject: [issue17804] streaming struct unpacking In-Reply-To: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za> Message-ID: <1367014863.19.0.340293841354.issue17804@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I don't want the bikeshedding to last too long, so I committed the patch with docs. Thanks everyone! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 00:22:06 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Apr 2013 22:22:06 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1367014926.12.0.0698089429654.issue17838@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think PseudoXxxFile should have close methods, but that the methods should not be called when they should not be. Rebinding sys.stdin should not close command line input. My perhaps naive thought is that initializing sys.__stdin__ to the original sys.stdin, as in the standard interpreter and as specified in the docs, is the proper place for the extra reference to keep PseudoInputFile alive. (I presume we are talking about the object in the user process.) While the sys module doc says that any of sys.std** and sys.__std**__ can be None on Windows pythonw gui apps, that does not make None a good idea ;-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 00:33:07 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Apr 2013 22:33:07 +0000 Subject: [issue17846] Building Python on Windows - Supplementary info In-Reply-To: <1366919664.94.0.0931557904055.issue17846@psf.upfronthosting.co.za> Message-ID: <1367015587.11.0.855342240794.issue17846@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have also had problems, and I think the devguide needs a chapter on the subject. I have additional info from Steve Dower of MS to add. There are also proposed rewrites of the .bat files to be factored it to any doc. Thank you for your writeup. ---------- components: +Devguide nosy: +ezio.melotti, terry.reedy type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 00:33:31 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Apr 2013 22:33:31 +0000 Subject: [issue17846] Building Python on Windows - Supplementary info In-Reply-To: <1366919664.94.0.0931557904055.issue17846@psf.upfronthosting.co.za> Message-ID: <1367015611.08.0.760282995041.issue17846@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 03:06:25 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Apr 2013 01:06:25 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1367024785.06.0.755170316943.issue9682@psf.upfronthosting.co.za> R. David Murray added the comment: As I said in the review, thanks for working more on this. For the reason for (3), look at the test just before the ones you added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 03:48:55 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Apr 2013 01:48:55 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1367027335.46.0.371788417344.issue17818@psf.upfronthosting.co.za> R. David Murray added the comment: I made review comments: patch looks good, tests need a bit of work. Would you be interested in adding the What's New entry as well? (Doc/whatsnew/3.4). ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 06:39:21 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sat, 27 Apr 2013 04:39:21 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1367037561.86.0.403944432503.issue17818@psf.upfronthosting.co.za> Claudiu.Popa added the comment: Hello. I changed the patch according to your review comments. Here is the new version. ---------- Added file: http://bugs.python.org/file30028/aifc_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 06:55:56 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sat, 27 Apr 2013 04:55:56 +0000 Subject: [issue17851] Grammar errors in threading.Lock documentation Message-ID: <1367038556.41.0.738438135734.issue17851@psf.upfronthosting.co.za> New submission from Andriy Mysyk: No need for comma in "which one of the waiting threads proceeds is not defined, and may vary across implementations." "Once a thread has acquired a lock, subsequent attempts to acquire it block, until it is released; any thread may release it" should read "are blocked" instead of "block." /Documents/python/cpython/Doc/build/html/library/threading.html ---------- messages: 187887 nosy: amysyk priority: normal severity: normal status: open title: Grammar errors in threading.Lock documentation type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 07:02:23 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sat, 27 Apr 2013 05:02:23 +0000 Subject: [issue17851] Grammar errors in threading.Lock documentation In-Reply-To: <1367038556.41.0.738438135734.issue17851@psf.upfronthosting.co.za> Message-ID: <1367038942.99.0.334903582717.issue17851@psf.upfronthosting.co.za> Andriy Mysyk added the comment: submitting a patch for both grammar errors ---------- assignee: -> docs at python components: +Documentation keywords: +patch nosy: +docs at python Added file: http://bugs.python.org/file30029/issue17851.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 07:38:02 2013 From: report at bugs.python.org (Daniel Wong) Date: Sat, 27 Apr 2013 05:38:02 +0000 Subject: [issue17794] Priority Queue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1367041082.52.0.260117085867.issue17794@psf.upfronthosting.co.za> Daniel Wong added the comment: btw, I have a related patch: http://bugs.python.org/issue17834 Chances of it being accepted aren't looking good right now though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 09:33:31 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 27 Apr 2013 07:33:31 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit Message-ID: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> New submission from Armin Rigo: In Python 2, a buffered file opened for writing is flushed by the C library when the process exit. In Python 3, the _pyio and _io modules don't do it reliably. They rely on __del__ being called, which is not neccesarily the case. The attached example ends with the file 'foo' empty (tested with Python 3.3 and the current trunk). The same example in Python 2 using the built-in open() cannot end with 'foo' empty. ---------- components: IO files: y.py messages: 187890 nosy: arigo priority: normal severity: normal status: open title: Built-in module _io can loose data from buffered files at exit type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30030/y.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 09:55:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 07:55:34 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367049334.75.0.137571666167.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I were thinking about framing before looking at your last changes to PEP 3154 and I have two alternative propositions. 1. Pack picked items in blocks of some predefined (or specified at the start with the BLOCKSIZE opcode) size. Only some large data (long strings, large integers) can cross the boundary between blocks. In all other cases the block should be padded with the NOP opcode. 2. A similar to your proposition, but frames should be declared with a special PREFETCH opcode (with 2- or 4-bytes argument). Large data pickled outside frames (this prevents doublecopying). Opcode and size of large data object can (should?) be included in the previous frame. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 10:10:01 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 27 Apr 2013 08:10:01 +0000 Subject: [issue17853] class construction name resolution broken in functions Message-ID: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> New submission from Ethan Furman: In playing with metaclasses for the ongoing Enum saga, I tried having the metaclass insert an object into the custom dict (aka namespace) returned by __prepare__; this object has the same name as the to-be-created class. An example: class Season(Enum): SPRING = Season() SUMMER = Season() AUTUMN = Season() WINTER = Season() When this executes as top level code it works beautifully. However, if you have the exact same definition in a function, Bad Things happen: --------------------------------------- --> def test(): ... class Season(Enum): ... SPRING = Season() ... --> test() Traceback (most recent call last): File "", line 1, in File "", line 2, in test File "", line 3, in Season NameError: free variable 'Season' referenced before assignment in enclosing scope --------------------------------------- So I tried creating a dummy variable to see if it would be worked around: --------------------------------------- --> def test(): ... Season = None ... class Season(Enum): ... SPRING = Season() ... --> test() Traceback (most recent call last): File "", line 1, in File "", line 3, in test File "", line 4, in Season TypeError: 'NoneType' object is not callable --------------------------------------- Finally I inserted the object using a different name, and also printed 'locals()' just to see what was going on: --------------------------------------- --> def test(): ... class Season(Enum): ... print(locals()) ... SPRING = S() ... --> test() {'S': , 'Season': , '__module__': '__main__', '__qualname__': 'test..Season', '__locals__': {...}} --------------------------------------- and an actual (albeit extremely ugly) work around: --------------------------------------- >>> def test(): ... class Season(Enum): ... Season = locals()['Season'] ... SPRING = Season() ... print(Season) ... >>> test() Season(SPRING=1) --------------------------------------- It seems that the function namespace is seriously messing with the class namespace. ---------- components: Interpreter Core messages: 187892 nosy: stoneleaf priority: normal severity: normal status: open title: class construction name resolution broken in functions type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 10:17:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 08:17:14 +0000 Subject: [issue4424] Add support for a cmp, or key argument to heapq functions. In-Reply-To: <1227587964.05.0.309336873132.issue4424@psf.upfronthosting.co.za> Message-ID: <1367050634.75.0.760874603939.issue4424@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- superseder: -> Add key argument to heapq functions type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 10:20:52 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 08:20:52 +0000 Subject: [issue17794] Add a key parameter to PriorityQueue In-Reply-To: <1366331842.58.0.144732937336.issue17794@psf.upfronthosting.co.za> Message-ID: <1367050852.4.0.265251205158.issue17794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Related issues: issue4356, issue13742. See also issue1185383, issue1904 and issue1162363. ---------- nosy: +serhiy.storchaka title: Priority Queue -> Add a key parameter to PriorityQueue type: behavior -> enhancement versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 10:22:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 08:22:05 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1367050925.23.0.853420086389.issue17834@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also rejected issue1162363. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 10:25:59 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 27 Apr 2013 08:25:59 +0000 Subject: [issue17853] class construction name resolution broken in functions In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <517B8B99.3030602@stoneleaf.us> Ethan Furman added the comment: One more data point to truly demonstrate that something is wrong: -------------------------------------------- --> def test(): ... class Season(Enum): ... print(locals()) ... Season = locals()['Season'] ... print(locals()) ... --> test() {'Season': , '__module__': '__main__', '__locals__': {...}} {'Season': , '__module__': '__main__', '__locals__': {...}} -------------------------------------------- Notice the class name space *did not change in any way* before and after setting 'Season' manually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 11:15:35 2013 From: report at bugs.python.org (Daniel Urban) Date: Sat, 27 Apr 2013 09:15:35 +0000 Subject: [issue17853] class construction name resolution broken in functions In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367054135.99.0.641530266217.issue17853@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 12:38:32 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 27 Apr 2013 10:38:32 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1367049334.75.0.137571666167.issue17810@psf.upfronthosting.co.za> Message-ID: <1367059107.2540.4.camel@fsol> Antoine Pitrou added the comment: > 1. Pack picked items in blocks of some predefined (or specified at the > start with the BLOCKSIZE opcode) size. Only some large data (long > strings, large integers) can cross the boundary between blocks. In all > other cases the block should be padded with the NOP opcode. Padding makes it both less efficient and more annoying to handle, IMO. My framing proof-of-concept ends up quite simple in terms of code complexity. For example, the C version only adds 125 lines of code in 3 additional functions. > 2. A similar to your proposition, but frames should be declared with a > special PREFETCH opcode (with 2- or 4-bytes argument). Large data > pickled outside frames (this prevents doublecopying). No doublecopying is necessary (not in the C version, that is). That said, this is an interesting idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 13:28:42 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 27 Apr 2013 11:28:42 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1367062122.27.0.154027620262.issue17839@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, this should probably be done the other way around: wrap the base64 argument in a memoryview, and encode/decode from it. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 13:40:28 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 27 Apr 2013 11:40:28 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1367062828.2.0.80791281912.issue17852@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There are actually several issues here: * collection of globals at shutdown is wonky: you should add an explicit "del a,f; gc.collect()" at the end of the script * order of tp_clear calls, or another issue with TextIOWrapper: if you open the file in binary mode ("f = open('...', 'wb'); f.write(b'bar')"), the data gets flushed during the GC run ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 13:47:20 2013 From: report at bugs.python.org (Amit Saha) Date: Sat, 27 Apr 2013 11:47:20 +0000 Subject: [issue17854] symmetric difference operation applicable to more than two sets Message-ID: <1367063240.22.0.643670001227.issue17854@psf.upfronthosting.co.za> New submission from Amit Saha: The description of the symmetric difference operation implies that it cannot be applied to more than two sets (http://docs.python.org/3/library/stdtypes.html#set.symmetric_difference). However, this is certainly possible: >>> s={1,2} >>> t={2,3} >>> u={3,4} >>> s^t^u {1, 4} >>> s.symmetric_difference(t).symmetric_difference(u) {1, 4} I am not sure how much of a "semantic" sense that makes, given that symmetric difference is by definition for two sets. (http://en.wikipedia.org/wiki/Symmetric_difference). So, either the operator should be fixed to allow only two sets or the description be updated. ---------- assignee: docs at python components: Documentation messages: 187899 nosy: Amit.Saha, docs at python priority: normal severity: normal status: open title: symmetric difference operation applicable to more than two sets type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 13:49:10 2013 From: report at bugs.python.org (Amit Saha) Date: Sat, 27 Apr 2013 11:49:10 +0000 Subject: [issue17854] symmetric difference operation applicable to more than two sets In-Reply-To: <1367063240.22.0.643670001227.issue17854@psf.upfronthosting.co.za> Message-ID: <1367063350.66.0.176236021772.issue17854@psf.upfronthosting.co.za> Amit Saha added the comment: On some more thought, perhaps the description should be updated. Since s^t^u is effectively (s^t)^u and hence the implementation does not violate the definition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 14:07:18 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Apr 2013 12:07:18 +0000 Subject: [issue17854] symmetric difference operation applicable to more than two sets In-Reply-To: <1367063240.22.0.643670001227.issue17854@psf.upfronthosting.co.za> Message-ID: <1367064438.66.0.515935211858.issue17854@psf.upfronthosting.co.za> Georg Brandl added the comment: Can you suggest a change? I don't see a problem here; giving multiple operators for the other operations does not imply that they are not treated as left-associative. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 14:16:31 2013 From: report at bugs.python.org (Amit Saha) Date: Sat, 27 Apr 2013 12:16:31 +0000 Subject: [issue17854] symmetric difference operation applicable to more than two sets In-Reply-To: <1367063240.22.0.643670001227.issue17854@psf.upfronthosting.co.za> Message-ID: <1367064991.08.0.69934018018.issue17854@psf.upfronthosting.co.za> Amit Saha added the comment: I think the only change I am suggesting is the description of the ^ operator to be something like this: set ^ other ^ .. Return a new set with elements from the sets which are not present in more than one set I do understand that this is not really what the operator and the corresponding operation symmetric_difference() allows semantically. But it does make it consistent with the description of operators such as the | or &, but then their operation allows multiple sets semantically. Hmm may be it is fine as it is.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 14:41:35 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 27 Apr 2013 12:41:35 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1367066495.25.0.276013150217.issue17852@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Code relying on garbage collection/shutdown hook to flush files is borked: - it's never been guaranteed by the Python specification (neither does Java/C#...) - even with an implementation based on C stdio streams, streams won't get flushed in case of _exit()/abort()/asynchronous signal Furthermore, I think it's inherently unsafe: in a multi-threaded program, flushing requires locking, and doing this at shutdown is a recipe for deadlock/arbitrary delay (image you have a daemon thread currently holding the lock, e.g. for stdout). In short, that's an application bug to me. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 14:48:58 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 27 Apr 2013 12:48:58 +0000 Subject: [issue17855] Implement introspection of logger hierarchy Message-ID: <1367066938.7.0.169657399656.issue17855@psf.upfronthosting.co.za> New submission from Vinay Sajip: Track implementation of logger hierarchy introspection as per http://plumberjack.blogspot.co.uk/2012/04/introspecting-logger-hierarchy.html ---------- assignee: vinay.sajip components: Library (Lib) messages: 187904 nosy: vinay.sajip priority: normal severity: normal status: open title: Implement introspection of logger hierarchy type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 15:01:07 2013 From: report at bugs.python.org (Berker Peksag) Date: Sat, 27 Apr 2013 13:01:07 +0000 Subject: [issue17652] Add skip_on_windows decorator to test.support In-Reply-To: <1365353236.0.0.311562843433.issue17652@psf.upfronthosting.co.za> Message-ID: <1367067667.8.0.66546715471.issue17652@psf.upfronthosting.co.za> Berker Peksag added the comment: > Could you also propose places in the test to use this? Sure. - Lib/test/test_py_compile.py - Lib/test/test_cmd_line.py - Lib/test/test_faulthandler.py - Lib/test/test_subprocess.py - Lib/test/test_fileio.py - Lib/test/test_io.py - Lib/test/test_logging.py - Lib/test/test_uuid.py - Lib/test/datetimetester.py - Lib/test/test_glob.py - Lib/test/test_import.py - Lib/test/test_multiprocessing.py - Lib/test/test_signal.py - Lib/test/test_site.py - Lib/test/test_sysconfig.py Here's an alternative patch that adds an optional "reason" parameter. ---------- Added file: http://bugs.python.org/file30031/issue17652_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 16:01:05 2013 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 27 Apr 2013 14:01:05 +0000 Subject: [issue17846] Building Python on Windows - Supplementary info In-Reply-To: <1366919664.94.0.0931557904055.issue17846@psf.upfronthosting.co.za> Message-ID: <1367071265.81.0.193595712039.issue17846@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 16:10:13 2013 From: report at bugs.python.org (Mike Milkin) Date: Sat, 27 Apr 2013 14:10:13 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1367071813.93.0.100616951544.issue9682@psf.upfronthosting.co.za> Mike Milkin added the comment: Dave, let me know what you think of the tests, ill fix the rest of your comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 16:22:40 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 27 Apr 2013 14:22:40 +0000 Subject: [issue17851] Grammar errors in threading.Lock documentation In-Reply-To: <1367038556.41.0.738438135734.issue17851@psf.upfronthosting.co.za> Message-ID: <1367072560.67.0.841665051857.issue17851@psf.upfronthosting.co.za> Ramchandra Apte added the comment: afaik they don't seem to be grammatical errors "subsequent attempts to acquire it block" - block is the verb, don't see anything wrong similar example: the crowd blocks me. (present tense) "which one of the waiting threads proceeds is not defined, and may vary across implementations." - there is only one clause, so no comma needed. If two separate clauses. are separated a coordinating conjunction (such as and), commas are required afaik. ---------- nosy: +Ramchandra Apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 16:26:27 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 27 Apr 2013 14:26:27 +0000 Subject: [issue17851] Grammar errors in threading.Lock documentation In-Reply-To: <1367038556.41.0.738438135734.issue17851@psf.upfronthosting.co.za> Message-ID: <1367072787.29.0.385720775733.issue17851@psf.upfronthosting.co.za> Ramchandra Apte added the comment: oops, should be "the crowd blocks me" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 16:48:39 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sat, 27 Apr 2013 14:48:39 +0000 Subject: [issue17851] Grammar errors in threading.Lock documentation In-Reply-To: <1367038556.41.0.738438135734.issue17851@psf.upfronthosting.co.za> Message-ID: <1367074119.36.0.629399233605.issue17851@psf.upfronthosting.co.za> Andriy Mysyk added the comment: Ramachandra, if I understand you correctly, I think what you are saying that both are grammar mistakes and the first one could addressed by adding "s" to block. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 17:21:34 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Apr 2013 15:21:34 +0000 Subject: [issue17827] Document codecs.encode and codecs.decode In-Reply-To: <1366811140.15.0.0983174574305.issue17827@psf.upfronthosting.co.za> Message-ID: <1367076094.16.0.121430836696.issue17827@psf.upfronthosting.co.za> Nick Coghlan added the comment: This is only the second case I'm aware of where a particularly interesting piece of functionality didn't get mentioned in the appropriate What's New doc. For the other case, the zipfile execution support, we just added it in to the 2.6 What's New long after 2.6 had been released. To this day, most people don't know about that capability, which is why I suggest it's worth handling the current case (codecs.encode and codecs.decode) differently and noting their existence in the next What's New doc that people are likely to read :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 17:27:12 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 27 Apr 2013 15:27:12 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1367076432.63.0.437931778182.issue17839@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Serhiy and Antoine noted, what I had in mind here was to try to wrap the input in a memoryview if it wasn't an instance of str, bytes or bytearray. An existing memoryview will be passed back unmodified, while something like array.array will provide a view into its raw data for encoding or decoding. The tests would then cover both memoryview and array.array to ensure it was all working as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 17:27:14 2013 From: report at bugs.python.org (Georg Brandl) Date: Sat, 27 Apr 2013 15:27:14 +0000 Subject: [issue17851] Grammar errors in threading.Lock documentation In-Reply-To: <1367038556.41.0.738438135734.issue17851@psf.upfronthosting.co.za> Message-ID: <1367076434.77.0.489902548604.issue17851@psf.upfronthosting.co.za> Georg Brandl added the comment: I see no problem with both points: "block" is the correct verb form in this context ("attempts" being plural), and the version including comma reads better to me. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 17:45:11 2013 From: report at bugs.python.org (koobs) Date: Sat, 27 Apr 2013 15:45:11 +0000 Subject: [issue17809] FAIL: test_expanduser when $HOME ends with / In-Reply-To: <1366522649.21.0.891133291523.issue17809@psf.upfronthosting.co.za> Message-ID: <1367077511.6.0.115757701592.issue17809@psf.upfronthosting.co.za> koobs added the comment: After some sleuthing with Ezio (thank you for the help) and some amateur debugging, all conditions in expanduser return the the home directory after stripping trailing slashes. The assertion in Lib/test/test_posixpath.py:264 compares expanduser(path) with a path obtained directly from pwd.getpwuidpw_dir "without" submitting it to the same treatment, and thus the test fails when $HOME ends in a "/". The assertion was added in f11da6cecffd (2011-03-17) in order to show that expanduser() "does" infact derive a path from pw_dir, when $HOME is undefined, as the test indicates by deleting the environment variable In so far as using exact path equivalence to make that assertion, the 'home' variable in the test either ought to be subjected to the same treatment as paths derived via expanduser(), or the assertion relaxed to use assertIsNotNone. Given the comment in the test: "# expanduser should fall back to using the password database", my feeling is that the failure case is that no path is returned if a username is not provided in the path passed to expanduser, and as such assertIsNotNone is the more specific assertion, but I'll leave it in the hands of the experts to make the call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 17:57:23 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Apr 2013 15:57:23 +0000 Subject: [issue17809] FAIL: test_expanduser when $HOME ends with / In-Reply-To: <1366522649.21.0.891133291523.issue17809@psf.upfronthosting.co.za> Message-ID: <1367078243.53.0.293107377297.issue17809@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> behavior versions: -Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:27:54 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 27 Apr 2013 16:27:54 +0000 Subject: [issue17855] Implement introspection of logger hierarchy In-Reply-To: <1367066938.7.0.169657399656.issue17855@psf.upfronthosting.co.za> Message-ID: <1367080074.31.0.856609043528.issue17855@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- hgrepos: +186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:28:22 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 27 Apr 2013 16:28:22 +0000 Subject: [issue17855] Implement introspection of logger hierarchy In-Reply-To: <1367066938.7.0.169657399656.issue17855@psf.upfronthosting.co.za> Message-ID: <1367080102.71.0.114569638453.issue17855@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- keywords: +patch Added file: http://bugs.python.org/file30032/64df448c183d.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:33:41 2013 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 27 Apr 2013 16:33:41 +0000 Subject: [issue17855] Implement introspection of logger hierarchy In-Reply-To: <1367066938.7.0.169657399656.issue17855@psf.upfronthosting.co.za> Message-ID: <1367080421.17.0.613554410941.issue17855@psf.upfronthosting.co.za> Vinay Sajip added the comment: Added Brandon to nosy list, as his logging_tree is what set the ball rolling on this one. Brandon, your comments on the patch would be very welcome. ---------- nosy: +brandon-rhodes stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:35:07 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Apr 2013 16:35:07 +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: <1367080507.63.0.0822229822006.issue17806@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +eric.araujo, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:49:24 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Apr 2013 16:49:24 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367081364.14.0.405196691327.issue17825@psf.upfronthosting.co.za> Ezio Melotti added the comment: I tried a few different lines that result in a syntax error and the position of the '^' always seems ok to me, so I'm not sure there's any bug here: foo:bar ^ from import * ^ try:+ ^ try+ ^ 1? ^ 1+*1 ^ 1+-*1 ^ [}] ^ foo) ^ ---------- nosy: +ezio.melotti versions: +Python 3.4 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:51:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Apr 2013 16:51:22 +0000 Subject: [issue17826] Setting a side_effect on mock from create_autospec doesn't work In-Reply-To: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za> Message-ID: <1367081482.12.0.190185947472.issue17826@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:56:50 2013 From: report at bugs.python.org (ProgVal) Date: Sat, 27 Apr 2013 16:56:50 +0000 Subject: [issue17856] multiprocessing.Process.join does not block if timeout is lower than 1 Message-ID: <1367081810.71.0.573037357141.issue17856@psf.upfronthosting.co.za> New submission from ProgVal: In Python 3.3, multiprocessing.Process.join() is not blocking with floats lower than 1.0 (not included). It works as expected (ie. blocking for the specified timeout) in Python 2.6->3.2 As you can see in this example, calling join() with 0.99 returns immediately. $ python3.3 Python 3.3.1 (default, Apr 6 2013, 13:58:40) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> import multiprocessing >>> def foo(): ... time.sleep(1000) ... >>> p = multiprocessing.Process(target=foo) >>> p.start() >>> bar = time.time(); p.join(0.99); print(time.time()-bar) 0.015963315963745117 >>> p.is_alive() True >>> bar = time.time(); p.join(1.0); print(time.time()-bar) 1.0011239051818848 >>> p.is_alive() True ---------- components: Library (Lib) messages: 187916 nosy: Valentin.Lorentz priority: normal severity: normal status: open title: multiprocessing.Process.join does not block if timeout is lower than 1 type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:58:47 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Apr 2013 16:58:47 +0000 Subject: [issue17840] base64_codec uses assert for runtime validity checks In-Reply-To: <1366875650.57.0.151905786577.issue17840@psf.upfronthosting.co.za> Message-ID: <1367081927.42.0.0411109234452.issue17840@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 18:59:08 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 27 Apr 2013 16:59:08 +0000 Subject: [issue17841] Remove missing aliases from codecs documentation In-Reply-To: <1366878629.86.0.715834730144.issue17841@psf.upfronthosting.co.za> Message-ID: <1367081948.94.0.915962339269.issue17841@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 19:18:13 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 27 Apr 2013 17:18:13 +0000 Subject: [issue17856] multiprocessing.Process.join does not block if timeout is lower than 1 In-Reply-To: <1367081810.71.0.573037357141.issue17856@psf.upfronthosting.co.za> Message-ID: <1367083093.32.0.641658967751.issue17856@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Thanks for the report, but it's a duplicate of #17707 (recently fixed). ---------- nosy: +neologix resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Multiprocessing queue get method does not block for short timeouts versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 19:44:34 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 17:44:34 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367084674.33.0.77841470641.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Padding makes it both less efficient and more annoying to handle, IMO. Agree. But there is other application for NOPs. UTF-8 decoder (and some other decoders) works more fast (up to 4x) when input is aligned. By adding several NOPs before BINUNICODE so that start of encoded data is 4- or 8-bytes aligned relatively to start of frame, we can significan speedup unpickling long ASCII strings. I propose to add new NOP opcode and to use it to align some align-sensitive data. > My framing proof-of-concept ends up quite simple in terms of code > complexity. For example, the C version only adds 125 lines of code in 3 > additional functions. I just looked in the code and saw that the unpickler already has a ready infrastructure for prefetching. Now your words have not appear to be so incredible. ;) It should work. > No doublecopying is necessary (not in the C version, that is). Agree, there is no doublecopying (except for large bytes objects). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:07:21 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 18:07:21 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1367086041.09.0.470106090464.issue17839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note that some functions use bytes/bytearray methods and an argument should converted to bytes for them. Other functions use C functions which supports the buffer protocol and do not required any conversion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:32:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 18:32:37 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1367087557.13.0.483968297476.issue17818@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is a regression. The result of getparams() was pickable, but now it is not. I have added other comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:40:19 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Apr 2013 18:40:19 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367088019.97.0.386119046809.issue17825@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> works for me status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:46:05 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 27 Apr 2013 18:46:05 +0000 Subject: [issue17857] sqlite modules doesn't build on 2.7.4 with Mac OS X 10.4 Message-ID: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> New submission from Marc-Andre Lemburg: This is essentially the same issue as http://bugs.python.org/issue14572. The following addition in Python 2.7.4 (compared to 2.7.3) reintroduced the same problem in a different place: --- Python-2.7.3/Modules/_sqlite/util.h 2012-04-10 01:07:33.000000000 +0200 +++ Python-2.7.4/Modules/_sqlite//util.h 2013-04-06 16:02:36.000000000 +0200 @@ -33,6 +33,10 @@ int pysqlite_step(sqlite3_stmt* statemen /** * Checks the SQLite error code and sets the appropriate DB-API exception. * Returns the error code (0 means no error occurred). */ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st); + +PyObject * _pysqlite_long_from_int64(sqlite3_int64 value); +sqlite3_int64 _pysqlite_long_as_int64(PyObject * value); + #endif The fix is the same as for the 2.7.3 issue: replace sqlite3_int64 with sqlite_int64 ---------- components: Extension Modules, Library (Lib) messages: 187921 nosy: lemburg priority: normal severity: normal status: open title: sqlite modules doesn't build on 2.7.4 with Mac OS X 10.4 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:46:38 2013 From: report at bugs.python.org (Armin Rigo) Date: Sat, 27 Apr 2013 18:46:38 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1367088398.06.0.271092795297.issue17852@psf.upfronthosting.co.za> Armin Rigo added the comment: It used to be a consistently reliable behavior in Python 2 (and we made it so in PyPy too), provided of course that the process exits normally; but it no longer is in Python 3. Well I can see the reasons for not flushing files, if it's clearly documented somewhere as a change of behavior from Python 2. However I'm complaining about the current behavior: files are flushed *most of the time*. That's a behavior that is clearly misleading, or so I would think. I'm rather sure that there are many small scripts and large programs out there relying on automatic flushing, and then one day they'll hit a case where the file is not flushed and get the worst kind of error: a file unexpectedly truncated at 99% of its length, in a way that cannot be reproduced by small examples. Feel free to close anyway as not-a-bug; I won't fight the Python 3 behavior, because Python 2 works as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:47:06 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Apr 2013 18:47:06 +0000 Subject: [issue17721] Help button on preference window doesn't work In-Reply-To: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> Message-ID: <1367088426.65.0.111358833633.issue17721@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Perhaps we should merely comment out the two blocks of text until we decide we don't ever want a help button. If the expanded doc in progress had a marked helpful doc on configure, the help button could open the doc to that section. Guilherme, have you submitted a PSF Contributor License Agreement? http://www.python.org/psf/contrib/contrib-form/ (Sorry if this a repeat question.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:50:25 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 27 Apr 2013 18:50:25 +0000 Subject: [issue17857] sqlite modules doesn't build on 2.7.4 with Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367088625.97.0.782774511725.issue17857@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Adding the same people to the nosy list as on issue #14572. ---------- nosy: +Joakim.Sernbrant, Marc.Abramowitz, dmalcolm, ned.deily, petri.lehtinen, python-dev type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:51:27 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 27 Apr 2013 18:51:27 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367088687.11.0.046153310102.issue17825@psf.upfronthosting.co.za> Florent Xicluna added the comment: Hello again, actually, the attached script demonstrates some issues with the computation of the offset. In rare cases, the computed offset does not match the position of the caret '^' in the traceback. It makes it difficult to reuse exc.offset to display the exact position. ---------- Added file: http://bugs.python.org/file30033/issue17825_cases.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:52:47 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 27 Apr 2013 18:52:47 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367088767.36.0.252791811766.issue17825@psf.upfronthosting.co.za> Florent Xicluna added the comment: And this additional script (test_indenterror.py) demonstrates a different issue in the traceback module. ---------- Added file: http://bugs.python.org/file30034/test_indenterror.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 20:55:28 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 27 Apr 2013 18:55:28 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367088928.98.0.09333876713.issue17825@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 21:51:15 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Apr 2013 19:51:15 +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: <1367092275.47.0.746705108765.issue17806@psf.upfronthosting.co.za> ?ric Araujo added the comment: Where is the ?Approve patch? button :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 21:56:06 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 19:56:06 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367092566.15.0.949678643194.issue17825@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed, there is an inconsistence between the traceback module and builtin exception print function. Behavior of traceback is intentional as noted in format_exception_only() (if this comment is not misleading). ---------- nosy: +georg.brandl, serhiy.storchaka type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 22:02:41 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 20:02:41 +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: <1367092961.0.0.658754579806.issue17806@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note that adding support of keyword arguments significant slowdown argument parsing. Please measure time of the function call with and without the patch. I object to add support for keyword arguments in a quick built-in functions. Especially if it's the only argument. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 22:07:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 20:07:15 +0000 Subject: [issue17857] sqlite modules doesn't build on 2.7.4 with Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367093235.12.0.124725279994.issue17857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The regression was introduced in issue17073. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 22:13:19 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 27 Apr 2013 20:13:19 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367093599.6.0.313858737921.issue17857@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- title: sqlite modules doesn't build on 2.7.4 with Mac OS X 10.4 -> sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 22:27:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 20:27:14 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367094434.76.0.184829903088.issue17857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for 2.7. Please test. Should it be fixed on 3.x? ---------- keywords: +patch Added file: http://bugs.python.org/file30035/sqlite_int64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 22:27:58 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 27 Apr 2013 20:27:58 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367094478.21.0.176409837024.issue17825@psf.upfronthosting.co.za> Florent Xicluna added the comment: The proposed patch deals with the case of the IndentationError in the traceback module. ---------- keywords: +patch resolution: works for me -> Added file: http://bugs.python.org/file30036/patch_indenterror_offset.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 22:31:00 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 27 Apr 2013 20:31:00 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367094660.55.0.255036662032.issue17825@psf.upfronthosting.co.za> Changes by Florent Xicluna : Removed file: http://bugs.python.org/file30036/patch_indenterror_offset.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 22:31:38 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 27 Apr 2013 20:31:38 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367094698.09.0.652613186623.issue17825@psf.upfronthosting.co.za> Changes by Florent Xicluna : Added file: http://bugs.python.org/file30037/patch_indenterror_offset.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 22:32:37 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Apr 2013 20:32:37 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367094757.37.0.222650267525.issue17825@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Your diff file looks broken. I'm not sure it's the traceback module should be fixed and not Python internals. Georg, what you say? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 23:01:26 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 27 Apr 2013 21:01:26 +0000 Subject: [issue17853] class construction name resolution broken in functions In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367096486.18.0.183635163843.issue17853@psf.upfronthosting.co.za> Mark Dickinson added the comment: Isn't this just a consequence of Python's usual name-lookup rules? In this code: def test(): class Season(Enum): SPRING = Season() the class definition in 'test' amounts to a local assignment to the name 'Season'. So the occurrence of 'Season' in the class definition is bound to that function local (at bytecode level, it's looked up using LOAD_DEREF instead of LOAD_NAME). I find it difficult to see how one could 'fix' this without significant changes to the way that Python does name resolution. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 23:07:55 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 27 Apr 2013 21:07:55 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367096875.77.0.739998863626.issue17825@psf.upfronthosting.co.za> Florent Xicluna added the comment: The previous patch fixes some cases where the caret was wrongly positioned. However, there's probably stuff to fix in Python internals too. See attached test cases (test_traceback_caret.py) which demonstrates other issues with non-ASCII chars or in the source code. ---------- Added file: http://bugs.python.org/file30038/test_traceback_caret.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 23:17:59 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 27 Apr 2013 21:17:59 +0000 Subject: [issue17853] class construction name resolution broken in functions In-Reply-To: <1367096486.18.0.183635163843.issue17853@psf.upfronthosting.co.za> Message-ID: <517C4088.1060801@stoneleaf.us> Ethan Furman added the comment: On 04/27/2013 02:01 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Isn't this just a consequence of Python's usual name-lookup rules? In this code: > > def test(): > class Season(Enum): > SPRING = Season() > > the class definition in 'test' amounts to a local assignment to the name 'Season'. So the occurrence of 'Season' in the class definition is bound to that function local (at bytecode level, it's looked up using LOAD_DEREF instead of LOAD_NAME). The key point is that class construction should take place in its own namespace (it has its own locals(), after all), only looking to enclosing name spaces if it can't find the name in its locals() (which it won't know until it tries). Granted, this was never a problem before __prepare__ was available, but now that it is we need to have the name space look-up rules applied appropriately, and not have the enclosing function strong-arm its own values into the class namespace. > I find it difficult to see how one could 'fix' this without significant changes to the way that Python does name resolution. I don't know if this helps, but here's the dis for three different runs: --> def test1(): ... class WeekDay(Enum): ... MONDAY = WeekDay(1) ... --> dis.dis(test1) 2 0 LOAD_BUILD_CLASS 1 LOAD_CLOSURE 0 (WeekDay) 4 BUILD_TUPLE 1 7 LOAD_CONST 1 (", line 2>) 10 MAKE_CLOSURE 0 13 LOAD_CONST 2 ('WeekDay') 16 LOAD_GLOBAL 0 (Enum) 19 CALL_FUNCTION 3 22 STORE_DEREF 0 (WeekDay) 25 LOAD_CONST 0 (None) 28 RETURN_VALUE --> def test2(): ... class WeekDay(Enum): ... MONDAY = enum(1) ... --> dis.dis(test2) 2 0 LOAD_BUILD_CLASS 1 LOAD_CONST 1 (", line 2>) 4 MAKE_FUNCTION 0 7 LOAD_CONST 2 ('WeekDay') 10 LOAD_GLOBAL 0 (Enum) 13 CALL_FUNCTION 3 16 STORE_FAST 0 (WeekDay) 19 LOAD_CONST 0 (None) 22 RETURN_VALUE --> def test3(): ... class WeekDay(Enum): ... WeekDay = locals()['WeekDay'] ... MONDAY = WeekDay(1) ... --> dis.dis(test3) 2 0 LOAD_BUILD_CLASS 1 LOAD_CONST 1 (", line 2>) 4 MAKE_FUNCTION 0 7 LOAD_CONST 2 ('WeekDay') 10 LOAD_GLOBAL 0 (Enum) 13 CALL_FUNCTION 3 16 STORE_FAST 0 (WeekDay) 19 LOAD_CONST 0 (None) 22 RETURN_VALUE test1's dis should look more like test3's. Also, I find it interesting that test2's dis is exactly the same as test3's. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 23:35:31 2013 From: report at bugs.python.org (Ethan Furman) Date: Sat, 27 Apr 2013 21:35:31 +0000 Subject: [issue17853] class construction name resolution broken in functions In-Reply-To: <517C4088.1060801@stoneleaf.us> Message-ID: <517C44A5.9010308@stoneleaf.us> Ethan Furman added the comment: I guess the question is: Because Python can no longer know if the name has been inserted via __prepare__ it has to go through the whole CLOSURE business, but will changing the LOAD_DEREF to a LOAD_GLOBAL (only for items inside a class def) do the trick? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 23:42:02 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Apr 2013 21:42:02 +0000 Subject: [issue17396] modulefinder fails if module contains syntax error In-Reply-To: <1363003425.82.0.865184669213.issue17396@psf.upfronthosting.co.za> Message-ID: <1367098922.1.0.982563027488.issue17396@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report and patch. Could you add a test? I?m not sure where this sits on the bug vs. feature line. ---------- nosy: +eric.araujo, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 23:44:18 2013 From: report at bugs.python.org (Ned Deily) Date: Sat, 27 Apr 2013 21:44:18 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367099058.74.0.881207722043.issue17857@psf.upfronthosting.co.za> Ned Deily added the comment: The patch does solve the build problem for 2.7 on 10.4 (Tiger). The same problem exists for 3.3 and default as well. I see the Tiger buildbots aren't failing with this problem; I suspect that's because there is a newer version of libsqlite3 being supplied in /usr/local/{include,lib}, like the OS X installer builds do since the Apple-supplied version of libsqlite3 in 10.4 is the ancient 3.1.3. ---------- stage: -> patch review versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 27 23:44:25 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 27 Apr 2013 21:44:25 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367094434.76.0.184829903088.issue17857@psf.upfronthosting.co.za> Message-ID: <517C46AE.7010108@egenix.com> Marc-Andre Lemburg added the comment: On 27.04.2013 22:27, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Here is a patch for 2.7. Please test. Should it be fixed on 3.x? Thanks, Serhiy. I can confirm that the patch fixes the problem with 2.7.4 on Mac OS X (and probably other platforms with old sqlite libs as well). Python 3.3 is not affected by this. It uses a Python type for storing the values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 00:03:29 2013 From: report at bugs.python.org (Jan Gosmann) Date: Sat, 27 Apr 2013 22:03:29 +0000 Subject: [issue17396] modulefinder fails if module contains syntax error In-Reply-To: <1363003425.82.0.865184669213.issue17396@psf.upfronthosting.co.za> Message-ID: <1367100209.19.0.423628812073.issue17396@psf.upfronthosting.co.za> Jan Gosmann added the comment: Could you point me to some documentation on how to add a test? I have not been involved in Python development so far. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 00:06:16 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 27 Apr 2013 22:06:16 +0000 Subject: [issue17396] modulefinder fails if module contains syntax error In-Reply-To: <1363003425.82.0.865184669213.issue17396@psf.upfronthosting.co.za> Message-ID: <1367100376.66.0.780503496781.issue17396@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 00:19:39 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Apr 2013 22:19:39 +0000 Subject: [issue17851] Grammar errors in threading.Lock documentation In-Reply-To: <1367038556.41.0.738438135734.issue17851@psf.upfronthosting.co.za> Message-ID: <1367101179.6.0.604982479416.issue17851@psf.upfronthosting.co.za> R. David Murray added the comment: I (as a native English speaker, FWIW) agree that the existing text is correct insofar as the reported problems go. I, however, would remove the comma after 'block'. I don't know that it is wrong as written, but it reads strangely to my ear. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 00:21:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Apr 2013 22:21:08 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1367101268.32.0.373931644009.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: Advantages of the patch. * finer control on how the buffer is allocated: only overallocate if the replacement string (while handling an encoding error) is longer than 1 character. The "replace" error handler should never use overallocation for example. Overallocation has a cost at the end of the encoder, because the buffer must be resized (shrink) * use a buffer allocated on the stack for short strings. I'm not really convinced of this optimization. The data is still copied when the result is converted to a bytes objects (PyBytes_FromStringAndSize). It may be interesting if the encoder has to handle one or more errors: no need to resize the buffer until we read the size of the small buffer (ex: 512 bytes). * handle correctly integer overflow: most encoders do not catch integer overflow errors and may fail to handle (very) long strings (ex: encoded string longer than PY_SSIZE_T_MAX). I'm not convinced that the patch would permit to design faster code. According to the assembler, it is the opposite (when "*writer.str++" is used in a loop). I don't know if it's possible to design a more efficient _PyBytesWriter API (to help GCC to generate more efficient machine code), nor if the overhead is important in a "normal case" (bench_encoders.py tests border cases, text with many many errors). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 00:28:56 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Apr 2013 22:28:56 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1367101736.74.0.746220323103.issue17742@psf.upfronthosting.co.za> STINNER Victor added the comment: Advantages of the patch. * finer control on how the buffer is allocated: only overallocate if the replacement string (while handling an encoding error) is longer than 1 byte/character. The "replace" error handler should never use overallocation for example. Overallocation (when misused, when it was not needed) has a cost at the end of the encoder, because the buffer must be resized (shrink) * use a buffer allocated on the stack for short strings. I'm not really convinced of this optimization. The data is still copied when the result is converted to a bytes objects (PyBytes_FromStringAndSize). It may be interesting if the encoder has to handle one or more errors: no need to resize the buffer until we reach the size of the small buffer (ex: 512 bytes). * handle correctly integer overflow: most encoders do not catch integer overflow errors and may fail to handle (very) long strings (ex: encoded string longer than PY_SSIZE_T_MAX). I'm not convinced that the patch would permit to design faster code. According to the assembler, it is the opposite (when "*writer.str++" is used in a loop). I don't know if it's possible to design a more efficient _PyBytesWriter API (to help GCC to generate more efficient machine code), nor if the overhead is important in a "normal case" (bench_encoders.py tests border cases, text with many many errors). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 00:29:18 2013 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Apr 2013 22:29:18 +0000 Subject: [issue17742] Add _PyBytesWriter API In-Reply-To: <1366063415.31.0.505871872027.issue17742@psf.upfronthosting.co.za> Message-ID: <1367101758.23.0.476667991882.issue17742@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- Removed message: http://bugs.python.org/msg187943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 00:58:05 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sat, 27 Apr 2013 22:58:05 +0000 Subject: [issue17858] Different documentation for identical methods Message-ID: <1367103485.02.0.041609834341.issue17858@psf.upfronthosting.co.za> New submission from Andriy Mysyk: Use _thread.Lock.acquire() documentation for threading.Lock.acquire(). threading.Lock inherits acquire() method from _thread.Lock. The two acquire() methods are identical in their functionality yet have different documentation. Documentation for threading.Lock.acquire() creates the impression that the function is more complex or harder to use than it actually is. See http://docs.python.org/devguide/documenting.html#economy-of-expression for guidelines. ---------- assignee: docs at python components: Documentation messages: 187945 nosy: amysyk, docs at python priority: normal severity: normal status: open title: Different documentation for identical methods type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 01:02:31 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sat, 27 Apr 2013 23:02:31 +0000 Subject: [issue17858] Different documentation for identical methods In-Reply-To: <1367103485.02.0.041609834341.issue17858@psf.upfronthosting.co.za> Message-ID: <1367103751.97.0.885702917858.issue17858@psf.upfronthosting.co.za> Andriy Mysyk added the comment: I am attaching a patch that applies _thread.Lock.acquire() documentation to the functionally identical threading.Lock.acquire(). ---------- keywords: +patch Added file: http://bugs.python.org/file30039/issue17858.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 01:35:23 2013 From: report at bugs.python.org (R. David Murray) Date: Sat, 27 Apr 2013 23:35:23 +0000 Subject: [issue17858] Different documentation for identical methods In-Reply-To: <1367103485.02.0.041609834341.issue17858@psf.upfronthosting.co.za> Message-ID: <1367105723.43.0.464240855546.issue17858@psf.upfronthosting.co.za> R. David Murray added the comment: For the record, both the _thread docs and the threading docs for acquire were updated in 01d1fd775d16 as part of issue 7316. Some at least of the differences come from 6ab4128acccc (issue 14823). That makes it likely that the threading docs are the better of the two. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 01:51:44 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sat, 27 Apr 2013 23:51:44 +0000 Subject: [issue17858] Different documentation for identical methods In-Reply-To: <1367103485.02.0.041609834341.issue17858@psf.upfronthosting.co.za> Message-ID: <1367106704.54.0.836621146441.issue17858@psf.upfronthosting.co.za> Andriy Mysyk added the comment: Issue 14823 indeed improved threading documentation. However, even with the improvement threading documentation makes acquire() appear to be more complex and harder to use than it actually is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 03:43:44 2013 From: report at bugs.python.org (Chris Calloway) Date: Sun, 28 Apr 2013 01:43:44 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1367113424.03.0.563459715229.issue15518@psf.upfronthosting.co.za> Changes by Chris Calloway : Removed file: http://bugs.python.org/file29758/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 03:59:18 2013 From: report at bugs.python.org (Chris Calloway) Date: Sun, 28 Apr 2013 01:59:18 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1367114358.73.0.1432310302.issue15518@psf.upfronthosting.co.za> Chris Calloway added the comment: I'm uploading a new patch which gets rid of the temp_cwd calls as suggested in the review. The patch is not complete in that the explanatory comments suggested in the review and revising the pre-existing tests have not been completed yet. However, I want to upload the work I do have as it has been a couple of weeks since reivew and I won't have another opportunity to complete the review suggestions until PUG project nights on May 7th and 8th. Also, I'm uploading this new patch because the previous patch had a serious problem that caused this delay. I happened to get a new laptop and used the previous patch to recreate the tests. I found that part of the new filecmpdata directory was missing when I did that and some of the tests failed as a result. It turns out that hg add and hg diff were not detecting all of filecmpdata. There's a well known problem with hg no detecting empty directories. However, this was not the case in this patch. Because I was able to workaround the problem by recreating all the dir-same directories and all their subdirectories, I think the problem is with hg not detecting directories with identical contents if the creation dates are the same. It's something I'll need to investigate more when this issue has been completed. ---------- Added file: http://bugs.python.org/file30040/issue-15518-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 04:46:47 2013 From: report at bugs.python.org (Ben Darnell) Date: Sun, 28 Apr 2013 02:46:47 +0000 Subject: [issue13721] ssl.wrap_socket on a connected but failed connection succeeds and .peer_certificate gives AttributeError In-Reply-To: <1325871512.71.0.286774610121.issue13721@psf.upfronthosting.co.za> Message-ID: <1367117207.57.0.834655607665.issue13721@psf.upfronthosting.co.za> Ben Darnell added the comment: We found a related issue with Tornado: https://github.com/facebook/tornado/pull/750 We call wrap_socket with do_handshake_on_connect=False and then call do_handshake when the socket is ready. If the getpeername call in wrap_socket fails with ENOTCONN because the connection was reset immediately after it was opened, then do_handshake will fail with an AttributeError (because self._sslobj is None). do_handshake should fail with a clearer error (perhaps socket.error with ENOTCONN or ECONNABORTED?) if self._sslobj is None. Also, Mac OS X appears to return EINVAL from getpeername in this case, instead of ENOTCONN. wrap_socket should probably treat ENOTCONN and EINVAL from getpeername as equivalent. ---------- nosy: +Ben.Darnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 04:49:41 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Apr 2013 02:49:41 +0000 Subject: [issue16104] Use multiprocessing in compileall script In-Reply-To: <1349124414.14.0.0730954283721.issue16104@psf.upfronthosting.co.za> Message-ID: <1367117381.41.0.267321546537.issue16104@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 04:52:52 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Apr 2013 02:52:52 +0000 Subject: [issue17115] __loader__ = None should be fine In-Reply-To: <1359910046.95.0.667824237181.issue17115@psf.upfronthosting.co.za> Message-ID: <1367117572.69.0.642065128701.issue17115@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -xml.parsers.expat.(errors|model) don't set the __loader__ attribute _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:20:53 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Apr 2013 03:20:53 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367119253.04.0.752457610441.issue17857@psf.upfronthosting.co.za> Ned Deily added the comment: Marc-Andre, can you elaborate on why you think Python 3 is not affected? The changes for Issue17073 also added sqlite3_int64 to 3.2, 3.3, and default and, for me on 10.4, _sqlite3.so currently fails to build in all three. (I don't think 3.2 is worth worrying about but if Georg does spin a brown bag 3.2.5 he could cherry pick it.) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:21:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 03:21:38 +0000 Subject: [issue17357] Add missing verbosity message to importlib In-Reply-To: <1362507829.49.0.31047461658.issue17357@psf.upfronthosting.co.za> Message-ID: <3ZyvRj6ffCz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 75e32a0bfd74 by Brett Cannon in branch '3.3': Issue #17357: Use more stern wording for http://hg.python.org/cpython/rev/75e32a0bfd74 New changeset 5fac0ac46f54 by Brett Cannon in branch 'default': merge for issue #17357 http://hg.python.org/cpython/rev/5fac0ac46f54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:22:50 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Apr 2013 03:22:50 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367119370.19.0.295121882093.issue17853@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just to clarify, the problem here isn't to do with referencing the class name in particular, it's referencing *any* lexically scoped name from the class body, when a metaclass wants to inject that as variable name in the class namespace. Here's a case where it silently looks up the wrong value: >>> class Meta(type): pass ... >>> def f(): ... outer = "lexically scoped" ... class inner(metaclass=Meta): ... print(outer) ... >>> f() lexically scoped >>> class Meta(type): ... def __prepare__(*args): ... return dict(outer="from metaclass") ... >>> f() lexically scoped That second one *should* say "from metaclass", but it doesn't because the LOAD_DEREF completely ignores the local namespace. You can get the same exception noted above by moving the assignment after the inner class definition: >>> def g(): ... class inner(metaclass=Meta): ... print(outer) ... outer = "This causes an exception" ... >>> g() Traceback (most recent call last): File "", line 1, in File "", line 2, in g File "", line 3, in inner NameError: free variable 'outer' referenced before assignment in enclosing scope We simply missed the fact that PEP 3115 and the __prepare__ method mean that using LOAD_DEREF to resolve lexically scoped names in a nested class is now wrong. Instead, we need a new opcode that first tries the class namespace and only if that fails does it fall back to looking it up in the lexically scoped cell reference. (I changed the affected versions, as even though this *is* a bug in all current Python 3 versions, there's no way we're going to change the behaviour of name resolution in a maintenance release) ---------- nosy: +ncoghlan title: class construction name resolution broken in functions -> Conflict between lexical scoping and name injection in __prepare__ versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:24:16 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Apr 2013 03:24:16 +0000 Subject: [issue17330] Stop checking for directory cache invalidation in importlib In-Reply-To: <1362163091.64.0.598022639655.issue17330@psf.upfronthosting.co.za> Message-ID: <1367119456.24.0.560322236231.issue17330@psf.upfronthosting.co.za> Brett Cannon added the comment: http://hg.python.org/cpython/rev/75e32a0bfd74 and http://hg.python.org/cpython/rev/5fac0ac46f54 have more stronger wording for importlib.invalidate_caches(). What's New already says to call the function without being wishy-washy, so I didn't touch it. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:24:48 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Apr 2013 03:24:48 +0000 Subject: [issue17330] Stop checking for directory cache invalidation in importlib In-Reply-To: <1362163091.64.0.598022639655.issue17330@psf.upfronthosting.co.za> Message-ID: <1367119488.86.0.984455522861.issue17330@psf.upfronthosting.co.za> Brett Cannon added the comment: And I have decided to not bother removing the stat check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:25:47 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Apr 2013 03:25:47 +0000 Subject: [issue15834] 2to3 benchmark not working under Python 3 In-Reply-To: <1346452040.3.0.632075344934.issue15834@psf.upfronthosting.co.za> Message-ID: <1367119547.62.0.144439049905.issue15834@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:29:11 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Apr 2013 03:29:11 +0000 Subject: [issue15834] 2to3 benchmark not working under Python 3 In-Reply-To: <1346452040.3.0.632075344934.issue15834@psf.upfronthosting.co.za> Message-ID: <1367119751.46.0.0254802335469.issue15834@psf.upfronthosting.co.za> Brett Cannon added the comment: Since lib3 now exists we should probably take advantage and just keep a translated, patched copy of 2to3 there to avoid this problem while keeping performance on an even keel for comparison. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:30:27 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 28 Apr 2013 03:30:27 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367119827.28.0.0397878780571.issue17853@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +benjamin.peterson versions: +Python 3.2, Python 3.3 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:36:07 2013 From: report at bugs.python.org (Ethan Furman) Date: Sun, 28 Apr 2013 03:36:07 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367119827.3.0.316773187526.issue17853@psf.upfronthosting.co.za> Message-ID: <517C9928.7050006@stoneleaf.us> Ethan Furman added the comment: Perhaps you and Benjamin should discuss that. :) I just read a thread on core-mentors about when a bug is fixed or not -- considering that the behavior is plain wrong, that workarounds will still work even if the bug is fixed, why shouldn't we fix it even in a maintenance release? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:37:58 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 28 Apr 2013 03:37:58 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367120278.41.0.496424420655.issue17853@psf.upfronthosting.co.za> Benjamin Peterson added the comment: There's no need for a discussion; the answer is no. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 05:47:54 2013 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Apr 2013 03:47:54 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367120874.39.0.209581560629.issue17853@psf.upfronthosting.co.za> Nick Coghlan added the comment: In this case, we won't fix it in a maintenance release because of the kind of change required to eliminate the bug. Adding a new opcode is likely to be the simplest fix and that is necessarily a backwards incompatible change (since older versions won't understand the new opcode). Even if we find a solution that doesn't require a new opcode, fixing the problem is going to require changes to both the compiler and the eval loop, and we simply don't touch those in maintenance releases without a *really* compelling reason. Fixing an edge case related to the interaction between two features that are already somewhat obscure on their own doesn't qualify. If anyone does decide to tackle this, I'll note that my examples in my previous post may be useful as inspiration for a test case - the final versions of both f() and g() should report "from metaclass" as the value of "outer" inside the class body, and it should be simple enough to replace the print statements with self.assertEqual() in a unit test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 06:19:07 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Apr 2013 04:19:07 +0000 Subject: [issue17396] modulefinder fails if module contains syntax error In-Reply-To: <1363003425.82.0.865184669213.issue17396@psf.upfronthosting.co.za> Message-ID: <1367122747.69.0.401114829475.issue17396@psf.upfronthosting.co.za> ?ric Araujo added the comment: Certainly: http://docs.python.org/devguide contains information to get the source code, describes the files layout and explains how to generate a patch. You?ll find existing unit tests in Lib/test/test_modulefinder.py Feel free to ask any question you might have on this bug, or if you prefer on the friendly core-mentorship mailing list (where I am). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 06:20:51 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Apr 2013 04:20:51 +0000 Subject: [issue17396] modulefinder fails if module contains syntax error In-Reply-To: <1363003425.82.0.865184669213.issue17396@psf.upfronthosting.co.za> Message-ID: <1367122851.59.0.788746936834.issue17396@psf.upfronthosting.co.za> ?ric Araujo added the comment: I would recommend that you base your patch on the default branch, i.e. what will become Python 3.4. If we judge that this is not a new feature but actually a bug fix, the core developer who commits the patch will take care of backporting it to 2.7 and 3.3. ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 06:43:12 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Apr 2013 04:43:12 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <1349800735.66.0.856769538072.issue16177@psf.upfronthosting.co.za> Message-ID: <1367124192.47.0.992846146709.issue16177@psf.upfronthosting.co.za> Ned Deily added the comment: Something that comes to mind: the stack traces in both issues show similar crashes where Tk is calling into OS X AppKit to create or modify a window. Since a left paren is being typed, it seems to me the most likely scenario is that the left paren is completing a recognized token and IDLE is attempting to display a calltip (Lib/idlelib/CallTipWindow.py). That shouldn't be a problem, of course. Also, note the exception class: NSInternalInconsistencyException. That sounds suspicious. I've found a few other reports, all from 10.8, of other non-Tk, non-Python apps with similar crashes. I'm still not able to reproduce it myself. Both reports here were with 10.8.2 and with ActiveTcl 8.5.11 or .12. Can anyone reproduce the crash with the current 10.8.3 and ActiveTcl 8.5.13, which does contain some significant fixes for OS X? And also, if so, verify that it is a calltip causing the problem? To check that, in either an IDLE shell or edit window, typing ( at the beginning of a line should not cause a calltip to be created so, if there is a connection, there should not be a crash. But then typing something like "open(" should cause a calltip to be created. A crash of this sort is almost certainly a problem in either OS X or in Tk and not Python. In any case, if we can't find a way to reproduce the problem reliably, there isn't much we can do about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 07:46:09 2013 From: report at bugs.python.org (Kushal Das) Date: Sun, 28 Apr 2013 05:46:09 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument In-Reply-To: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> Message-ID: <1367127969.42.0.31490082195.issue17842@psf.upfronthosting.co.za> Kushal Das added the comment: Bytearray encoding and decoding ---------- Added file: http://bugs.python.org/file30041/issue17842_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 07:53:09 2013 From: report at bugs.python.org (Catalin Patulea) Date: Sun, 28 Apr 2013 05:53:09 +0000 Subject: [issue15139] Speed up threading.Condition wakeup In-Reply-To: <1340379512.47.0.965576630558.issue15139@psf.upfronthosting.co.za> Message-ID: <1367128389.77.0.859227018377.issue15139@psf.upfronthosting.co.za> Changes by Catalin Patulea : ---------- nosy: +Catalin.Patulea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 07:57:55 2013 From: report at bugs.python.org (Ethan Furman) Date: Sun, 28 Apr 2013 05:57:55 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367120874.39.0.209581560629.issue17853@psf.upfronthosting.co.za> Message-ID: <517CBA65.7030606@stoneleaf.us> Ethan Furman added the comment: Nick, thanks for the explanation. Benjamin, I was referring to Nick taking 3.3 and 3.2 off the issue and leaving 3.4, and you reversing it. ;) Sorry for the confusion -- I just reread my post and the words there didn't match the ideas in my head at the time very well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 08:02:19 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Apr 2013 06:02:19 +0000 Subject: [issue17858] Different documentation for identical methods In-Reply-To: <1367103485.02.0.041609834341.issue17858@psf.upfronthosting.co.za> Message-ID: <1367128939.94.0.667884339966.issue17858@psf.upfronthosting.co.za> Georg Brandl added the comment: This patch includes changes from #17851, please remove that (but you can remove the comma after "block"). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 08:08:57 2013 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 28 Apr 2013 06:08:57 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367129337.49.0.651981438218.issue17853@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 09:33:07 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 28 Apr 2013 07:33:07 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: <1367088398.06.0.271092795297.issue17852@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > It used to be a consistently reliable behavior in Python 2 (and we made it so in PyPy too), provided of course that the process exits normally; but it no longer is in Python 3. Well I can see the reasons for not flushing files, if it's clearly documented somewhere as a change of behavior from Python 2. When you say Python 2, I assume you mean CPython 2, right? Because - AFAICT - files got flushed only by accident, not by design. For example, I suspect that Jython doesn't flush files on exit (since the JVM doesn't), and I guess IronPython neither. > However I'm complaining about the current behavior: files are flushed *most of the time*. That's the problem with implementation-defined behavior ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 09:36:27 2013 From: report at bugs.python.org (Roger Serwy) Date: Sun, 28 Apr 2013 07:36:27 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1367134587.37.0.843145173138.issue17838@psf.upfronthosting.co.za> Roger Serwy added the comment: I agree with Serhiy that the patch should be updated to better explain why the extra reference to stdin was being held. The attached patch provides that update in case anyone considers applying it in the future. Terry, are you suggesting that the code should read like "sys.__stdin__ = sys.stdin" within MyHandler in Lib/idlelib/run.py ? ---------- Added file: http://bugs.python.org/file30042/hold_stdin_rev1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 09:37:56 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 28 Apr 2013 07:37:56 +0000 Subject: [issue17859] improve error message for saving ints to file Message-ID: <1367134676.21.0.161863892006.issue17859@psf.upfronthosting.co.za> New submission from anatoly techtonik: I needed to write some bytes to file and got this message. >>> hex = open('hex', 'wb') >>> for x in range(0, 0xff, 0x11): ... hex.write(x) ... Traceback (most recent call last): File "", line 2, in TypeError: 'int' does not support the buffer interface The cause of the error is not that 'int' doesn't support some interface (which is strange already, because the function analyzes and writes int, not the int writes itself), but because it is impossible to know how many binary bytes the int type should take when written. In Python 2 the solution is: ... hex.write(chr(x)) But in Python 3 this is again: TypeError: 'str' does not support the buffer interface In Python 3 the solution is: ... hex.write(x.to_bytes(1, 'little')) ---------- messages: 187968 nosy: techtonik priority: normal severity: normal status: open title: improve error message for saving ints to file versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 09:40:28 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Apr 2013 07:40:28 +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: <1367134828.71.0.874509548552.issue17806@psf.upfronthosting.co.za> Ezio Melotti added the comment: Without patch: $ ./python -m timeit -s 'et = "a\tb\tc\td\te".expandtabs' 'et()' 1000000 loops, best of 3: 0.672 usec per loop $ ./python -m timeit -s 'et = "a\tb\tc\td\te".expandtabs' 'et(4)' 1000000 loops, best of 3: 0.744 usec per loop $ ./python -m timeit -s 'et = "a\tb\tc\td\te".expandtabs' 'et(8)' 1000000 loops, best of 3: 0.762 usec per loop $ ./python -m timeit -s 'et = "a\tb\tc\td\te".expandtabs' 'et()' 1000000 loops, best of 3: 0.658 usec per loop $ ./python -m timeit -s 'et = "a\tb\tc\td\te".expandtabs' 'et(4)' 1000000 loops, best of 3: 0.73 usec per loop $ ./python -m timeit -s 'et = "a\tb\tc\td\te".expandtabs' 'et(8)' 1000000 loops, best of 3: 0.769 usec per loop $ ./python -m timeit -s 'et = "a\tb\tc\td\te".expandtabs' 'et(tabsize=4)' 1000000 loops, best of 3: 1.84 usec per loop $ ./python -m timeit -s 'et = "a\tb\tc\td\te".expandtabs' 'et(tabsize=8)' 1000000 loops, best of 3: 1.89 usec per loop If "tabsize" is not used the performances seem the same, if it's used it's 2-3 times slower. I don't think expandtabs is used in performance-critical paths, but if it is the patch shouldn't affect it as long as people don't add "tabsize" to the call. FTR the reason to add this is consistency (Python functions allow you to pass positional args as keywords too) and readability (s.expandtabs(3) might be read as "expand at most 3 tabs" or something else). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 09:47:54 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Apr 2013 07:47:54 +0000 Subject: [issue17859] improve error message for saving ints to file In-Reply-To: <1367134676.21.0.161863892006.issue17859@psf.upfronthosting.co.za> Message-ID: <1367135274.02.0.671828174045.issue17859@psf.upfronthosting.co.za> Ezio Melotti added the comment: Maybe the error could be replaced with something like: TypeError: write() requires an object that supports the buffer interface, not '' But that's a bit long and also not entirely accurate, because the type accepted by write depends on the type of the file (binary or text). The first problem could be solved by using "requires a bytes-like object"[0], the second problem could be fixed by omitting the name of the function: TypeError: a bytes-like object is required, not '' [0]: #16518 has a discussion about the best term to describe "objects that support the buffer protocol" ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 10:44:21 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 28 Apr 2013 08:44:21 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367119253.04.0.752457610441.issue17857@psf.upfronthosting.co.za> Message-ID: <517CE163.7090300@egenix.com> Marc-Andre Lemburg added the comment: On 28.04.2013 05:20, Ned Deily wrote: > > Ned Deily added the comment: > > Marc-Andre, can you elaborate on why you think Python 3 is not affected? The changes for Issue17073 also added sqlite3_int64 to 3.2, 3.3, and default and, for me on 10.4, _sqlite3.so currently fails to build in all three. (I don't think 3.2 is worth worrying about but if Georg does spin a brown bag 3.2.5 he could cherry pick it.) Oh, I just did a grep on the Python 3.3.0 code base and couldn't find any hits. Was the issue you mentioned applied to the 3.3.1 dot release ? If so, then those new mentions will have to be fixed as well, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 10:46:05 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 28 Apr 2013 08:46:05 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1367138765.43.0.258365525829.issue16518@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 10:46:44 2013 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 28 Apr 2013 08:46:44 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367138804.93.0.854752828614.issue17825@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- components: +Interpreter Core, Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 12:03:44 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Apr 2013 10:03:44 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367143424.68.0.209787787652.issue17857@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 12:08:20 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Apr 2013 10:08:20 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367143700.34.0.0680603909438.issue17857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch for issue14572 was applied only to 2.7 and then I backported the bug back from 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 12:45:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Apr 2013 10:45:33 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1367145933.7.0.00562266318646.issue17838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Last patch LGTM. With keeping a reference in sys.__stdin__ we will encounter same issue. sys.stdin = None sys.__stdin__ = None # close! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 13:17:56 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 11:17:56 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <3Zz61H4g9JzNVK@mail.python.org> Roundup Robot added the comment: New changeset 44fe1f5b07e3 by Serhiy Storchaka in branch '2.7': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/44fe1f5b07e3 New changeset b677f656c0bf by Serhiy Storchaka in branch '3.3': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/b677f656c0bf New changeset 19015fc0c338 by Serhiy Storchaka in branch 'default': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/19015fc0c338 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 13:17:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 11:17:57 +0000 Subject: [issue14572] 2.7.3: sqlite module does not build on centos 5 and Mac OS X 10.4 In-Reply-To: <1334354952.88.0.487562486207.issue14572@psf.upfronthosting.co.za> Message-ID: <3Zz61J35Z6zNVK@mail.python.org> Roundup Robot added the comment: New changeset 44fe1f5b07e3 by Serhiy Storchaka in branch '2.7': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/44fe1f5b07e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 13:17:57 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 11:17:57 +0000 Subject: [issue17073] Integer overflow in sqlite module In-Reply-To: <1359478908.69.0.671503350697.issue17073@psf.upfronthosting.co.za> Message-ID: <3Zz61K1RsPzPCx@mail.python.org> Roundup Robot added the comment: New changeset 44fe1f5b07e3 by Serhiy Storchaka in branch '2.7': Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, http://hg.python.org/cpython/rev/44fe1f5b07e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 13:19:14 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Apr 2013 11:19:14 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument In-Reply-To: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> Message-ID: <1367147954.55.0.768751434808.issue17842@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 14:41:27 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 28 Apr 2013 12:41:27 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367152887.78.0.567631401668.issue17853@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 14:58:36 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 12:58:36 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument In-Reply-To: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> Message-ID: <3Zz8FS2KpNz7LjR@mail.python.org> Roundup Robot added the comment: New changeset 6e57d097ae56 by Serhiy Storchaka in branch '2.7': Issue #17842. Added base64 module tests with bytearray arguments. http://hg.python.org/cpython/rev/6e57d097ae56 New changeset 44edbea21640 by Serhiy Storchaka in branch '3.3': Issue #17842. Added base64 module tests with bytearray arguments. http://hg.python.org/cpython/rev/44edbea21640 New changeset f7f6c2ea4b14 by Serhiy Storchaka in branch 'default': Issue #17842. Added base64 module tests with bytearray arguments. http://hg.python.org/cpython/rev/f7f6c2ea4b14 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 14:59:29 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Apr 2013 12:59:29 +0000 Subject: [issue17659] no way to determine First weekday (based on locale) In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1367153969.4.0.108561539383.issue17659@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the patch. We'll be interested in the results of your research, certainly. Windows support would also be a question we'd probably want to consider before deciding whether or not to add this. I've added MAL as nosy since I suspect he'll have thoughts about the API, as well as the appropriateness of the feature. ---------- nosy: +lemburg stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 15:11:55 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Apr 2013 13:11:55 +0000 Subject: [issue12220] minidom xmlns not handling spaces in xmlns attribute value field In-Reply-To: <1306789573.92.0.875996944294.issue12220@psf.upfronthosting.co.za> Message-ID: <1367154715.34.0.496913968395.issue12220@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the patch. It would be nice to have a test before we commit this. The tests should use assertRaisesRegex to look for something specific to this error...probably the word 'syntax'...in the error text. On the other hand, if the spaces are technically legal, is calling it a syntax error appropriate? Perhaps the message should instead say something like "spaces in URIs is not supported"? ---------- nosy: +r.david.murray versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 15:17:12 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Apr 2013 13:17:12 +0000 Subject: [issue1727418] xmlrpclib waits indefinately Message-ID: <1367155032.58.0.0577056667015.issue1727418@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for verifying this, Adam. ---------- nosy: +r.david.murray resolution: -> out of date stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 16:11:34 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Apr 2013 14:11:34 +0000 Subject: [issue17724] urllib -- add_handler method refactoring for clarity In-Reply-To: <1365887848.07.0.0995479400533.issue17724@psf.upfronthosting.co.za> Message-ID: <1367158294.5.0.197537580824.issue17724@psf.upfronthosting.co.za> R. David Murray added the comment: I presume you closed this bug yourself because you decided it probably wasn't worth applying it? I'm inclined to agree. Cleaning up the code would be nice, but since the existing code works fine, changing it *just* to clean it up probably isn't worth the code churn or the chance of introducing an unexpected new bug. If we were also fixing a bug while doing the rewrite, it would be a different story. So I'll try to keep this patch in mind if we have occasion to fix anything in that code. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 16:36:39 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 28 Apr 2013 14:36:39 +0000 Subject: [issue17860] subprocess docs lack info how to use output result Message-ID: <1367159799.26.0.456231833917.issue17860@psf.upfronthosting.co.za> New submission from anatoly techtonik: http://docs.python.org/3/library/subprocess.html A common confusion is that result from subprocess calls in Python 3 is bytes, not string, and needs to be converted. The problem is complicated because you need to know the encoding of input/output streams. This should be documented at least. http://stackoverflow.com/questions/606191/convert-byte-array-to-python-string ---------- assignee: docs at python components: Documentation messages: 187982 nosy: docs at python, techtonik priority: normal severity: normal status: open title: subprocess docs lack info how to use output result versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 16:39:13 2013 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Apr 2013 14:39:13 +0000 Subject: [issue17860] subprocess docs lack info how to use output result In-Reply-To: <1367159799.26.0.456231833917.issue17860@psf.upfronthosting.co.za> Message-ID: <1367159953.51.0.741468429284.issue17860@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, haypo stage: -> needs patch type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 17:04:20 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 28 Apr 2013 15:04:20 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367161460.48.0.954502491006.issue17853@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Nick, care to review? ---------- keywords: +patch Added file: http://bugs.python.org/file30043/classderef.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 17:06:05 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Apr 2013 15:06:05 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1367161565.62.0.498059433568.issue17839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which allows bytes-like arguments in the base64 module. I just removed type checking if underlying function raises an exception with an appropriate message. I'm not sure about b32encode(), perhaps we can left an exception from memoryview(). ---------- Added file: http://bugs.python.org/file30044/base64_buffer_input.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 17:09:49 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Apr 2013 15:09:49 +0000 Subject: [issue17842] Add base64 module tests for a bytearray argument In-Reply-To: <1366887014.03.0.146233163462.issue17842@psf.upfronthosting.co.za> Message-ID: <1367161789.2.0.57407108625.issue17842@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Committed. Thank you for the patch. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 17:14:49 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 28 Apr 2013 15:14:49 +0000 Subject: [issue17861] put opcode information in one place Message-ID: <1367162089.6.0.986391601417.issue17861@psf.upfronthosting.co.za> New submission from Benjamin Peterson: Right now, opcode information is duplicated in Include/opcode.h and Lib/opcode.py. I should only have to update one manually and have the other one generated automatically. opcode.h should probably be generated by a script from opcode.py. ---------- components: Interpreter Core keywords: easy messages: 187986 nosy: benjamin.peterson priority: normal severity: normal stage: needs patch status: open title: put opcode information in one place type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 17:31:26 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 15:31:26 +0000 Subject: [issue7152] urllib2.build_opener() skips ProxyHandler In-Reply-To: <1255720004.18.0.991850721386.issue7152@psf.upfronthosting.co.za> Message-ID: <3ZzCdn3bH2z7LjV@mail.python.org> Roundup Robot added the comment: New changeset f2472fb98457 by R David Murray in branch '3.3': #7152: Clarify that ProxyHandler is added only if proxy settings are detected. http://hg.python.org/cpython/rev/f2472fb98457 New changeset aca80409ecdd by R David Murray in branch 'default': Merge #7152: Clarify that ProxyHandler is added only if proxy settings are detected. http://hg.python.org/cpython/rev/aca80409ecdd New changeset 27999a389742 by R David Murray in branch '2.7': #7152: Clarify that ProxyHandler is added only if proxy settings are detected. http://hg.python.org/cpython/rev/27999a389742 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 17:36:05 2013 From: report at bugs.python.org (Ethan Furman) Date: Sun, 28 Apr 2013 15:36:05 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367161460.48.0.954502491006.issue17853@psf.upfronthosting.co.za> Message-ID: <517D41E6.2090400@stoneleaf.us> Ethan Furman added the comment: Thanks, Benjamin. Looking at that patch I realize the fix was way beyond my current core-hacking skills. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 17:58:44 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 15:58:44 +0000 Subject: [issue17358] imp.load_module() leads to the improper caching of the 'file' argument In-Reply-To: <1362511985.74.0.511214026015.issue17358@psf.upfronthosting.co.za> Message-ID: <3ZzDFH6G6dzRfH@mail.python.org> Roundup Robot added the comment: New changeset 3dcc81c2eef5 by Brett Cannon in branch '3.3': Issue #17358: imp.load_source() and load_compiled() should now return http://hg.python.org/cpython/rev/3dcc81c2eef5 New changeset be6bbc9f0561 by Brett Cannon in branch 'default': merge for issue #17358 http://hg.python.org/cpython/rev/be6bbc9f0561 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:00:24 2013 From: report at bugs.python.org (Brett Cannon) Date: Sun, 28 Apr 2013 16:00:24 +0000 Subject: [issue17358] imp.load_module() leads to the improper caching of the 'file' argument In-Reply-To: <1362511985.74.0.511214026015.issue17358@psf.upfronthosting.co.za> Message-ID: <1367164824.95.0.171562399758.issue17358@psf.upfronthosting.co.za> Brett Cannon added the comment: I figured out why testing was difficult; the file is only read from if it's necessary. That means if you are trying to load source which has bytecode available which is legitimate it will simply skip over the source and read from the bytecode. So in the end I just fixed it without a test since it's for a marginal case for a deprecated module. Plus the fix is rather simple and still passed the test suite. ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:01:00 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Apr 2013 16:01:00 +0000 Subject: [issue17659] no way to determine First weekday (based on locale) In-Reply-To: <1365410883.64.0.172005963141.issue17659@psf.upfronthosting.co.za> Message-ID: <1367164860.15.0.101646436659.issue17659@psf.upfronthosting.co.za> ?ric Araujo added the comment: If I read the patch correctly, the code can return 0 if Monday is the first weekday as indicated by glibc, or as a fallback. I think there should be a difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:07:21 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Apr 2013 16:07:21 +0000 Subject: [issue12220] minidom xmlns not handling spaces in xmlns attribute value field In-Reply-To: <1306789573.92.0.875996944294.issue12220@psf.upfronthosting.co.za> Message-ID: <1367165241.84.0.475866990231.issue12220@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'unsupported syntax' would be more accurate, but I agree that saying what it is that is unsupported is even better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:08:51 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Apr 2013 16:08:51 +0000 Subject: [issue7152] urllib2.build_opener() skips ProxyHandler In-Reply-To: <1255720004.18.0.991850721386.issue7152@psf.upfronthosting.co.za> Message-ID: <1367165331.8.0.543371610319.issue7152@psf.upfronthosting.co.za> ?ric Araujo added the comment: Patch adds a mention of DataHandler, that code doesn?t have yet. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:12:42 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Apr 2013 16:12:42 +0000 Subject: [issue17859] improve error message for saving ints to file In-Reply-To: <1367134676.21.0.161863892006.issue17859@psf.upfronthosting.co.za> Message-ID: <1367165562.33.0.883592988706.issue17859@psf.upfronthosting.co.za> ?ric Araujo added the comment: I don?t understand that the first message says. If one wants to call the write method of a file object opened in binary mode, one needs to pass bytes, as the doc surely explains. The same error that is seen here with ints would be seen with any other objects. A more practical way is to use print (with its file, sep and end parameters) which will do the conversion for you. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:13:10 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 28 Apr 2013 16:13:10 +0000 Subject: [issue17862] itertools.chunks(iterable, size, fill=None) Message-ID: <1367165590.04.0.46648726654.issue17862@psf.upfronthosting.co.za> New submission from anatoly techtonik: The history: 2007 - http://bugs.python.org/issue1502 2009 - http://bugs.python.org/issue6021 I'd like to resurrect this proposal again, but name it: itertools.chunks(iterable, size, fill=None) Two reasons. 1. practicality - top itertools request on StackOverflow http://stackoverflow.com/search?tab=votes&q=%5bpython%5d%20%2bitertools 2. performance the time should be a constant for a fixed-length iterable regardless of a size of chunk, but in fact the time is proportional to the size of chunk {{{ import timeit print timeit.timeit( 'grouper(30000, "x"*400000)', setup='from __main__ import grouper', number=1000 ) print timeit.timeit( 'grouper(300000, "x"*400000)', setup='from __main__ import grouper', number=1000 ) }}} 1.52581005407 14.6219704599 Addressing odd length user stories from msg87745: 1. no exceptions - odd end is an easy check if you need it 2. fill-in value - provided 3. truncation - just don't set fill-in value 3.1. if you really need fill-in as None, then an itertools.TRUNCATE value can be used as a truncation parameter 4. partially filled-in tuple - not sure what that means Raymond, your opinion is critical here. =) ---------- components: Library (Lib) messages: 187995 nosy: rhettinger, techtonik priority: normal severity: normal status: open title: itertools.chunks(iterable, size, fill=None) versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:14:45 2013 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Apr 2013 16:14:45 +0000 Subject: [issue17860] subprocess docs lack info how to use output result In-Reply-To: <1367159799.26.0.456231833917.issue17860@psf.upfronthosting.co.za> Message-ID: <1367165685.23.0.793844948961.issue17860@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Actually stdin/stdout/stderr are string streams if universal_newline is True ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:22:11 2013 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Apr 2013 16:22:11 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367166131.18.0.313612491484.issue17853@psf.upfronthosting.co.za> Mark Dickinson added the comment: What's the purpose of the CLASS_FREE #definition? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:25:05 2013 From: report at bugs.python.org (Kushal Das) Date: Sun, 28 Apr 2013 16:25:05 +0000 Subject: [issue17861] put opcode information in one place In-Reply-To: <1367162089.6.0.986391601417.issue17861@psf.upfronthosting.co.za> Message-ID: <1367166305.73.0.422198363453.issue17861@psf.upfronthosting.co.za> Kushal Das added the comment: Here is a simple script which prints the opcode.h in console. We can redirect it as required. ---------- nosy: +kushaldas Added file: http://bugs.python.org/file30045/generate_opcode_h.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:45:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 16:45:39 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <3ZzFHQ2h3LzRpD@mail.python.org> Roundup Robot added the comment: New changeset b7bfedc8ee18 by Nadeem Vawda in branch '2.7': Issue #17843: Remove bz2 test data that triggers antivirus warnings. http://hg.python.org/cpython/rev/b7bfedc8ee18 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:51:21 2013 From: report at bugs.python.org (Kushal Das) Date: Sun, 28 Apr 2013 16:51:21 +0000 Subject: [issue17861] put opcode information in one place In-Reply-To: <1367162089.6.0.986391601417.issue17861@psf.upfronthosting.co.za> Message-ID: <1367167881.46.0.0608290957432.issue17861@psf.upfronthosting.co.za> Kushal Das added the comment: Second version of the script with the fix for HAVE_ARGUMENT ---------- Added file: http://bugs.python.org/file30046/generate_opcode_h.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:53:38 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Apr 2013 16:53:38 +0000 Subject: [issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements In-Reply-To: <1286939996.87.0.346411752414.issue10079@psf.upfronthosting.co.za> Message-ID: <1367168017.99.0.435909172553.issue10079@psf.upfronthosting.co.za> Terry J. Reedy added the comment: With PEP343 accepted, we can apply changes more uniformly. I think each of the changes listed should be separate issues with separate review, as most already are (msg149930). "Run a script without saving it first." I am sure this has been mentioned on at least 1 other issue, but I cannot find an issue devoted to this. "The "PseudoStderrFile" in PyShell.py brings the shell forward if an error occurs." The PseudoFiles were updated last fall. Has this behavior been added? ---------- nosy: +terry.reedy versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 18:54:54 2013 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Apr 2013 16:54:54 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1367168094.33.0.616724461148.issue17843@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, you are right. Python 3.3.1 doesn't contain the file in question, just 2.7.4 and 3.2.4. Could you update Misc/NEWS, too? The release notes should mention that a false positive virus warning was removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 19:01:41 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 17:01:41 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <3ZzFdt74q0zSwc@mail.python.org> Roundup Robot added the comment: New changeset 529c4defbfd7 by Nadeem Vawda in branch '2.7': Add missing NEWS entry for issue #17843. http://hg.python.org/cpython/rev/529c4defbfd7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 19:02:28 2013 From: report at bugs.python.org (Andriy Mysyk) Date: Sun, 28 Apr 2013 17:02:28 +0000 Subject: [issue17858] Different documentation for identical methods In-Reply-To: <1367103485.02.0.041609834341.issue17858@psf.upfronthosting.co.za> Message-ID: <1367168548.49.0.598447445172.issue17858@psf.upfronthosting.co.za> Andriy Mysyk added the comment: Apologies. I did not mean to include 17851 changes. Removed the changes, leaving out the comma after "block" in the attached patch. ---------- Added file: http://bugs.python.org/file30047/issue17858.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 19:05:33 2013 From: report at bugs.python.org (Kushal Das) Date: Sun, 28 Apr 2013 17:05:33 +0000 Subject: [issue17861] put opcode information in one place In-Reply-To: <1367162089.6.0.986391601417.issue17861@psf.upfronthosting.co.za> Message-ID: <1367168733.85.0.45991387076.issue17861@psf.upfronthosting.co.za> Kushal Das added the comment: Third revision with fixed empty spaces at the end of the lines. ---------- Added file: http://bugs.python.org/file30048/generate_opcode_h.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 19:12:52 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Apr 2013 17:12:52 +0000 Subject: [issue17863] Bad sys.stdin assignment hands interpreter. Message-ID: <1367169172.83.0.786523829005.issue17863@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This appears to be Python 3 specific. On 2.7.4 (Win7): >>> import sys >>> sys.stdin='abd' >>> With fresh 3.4 repository debug build, prompt never appears, ^C, ^D are ignored. Must close with window's [X] button. With fresh 3.3, get repeated [62312 refs] lines. One could guess that they are generated but suppressed in 3.4. There is a possibility that this is specific to debug builds; I cannot currently build or run one for 2.7. However, there is no problem with Idle running (on Windows) with 3.3/3.4 pythonw-d. (In other words, see same behavior as 2.7 above.) ---------- messages: 188006 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Bad sys.stdin assignment hands interpreter. type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 19:14:08 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 28 Apr 2013 17:14:08 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367169248.88.0.972563978631.issue17853@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 19:22:02 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 28 Apr 2013 17:22:02 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1367169722.92.0.780265267591.issue17843@psf.upfronthosting.co.za> Nadeem Vawda added the comment: OK, 2.7 is done. Georg, what do we want to do for 3.2? I've attached a patch. ---------- assignee: nadeem.vawda -> georg.brandl keywords: +patch Added file: http://bugs.python.org/file30049/bz2-viruswarning.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 19:38:02 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 28 Apr 2013 17:38:02 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367170682.47.0.474437555808.issue17853@psf.upfronthosting.co.za> Benjamin Peterson added the comment: That's superflous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 19:47:32 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Apr 2013 17:47:32 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1367171252.46.0.709762136156.issue17838@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Roger: yes. This solves immediate problem and makes Idle more like console interpreter. Same should be done for all three. Serhiy: the sole and documented purpose of sys.__stdxyz__ is to serve as backup bindings for the three i/o streams, so rebinding them is senseless. I would be willing to say 'you get what you deserve if you do that'. But since console tolerates double rebinding, we can make Idle do so too. Again, same should be done for all three streams. See attached patch. It seems to work, but someone please recheck for typos. Are we sure that binding streams to handler object cannot cause problems, such as during shutdown with atexit handlers? ---------- Added file: http://bugs.python.org/file30050/Terry17838.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 20:22:09 2013 From: report at bugs.python.org (Alejandro Rodas) Date: Sun, 28 Apr 2013 18:22:09 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1367173329.83.0.015248604181.issue17642@psf.upfronthosting.co.za> Alejandro Rodas added the comment: I have made a patch to zoom in and out with and events, respectively. I'll upload it soon since the test suite is giving me an error in test_multiprocessing, even before writing the patch. I have taken a look at ZoomFont.py of IdleX and it also has the option to reset the font size to its original value, but I don't know if this feature was wanted to be added too. However, ZoomFont controls the size of the LineNumber extension, while this patch only changes the font of the editview's text widget. ---------- nosy: +alex.rodas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 20:22:17 2013 From: report at bugs.python.org (Ben Read) Date: Sun, 28 Apr 2013 18:22:17 +0000 Subject: [issue17864] IDLE won't run Message-ID: <1367173337.57.0.3678200637.issue17864@psf.upfronthosting.co.za> New submission from Ben Read: I am installing Python 3.31 on a Mac running OS 10.8.2 and have already installed ActiveTCL 8.5.13. When I try and launch IDLE, the icon appears on the dock for a second and then disappears and the application doesn't run. I have already installed both Python and Active TCL in the same way on two other Macs and it has run just fine, so I don't know why it's not running on this one. Is there anything specific that would cause this to happen? Thanks, Ben ---------- components: IDLE messages: 188011 nosy: Bozdog priority: normal severity: normal status: open title: IDLE won't run type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 20:52:28 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Apr 2013 18:52:28 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367175148.68.0.653093890702.issue17857@psf.upfronthosting.co.za> Ned Deily added the comment: Fix verified on OS X 10.4 for 2.7, 3.3, and default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:04:23 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Apr 2013 19:04:23 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367173337.57.0.3678200637.issue17864@psf.upfronthosting.co.za> Message-ID: <1367175863.79.0.193587966223.issue17864@psf.upfronthosting.co.za> Ned Deily added the comment: How are you trying to launch IDLE? Also, use the Console.app (in /Applications/Utilites) to examine system.log to see if there are any error messages produced there when you attempt to launch IDLE. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:06:57 2013 From: report at bugs.python.org (Nathan Housel) Date: Sun, 28 Apr 2013 19:06:57 +0000 Subject: [issue1722] Undocumented urllib functions In-Reply-To: <1199298780.6.0.893928826633.issue1722@psf.upfronthosting.co.za> Message-ID: <1367176017.05.0.151903006677.issue1722@psf.upfronthosting.co.za> Nathan Housel added the comment: This has been fixed in trunk, the split* methods have documentation and appear in the module docs. See: >>> help('urllib') ---------- nosy: +plasticgap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:15:03 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Apr 2013 19:15:03 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1367176503.97.0.750518534454.issue17843@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, I've got it from here. ---------- versions: -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:17:01 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Apr 2013 19:17:01 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1367176621.61.0.985736770043.issue15535@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:19:00 2013 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 28 Apr 2013 19:19:00 +0000 Subject: [issue17860] subprocess docs lack info how to use output result In-Reply-To: <1367165685.23.0.793844948961.issue17860@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: > > > Actually stdin/stdout/stderr are string streams if universal_newline is > True > I believe that makes the issue even worse. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:19:44 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Apr 2013 19:19:44 +0000 Subject: [issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8 In-Reply-To: <1364240036.0.0.495843553762.issue17547@psf.upfronthosting.co.za> Message-ID: <1367176784.49.0.522604085381.issue17547@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:20:44 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Apr 2013 19:20:44 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1367176844.32.0.185559119263.issue17192@psf.upfronthosting.co.za> Georg Brandl added the comment: Greg? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:22:52 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Apr 2013 19:22:52 +0000 Subject: [issue17123] Add OCSP support to ssl module In-Reply-To: <1359994472.8.0.804183286731.issue17123@psf.upfronthosting.co.za> Message-ID: <1367176972.41.0.220089632248.issue17123@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 21:27:28 2013 From: report at bugs.python.org (Georg Brandl) Date: Sun, 28 Apr 2013 19:27:28 +0000 Subject: [issue17425] Update OpenSSL versions in Windows builds In-Reply-To: <1363299017.8.0.243503203176.issue17425@psf.upfronthosting.co.za> Message-ID: <1367177248.9.0.807778701841.issue17425@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 22:21:06 2013 From: report at bugs.python.org (Ben Read) Date: Sun, 28 Apr 2013 20:21:06 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367175863.79.0.193587966223.issue17864@psf.upfronthosting.co.za> Message-ID: <858AE916-4E6C-4EDB-8A42-072B96F9EBA4@denmarkfarmbarn.co.uk> Ben Read added the comment: Hi there, I'm launching IDLE from Applications in Finder (double clicking the application file). I've tried doing this while Console is open and the response is: 28/04/2013 21:17:19.271 Dock[167]: no information back from LS about running process Thanks, Ben On 28 Apr 2013, at 20:04, Ned Deily wrote: > > Ned Deily added the comment: > > How are you trying to launch IDLE? Also, use the Console.app (in /Applications/Utilites) to examine system.log to see if there are any error messages produced there when you attempt to launch IDLE. > > ---------- > nosy: +ned.deily > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 22:45:29 2013 From: report at bugs.python.org (Abhishek Kumar) Date: Sun, 28 Apr 2013 20:45:29 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1367181929.53.0.340912346328.issue17642@psf.upfronthosting.co.za> Abhishek Kumar added the comment: I have submitted a patch that is working fine on Windows and on Ubuntu. I have used ZoomFont.py of IdleX. On pressing Ctrl+ or Ctrl- it changes the user configuration and updates the font of all open windows as there is a common user configuration for all windows. I have removed polling from CodeContext instead I set font of CodeContext on every font change. As this is my first patch. Please review it and give your valuable feedback. ---------- keywords: +patch nosy: +Abhishek.Kumar Added file: http://bugs.python.org/file30051/issue17642_patch2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 22:48:31 2013 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 28 Apr 2013 20:48:31 +0000 Subject: [issue17425] Update OpenSSL versions in Windows builds In-Reply-To: <1363299017.8.0.243503203176.issue17425@psf.upfronthosting.co.za> Message-ID: <1367182111.35.0.919641286649.issue17425@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Please don't reopen issues. If there is a bug in the current setup, please submit a new reporting indicating what the problem is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 22:59:07 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Apr 2013 20:59:07 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367173337.57.0.3678200637.issue17864@psf.upfronthosting.co.za> Message-ID: <1367182747.09.0.61314424976.issue17864@psf.upfronthosting.co.za> Ned Deily added the comment: OK, assuming you are using a default install of Python 3.3.1, try opening a terminal window (Terminal.app) and launching IDLE from there by typing: /usr/local/bin/python3.3 -c 'import sys;print(sys.version)' /usr/local/bin/python3.3 -m idlelib and report what messages you see there. Also, are there any other messages with "com.apple.launchd.peruser" or "org.python.IDLE" immediately before that one? You can use Console.app to see if there are any relevant crash reports under User Diagnostic Reports. You could use Activity Monitor.app to see if there is already an IDLE or Python process running. If you can, try logging -out and -in and/or rebooting. And which Python 3.3.1 did you install: from the python.org 3.3.1 64-bit/32-bit installer, from the python.org 3.3.1 32-bit-only installer, or from somewhere else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 23:07:34 2013 From: report at bugs.python.org (Roundup Robot) Date: Sun, 28 Apr 2013 21:07:34 +0000 Subject: [issue7152] urllib2.build_opener() skips ProxyHandler In-Reply-To: <1255720004.18.0.991850721386.issue7152@psf.upfronthosting.co.za> Message-ID: <3ZzM5d2sSNz7LkT@mail.python.org> Roundup Robot added the comment: New changeset 5da7bb478dd9 by R David Murray in branch '2.7': #7152: Remove incorrectly added reference to DataHandler. http://hg.python.org/cpython/rev/5da7bb478dd9 New changeset 122d42d5268e by R David Murray in branch '3.3': #7152: Remove incorrectly added reference to DataHandler. http://hg.python.org/cpython/rev/122d42d5268e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 23:08:51 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Apr 2013 21:08:51 +0000 Subject: [issue7152] urllib2.build_opener() skips ProxyHandler In-Reply-To: <1255720004.18.0.991850721386.issue7152@psf.upfronthosting.co.za> Message-ID: <1367183331.42.0.487767818998.issue7152@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Jessica. I reworded it slightly, since the proxy setting can come from things other than environment variables on Windows and OSX. Also found one other place it needed to be mentioned, and fixed up the punctuation on one of the pre-existing sentences. And thanks for the catch on DataHandler, ?ric. ---------- nosy: +r.david.murray resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 23:10:19 2013 From: report at bugs.python.org (Claudiu.Popa) Date: Sun, 28 Apr 2013 21:10:19 +0000 Subject: [issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple In-Reply-To: <1366659454.45.0.422161537493.issue17818@psf.upfronthosting.co.za> Message-ID: <1367183419.09.0.0231151777736.issue17818@psf.upfronthosting.co.za> Claudiu.Popa added the comment: I've modified the patch according to your comments, thanks! Now the result of getparams() is picklable again. ---------- Added file: http://bugs.python.org/file30052/aifc_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 23:21:26 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Apr 2013 21:21:26 +0000 Subject: [issue17860] subprocess docs lack info how to use output result In-Reply-To: <1367159799.26.0.456231833917.issue17860@psf.upfronthosting.co.za> Message-ID: <1367184086.66.0.578348569125.issue17860@psf.upfronthosting.co.za> R. David Murray added the comment: Anatoly, do you have a specific suggestion for improved wording? This *is* documented in the subprocess documentation, in several appropriate places, including the fact that the appropriate encoding to use may need to be determined at the application level. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 23:32:34 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Apr 2013 21:32:34 +0000 Subject: [issue17863] Bad sys.stdin assignment hands interpreter. In-Reply-To: <1367169172.83.0.786523829005.issue17863@psf.upfronthosting.co.za> Message-ID: <1367184754.83.0.680961929564.issue17863@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed, in both 3.3.0 non-debug and 3.4 tip debug, python starts consuming 100% of the CPU. I'm guessing there is some subtlety involving the new IO system involved here. Python 2.7 debug build acts as you indicate for your 2.7 non-debug build. All my tests are on linux, and I had to kill -HUP the python process. As you say, ctl-C (and ctl-D, not surprisingly) were ignored. ---------- nosy: +pitrou, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 28 23:40:11 2013 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Apr 2013 21:40:11 +0000 Subject: [issue17859] improve error message for saving ints to file In-Reply-To: <1367134676.21.0.161863892006.issue17859@psf.upfronthosting.co.za> Message-ID: <1367185211.72.0.55988048329.issue17859@psf.upfronthosting.co.za> R. David Murray added the comment: ?ric, print doesn't help if one is writing binary data. What do you mean by not understanding the first message? If you are agreeing that the first error message in Anatoly's initial post isn't clear, does Ezio's proposed change make it clearer? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 00:04:42 2013 From: report at bugs.python.org (Ben Read) Date: Sun, 28 Apr 2013 22:04:42 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367182747.09.0.61314424976.issue17864@psf.upfronthosting.co.za> Message-ID: <85B28845-E597-4DFB-9887-07BC1AEB95D5@denmarkfarmbarn.co.uk> Ben Read added the comment: In response to the first command: 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 11:07:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] ?and the second command: Warning: unable to create user config directory /Users/ben/.idlerc Check path and permissions. Exiting! I've checked console and activity monitor and cannot see any further reference to IDLE. The message I sent previously was the only one shown in 'All Messages' after a marker I added to know where to start from. I downloaded Python 3.31 from the official site and selected the 64bit version. I ran the ActiveTCL 8.5.13 download first. Thanks, Ben On 28 Apr 2013, at 21:59, Ned Deily wrote: > > Ned Deily added the comment: > > OK, assuming you are using a default install of Python 3.3.1, try opening a terminal window (Terminal.app) and launching IDLE from there by typing: > > /usr/local/bin/python3.3 -c 'import sys;print(sys.version)' > /usr/local/bin/python3.3 -m idlelib > > and report what messages you see there. > > Also, are there any other messages with "com.apple.launchd.peruser" or "org.python.IDLE" immediately before that one? You can use Console.app to see if there are any relevant crash reports under User Diagnostic Reports. You could use Activity Monitor.app to see if there is already an IDLE or Python process running. If you can, try logging -out and -in and/or rebooting. And which Python 3.3.1 did you install: from the python.org 3.3.1 64-bit/32-bit installer, from the python.org 3.3.1 32-bit-only installer, or from somewhere else? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 00:43:41 2013 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Apr 2013 22:43:41 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367173337.57.0.3678200637.issue17864@psf.upfronthosting.co.za> Message-ID: <1367189021.31.0.851960140066.issue17864@psf.upfronthosting.co.za> Ned Deily added the comment: That's really odd. It looks you have a permissions problem with your home directory. On startup, IDLE attempts to create the directory .idlerc in your home directory, /Users/ben, if it doesn't exist already. If for some reason the directory creation fails, IDLE aborts. Interestingly, if the directory exists but IDLE lacks write permission to create files in it, it does not abort but posts a warning message in a window. Perhaps it could be a little more consistent about that. But still, this appears to be avery unusual situation. I can't think of any reason why IDLE would be unable to create a directory unless you have some security system installed or some unusual access control list setting. The most likely reason is just a plain old permission problem on your home directory. Try this in a terminal session: cd ~ ls -lde ~ You should see something similar to this: drwxr-xr-x+ 38 nad staff 2992 Apr 28 15:26 /Users/nad/ 0: group:everyone deny delete if the permissions string is missing the "w" ("dr-xr-x"), that means you do not have write permission to your home directory and can't create new directories there. In that case, mkdir ~/.idlerc should fail. (This is essentially what IDLE is trying to do.) If you are missing write permission on your home directory, you *should* be able to fix it by doing: chmod u+w ~ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 01:08:47 2013 From: report at bugs.python.org (Alejandro Rodas) Date: Sun, 28 Apr 2013 23:08:47 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1367190527.88.0.100510171137.issue17642@psf.upfronthosting.co.za> Alejandro Rodas added the comment: I have uploaded my patch as well, it doesn't make use of tkfont (just vanilla Tkinter methods) and it works both in Python 2.7 and 3.4 without the need of any import. I think the main difference with Abhishek Kumar's version is that mine does not use idleConf to retrieve and set the font size. However, the original ZoomFont.py of IdleX does not use it. Is it really necessary? ---------- Added file: http://bugs.python.org/file30053/ZoomInOut.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 01:10:16 2013 From: report at bugs.python.org (Alejandro Rodas) Date: Sun, 28 Apr 2013 23:10:16 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1367190616.52.0.380973712963.issue17642@psf.upfronthosting.co.za> Changes by Alejandro Rodas : Removed file: http://bugs.python.org/file30053/ZoomInOut.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 01:17:29 2013 From: report at bugs.python.org (Alejandro Rodas) Date: Sun, 28 Apr 2013 23:17:29 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1367191049.09.0.672372968735.issue17642@psf.upfronthosting.co.za> Alejandro Rodas added the comment: Sorry, I submitted a patch which only works on Windows. This one has been tested on Ubuntu too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 03:41:33 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Apr 2013 01:41:33 +0000 Subject: [issue17863] Bad sys.stdin assignment hands interpreter. In-Reply-To: <1367169172.83.0.786523829005.issue17863@psf.upfronthosting.co.za> Message-ID: <1367199693.93.0.871441636565.issue17863@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In searching for an existing issue about this, there seemed to be other edge-case stdin problems. I don't think that they were all usage errors. This problem was revealed by an accidental usage error that should have lain dormant until an exception was raised upon first use by input() (as happened in 2.7). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 05:29:26 2013 From: report at bugs.python.org (Ellen Wang) Date: Mon, 29 Apr 2013 03:29:26 +0000 Subject: [issue17865] PowerPC exponentiation and round() interaction Message-ID: <1367206166.88.0.195054463405.issue17865@psf.upfronthosting.co.za> New submission from Ellen Wang: This is only on a PowerPC, specifically a p2020, running Debian 7.0 wheezy, python 2.7.3. Calling round() seems to corrupt something (in the floating point state?) that causes subsequent exponentiation (the ** operator) to be wrong: Python 2.7.3 (default, Jan 2 2013, 16:38:11) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 2 ** -2 0.25 >>> round(1) 1.0 >>> 2 ** -2 0.1253019036571362 Cool. Huh? ---------- components: Library (Lib) files: math.py messages: 188033 nosy: squeakbat priority: normal severity: normal status: open title: PowerPC exponentiation and round() interaction type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file30054/math.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 05:57:10 2013 From: report at bugs.python.org (Ellen Wang) Date: Mon, 29 Apr 2013 03:57:10 +0000 Subject: [issue17865] PowerPC exponentiation and round() interaction In-Reply-To: <1367206166.88.0.195054463405.issue17865@psf.upfronthosting.co.za> Message-ID: <1367207830.24.0.11213032389.issue17865@psf.upfronthosting.co.za> Ellen Wang added the comment: Here's an example that uses only math library functions and float literals, presumably with a simpler code path: Python 2.7.3 (default, Jan 2 2013, 16:38:11) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> math.exp(-2.0) 0.1353352832366127 >>> math.ceil(1.0) 1.0 >>> math.exp(-2.0) 0.23902241864785234 By the way, the equivalent C program (using exp() and ceil()) on the same platform behaves correctly, so it's not an obvious libc or fpu problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 06:04:18 2013 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 29 Apr 2013 04:04:18 +0000 Subject: [issue15518] Provide test coverage for filecmp.dircmp.report methods. In-Reply-To: <1343786533.33.0.657671203467.issue15518@psf.upfronthosting.co.za> Message-ID: <1367208258.45.0.963918102447.issue15518@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the heads up Chris. Since I'm a bit busy myself lately, it's fine to wait until you have time to complete the patch. I'll review it then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 07:06:47 2013 From: report at bugs.python.org (Kushal Das) Date: Mon, 29 Apr 2013 05:06:47 +0000 Subject: [issue17826] Setting a side_effect on mock from create_autospec doesn't work In-Reply-To: <1366797608.02.0.0150366437779.issue17826@psf.upfronthosting.co.za> Message-ID: <1367212007.86.0.272605719659.issue17826@psf.upfronthosting.co.za> Kushal Das added the comment: Version 2 of the patch, with typo fixed also one more addition test to check callable side effect in create_autospec. ---------- Added file: http://bugs.python.org/file30055/issue17826_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 07:45:35 2013 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 29 Apr 2013 05:45:35 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1367214335.28.0.24491978271.issue16631@psf.upfronthosting.co.za> anatoly techtonik added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:01:55 2013 From: report at bugs.python.org (paul j3) Date: Mon, 29 Apr 2013 07:01:55 +0000 Subject: [issue16142] ArgumentParser inconsistent with parse_known_args In-Reply-To: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> Message-ID: <1367218915.36.0.347731327946.issue16142@psf.upfronthosting.co.za> paul j3 added the comment: Correction: The patch I gave in the last message produces: >>> parser.parse_known_args(['-ku']) (Namespace(known=False), ['u']) It doesn't take action on the '-k', and puts 'u' in extras, not '-u'. This new patch gets it right: >>> parser.parse_known_args(['-ku']) (Namespace(known=True), ['-u']) We need more test cases, including ones that work as expected with optparse or other unix parsers. ---------- Added file: http://bugs.python.org/file30056/dashku.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:06:09 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 07:06:09 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1367219169.73.0.655204506893.issue16631@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:13:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 07:13:04 +0000 Subject: [issue17865] PowerPC exponentiation and round() interaction In-Reply-To: <1367206166.88.0.195054463405.issue17865@psf.upfronthosting.co.za> Message-ID: <1367219584.49.0.985600412981.issue17865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can't reproduce this on 2.7.4. Could you please test 2.7.4? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:13:31 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Apr 2013 07:13:31 +0000 Subject: [issue17865] PowerPC exponentiation and round() interaction In-Reply-To: <1367206166.88.0.195054463405.issue17865@psf.upfronthosting.co.za> Message-ID: <1367219611.17.0.0737641173962.issue17865@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:21:10 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Apr 2013 07:21:10 +0000 Subject: [issue17865] PowerPC exponentiation and round() interaction In-Reply-To: <1367206166.88.0.195054463405.issue17865@psf.upfronthosting.co.za> Message-ID: <1367220070.38.0.884568365289.issue17865@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm: it's not an obvious Python bug, either: both math.exp and math.ceil are simple wrappers around the libm functions, so there's little room for things to go wrong between Python and the OS. Are you in a position to compile Python from source on your platform? What was the equivalent C program you tried? What's the compiler on this platform? Note that gcc (I believe) evaluates math function calls for constants at compile time (using MPFR), rather than run time, which would mean if your C program simply does "exp(-2.0);" then it's not even using the OS libm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:22:14 2013 From: report at bugs.python.org (Ben Read) Date: Mon, 29 Apr 2013 07:22:14 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367189021.31.0.851960140066.issue17864@psf.upfronthosting.co.za> Message-ID: <957B7EEE-B0FF-4434-BD67-7465CDED9313@denmarkfarmbarn.co.uk> Ben Read added the comment: I've tried this and it looks like write access is already enabled, but I entered the commands you listed all the same - here's the output: Bens-iMac:~ ben$ cd Bens-iMac:~ ben$ ls -lde drwxr-xr-x 28 temp staff 952 28 Apr 18:46 . Bens-iMac:~ ben$ mkdir /.idlerc mkdir: /.idlerc: Permission denied Bens-iMac:~ ben$ chmod u+w usage: chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a [i][# [ n]]] mode|entry file ... chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ... Bens-iMac:~ ben$ mkdir /.idlerc mkdir: /.idlerc: Permission denied On 28 Apr 2013, at 23:43, Ned Deily wrote: > > Ned Deily added the comment: > > That's really odd. It looks you have a permissions problem with your home directory. On startup, IDLE attempts to create the directory .idlerc in your home directory, /Users/ben, if it doesn't exist already. If for some reason the directory creation fails, IDLE aborts. Interestingly, if the directory exists but IDLE lacks write permission to create files in it, it does not abort but posts a warning message in a window. Perhaps it could be a little more consistent about that. But still, this appears to be avery unusual situation. I can't think of any reason why IDLE would be unable to create a directory unless you have some security system installed or some unusual access control list setting. The most likely reason is just a plain old permission problem on your home directory. Try this in a terminal session: > > cd ~ > ls -lde ~ > > You should see something similar to this: > drwxr-xr-x+ 38 nad staff 2992 Apr 28 15:26 /Users/nad/ > 0: group:everyone deny delete > > if the permissions string is missing the "w" ("dr-xr-x"), that means you do not have write permission to your home directory and can't create new directories there. In that case, > > mkdir ~/.idlerc > > should fail. (This is essentially what IDLE is trying to do.) > > If you are missing write permission on your home directory, you *should* be able to fix it by doing: > > chmod u+w ~ > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:23:23 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 07:23:23 +0000 Subject: [issue17865] PowerPC exponentiation and round() interaction In-Reply-To: <1367206166.88.0.195054463405.issue17865@psf.upfronthosting.co.za> Message-ID: <1367220203.06.0.455618819869.issue17865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, sorry, I missed PowerPC. Please ignore my previous comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:25:07 2013 From: report at bugs.python.org (Miguel Latorre) Date: Mon, 29 Apr 2013 07:25:07 +0000 Subject: [issue11632] difflib.unified_diff loses context In-Reply-To: <1300788570.13.0.524020554804.issue11632@psf.upfronthosting.co.za> Message-ID: <1367220307.47.0.318736544844.issue11632@psf.upfronthosting.co.za> Miguel Latorre added the comment: This bug is still present in python 2.7.4 and python 3.3.1. I attach another example, the result differs depending on number of lines to process (see test.py). ---------- nosy: +mal versions: +Python 2.7, Python 3.3 Added file: http://bugs.python.org/file30057/test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 09:26:34 2013 From: report at bugs.python.org (Ellen Wang) Date: Mon, 29 Apr 2013 07:26:34 +0000 Subject: [issue17865] PowerPC exponentiation and round() interaction In-Reply-To: <1367206166.88.0.195054463405.issue17865@psf.upfronthosting.co.za> Message-ID: <1367220394.46.0.0658002763473.issue17865@psf.upfronthosting.co.za> Ellen Wang added the comment: OK. My bad. I should have been tipped off that the program didn't need -lm to link. Output from C code: 0.135335 1 0.239022 Feel free to close. I'll have to look into this on my own. Thanks and sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:01:29 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Apr 2013 08:01:29 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 Message-ID: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> New submission from Ronald Oussoren: assertItemsEqual was added to unittest.TestCase in Python 2.7 (according to the documentation), but is not present in Python 3.3. I'd expect it to be present in 3.3 as well, or for it to be mentioned in documentation as not being present (either in the 2.7 documentation or the Misc/NEWS file for py3k) ---------- components: Library (Lib) messages: 188045 nosy: ronaldoussoren priority: normal severity: normal status: open title: TestCase.assertItemsEqual exists in 2.7, not in 3.3 versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:15:18 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 08:15:18 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367223318.84.0.993066751809.issue17866@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't remember how it went exactly, but there were a few similar methods (assertItemsEqual, assertSameElements, assertCountEqual). In 3.x we eventually decide to remove the first 2 because it wasn't clear what they were doing, and only assertCountEqual survived. In 2.7 this wasn't possible, so assertItemsEqual survived. assertDictContainsSubset is another method that was in 2.7 but is not in 3.x anymore. Do you think the docs for 2.x should mention this? ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:33:18 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Apr 2013 08:33:18 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367224398.14.0.647536617271.issue17866@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I do think this should be mentioned in the 2.7 docs, assertDictContainsSubset is mentioned as "deprecated since 3.2" in the 2.7 docs. The only problem with that is that there doesn't seem to be a "versionremoved" directive in sphinx, the best alternative seems to be deprecated-removed. I'm not to happy about the removal though, assertCountEqual is not in 2.7 which means it is unnecessarily hard to port tests from 2.7 to 3.3. I also don't quite understand the difference between assertCountEqual and assetItemsEqual, the documentation for the two (in the 3.3 and 2.7 docs) appears to indicate they have the same behavior (both assert that two sequence have the same contents when the order of items is ignored). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:36:45 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Apr 2013 08:36:45 +0000 Subject: [issue17865] PowerPC exponentiation and round() interaction In-Reply-To: <1367206166.88.0.195054463405.issue17865@psf.upfronthosting.co.za> Message-ID: <1367224605.51.0.060794473586.issue17865@psf.upfronthosting.co.za> Mark Dickinson added the comment: No problem; thanks for the update. By the way, if you do file an OS bug report of some form, it would be great if you could add a link to this issue. That might help anyone who encounters this in Python in the future. Closing. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:37:01 2013 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 29 Apr 2013 08:37:01 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367224621.94.0.780282006373.issue17866@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:40:28 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 08:40:28 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367224828.8.0.147766026805.issue17866@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think they might actually be the same (i.e. the name changed but not the implementation). See #10242. If this is true the new name could be mentioned in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:41:12 2013 From: report at bugs.python.org (Miroslav Stampar) Date: Mon, 29 Apr 2013 08:41:12 +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: <1367224872.94.0.479583847167.issue17849@psf.upfronthosting.co.za> Miroslav Stampar added the comment: This trivial "patch" solved the issue (reported back by user): def _(self, *args): return self._readline() httplib.LineAndFileWrapper._readline = httplib.LineAndFileWrapper.readline httplib.LineAndFileWrapper.readline = _ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:42:48 2013 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 29 Apr 2013 08:42:48 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1367224968.68.0.601358549642.issue10242@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 10:59:55 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Apr 2013 08:59:55 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367225995.5.0.460725981453.issue17866@psf.upfronthosting.co.za> Ronald Oussoren added the comment: You're right, according to #10242 the method was renamed in 3.2. Something like the attached patch? I'm somewhat flabbergasted that #10242 came to the conclusion that it would be a good idea to rename this method, given the folks that contributed the discussion. It not that the new name is very good, I've seen it in the 3.3 docs and didn't notice that it was relevant for what I was trying to do until you mentioned the method and I actually read the description. When I first saw the method I thought it was related to list.count. ---------- Added file: http://bugs.python.org/file30058/issue17866.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 11:08:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 09:08:55 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367226535.08.0.142350592062.issue17866@psf.upfronthosting.co.za> Ezio Melotti added the comment: Apparently assertItemsEqual was added to 2.7 and 3.2 and, after the release of 2.7 but before the release of 3.2, assertItemsEqual has been renamed assertCountEqual (596239da3db7) and initially the assertItemsEqual was available too. However, since the method was new in 3.2 the old alias got removed shortly after (bdd57841f5e2). Eventually 3.2 was released with only assertCountEqual. ---------- keywords: +patch Added file: http://bugs.python.org/file30059/issue17866.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 11:19:46 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 09:19:46 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367227186.38.0.0635334796593.issue17866@psf.upfronthosting.co.za> Ezio Melotti added the comment: Looks like we wrote a similar patch at the same time :) We don't usually use versionchanged in the 2.x docs for things that changed in 3.x. Using "named" instead of "renamed" is better, since in 3.x the name was assertCountEqual since the beginning, however saying "In Python 3.2" might be confusing (people might think that it's different for 3.3+). I suggest to replace it with simply "Python 3", or perhaps "Python 3.2+". ---------- Added file: http://bugs.python.org/file30060/issue17866-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 11:22:46 2013 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 29 Apr 2013 09:22:46 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367227366.6.0.0272391935106.issue17866@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Your patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 11:26:13 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Apr 2013 09:26:13 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <3ZzgTw3M7tz7LjS@mail.python.org> Roundup Robot added the comment: New changeset d9921cb6e3cd by Ezio Melotti in branch '2.7': #17866: mention that in Python 3, assertItemsEqual is named assertCountEqual. http://hg.python.org/cpython/rev/d9921cb6e3cd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 11:27:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 09:27:15 +0000 Subject: [issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3 In-Reply-To: <1367222489.01.0.284119799467.issue17866@psf.upfronthosting.co.za> Message-ID: <1367227635.21.0.247365552848.issue17866@psf.upfronthosting.co.za> Ezio Melotti added the comment: Applied. ---------- assignee: docs at python -> ezio.melotti components: -Library (Lib) resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 11:37:12 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Apr 2013 09:37:12 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367173337.57.0.3678200637.issue17864@psf.upfronthosting.co.za> Message-ID: <1367228232.5.0.0455787528283.issue17864@psf.upfronthosting.co.za> Ned Deily added the comment: The "ls" shows that, for some reason, your home directory is owned by user "temp", not by user "ben". That's not good. Try doing this: sudo chown ben /Users/ben/ But we're way past an IDLE or Python problem here. This is a basic Unix system administration issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:02:11 2013 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 29 Apr 2013 10:02:11 +0000 Subject: [issue17851] Grammar errors in threading.Lock documentation In-Reply-To: <1367074119.36.0.629399233605.issue17851@psf.upfronthosting.co.za> Message-ID: Ramchandra Apte added the comment: I'm saying that they aren't valid grammar mistakes (there is no grammar mistake). I agree with Georg Brandl's comment. On 27 April 2013 20:18, Andriy Mysyk wrote: > > Andriy Mysyk added the comment: > > Ramachandra, if I understand you correctly, I think what you are saying > that both are grammar mistakes and the first one could addressed by adding > "s" to block. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:15:23 2013 From: report at bugs.python.org (Dmi Baranov) Date: Mon, 29 Apr 2013 10:15:23 +0000 Subject: [issue17867] Deleting __import__ from builtins can crash Python3 Message-ID: <1367230523.7.0.186873626934.issue17867@psf.upfronthosting.co.za> New submission from Dmi Baranov: Simple case - let's delete __import__ and try to import anything $ python3.3 Python 3.3.0 (default, Oct 7 2012, 11:03:52) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> del __builtins__.__dict__['__import__'] >>> import os Traceback (most recent call last): File "", line 1, in Fatal Python error: __import__ missing Current thread 0x00007f07c9ebc700: Aborted But in python2.x $ python2.7 Python 2.7.3 (default, Sep 22 2012, 02:37:18) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> del __builtins__.__dict__['__import__'] >>> import os Traceback (most recent call last): File "", line 1, in ImportError: __import__ not found >>> ---------- components: Interpreter Core messages: 188059 nosy: Dmi.Baranov priority: normal severity: normal status: open title: Deleting __import__ from builtins can crash Python3 type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:21:07 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 10:21:07 +0000 Subject: [issue17867] Deleting __import__ from builtins can crash Python3 In-Reply-To: <1367230523.7.0.186873626934.issue17867@psf.upfronthosting.co.za> Message-ID: <1367230867.2.0.299337521045.issue17867@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +brett.cannon, ezio.melotti stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:28:27 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 10:28:27 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1367231307.48.0.559058069596.issue17834@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:36:17 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 10:36:17 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1367231777.14.0.244922374088.issue17834@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Daniel, I've already been in the process of adding a class to the heapq module and have done substantial work on it over the last few months. I'll look at your code to see if there are any ideas that should be merged with it before I finish it up. Am attaching my current draft for Heap(). A PriorityQueue() variant would also be added to 3.4. ---------- Added file: http://bugs.python.org/file30061/heap2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:37:44 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 10:37:44 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1367231864.04.0.279983481802.issue17834@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See also http://bugs.python.org/issue17794 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:47:14 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 10:47:14 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1367232434.55.0.365802042687.issue17834@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Daniel, I'm going to close this one so we can continue work in just a single tracker item: http://bugs.python.org/issue17794 I'll see if anything in your code should be merged in to mine and will list you as a co-contributor when it all goes in. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:47:31 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 10:47:31 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1367232451.03.0.160517940694.issue17834@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg188061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:50:54 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 10:50:54 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1367232654.93.0.549334203385.issue15535@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Antoine] > I would like to call this a critical regression. I concur. I will post the suggested fix with tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 12:54:52 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 10:54:52 +0000 Subject: [issue13742] Add a key parameter (like sorted) to heapq.merge In-Reply-To: <1326105342.42.0.0197399269422.issue13742@psf.upfronthosting.co.za> Message-ID: <1367232892.63.0.196080287857.issue13742@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: low -> normal Added file: http://bugs.python.org/file30062/heap2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 13:01:35 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 11:01:35 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1367233295.5.0.479639594738.issue15535@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Amaury, please go ahead and apply your patch. ---------- assignee: rhettinger -> amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 13:02:02 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 11:02:02 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1367233322.58.0.898753682858.issue15535@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg188063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 13:05:40 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 11:05:40 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1367233540.52.0.253684517973.issue17834@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Daniel, I'm going to close this one so we can continue work in just a single tracker item: http://bugs.python.org/issue13742 I'll see if anything in your code should be merged in to mine and will list you as a co-contributor when it all goes in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 13:05:54 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 11:05:54 +0000 Subject: [issue17834] Add Heap (and DynamicHeap) classes to heapq module In-Reply-To: <1366829553.37.0.470727650744.issue17834@psf.upfronthosting.co.za> Message-ID: <1367233554.05.0.559666543584.issue17834@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg188062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 13:36:59 2013 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 29 Apr 2013 11:36:59 +0000 Subject: [issue17867] Deleting __import__ from builtins can crash Python3 In-Reply-To: <1367230523.7.0.186873626934.issue17867@psf.upfronthosting.co.za> Message-ID: <1367235419.07.0.0844356794272.issue17867@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 13:38:30 2013 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 29 Apr 2013 11:38:30 +0000 Subject: [issue15535] Fix pickling efficiency of named tuples in 2.7.3 In-Reply-To: <1343915086.31.0.252328658724.issue15535@psf.upfronthosting.co.za> Message-ID: <1367235510.88.0.590418929779.issue15535@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 13:43:35 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 11:43:35 +0000 Subject: [issue13742] Add a key parameter (like sorted) to heapq.merge In-Reply-To: <1326105342.42.0.0197399269422.issue13742@psf.upfronthosting.co.za> Message-ID: <1367235815.75.0.199846466161.issue13742@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file30063/heap2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 13:43:52 2013 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Apr 2013 11:43:52 +0000 Subject: [issue13742] Add a key parameter (like sorted) to heapq.merge In-Reply-To: <1326105342.42.0.0197399269422.issue13742@psf.upfronthosting.co.za> Message-ID: <1367235832.56.0.0433373144262.issue13742@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file30062/heap2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 14:14:03 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Apr 2013 12:14:03 +0000 Subject: [issue13742] Add a key parameter (like sorted) to heapq.merge In-Reply-To: <1326105342.42.0.0197399269422.issue13742@psf.upfronthosting.co.za> Message-ID: <1367237643.89.0.345469780262.issue13742@psf.upfronthosting.co.za> Mark Dickinson added the comment: heap2.diff contains only a single line's change. Wrong file attached? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 14:14:41 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Apr 2013 12:14:41 +0000 Subject: [issue13742] Add a key parameter (like sorted) to heapq.merge In-Reply-To: <1326105342.42.0.0197399269422.issue13742@psf.upfronthosting.co.za> Message-ID: <1367237681.16.0.772504903152.issue13742@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah, I see the new file now (I'd failed to refresh my browser); sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 14:15:14 2013 From: report at bugs.python.org (Dmi Baranov) Date: Mon, 29 Apr 2013 12:15:14 +0000 Subject: [issue17867] Deleting __import__ from builtins can crash Python3 In-Reply-To: <1367230523.7.0.186873626934.issue17867@psf.upfronthosting.co.za> Message-ID: <1367237714.46.0.78115020175.issue17867@psf.upfronthosting.co.za> Dmi Baranov added the comment: Another example of post-effects: >>> del __builtins__.__dict__['__import__'] >>> 1/0 Traceback (most recent call last): File "", line 1, in Fatal Python error: __import__ missing Current thread 0x00007f3db64fd700: Aborted ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 14:50:02 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 29 Apr 2013 12:50:02 +0000 Subject: [issue17867] Deleting __import__ from builtins can crash Python3 In-Reply-To: <1367230523.7.0.186873626934.issue17867@psf.upfronthosting.co.za> Message-ID: <1367239802.64.0.457889186449.issue17867@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Technically its not a crash but a fatal error. That's not to say its desirable, of course. :) ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 15:08:42 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Apr 2013 13:08:42 +0000 Subject: [issue17867] Deleting __import__ from builtins can crash Python3 In-Reply-To: <1367230523.7.0.186873626934.issue17867@psf.upfronthosting.co.za> Message-ID: <3ZzmQd2YTFz7LkZ@mail.python.org> Roundup Robot added the comment: New changeset 08ce30768003 by Benjamin Peterson in branch '3.3': raise an ImportError (rather than fatal) when __import__ is not found in __builtins__ (closes #17867) http://hg.python.org/cpython/rev/08ce30768003 ---------- nosy: +python-dev resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 15:12:32 2013 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 29 Apr 2013 13:12:32 +0000 Subject: [issue17863] Bad sys.stdin assignment hangs interpreter. In-Reply-To: <1367169172.83.0.786523829005.issue17863@psf.upfronthosting.co.za> Message-ID: <1367241152.14.0.226637465412.issue17863@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox title: Bad sys.stdin assignment hands interpreter. -> Bad sys.stdin assignment hangs interpreter. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 16:23:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Apr 2013 14:23:39 +0000 Subject: [issue17863] Bad sys.stdin assignment hangs interpreter. In-Reply-To: <1367169172.83.0.786523829005.issue17863@psf.upfronthosting.co.za> Message-ID: <3Zzp564pnGzQZ8@mail.python.org> Roundup Robot added the comment: New changeset 68d1ac152b5d by Benjamin Peterson in branch '3.3': ignore errors when trying to fetch sys.stdin.encoding (closes #17863) http://hg.python.org/cpython/rev/68d1ac152b5d New changeset 97522b189c79 by Benjamin Peterson in branch 'default': merge 3.3 (#17863) http://hg.python.org/cpython/rev/97522b189c79 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 16:33:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 14:33:25 +0000 Subject: [issue17861] put opcode information in one place In-Reply-To: <1367162089.6.0.986391601417.issue17861@psf.upfronthosting.co.za> Message-ID: <1367246005.27.0.49597687507.issue17861@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 16:33:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 14:33:59 +0000 Subject: [issue17839] base64 module should use memoryview In-Reply-To: <1366875154.79.0.0782227735295.issue17839@psf.upfronthosting.co.za> Message-ID: <1367246039.86.0.610490623569.issue17839@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 17:03:35 2013 From: report at bugs.python.org (Roger Serwy) Date: Mon, 29 Apr 2013 15:03:35 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367173337.57.0.3678200637.issue17864@psf.upfronthosting.co.za> Message-ID: <1367247815.26.0.793176325423.issue17864@psf.upfronthosting.co.za> Roger Serwy added the comment: This looks like a duplicate of issue8231. ---------- nosy: +roger.serwy type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 17:11:28 2013 From: report at bugs.python.org (Kyle Roberts) Date: Mon, 29 Apr 2013 15:11:28 +0000 Subject: [issue17673] add `copy_from` argument to temporaryfile In-Reply-To: <1365502798.91.0.357173988008.issue17673@psf.upfronthosting.co.za> Message-ID: <1367248288.34.0.731919592439.issue17673@psf.upfronthosting.co.za> Kyle Roberts added the comment: Thanks for the comments Antoine. I didn't have a good reason for using the file name at the time, although even when using the file name I should have used the "file" variable that was already created. I tried using the file descriptor, but I encountered a "[Errno 9] Bad file descriptor" once the methods using _mkstemp_inner call _io.open on the returned fd. This leads me to believe that the fd is being closed somehow, but as you can see from my copy function, I don't implicitly or explicitly close the file using the file descriptor. I'm not sure yet why the file name works as expected but the fd does not. Am I missing something simple? As for points 2-4 I have most of that done. What's the pythonic way for determining if an argument is file-like? I've seen isinstance, hasattr, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 18:27:08 2013 From: report at bugs.python.org (Sarah) Date: Mon, 29 Apr 2013 16:27:08 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209319360.66.0.583090952017.issue2704@psf.upfronthosting.co.za> Message-ID: <1367252828.12.0.974735584425.issue2704@psf.upfronthosting.co.za> Changes by Sarah : ---------- nosy: +Sarah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 18:27:58 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 16:27:58 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1367252878.05.0.113122381277.issue17852@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 18:43:33 2013 From: report at bugs.python.org (Kushal Das) Date: Mon, 29 Apr 2013 16:43:33 +0000 Subject: [issue17861] put opcode information in one place In-Reply-To: <1367162089.6.0.986391601417.issue17861@psf.upfronthosting.co.za> Message-ID: <1367253813.78.0.428386204131.issue17861@psf.upfronthosting.co.za> Kushal Das added the comment: As we discussed on #python-dev channel this new patch includes the script in Tools/scripts/generate_opcode_h.py and it also contains the required Makefile.pre.in change so that it gets auto(re)generated at compile time if required. ---------- keywords: +patch Added file: http://bugs.python.org/file30064/issue17861_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 18:46:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 16:46:19 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: <1367048010.96.0.3580561262.issue17852@psf.upfronthosting.co.za> Message-ID: <1367253979.55.0.888489202089.issue17852@psf.upfronthosting.co.za> STINNER Victor added the comment: "In Python 2, a buffered file opened for writing is flushed by the C library when the process exit." "When you say Python 2, I assume you mean CPython 2, right? Because - AFAICT - files got flushed only by accident, not by design." It looks to be a feature of the standard C library, at least the GNU libc. Its libio library installs an exit handler flushing all open files. You can see it if you set a breaking on write() using gdb: Breakpoint 5, write () at ../sysdeps/unix/syscall-template.S:82 82 ../sysdeps/unix/syscall-template.S: Aucun fichier ou dossier de ce type. (gdb) where #0 write () at ../sysdeps/unix/syscall-template.S:82 #1 0xb7e33ba5 in _IO_new_file_write (f=0x8254ef0, data=0x81f9798, n=3) at fileops.c:1289 #2 0xb7e33a84 in new_do_write (fp=0x8254ef0, data=0x81f9798 "bar\267\300\207\366\267\220\227\037\b\220\227\037\b\004d", to_do=3) at fileops.c:543 #3 0xb7e350fe in _IO_new_do_write (fp=0x8254ef0, data=0x81f9798 "bar\267\300\207\366\267\220\227\037\b\220\227\037\b\004d", to_do=3) at fileops.c:516 #4 0xb7e354b5 in _IO_new_file_overflow (f=0x8254ef0, ch=-1) at fileops.c:894 #5 0xb7e36c40 in _IO_flush_all_lockp (do_lock=0) at genops.c:849 #6 0xb7e36d8e in _IO_cleanup () at genops.c:1010 #7 0xb7df5f92 in __run_exit_handlers (status=0, listp=0xb7f683e4, run_list_atexit=true) at exit.c:91 #8 0xb7df5fdd in __GI_exit (status=0) at exit.c:100 #9 0xb7ddc4db in __libc_start_main (main=0x8058f90
, argc=2, ubp_av=0xbffff1b4, init=0x8156960 <__libc_csu_init>, fini=0x81569d0 <__libc_csu_fini>, rtld_fini=0xb7fed280 <_dl_fini>, stack_end=0xbffff1ac) at libc-start.c:258 #10 0x08058fd1 in _start () Source of _IO_flush_all_lockp() in the GNU libc: http://sourceware.org/git/?p=glibc.git;a=blob;f=libio/genops.c;h=390d8d24b5fb04f6a35b8fec27e700b9a9d641d4;hb=HEAD#l816 So the glibc maintains a list of open "FILE*" files: _IO_list_all, which is protected by list_all_lock lock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 19:04:54 2013 From: report at bugs.python.org (Ben Harper) Date: Mon, 29 Apr 2013 17:04:54 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367255094.3.0.828382491889.issue17857@psf.upfronthosting.co.za> Ben Harper added the comment: This issue, like 14572, is also effecting Python 2.7.4 on CentOS 5. I can confirm the patch fixes this issue on CentOS5. ---------- nosy: +bharper _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 19:08:36 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 17:08:36 +0000 Subject: [issue17861] put opcode information in one place In-Reply-To: <1367162089.6.0.986391601417.issue17861@psf.upfronthosting.co.za> Message-ID: <1367255316.49.0.0152610275549.issue17861@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 19:13:52 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 29 Apr 2013 17:13:52 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: <1367253979.55.0.888489202089.issue17852@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > "When you say Python 2, I assume you mean CPython 2, right? > Because - AFAICT - files got flushed only by accident, not by design." > > It looks to be a feature of the standard C library, at least the GNU libc. Its libio library installs an exit handler flushing all open files. You can see it if you set a breaking on write() using gdb: Yes, it's guaranteed by POSIX/ANSI (see man exit). I was refering to the fact that the automatic flushing of files upon exit is a mere side effect of the implementation based atop stdio stream in cpython 2. It's no guaranteed by any Python spec (and I can't really think of any platform other than C that makes such guarantee). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 19:32:03 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 17:32:03 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1367256723.87.0.92447101921.issue16518@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch that adds "bytes-like object" to the glossary, links to the buffer protocol docs[0] and provides bytes and bytearray as examples. [0]: http://docs.python.org/dev/c-api/buffer.html#buffer-protocol ---------- keywords: +patch stage: needs patch -> patch review versions: +Python 2.7 -Python 3.2 Added file: http://bugs.python.org/file30065/issue16518.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 19:34:12 2013 From: report at bugs.python.org (Kushal Das) Date: Mon, 29 Apr 2013 17:34:12 +0000 Subject: [issue17861] put opcode information in one place In-Reply-To: <1367162089.6.0.986391601417.issue17861@psf.upfronthosting.co.za> Message-ID: <1367256852.75.0.686784872754.issue17861@psf.upfronthosting.co.za> Kushal Das added the comment: Version 2 of the patchset edited as per review. ---------- Added file: http://bugs.python.org/file30066/issue17861_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 19:45:22 2013 From: report at bugs.python.org (Ian Cordasco) Date: Mon, 29 Apr 2013 17:45:22 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367257522.32.0.267179634569.issue12458@psf.upfronthosting.co.za> Changes by Ian Cordasco : ---------- nosy: +icordasc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 19:51:35 2013 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Apr 2013 17:51:35 +0000 Subject: [issue13742] Add a key parameter (like sorted) to heapq.merge In-Reply-To: <1326105342.42.0.0197399269422.issue13742@psf.upfronthosting.co.za> Message-ID: <1367257895.05.0.0418311316347.issue13742@psf.upfronthosting.co.za> Mark Dickinson added the comment: Looks pretty good to me. - There's a bonus print call in the diff. - Should the "len(self._data)" call be protected by the lock? I can't immediately think of any reason why that would be necessary (e.g., pushpop nd poppush never change the size of self._data, so there's no risk of getting a bogus length there), but the lack of the lock makes me nervous. - Support for iter() seems a bit out of place to me. What are the use-cases for this? Would it make sense to leave this out (for now)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 20:19:29 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 18:19:29 +0000 Subject: [issue17868] pprint long non-printable bytes as hexdump Message-ID: <1367259569.59.0.63399196745.issue17868@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch with which pprint formats long bytes objects which contain non-ascii or non-printable bytes as a hexdump. Inspired by Antoine's wish (http://permalink.gmane.org/gmane.comp.python.ideas/20329). ---------- components: Library (Lib) files: pprint_bytes_hex.patch keywords: patch messages: 188081 nosy: fdrake, pitrou, serhiy.storchaka, techtonik priority: normal severity: normal stage: patch review status: open title: pprint long non-printable bytes as hexdump type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file30067/pprint_bytes_hex.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 20:22:04 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 18:22:04 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367259724.02.0.957229248048.issue17857@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 Mon Apr 29 20:26:23 2013 From: report at bugs.python.org (Kushal Das) Date: Mon, 29 Apr 2013 18:26:23 +0000 Subject: [issue1475692] replacing obj.__dict__ with a subclass of dict Message-ID: <1367259983.35.0.456965100499.issue1475692@psf.upfronthosting.co.za> Kushal Das added the comment: In Objects/typeobject.c we have subtype_setdict function, in which at line 1830 we have PyDict_Check() macro call, which checks if it is a subclass of dict or not. The definition is in Include/dictobject.h #define PyDict_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS) We can stop assigning anything other than dict in typesobject.c but that will break other things like http://bugs.python.org/issue1475692 ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 20:27:47 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 29 Apr 2013 18:27:47 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367260067.7.0.530875967367.issue12458@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 20:28:01 2013 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 29 Apr 2013 18:28:01 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367259724.07.0.14595733564.issue17857@psf.upfronthosting.co.za> Message-ID: <517EBBAE.2050908@egenix.com> Marc-Andre Lemburg added the comment: Thanks, Serhiy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 20:34:55 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 18:34:55 +0000 Subject: [issue17868] pprint long non-printable bytes as hexdump In-Reply-To: <1367259569.59.0.63399196745.issue17868@psf.upfronthosting.co.za> Message-ID: <1367260495.72.0.603563771777.issue17868@psf.upfronthosting.co.za> Ezio Melotti added the comment: A couple of comments: 1) A separate function might be better. I think this kind of output would be more useful while inspecting individual byte objects, rather than having it for arbitrary byte objects (that might be inside other containers). 2) I don't know if the output of pprint is supposed to be eval()uable, but I don't like too much the base64.b16decode(...).replace(' ', '') in the output (especially if the byte objects are short). If a separate function is used as suggested in 1) this won't be a problem. Using the hex_codec might be another option. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 20:35:13 2013 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Mon, 29 Apr 2013 18:35:13 +0000 Subject: [issue17868] pprint long non-printable bytes as hexdump In-Reply-To: <1367259569.59.0.63399196745.issue17868@psf.upfronthosting.co.za> Message-ID: <1367260513.83.0.615922789321.issue17868@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: -fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 20:55:40 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 18:55:40 +0000 Subject: [issue13742] Add a key parameter (like sorted) to heapq.merge In-Reply-To: <1326105342.42.0.0197399269422.issue13742@psf.upfronthosting.co.za> Message-ID: <1367261740.38.0.181941489837.issue13742@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is already one heap class in the stdlib: queue.PriorityQueue. Why create a duplicate instead extend queue.PriorityQueue with desired features? May be name the maxheap parameter as reverse? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 20:55:48 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Apr 2013 18:55:48 +0000 Subject: [issue17868] pprint long non-printable bytes as hexdump In-Reply-To: <1367259569.59.0.63399196745.issue17868@psf.upfronthosting.co.za> Message-ID: <1367261748.86.0.138481103309.issue17868@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, I think a separate function would be better. There's another issue for pprint() of bytes with line continuations: http://bugs.python.org/issue17530 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 21:32:45 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Apr 2013 19:32:45 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367263965.86.0.540994165011.issue17810@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a framing patch on top of Alexandre's work. There is one thing that framing breaks: pickletools.optimize(). I think it would be non-trivial to fix it. Perhaps the PREFETCH opcode is a better idea for this. Alexandre, I don't understand why you removed STACK_GLOBAL. GLOBAL is a PITA that we should not use in protocol 4 anymore, so we need either STACK_GLOBAL or some kind of BINGLOBAL. ---------- Added file: http://bugs.python.org/file30068/framing.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 21:43:22 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Apr 2013 19:43:22 +0000 Subject: [issue13721] ssl.wrap_socket on a connected but failed connection succeeds and .peer_certificate gives AttributeError In-Reply-To: <1325871512.71.0.286774610121.issue13721@psf.upfronthosting.co.za> Message-ID: <1367264602.24.0.161775551971.issue13721@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, so this is a slightly annoying issue, but which isn't critical since there's a workaround (catch the AttributeError). Therefore I'm inclined not to change the behaviour in a bugfix release, for fear of regressions for people who are used to the workaround. In 3.4, it makes sense to improve behaviour. I would propose the following: when self._sslobj is None, call getpeername() on the underlying socket, and let it raise, so that the user gets an appropriate exception for the situation (ENOTCONN mostly, but who knows?). If getpeername() doesn't raise, raise a ValueError instead (since it's akin to calling read() or fileno() on a closed file). What do you think? ---------- versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 21:49:33 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 19:49:33 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367264973.31.0.674111638595.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is wrong with GLOBAL? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 21:50:58 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Apr 2013 19:50:58 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1367264973.31.0.674111638595.issue17810@psf.upfronthosting.co.za> Message-ID: <1367265055.2574.0.camel@fsol> Antoine Pitrou added the comment: > What is wrong with GLOBAL? It uses the lame "text mode" that scans for newlines, and is generally annoying to optimize. This is like C strings vs. Pascal strings. http://www.python.org/dev/peps/pep-3154/#binary-encoding-for-all-opcodes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:00:47 2013 From: report at bugs.python.org (Dmi Baranov) Date: Mon, 29 Apr 2013 20:00:47 +0000 Subject: [issue17714] str.encode('base64') add trailing new line character. It is not documented. In-Reply-To: <1365867569.46.0.547710519327.issue17714@psf.upfronthosting.co.za> Message-ID: <1367265647.18.0.568669418501.issue17714@psf.upfronthosting.co.za> Dmi Baranov added the comment: Added a patch ---------- keywords: +patch nosy: +dmi.baranov Added file: http://bugs.python.org/file30069/issue17714.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:10:21 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 29 Apr 2013 20:10:21 +0000 Subject: [issue17869] distutils - TypeError in command/build_ext.py Message-ID: <1367266221.15.0.812330331634.issue17869@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': Traceback (most recent call last): File "setup.py", line 221, in ... and much more ;)""" File "/home/giampaolo/svn/python/3.4/Lib/distutils/core.py", line 148, in setup dist.run_commands() File "/home/giampaolo/svn/python/3.4/Lib/distutils/dist.py", line 917, in run_commands self.run_command(cmd) File "/home/giampaolo/svn/python/3.4/Lib/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/home/giampaolo/svn/python/3.4/Lib/distutils/command/build.py", line 126, in run self.run_command(cmd_name) File "/home/giampaolo/svn/python/3.4/Lib/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/giampaolo/svn/python/3.4/Lib/distutils/dist.py", line 936, in run_command cmd_obj.run() File "/home/giampaolo/svn/python/3.4/Lib/distutils/command/build_ext.py", line 349, in run self.build_extensions() File "/home/giampaolo/svn/python/3.4/Lib/distutils/command/build_ext.py", line 458, in build_extensions self.build_extension(ext) File "/home/giampaolo/svn/python/3.4/Lib/distutils/command/build_ext.py", line 474, in build_extension ext_path = self.get_ext_fullpath(ext.name) File "/home/giampaolo/svn/python/3.4/Lib/distutils/command/build_ext.py", line 633, in get_ext_fullpath filename = self.get_ext_filename(modpath[-1]) File "/home/giampaolo/svn/python/3.4/Lib/distutils/command/build_ext.py", line 672, in get_ext_filename return os.path.join(*ext_path) + ext_suffix TypeError: Can't convert 'NoneType' object to str implicitly I'm getting this while building PyOpenSSL on Linux with laterst cset of Python 3.4. Everything's fine on Python 3.3. Possibly related with issue #16754? ---------- assignee: eric.araujo components: Distutils messages: 188092 nosy: doko, eric.araujo, giampaolo.rodola, tarek priority: normal severity: normal status: open title: distutils - TypeError in command/build_ext.py versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:11:24 2013 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Apr 2013 20:11:24 +0000 Subject: [issue17646] traceback.py has a lot of code duplication In-Reply-To: <1365269024.35.0.461360708932.issue17646@psf.upfronthosting.co.za> Message-ID: <3ZzxpM27bfzNWy@mail.python.org> Roundup Robot added the comment: New changeset 84cef4f1999a by Benjamin Peterson in branch 'default': refactor traceback.py to reduce code duplication (closes #17646) http://hg.python.org/cpython/rev/84cef4f1999a ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:20:28 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 29 Apr 2013 20:20:28 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1367266828.54.0.69503431426.issue16754@psf.upfronthosting.co.za> ?ric Araujo added the comment: This change may be responsible for #17869 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:22:25 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 20:22:25 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: Message-ID: STINNER Victor added the comment: >> It looks to be a feature of the standard C library, at least the GNU libc. > Yes, it's guaranteed by POSIX/ANSI (see man exit). Hum, POSIX (2004) is not so strict: "Whether open streams are flushed or closed, or temporary files are removed is implementation-defined." http://pubs.opengroup.org/onlinepubs/009695399/functions/exit.html 2013/4/29 Charles-Fran?ois Natali : > > Charles-Fran?ois Natali added the comment: > >> "When you say Python 2, I assume you mean CPython 2, right? >> Because - AFAICT - files got flushed only by accident, not by design." >> >> It looks to be a feature of the standard C library, at least the GNU libc. Its libio library installs an exit handler flushing all open files. You can see it if you set a breaking on write() using gdb: > > Yes, it's guaranteed by POSIX/ANSI (see man exit). > I was refering to the fact that the automatic flushing of files upon > exit is a mere side effect of the implementation based atop stdio > stream in cpython 2. It's no guaranteed by any Python spec (and I > can't really think of any platform other than C that makes such > guarantee). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:39:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 20:39:13 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367267953.94.0.586302413228.issue17810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: With framing it isn't annoying. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:44:45 2013 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 29 Apr 2013 20:44:45 +0000 Subject: [issue17869] distutils - TypeError in command/build_ext.py In-Reply-To: <1367266221.15.0.812330331634.issue17869@psf.upfronthosting.co.za> Message-ID: <1367268285.73.0.734122546391.issue17869@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Your Python seems to be built incorrectly. Maybe you forgot to re-run './configure ...; make' after updating working copy. Could you try in a new working copy? (I cannot reproduce this bug.) ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:48:06 2013 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 29 Apr 2013 20:48:06 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367268486.56.0.795694000816.issue17810@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Antoine, I removed STACK_GLOBAL when I found performance issues with the implementation. The changeset that added it had some unrelated changes that made it harder to debug than necessary. I am planning to re-add it when I worked out the kinks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:50:33 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 29 Apr 2013 20:50:33 +0000 Subject: [issue17869] distutils - TypeError in command/build_ext.py In-Reply-To: <1367266221.15.0.812330331634.issue17869@psf.upfronthosting.co.za> Message-ID: <1367268633.66.0.729444288371.issue17869@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I'm sorry, you're right. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:51:23 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 29 Apr 2013 20:51:23 +0000 Subject: [issue17869] distutils - TypeError in command/build_ext.py In-Reply-To: <1367266221.15.0.812330331634.issue17869@psf.upfronthosting.co.za> Message-ID: <1367268683.57.0.646522247993.issue17869@psf.upfronthosting.co.za> ?ric Araujo added the comment: :) ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:51:48 2013 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 29 Apr 2013 20:51:48 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1367268708.95.0.415818643466.issue16754@psf.upfronthosting.co.za> ?ric Araujo added the comment: False alarm, disregard my previous message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:54:12 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Apr 2013 20:54:12 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1367267953.94.0.586302413228.issue17810@psf.upfronthosting.co.za> Message-ID: <1367268849.2574.2.camel@fsol> Antoine Pitrou added the comment: > With framing it isn't annoying. Slightly less, but you still have to wrap readline() calls in the unpickler. I have started experimenting with PREFETCH, but making the opcode optional is a bit annoying in the C pickler, which means it's simpler to always emit it, which means it's not very different from framing in the end :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 22:57:05 2013 From: report at bugs.python.org (Devin Jeanpierre) Date: Mon, 29 Apr 2013 20:57:05 +0000 Subject: [issue17870] Hard to create python longs from arbitrary C integers Message-ID: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> New submission from Devin Jeanpierre: As far as I can tell, the only safe and correct way to convert a (for example) intptr_t to a python long is something akin to the following: size_t repsize = sizeof(intmax_t)*8 + 2; char i_buf[repsize]; // enough to fit base 2 with sign, let alone base 1 snprintf(i_buf, repsize, "%ij", (intmax_t) myinteger); return PyLong_FromString(i_buf, NULL, 10); Does this not seem absurd? PyLong_FromIntMax_t(myinteger) would be great. Or maybe even better would be PyLong_FromBytes(&myinteger, sizeof(myinteger)) ? This is problematic because many things that can interact with the Python C-API do not use the C types like "long long" or "int". Instead they might use the equivalents of intptr_t and int32_t, which are more reliably sized. ---------- messages: 188103 nosy: Devin Jeanpierre priority: normal severity: normal status: open title: Hard to create python longs from arbitrary C integers versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:06:32 2013 From: report at bugs.python.org (Piotr Dobrogost) Date: Mon, 29 Apr 2013 21:06:32 +0000 Subject: [issue17871] Wrong signature of TextTestRunner's init function Message-ID: <1367269592.44.0.115946830805.issue17871@psf.upfronthosting.co.za> New submission from Piotr Dobrogost: TextTestRunner's init as of 3.3.1 has (http://hg.python.org/cpython/file/d9893d13c628/Lib/unittest/runner.py#l128) the following parameters: stream, descriptions, verbosity, failfast, buffer, resultclass, warnings whereas docs (http://docs.python.org/3.3/library/unittest.html?highlight=unittest#loading-and-running-tests) show only the following parameters: stream, descriptions, verbosity, runnerclass, warnings 'Failfast' and 'buffer' parameters are missing in the docs and there's 'runnerclass' parameter instead of 'resultclass' parameter. ---------- assignee: docs at python components: Documentation messages: 188104 nosy: docs at python, ezio.melotti, michael.foord, piotr.dobrogost priority: normal severity: normal status: open title: Wrong signature of TextTestRunner's init function versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:09:12 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 21:09:12 +0000 Subject: [issue17870] Hard to create python longs from arbitrary C integers In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367269752.02.0.323738709353.issue17870@psf.upfronthosting.co.za> STINNER Victor added the comment: Did you try PyLong_FromVoidPtr()? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:10:47 2013 From: report at bugs.python.org (Devin Jeanpierre) Date: Mon, 29 Apr 2013 21:10:47 +0000 Subject: [issue17870] Hard to create python longs from arbitrary C integers In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367269847.07.0.564102529839.issue17870@psf.upfronthosting.co.za> Devin Jeanpierre added the comment: PyLong_FromVoidPtr works for uintptr_t, but not intptr_t. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:16:38 2013 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 29 Apr 2013 21:16:38 +0000 Subject: [issue17871] Wrong signature of TextTestRunner's init function In-Reply-To: <1367269592.44.0.115946830805.issue17871@psf.upfronthosting.co.za> Message-ID: <1367270198.17.0.822781237532.issue17871@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:29:12 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Apr 2013 21:29:12 +0000 Subject: [issue17872] Crash in marshal.load() with bad reader Message-ID: <1367270952.48.0.351702678796.issue17872@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: There is a buffer overflow in marshal.load() when len(read(n)) > n. Here is a sample. ---------- components: Interpreter Core files: marshal_bad_reader.py messages: 188107 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Crash in marshal.load() with bad reader type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30070/marshal_bad_reader.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:30:25 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 29 Apr 2013 21:30:25 +0000 Subject: [issue11632] difflib.unified_diff loses context In-Reply-To: <1300788570.13.0.524020554804.issue11632@psf.upfronthosting.co.za> Message-ID: <1367271024.99.0.87140744015.issue11632@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:37:15 2013 From: report at bugs.python.org (Dmi Baranov) Date: Mon, 29 Apr 2013 21:37:15 +0000 Subject: [issue17872] Crash in marshal.load() with bad reader In-Reply-To: <1367270952.48.0.351702678796.issue17872@psf.upfronthosting.co.za> Message-ID: <1367271435.21.0.561142544448.issue17872@psf.upfronthosting.co.za> Changes by Dmi Baranov : ---------- nosy: +dmi.baranov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:37:55 2013 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 29 Apr 2013 21:37:55 +0000 Subject: [issue17872] Crash in marshal.load() with bad reader In-Reply-To: <1367270952.48.0.351702678796.issue17872@psf.upfronthosting.co.za> Message-ID: <1367271475.54.0.772790350483.issue17872@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:41:30 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 29 Apr 2013 21:41:30 +0000 Subject: [issue17700] Update Curses HOWTO for 3.4 In-Reply-To: <1365719687.97.0.644773548697.issue17700@psf.upfronthosting.co.za> Message-ID: <1367271690.35.0.571218952945.issue17700@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Updated version of the patch, applying many changes suggested by merwok: * use ~curses.funcname notation for links. * use 3-hyphen em-dash * minor fixes to various examples * rewrap long paragraphs (this makes the diff larger -- sorry!) ---------- Added file: http://bugs.python.org/file30071/update-curses-howto.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:44:39 2013 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 29 Apr 2013 21:44:39 +0000 Subject: [issue17810] Implement PEP 3154 (pickle protocol 4) In-Reply-To: <1366526938.19.0.00976593994103.issue17810@psf.upfronthosting.co.za> Message-ID: <1367271879.9.0.713880002758.issue17810@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And here is an implementation of PREFETCH over Alexandre's work. As you can see the code complexity compared to framing is mostly a wash, but I think fixing pickletools.optimize() will be easier with PREFETCH (still needs confirmation, of course :-)). ---------- Added file: http://bugs.python.org/file30072/prefetch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 29 23:47:08 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 21:47:08 +0000 Subject: [issue17700] Update Curses HOWTO for 3.4 In-Reply-To: <1365719687.97.0.644773548697.issue17700@psf.upfronthosting.co.za> Message-ID: <1367272028.41.0.512814814773.issue17700@psf.upfronthosting.co.za> STINNER Victor added the comment: window.get_wch() and curses.unget_wch(ch) should be used instead of window.getch() and curses.ungetch(ch), when available. They work much better with non-ASCII characters. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 00:00:07 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 22:00:07 +0000 Subject: [issue17870] Hard to create python longs from arbitrary C integers In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367272807.19.0.017827588523.issue17870@psf.upfronthosting.co.za> STINNER Victor added the comment: "PyLong_FromVoidPtr works for uintptr_t, but not intptr_t." Ok correct. You should use something like: PyObject* PyLong_FromIntptr_t(intptr_t value) { if (sizeof(intptr_t) == sizeof(long)) return PyLong_FromLong(value); else { assert(sizeof(intptr_t) <= sizeof(PY_LONG_LONG)); return PyLong_FromLongLong((PY_LONG_LONG)value); } } The "if (sizeof(intptr_t) == sizeof(long))" should be optimized by your compiler. I don't know if Python should provide such function. What is your use case for intptr_t? It looks like intptr_t is only really used in the implementation of os.spawnv() and os.spawnve(). Extract: #if SIZEOF_LONG == SIZEOF_VOID_P return Py_BuildValue("l", (long) spawnval); #else return Py_BuildValue("L", (PY_LONG_LONG) spawnval); #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 00:01:59 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 22:01:59 +0000 Subject: [issue17870] Python does not provide a PyLong_FromIntptr_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367272919.11.0.0903824715288.issue17870@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Hard to create python longs from arbitrary C integers -> Python does not provide a PyLong_FromIntptr_t() function _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 00:05:10 2013 From: report at bugs.python.org (Devin Jeanpierre) Date: Mon, 29 Apr 2013 22:05:10 +0000 Subject: [issue17870] Python does not provide a PyLong_FromIntptr_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367273110.19.0.280033276322.issue17870@psf.upfronthosting.co.za> Devin Jeanpierre added the comment: Isn't it possible for a >64-bit architecture to have intptr_t be wider than long long? As for my use-case, I am wrapping the C-API for Rust. Rust can call and be called by C (and therefore Python), but a Rust "int" is a C "intptr_t", and a Rust "uint" is a C "uintptr_t". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 00:09:11 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Apr 2013 22:09:11 +0000 Subject: [issue17864] IDLE fails to launch when it cannot create .idlerc directory In-Reply-To: <1367173337.57.0.3678200637.issue17864@psf.upfronthosting.co.za> Message-ID: <1367273351.07.0.776319643695.issue17864@psf.upfronthosting.co.za> Ned Deily added the comment: Ah, yes, it is a duplicate, thanks. Let's move any further discussion to Issue8231. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed title: IDLE won't run -> IDLE fails to launch when it cannot create .idlerc directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 00:09:19 2013 From: report at bugs.python.org (Devin Jeanpierre) Date: Mon, 29 Apr 2013 22:09:19 +0000 Subject: [issue17870] Python does not provide a PyLong_FromIntptr_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367273359.09.0.735488358063.issue17870@psf.upfronthosting.co.za> Devin Jeanpierre added the comment: With regards to the title change, I would prefer a FromIntMax_t (and FromUintMax_t) to a FromIntPtr_t. The former covers every use case of the latter, and more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 00:09:29 2013 From: report at bugs.python.org (Ned Deily) Date: Mon, 29 Apr 2013 22:09:29 +0000 Subject: [issue8231] Unable to run IDLE without write-access to home directory In-Reply-To: <1269531569.44.0.352644957859.issue8231@psf.upfronthosting.co.za> Message-ID: <1367273369.54.0.909258858286.issue8231@psf.upfronthosting.co.za> Ned Deily added the comment: Issue17864 is a duplicate of this. Also, note the error reported here is a result of IDLE not having write access in the user's home directory and thus cannot create the .idlerc directory. IDLE seems to handle more gracefully the case of .idlerc existing but not writable. ---------- nosy: +ned.deily title: Unable to run IDLE without write-access to config directory -> Unable to run IDLE without write-access to home directory versions: +Python 3.4 -Python 2.6, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 00:15:44 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 22:15:44 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367273744.1.0.832936824601.issue17870@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Python does not provide a PyLong_FromIntptr_t() function -> Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 01:05:23 2013 From: report at bugs.python.org (Andreas Schwab) Date: Mon, 29 Apr 2013 23:05:23 +0000 Subject: [issue17873] _ctypes/libffi missing bits for aarch64 support Message-ID: <1367276723.56.0.050997158172.issue17873@psf.upfronthosting.co.za> New submission from Andreas Schwab: ctype modules doesn't build for aarch64 due to missing bits in the fficonfig.py script. ---------- components: ctypes files: ctypes-libffi-aarch64.patch keywords: patch messages: 188116 nosy: schwab priority: normal severity: normal status: open title: _ctypes/libffi missing bits for aarch64 support type: compile error versions: Python 3.3 Added file: http://bugs.python.org/file30073/ctypes-libffi-aarch64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 01:21:30 2013 From: report at bugs.python.org (Mateusz Loskot) Date: Mon, 29 Apr 2013 23:21:30 +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: <1367277690.42.0.1867855379.issue17797@psf.upfronthosting.co.za> Mateusz Loskot added the comment: I've just got an update on the bug report [1] I submitted to Microsoft. The Visual C++ team confirmed "It does appear to be a regression from Visual Studio 2010." So, it's not a bug in Python, but I think it may be important for Python to consider applying some reliable workaround (i.e. use of check_fd() function) [1] http://connect.microsoft.com/VisualStudio/feedback/details/785119/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 01:37:27 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 23:37:27 +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: <1367278647.77.0.764614732938.issue17797@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 01:45:26 2013 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Apr 2013 23:45:26 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367279126.87.0.0774347098139.issue17870@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem is to support platforms not providing a intmax_t type. I don't know if the following C code would be a good "approximation" of the maximum integral value (signed/unsigned). #ifdef HAVE_INTMAX_T typedef intmax_t Py_intmax_t; typedef uintmax_t Py_uintmax_t; #elif defined(HAVE_LONG_LONG) && (SIZEOF_VOID_P <= SIZEOF_LONG_LONG) typedef PY_LONG_LONG Py_intmax_t; typedef unsigned PY_LONG_LONG Py_uintmax_t; #elif SIZEOF_VOID_P <= SIZEOF_LONG typedef long Py_intmax_t; typedef unsigned long Py_uintmax_t; #elif SIZEOF_VOID_P <= SIZEOF_INT typedef int Py_intmax_t; typedef unsigned int Py_uintmax_t; #else # error "Python needs a typedef for Py_intmax_t in pyport.h." #endif /* HAVE_INTMAX_T */ If it is not, conversion from/to other types like off_t, time_t, pid_t or uid_t would loose information. It is the same question than yours: is there a platform with an integer type wider than a pointer (intptr_t/void*)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 01:46:07 2013 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 29 Apr 2013 23:46:07 +0000 Subject: [issue17700] Update Curses HOWTO for 3.4 In-Reply-To: <1365719687.97.0.644773548697.issue17700@psf.upfronthosting.co.za> Message-ID: <1367279167.41.0.336500782213.issue17700@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Victor: I would like to add a section about using Unicode characters with curses, but found little material about doing that in either Python or the underlying C API. Do you have any suggested references or example code that I could look at? (It's probably better to commit the current patch if it's suitable, and commit the wide-character changes in a separate patch once they're ready.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 02:33:36 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Apr 2013 00:33:36 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367282016.08.0.978390991896.issue12458@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is an enhancement request (at best), not a bug report. I would close it because I think it somewhat dubious, unreasonable, and not helpful. First, I think tracebacks *should* report 'the spot of the foul' for each call frame. What would sometimes be helpful when multiple operations are performed in one line would be to also have the column number reported, along with a ^ to indicate the exact point of error. So I think instead misreporting the location of an instruction pointer could be deceptive and not helpful. I think it unreasonable to ask the traceback reporter to guess which one line would be most helpful to report. The OP suggests somehow tracing back to the *first* line of a multiline statement. But on python-ideas, G. Rodola noted the following assert \ 1 == 0, \ "error" Traceback (most recent call last): File "foo.py", line 3, in "error" AssertionError: error and requested that the *second* or *middle* line should be reported. (But what if the asserted expression itself covered multiple lines?) I say sometimes 'not helpful' since the traceback already says what function the pointer is in, if it is in one, and therefore what function what called by the previous frame. In the 'reproducer', 'raise Exception' is in fun1, so in fun2, 'par="value")' must have been preceded by 'fun1(...' on a previous line. So replacing 'par="value")' with 'fun1(...' would not add information. I think debugging multiline statements will usually requires looking at the whole statement and a few more. To make this easy, one can use a more sophisticated environment than dumb consoles. For instance, if one executes a top-level script from an Idle edit window, one can right click on a traceback in the Shell window and select 'Go to file/line'. Idle will open the file, if necessary, and highlight the line. ---------- nosy: +terry.reedy type: behavior -> enhancement versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 03:08:12 2013 From: report at bugs.python.org (Ben Darnell) Date: Tue, 30 Apr 2013 01:08:12 +0000 Subject: [issue13721] ssl.wrap_socket on a connected but failed connection succeeds and .peer_certificate gives AttributeError In-Reply-To: <1325871512.71.0.286774610121.issue13721@psf.upfronthosting.co.za> Message-ID: <1367284092.63.0.150049656166.issue13721@psf.upfronthosting.co.za> Ben Darnell added the comment: That proposal sounds good to me. I agree that any change here should target 3.4, not backports to older versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 03:42:27 2013 From: report at bugs.python.org (Alejandro Rodas) Date: Tue, 30 Apr 2013 01:42:27 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1367286147.16.0.379872835649.issue17642@psf.upfronthosting.co.za> Changes by Alejandro Rodas : Added file: http://bugs.python.org/file30074/ZoomInOut.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 05:16:37 2013 From: report at bugs.python.org (Theodore Randolph) Date: Tue, 30 Apr 2013 03:16:37 +0000 Subject: [issue17874] ProcessPoolExecutor in interactive shell doesn't work in Windows Message-ID: <1367291797.68.0.0512798150346.issue17874@psf.upfronthosting.co.za> New submission from Theodore Randolph: ProcessPoolExecutor doesn't work in an interactive shell in Windows, such as IDLE or the command prompt. It does work in Unix, and it works if I use the ThreadPoolExecutor instead. For example, let's use the tutorial at http://eli.thegreenplace.net/2013/01/16/python-paralellizing-cpu-bound-tasks-with-concurrent-futures/ I get: >>> pool_factorizer_chunked([1,2,3,456,7,8],8) Exception in thread Thread-1: Traceback (most recent call last): File "C:\Python33\lib\threading.py", line 639, in _bootstrap_inner self.run() File "C:\Python33\lib\threading.py", line 596, in run self._target(*self._args, **self._kwargs) File "C:\Python33\lib\concurrent\futures\process.py", line 248, in _queue_management_worker shutdown_worker() File "C:\Python33\lib\concurrent\futures\process.py", line 208, in shutdown_worker call_queue.put_nowait(None) File "C:\Python33\lib\multiprocessing\queues.py", line 132, in put_nowait return self.put(obj, False) File "C:\Python33\lib\multiprocessing\queues.py", line 79, in put raise Full queue.Full Traceback (most recent call last): File "", line 1, in pool_factorizer_chunked([1,2,3,456,7,8],8) File "", line 14, in pool_factorizer_chunked resultdict.update(f.result()) File "C:\Python33\lib\concurrent\futures\_base.py", line 392, in result return self.__get_result() File "C:\Python33\lib\concurrent\futures\_base.py", line 351, in __get_result raise self._exception concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending. >>> pool_factorizer_map([1,2,3,456,7,8],8) Exception in thread Thread-2: Traceback (most recent call last): File "C:\Python33\lib\threading.py", line 639, in _bootstrap_inner self.run() File "C:\Python33\lib\threading.py", line 596, in run self._target(*self._args, **self._kwargs) File "C:\Python33\lib\concurrent\futures\process.py", line 248, in _queue_management_worker shutdown_worker() File "C:\Python33\lib\concurrent\futures\process.py", line 208, in shutdown_worker call_queue.put_nowait(None) File "C:\Python33\lib\multiprocessing\queues.py", line 132, in put_nowait return self.put(obj, False) File "C:\Python33\lib\multiprocessing\queues.py", line 79, in put raise Full queue.Full Traceback (most recent call last): File "", line 1, in pool_factorizer_map([1,2,3,456,7,8],8) File "", line 6, in pool_factorizer_map executor.map(factorize_naive, nums))} File "", line 4, in return {num:factors for num, factors in File "C:\Python33\lib\concurrent\futures\_base.py", line 546, in result_iterator yield future.result() File "C:\Python33\lib\concurrent\futures\_base.py", line 399, in result return self.__get_result() File "C:\Python33\lib\concurrent\futures\_base.py", line 351, in __get_result raise self._exception concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending. >>> ---------- components: Windows messages: 188122 nosy: Decade priority: normal severity: normal status: open title: ProcessPoolExecutor in interactive shell doesn't work in Windows type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 05:34:17 2013 From: report at bugs.python.org (Decade) Date: Tue, 30 Apr 2013 03:34:17 +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: <1367292857.54.0.612317777448.issue17874@psf.upfronthosting.co.za> Decade added the comment: Oh, yeah, using Python 3.3.1 (v3.3.1:d9893d13c628, Apr 6 2013, 20:30:21) [MSC v.1600 64 bit (AMD64)] on win32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 05:53:10 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 30 Apr 2013 03:53:10 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1367293990.21.0.60448721658.issue17642@psf.upfronthosting.co.za> Roger Serwy added the comment: Abhishek, Alejandro, welcome to IDLE development! If you can, please sign a contributor agreement. We have two patches to create this enhancement, both are good. I suggest that we figure out how to merge the solutions. The zoom-out binding should also include Ctrl-Equal, so that holding shift is no longer necessary. There's also a corner case where the zooming in on the editor may cause the cursor to go outside of viewing window. Using idleConf to query the font information is not strictly necessary since the font configuration in the text widget contains the font size already. In the future, please be careful with licensing. The top part of the ZoomFont.py extension places it under the NCSA license. Fortunately UIUC has allowed me to relicense parts IdleX for the Python Software Foundation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 07:04:30 2013 From: report at bugs.python.org (Afif Elghraoui) Date: Tue, 30 Apr 2013 05:04:30 +0000 Subject: [issue17875] Set Intersection returns unexpected results Message-ID: <1367298270.65.0.0671753217297.issue17875@psf.upfronthosting.co.za> New submission from Afif Elghraoui: I have two lists of strings (gene identifiers) that I know have something in common. I convert them to lists and do an intersection and I get the empty set. As an example test case, I know they both have the string 'Rv0500' >>> list1.index('Rv0500') 278 >>> list2.index('Rv0500') 245 >>> set(list1).intersection(set(list2)) set([]) I was expecting to get a few hundred matches. My two lists are attached to this report. This is how I created the data file: >>> x = shelve.open('lists.dat') >>> x['list1'] = list1 >>> x['list2'] = list2 >>> x.close() I did my best to make this report complete-- thanks for all your help. ---------- components: Interpreter Core files: lists.dat messages: 188125 nosy: Afif.Elghraoui priority: normal severity: normal status: open title: Set Intersection returns unexpected results type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file30075/lists.dat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 07:12:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Apr 2013 05:12:15 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367298735.19.0.664817741094.issue17870@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > It is the same question than yours: is there a platform with an integer type wider than a pointer (intptr_t/void*)? It's x86. sizeof(void*) == 4, sizeof(long long) == 8. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 08:06:25 2013 From: report at bugs.python.org (Xavier Ordoquy) Date: Tue, 30 Apr 2013 06:06:25 +0000 Subject: [issue17876] Doc issue with threading.Event Message-ID: <1367301985.85.0.51301072011.issue17876@psf.upfronthosting.co.za> New submission from Xavier Ordoquy: The documentation isn't correct for the threading.Event class under python 3.2. In the threading doc page (http://docs.python.org/3.2/library/threading.html), Event is said to be at the same time a function and a class. This is misleading and lead to a regression for celery under python 3.2 (https://github.com/celery/celery/pull/1333). Could the doc be updated under python 3.2 so that threading.Event leads to the function and threading._Event leads to the class ? Regards, Xavier. ---------- assignee: docs at python components: Documentation messages: 188127 nosy: docs at python, xordoquy priority: normal severity: normal status: open title: Doc issue with threading.Event type: enhancement versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 08:14:28 2013 From: report at bugs.python.org (Abhishek Kumar) Date: Tue, 30 Apr 2013 06:14:28 +0000 Subject: [issue17642] IDLE add font resizing hot keys In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1367302468.2.0.898284140047.issue17642@psf.upfronthosting.co.za> Abhishek Kumar added the comment: Thanks Roger, for the feedback especially the licence part. I have least idea about licences but will take care in future. One question: Is it right to change IdleConf on Ctrl+ and Ctrl- ? I mean to change font for all open windows? It happens with most text editors but not with browsers. To remove those 2 hacks for CodeContext and LineNumbers, what we can do is write a ResetFont() for each extenstion and can call it from the ResetFont() of editor window like this: for extension in self.extensions: extension.ResetFont() so that we don't have to write seperate font-size hacks for each extension while resetting the font. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 08:19:01 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Apr 2013 06:19:01 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367302741.07.0.827291345574.issue17870@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 08:37:41 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 30 Apr 2013 06:37:41 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1367303861.94.0.878823490799.issue17192@psf.upfronthosting.co.za> Gregory P. Smith added the comment: it _looks_ like the libffi updates i put in 3.2, 3.3 and default (3.4) are messed up with some changes missing in 3.2 and more missing in 3.3 and 3.4. (i'm comparing vs upstream 3.0.13 <-> 2.7 <-> 3.2 <-> 3.3 <-> 3.4). i blame the mess of merging that was required by hg due to the plethora of versions of libffi we had in different states in 2.7, 3.2 and 3.3+ before i did the update. i'm fixing it now. ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 08:44:36 2013 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 30 Apr 2013 06:44:36 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > Hum, POSIX (2004) is not so strict: > "Whether open streams are flushed or closed, or temporary files are > removed is implementation-defined." > http://pubs.opengroup.org/onlinepubs/009695399/functions/exit.html You're looking at the wrong section: "The exit() function shall then flush all open streams with unwritten buffered data, close all open streams" Then a couple lines below: "The _Exit() [CX] and _exit() functions shall not call functions registered with atexit() nor any registered signal handlers. Whether open streams are flushed or closed, or temporary files are removed is implementation-defined." It's guaranteed for exit(), not _Exit()/_exit(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 08:50:34 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Apr 2013 06:50:34 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367304634.02.0.175595518093.issue17870@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 08:59:06 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 30 Apr 2013 06:59:06 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1367305146.32.0.269979392534.issue17192@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks. For 3.2, please attach a patch here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 09:04:29 2013 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Apr 2013 07:04:29 +0000 Subject: [issue17875] Set Intersection returns unexpected results In-Reply-To: <1367298270.65.0.0671753217297.issue17875@psf.upfronthosting.co.za> Message-ID: <1367305469.69.0.448132256842.issue17875@psf.upfronthosting.co.za> Mark Dickinson added the comment: It appears that your list1 and list2 are not regular Python lists, but have type cobra.core.DictList (which inherits from list, but overrides the 'index' method). cobra is a 3rd party package, not maintained by the Python developers, so I'm afraid this isn't the right place to ask about it; is there a mailing list for the cobra package? ---------- nosy: +mark.dickinson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 09:12:22 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 07:12:22 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367305942.02.0.480726829877.issue12458@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think all the lines involved in a multi-line expression should be reported. Take for example this simple code: x = [int(c, 16) for c in '0123456789ABCDEFG' if c.isdigit() or c.isupper()] With Python 2 the traceback is: Traceback (most recent call last): File "deleteme.py", line 3, in if c.isdigit() or c.isupper()] ValueError: invalid literal for int() with base 16: 'G' Which is not very helpful, because you don't see the int() call that is causing the error in the first place and you don't see where the G comes from. Incidentally, for this specific case, the traceback is a bit better on Python3: Traceback (most recent call last): File "deleteme.py", line 2, in for c in '0123456789ABGDEF' File "deleteme.py", line 3, in if c.isdigit() or c.isupper()] ValueError: invalid literal for int() with base 16: 'G' But this still misses the int() call. IMHO it would be better to have something like: Traceback (most recent call last): File "deleteme.py", lines 1-3, in x = [int(c, 16) for c in '0123456789ABCDEFG' if c.isdigit() or c.isupper()] ValueError: invalid literal for int() with base 16: 'G' If this is rejected for some reason, I think printing the first line -- rather than the last -- would still be an improvement, because in most of the cases the first line contains more information (e.g. the name of the function with a multi-line list of args, a raise/assert with the name of the exception and part of the message, the operation done for each element of a genexp/listcomp). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 09:15:33 2013 From: report at bugs.python.org (Demian Brecht) Date: Tue, 30 Apr 2013 07:15:33 +0000 Subject: [issue17272] request.full_url: unexpected results on assignment In-Reply-To: <1361512602.9.0.97298415685.issue17272@psf.upfronthosting.co.za> Message-ID: <1367306133.29.0.532938497622.issue17272@psf.upfronthosting.co.za> Demian Brecht added the comment: Issue 8280 reports the error by way of urlopen(). In light of that, would it not make more sense to have the *Opener be responsible for determining which parts of the url should be used? i.e. request.py, line ~1255: r.url = req.get_full_url() might instead be r.url = req.full_url.split('#')[0] To me, it would make more sense to have the client code (in this case, meaning the consumer of the Request object, which is the *Opener) be smart enough to know what parts of the url should be used in the HTTP request than to have the Request object have inconsistencies in the set and subsequent get values for full_url. I wouldn't have an issue at all with adding a new patch that (on top of implementing full_url): 1. Adds identical tests to get_full_url for full_url 2. Changes the client code in *Opener (and anywhere else known to exhibit the same behaviour) to strip the URL fragment for the HTTP request I don't believe that this change would be any more of a backwards compatibility risk than what's currently in the patch as the logic in terms of urlopen is kept. The risk of dependencies on fragment-less full_urls however, would remain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 09:20:14 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 30 Apr 2013 07:20:14 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1367306414.92.0.508296324822.issue17192@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I've got this and all of the fixes necessary for 3.3, default and 2.7 in my local repositories. odd thing in the 3.2 patch: it is entirely unclear to me if the issue 10309 fix needs to be kept. i included it as it was missing from 3.2 after previous commits (3.3 and 3.4 still kept it). 2.7 needs it as well. the other part of the patch is the issue 11729 fix that already exists upstream being reapplied; it was inadvertently undone during the upgrade. I _could_ push fixes for all branches at once right now unless pushes to 3.2 are blocked and prevent me from pushing anything. (rant: at which point i declare "hg hell" and feel like giving up because it simply has gotten in the way throughout this entire process rather than helping... i'll be forced to manually create diffs and reapply them to _other_ hg checkouts? not so useful. surely someone will stupidly claim i'm holding hg wrong instead of the tool being unhelpful). We need to GET RID of libffi being bundled as part of the source release in 3.4. this is disgusting. ---------- keywords: +patch Added file: http://bugs.python.org/file30076/issue17192-refix-3.2-gps01.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 09:21:49 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 07:21:49 +0000 Subject: [issue17876] Doc issue with threading.Event In-Reply-To: <1367301985.85.0.51301072011.issue17876@psf.upfronthosting.co.za> Message-ID: <1367306509.52.0.979885402693.issue17876@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 09:31:55 2013 From: report at bugs.python.org (Georg Brandl) Date: Tue, 30 Apr 2013 07:31:55 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1367307115.74.0.749311890458.issue17192@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, 3.2 block disabled, push away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 09:38:48 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 07:38:48 +0000 Subject: [issue17714] str.encode('base64') add trailing new line character. It is not documented. In-Reply-To: <1365867569.46.0.547710519327.issue17714@psf.upfronthosting.co.za> Message-ID: <1367307528.95.0.802763076026.issue17714@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: needs patch -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 09:54:49 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Apr 2013 07:54:49 +0000 Subject: [issue17852] Built-in module _io can loose data from buffered files at exit In-Reply-To: Message-ID: STINNER Victor added the comment: > It's guaranteed for exit(), not _Exit()/_exit(). Oops ok, thanks. 2013/4/30 Charles-Fran?ois Natali : > > Charles-Fran?ois Natali added the comment: > >> Hum, POSIX (2004) is not so strict: >> "Whether open streams are flushed or closed, or temporary files are >> removed is implementation-defined." >> http://pubs.opengroup.org/onlinepubs/009695399/functions/exit.html > > You're looking at the wrong section: > > "The exit() function shall then flush all open streams with unwritten > buffered data, close all open streams" > > Then a couple lines below: > > "The _Exit() [CX] and _exit() functions shall not call functions > registered with atexit() nor any registered signal handlers. Whether > open streams are flushed or closed, or temporary files are removed is > implementation-defined." > > It's guaranteed for exit(), not _Exit()/_exit(). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 10:03:32 2013 From: report at bugs.python.org (koobs) Date: Tue, 30 Apr 2013 08:03:32 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1367309012.09.0.775649179144.issue17192@psf.upfronthosting.co.za> koobs added the comment: Ready to confirm on buildbots when this lands Also, libffi-3.0.13 is installed on my buildbots if you want to use -custom to have a play, I can be pinged anytime on IRC if I can be of any assistance. koobs @ #python-dev ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 10:05:37 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Apr 2013 08:05:37 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <3b0FfS6BT0z7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 7a2e0c1bb1a9 by Gregory P. Smith in branch '3.2': * Fix issue 17192 for 3.2 - reapply the issue11729 patch that was undone http://hg.python.org/cpython/rev/7a2e0c1bb1a9 New changeset aa3371fa9773 by Gregory P. Smith in branch '3.3': * Fix PART of issue 17192 for 3.3 - reapply the issue11729 patch http://hg.python.org/cpython/rev/aa3371fa9773 New changeset e0fdc21c7d13 by Gregory P. Smith in branch 'default': * Fix PART of issue 17192 for 3.4 - reapply the issue11729 patch http://hg.python.org/cpython/rev/e0fdc21c7d13 New changeset c665abe15c4a by Gregory P. Smith in branch '3.3': * Fix remaining bits of issue 17192 for 3.3 - these changes http://hg.python.org/cpython/rev/c665abe15c4a New changeset 688bc0b44d96 by Gregory P. Smith in branch 'default': * Fix remaining bits of issue 17192 for 3.4 - these changes http://hg.python.org/cpython/rev/688bc0b44d96 New changeset 663800e18fef by Gregory P. Smith in branch '3.2': This local change was lost during the fixing of issue17192 to update http://hg.python.org/cpython/rev/663800e18fef New changeset 7438d202e380 by Gregory P. Smith in branch '2.7': This local change was lost during the fixing of issue17192 to update http://hg.python.org/cpython/rev/7438d202e380 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 10:05:38 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Apr 2013 08:05:38 +0000 Subject: [issue10309] dlmalloc.c needs _GNU_SOURCE for mremap() In-Reply-To: <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za> Message-ID: <3b0FfT4y16z7Ljq@mail.python.org> Roundup Robot added the comment: New changeset 663800e18fef by Gregory P. Smith in branch '3.2': This local change was lost during the fixing of issue17192 to update http://hg.python.org/cpython/rev/663800e18fef New changeset 7438d202e380 by Gregory P. Smith in branch '2.7': This local change was lost during the fixing of issue17192 to update http://hg.python.org/cpython/rev/7438d202e380 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 10:05:39 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Apr 2013 08:05:39 +0000 Subject: [issue11729] libffi assembler relocation check is not robust, fails with clang In-Reply-To: <1301575120.29.0.707250693117.issue11729@psf.upfronthosting.co.za> Message-ID: <3b0FfV3lmMz7LkX@mail.python.org> Roundup Robot added the comment: New changeset 7a2e0c1bb1a9 by Gregory P. Smith in branch '3.2': * Fix issue 17192 for 3.2 - reapply the issue11729 patch that was undone http://hg.python.org/cpython/rev/7a2e0c1bb1a9 New changeset aa3371fa9773 by Gregory P. Smith in branch '3.3': * Fix PART of issue 17192 for 3.3 - reapply the issue11729 patch http://hg.python.org/cpython/rev/aa3371fa9773 New changeset e0fdc21c7d13 by Gregory P. Smith in branch 'default': * Fix PART of issue 17192 for 3.4 - reapply the issue11729 patch http://hg.python.org/cpython/rev/e0fdc21c7d13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 10:10:48 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Apr 2013 08:10:48 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367304634.06.0.617003995796.issue17870@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: >> It is the same question than yours: is there a platform with an integer type wider than a pointer (intptr_t/void*)? > It's x86. sizeof(void*) == 4, sizeof(long long) == 8. Ah yes. So "SIZEOF_VOID_P <=" is not a good test. File position (off_t) size can be 64 bit on a 32-bit system (like Linux/i386 and Win32), whereas pointers size is 32 bit. I don't think that we can rely on the availability of PY_LONG_LONG, it may depend on the compiler or even on the compiler options. IMO, if we decide to add functions for intmax_t and uintmax_t types, the safest option is to only define functions if the real C type (intmax_t and uintmax_t types) is available. I mean, we should not guess intmax_t ourself, or we may choose the wrong type (too small type). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 10:28:24 2013 From: report at bugs.python.org (Nadeem Vawda) Date: Tue, 30 Apr 2013 08:28:24 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1367310504.11.0.985611352243.issue17843@psf.upfronthosting.co.za> Nadeem Vawda added the comment: Benjamin, please cherry-pick this for 2.7.4 as well (changesets b7bfedc8ee18 and 529c4defbfd7). ---------- stage: needs patch -> commit review versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 10:32:24 2013 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 30 Apr 2013 08:32:24 +0000 Subject: [issue17192] libffi-3.0.13 import In-Reply-To: <1360677172.63.0.353475776128.issue17192@psf.upfronthosting.co.za> Message-ID: <1367310744.44.0.834412512614.issue17192@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 10:51:11 2013 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 30 Apr 2013 08:51:11 +0000 Subject: [issue17868] pprint long non-printable bytes as hexdump In-Reply-To: <1367259569.59.0.63399196745.issue17868@psf.upfronthosting.co.za> Message-ID: <1367311871.38.0.57803888418.issue17868@psf.upfronthosting.co.za> anatoly techtonik added the comment: Some issues: 1. the hex converting logic doesn't belong to base64 module - there is no chance a person without StackOverflow access can find it 2. i'd put issue17862 first as a dependency for this one, because proposed itertools.chunks() can be further optimized (chunking endless sequences with constant memory overhead, pypy specific speedups, etc) I like that this is not over-engineered. In my hexdump module I got too involved with problems of parsing/producing full dumps in a way compatible with Python 2/3. So I have to postpone my own user story until finally I run out of time. Probably hexdump.dump() returning string will make it a useful API for the primary user story. hexdump.dumpgen() as a line generator with 16 hexadecimal bytes delimited by space should cover all other use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 11:07:33 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 09:07:33 +0000 Subject: [issue17877] Skip test_variable_tzname when the zoneinfo database is missing Message-ID: <1367312853.26.0.203809750785.issue17877@psf.upfronthosting.co.za> New submission from Ezio Melotti: If the Olson/zoneinfo/tz database is missing, test_variable_tzname fails: [1/1] test_email Warning -- sys.path was modified by test_email test test_email failed -- Traceback (most recent call last): File "/usr/local/lib/python3.3/test/support.py", line 1311, in inner return func(*args, **kwds) File "/usr/local/lib/python3.3/test/test_email/test_utils.py", line 133, in test_variable_tzname self.assertEqual(t1.tzname(), 'MSK') AssertionError: 'Europe' != 'MSK' - Europe + MSK The attached patch checks if /usr/share/zoneinfo or /usr/lib/zoneinfo exist, and skip the test if they don't. This test is already skipped on Windows. ---------- components: Tests files: olson.diff keywords: patch messages: 188145 nosy: belopolsky, ezio.melotti, r.david.murray priority: normal severity: normal stage: patch review status: open title: Skip test_variable_tzname when the zoneinfo database is missing type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30077/olson.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 11:16:06 2013 From: report at bugs.python.org (Dmi Baranov) Date: Tue, 30 Apr 2013 09:16:06 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367313366.09.0.0866106469384.issue12458@psf.upfronthosting.co.za> Changes by Dmi Baranov : ---------- nosy: +dmi.baranov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 11:31:10 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Tue, 30 Apr 2013 09:31:10 +0000 Subject: [issue17721] Help button on preference window doesn't work In-Reply-To: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> Message-ID: <1367314270.66.0.708987179501.issue17721@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: Hi, Terry! I already signed the Contributor License Agreement Form. Attached is a new patch with the buttons commented out and a small comment explaining why I did that. I hope the patch is better now. ---------- Added file: http://bugs.python.org/file30078/Issue17721-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 11:51:57 2013 From: report at bugs.python.org (Paul Moore) Date: Tue, 30 Apr 2013 09:51:57 +0000 Subject: [issue17878] There is no way to get a list of available codecs Message-ID: <1367315517.44.0.647690228885.issue17878@psf.upfronthosting.co.za> New submission from Paul Moore: The codecs module allows the user to register additional codecs, but does not offer a means of getting a list of registered codecs. This is important, for example, in a tool to re-encode files. It is reasonable to expect that such a tool would offer a list of supported encodings, to assist the user. For example, the -l option of the iconv command. ---------- components: Unicode messages: 188147 nosy: ezio.melotti, pmoore priority: normal severity: normal status: open title: There is no way to get a list of available codecs type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 11:56:17 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 09:56:17 +0000 Subject: [issue17878] There is no way to get a list of available codecs In-Reply-To: <1367315517.44.0.647690228885.issue17878@psf.upfronthosting.co.za> Message-ID: <1367315777.16.0.234127910901.issue17878@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +lemburg, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 12:21:39 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Apr 2013 10:21:39 +0000 Subject: [issue17878] There is no way to get a list of available codecs In-Reply-To: <1367315517.44.0.647690228885.issue17878@psf.upfronthosting.co.za> Message-ID: <1367317299.48.0.415632320299.issue17878@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 12:32:04 2013 From: report at bugs.python.org (koobs) Date: Tue, 30 Apr 2013 10:32:04 +0000 Subject: [issue17773] test_pydoc fails with the installed testsuite (2.7) In-Reply-To: <1366195138.79.0.33949510354.issue17773@psf.upfronthosting.co.za> Message-ID: <1367317924.54.0.27786403072.issue17773@psf.upfronthosting.co.za> koobs added the comment: I am seeing a similar set of test failures buildbots for 2.7 that are relatively recent too: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%2Bclang%202.7/builds/479/steps/test/logs/stdio I cant account for test_html_doc failure but I have seen apropos tests fail in the past here due to third party modules doing funny things. I upstreamed a fix in buildbot which addressed it as seen in this commit: https://github.com/buildbot/buildbot/commit/126e02341c76bd5a027c2ca5a8467aa5708228f2#master/buildbot/test/__init__.py I can test again without paramiko installed on the buildbot to see what the test failure delta is and report back ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 12:38:19 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Apr 2013 10:38:19 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1367318299.24.0.471222666373.issue17870@psf.upfronthosting.co.za> STINNER Victor added the comment: > Or maybe even better would be PyLong_FromBytes(&myinteger, sizeof(myinteger)) ? There is a private function: obj = _PyLong_FromByteArray((const unsigned char*)&myinteger, sizeof(myinteger), PY_LITTLE_ENDIAN, is_signed); Where PY_LITTLE_ENDIAN is 1 on little-endian platform, and is_signed should be 0 or 1. This function is inefficient (slow). It would be better to have a functions for intmax_t and uintmax_t types. Such functions would be enough to support other "recent" C types: intptr_t, uintptr_t, ptrdiff_t, etc. We may also add support for these types in PyArg_Parse* (ex: with "j" and "J" types, intmax_t and uintmax_t). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 12:43:08 2013 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 30 Apr 2013 10:43:08 +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: <1367318588.46.0.877625480777.issue17874@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Some sort of error is expected. On Windows any functions or classes used in a task sent the executor must be picklable/unpicklable. This means that they must be defined in an importable module rather than being defined in the interactive shell. On Unix, you can use a definition made in the interactive shell, but *only* if it was defined before starting the executor. ---------- nosy: +sbt type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 12:52:41 2013 From: report at bugs.python.org (Steffen Flemming) Date: Tue, 30 Apr 2013 10:52:41 +0000 Subject: [issue17879] corrupt download Message-ID: <1367319161.21.0.277486874869.issue17879@psf.upfronthosting.co.za> New submission from Steffen Flemming: http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tgz http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tar.bz2 at 30.04.2013 12:45 bzip2: Compressed file ends unexpectedly; ---------- components: Build messages: 188151 nosy: u14183 priority: normal severity: normal status: open title: corrupt download versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 12:54:00 2013 From: report at bugs.python.org (Steffen Flemming) Date: Tue, 30 Apr 2013 10:54:00 +0000 Subject: [issue17880] `tmpnam_r' is dangerous, better use `mkstemp' Message-ID: <1367319240.88.0.90171528174.issue17880@psf.upfronthosting.co.za> New submission from Steffen Flemming: /tmp/Python-2.7.3/./Modules/posixmodule.c:7432: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp' ---------- components: Build messages: 188152 nosy: u14183 priority: normal severity: normal status: open title: `tmpnam_r' is dangerous, better use `mkstemp' type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 13:11:58 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 11:11:58 +0000 Subject: [issue17879] corrupt download In-Reply-To: <1367319161.21.0.277486874869.issue17879@psf.upfronthosting.co.za> Message-ID: <1367320318.54.0.0807587812201.issue17879@psf.upfronthosting.co.za> Ezio Melotti added the comment: Have you tried downloading it again? ---------- nosy: +benjamin.peterson, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 13:33:19 2013 From: report at bugs.python.org (Steffen Flemming) Date: Tue, 30 Apr 2013 11:33:19 +0000 Subject: [issue17879] corrupt download In-Reply-To: <1367319161.21.0.277486874869.issue17879@psf.upfronthosting.co.za> Message-ID: <1367321599.69.0.645792926758.issue17879@psf.upfronthosting.co.za> Steffen Flemming added the comment: yes on other host now its working. was confused by it was affecting two files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 13:46:49 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 11:46:49 +0000 Subject: [issue17879] corrupt download In-Reply-To: <1367319161.21.0.277486874869.issue17879@psf.upfronthosting.co.za> Message-ID: <1367322409.76.0.564110366231.issue17879@psf.upfronthosting.co.za> Ezio Melotti added the comment: OK, I'll close the issue then. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 14:09:26 2013 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Apr 2013 12:09:26 +0000 Subject: [issue17880] `tmpnam_r' is dangerous, better use `mkstemp' In-Reply-To: <1367319240.88.0.90171528174.issue17880@psf.upfronthosting.co.za> Message-ID: <1367323766.05.0.0126688540609.issue17880@psf.upfronthosting.co.za> Christian Heimes added the comment: Please ignore the linker warning. tmpnam_r has been removed from Python 3.x. It's still available in 2.7 for legacy reasons and marked as dangerous in our docs http://docs.python.org/2.7/library/os.html#os.tempnam ---------- nosy: +christian.heimes resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 14:17:56 2013 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 30 Apr 2013 12:17:56 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <1367324276.12.0.131789054629.issue17853@psf.upfronthosting.co.za> Nick Coghlan added the comment: Aside from the spurious definition of CLASS_FREE, looks good to me. I did need to double check that PyDict_GetItem is the API that *doesn't* raise the error :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 15:00:21 2013 From: report at bugs.python.org (Roger Serwy) Date: Tue, 30 Apr 2013 13:00:21 +0000 Subject: [issue17721] Help button on preference window doesn't work In-Reply-To: <1365876479.31.0.960204905759.issue17721@psf.upfronthosting.co.za> Message-ID: <1367326821.55.0.433145634737.issue17721@psf.upfronthosting.co.za> Roger Serwy added the comment: LGTM. ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 15:06:09 2013 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 30 Apr 2013 13:06:09 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367327169.83.0.779143384662.issue12458@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > But on python-ideas, G. Rodola noted the following > assert \ > 1 == 0, \ > "error" [...] > and requested that the *second* or *middle* line should be reported. No, I was suggesting (assuming it's reasonably possible in terms of implementation) to report the whole block (3 lines) as-is. Note that the same would apply for functions. For example this: self.assertEqual(1, 2) Currently prints: Traceback (most recent call last): File "foo.py", line 7, in test_foo 2) AssertionError: 1 != 2 While instead it should: Traceback (most recent call last): File "foo.py", line 6, in test_foo self.assertEqual(1, 2) AssertionError: 1 != 2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 15:22:22 2013 From: report at bugs.python.org (Lance Helsten) Date: Tue, 30 Apr 2013 13:22:22 +0000 Subject: [issue17881] plistlib.writePlist documentation clarification for file object Message-ID: <1367328142.85.0.378048877663.issue17881@psf.upfronthosting.co.za> New submission from Lance Helsten: plistlib.writePlist documentation states """Write 'rootObject' to a .plist file. 'pathOrFile' may either be a file name or a (writable) file object.""", but if a text IO object is given for the pathOrFile object (e.g. ``io.TextIOBase`` or ``sys.stdout``) a ``TypeError`` with message "must be str, not bytes" is raised. To clarify the documentation should be changed to be """...or a (writable, binary) file object.""". ---------- messages: 188160 nosy: lanhel priority: normal severity: normal status: open title: plistlib.writePlist documentation clarification for file object type: enhancement versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 15:34:43 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Apr 2013 13:34:43 +0000 Subject: [issue17881] plistlib.writePlist documentation clarification for file object In-Reply-To: <1367328142.85.0.378048877663.issue17881@psf.upfronthosting.co.za> Message-ID: <3b0NyB74wsz7Lkm@mail.python.org> Roundup Robot added the comment: New changeset 6e9d21761fc1 by Ezio Melotti in branch '3.3': #17881: clarify documentation of plistlib. http://hg.python.org/cpython/rev/6e9d21761fc1 New changeset 1ec6d3cc217d by Ezio Melotti in branch 'default': #17881: merge with 3.3. http://hg.python.org/cpython/rev/1ec6d3cc217d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 15:35:15 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 13:35:15 +0000 Subject: [issue17881] plistlib.writePlist documentation clarification for file object In-Reply-To: <1367328142.85.0.378048877663.issue17881@psf.upfronthosting.co.za> Message-ID: <1367328915.53.0.339165468349.issue17881@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: -> ezio.melotti components: +Documentation nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 15:41:49 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Apr 2013 13:41:49 +0000 Subject: [issue17853] Conflict between lexical scoping and name injection in __prepare__ In-Reply-To: <1367050201.95.0.307419620832.issue17853@psf.upfronthosting.co.za> Message-ID: <3b0P6N2nSbz7Lkm@mail.python.org> Roundup Robot added the comment: New changeset cf65c7a75f55 by Benjamin Peterson in branch 'default': check local class namespace before reaching for cells (closes #17853) http://hg.python.org/cpython/rev/cf65c7a75f55 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 15:45:24 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 30 Apr 2013 13:45:24 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1367329524.09.0.518618429512.issue17843@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm just going to branch off the current 2.7 branch at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 15:46:21 2013 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 30 Apr 2013 13:46:21 +0000 Subject: [issue17843] Lib/test/testbz2_bigmem.bz2 trigger virus warnings In-Reply-To: <1366887968.16.0.8223632695.issue17843@psf.upfronthosting.co.za> Message-ID: <1367329581.77.0.141267551615.issue17843@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ah, sorry, I see what you mean. Will do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 16:16:24 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Apr 2013 14:16:24 +0000 Subject: [issue17876] Doc issue with threading.Event In-Reply-To: <1367301985.85.0.51301072011.issue17876@psf.upfronthosting.co.za> Message-ID: <1367331384.4.0.0729897381841.issue17876@psf.upfronthosting.co.za> R. David Murray added the comment: I'm sorry, the 3.2 docs are no longer updated. The effective way to become aware of these changes between versions is via the 'version changed' tags in the new documentation. You will note that these tags exist in the 3.3 docs. ---------- nosy: +r.david.murray resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 16:38:29 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Apr 2013 14:38:29 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367332709.21.0.245850426612.issue12458@psf.upfronthosting.co.za> R. David Murray added the comment: I agree that printing all the lines would be best, and printing the first line would be second best. I suspect once someone works out how to do the latter it is just as easy to do the former, though :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 16:41:06 2013 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Apr 2013 14:41:06 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367318299.24.0.471222666373.issue17870@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Some Google searchs told me that no CPU support 128-bit integer and using 64-bit integer as intmax_t is safe. GCC has a __int128 type, but I didn't find on which platform it is supported, nor if intmax_t is __int128 in this case. Microsoft Visual Studio has stdint.h since its version 2010 (which is the version required to compile Python 3.4 on Windows according to the Python developer guide). I propose a safer definition of Py_intmax_t: #ifdef HAVE_UINTMAX_T typedef uintmax_t Py_uintmax_t; typedef intmax_t Py_intmax_t; #elif SIZEOF_SIZE_T >= 8 typedef size_t Py_uintmax_t; typedef Py_ssize_t Py_intmax_t; #elif defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG >= 8 typedef unsigned PY_LONG_LONG Py_uintmax_t; typedef PY_LONG_LONG Py_intmax_t; #else # error "Python needs a typedef for Py_uintmax_t in pyport.h." #endif I don't think that a fallback on the long type is required, testing size_t should be enough. At least, the compilation fails if the Py_intmax_t type cannot be defined. Having generic PyLong_FromUintMax_t() and PyLong_AsUintMax_t() functions (and signed version) would simplify the support of other OS types with variable size: time_t, clock_t, pid_t, gid_t, uid_t, off_t, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 18:55:43 2013 From: report at bugs.python.org (bharper) Date: Tue, 30 Apr 2013 16:55:43 +0000 Subject: [issue17882] test_objecttypes fails for 3.2.4 on CentOS 6 Message-ID: <1367340943.59.0.839415774822.issue17882@psf.upfronthosting.co.za> New submission from bharper: Hello, I have been running into some issues with test_objecttypes with 3.2.4 on CentOS 6: ====================================================================== FAIL: test_objecttypes (test.test_sys.SizeofTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.2.4/Lib/test/test_sys.py", line 789, in test_objecttypes check(int, s) File "/builddir/build/BUILD/Python-3.2.4/Lib/test/support.py", line 1155, in check_sizeof test.assertEqual(result, size, msg) AssertionError: 856 != 816 : wrong size for : got 856, expected 816 ---------------------------------------------------------------------- Looking over the bugs, I do not see anyone else having issues with this test. It does appear that this test got updated in issue 15467. Any insight would be greatly appreciate. -Ben ---------- components: Build messages: 188169 nosy: bharper priority: normal severity: normal status: open title: test_objecttypes fails for 3.2.4 on CentOS 6 versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 19:06:31 2013 From: report at bugs.python.org (Nathan Housel) Date: Tue, 30 Apr 2013 17:06:31 +0000 Subject: [issue15088] PyGen_NeedsFinalizing is public, but undocumented In-Reply-To: <1339906861.99.0.42415214654.issue15088@psf.upfronthosting.co.za> Message-ID: <1367341591.81.0.316533652946.issue15088@psf.upfronthosting.co.za> Nathan Housel added the comment: Please correct me if I'm wrong, but I think PyGen_NeedsFinalizing should not be an API function because it is only used, nor _PyGen_FetchStopIterationValue. In the attached patch I've removed PyGen_NeedsFinalizing and _PyGen_FetchStopIterationValue fom the public API. ---------- keywords: +patch nosy: +plasticgap Added file: http://bugs.python.org/file30079/Issue15088.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 19:19:03 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Apr 2013 17:19:03 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367342343.54.0.125674029303.issue12458@psf.upfronthosting.co.za> Terry J. Reedy added the comment: OK, you would make tracebacks even longer by adding lines that might or might not be be useful. Suppose the error is not the assertion itself, but in one of the expressions (in this case, being compared for equality): self.assertEqual(1/0, 1000) Or reverse the two expressions, or replace the method call with an assert statement and join the expressions with '=='. Would you still print both lines? My experience on python-list is that people more often have a problem with a whole line being too much context, not too little. Someone writes 'print(complicated_expression)' and gets a Unicode error. Is the problem the expression or the printing of the result to a limited charset console? Both cases have been posted. I sometimes advise people to break their elegant one-liners into two or more lines to make the actual error expression more obvious. If we were to revise the CPython compiler and traceback generator, that is what I think the aim should be. Such a change would include printing multiple lines when the expression spans multiple lines. This might have to be limited to debug builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 19:20:23 2013 From: report at bugs.python.org (Brian Curtin) Date: Tue, 30 Apr 2013 17:20:23 +0000 Subject: [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1367342423.26.0.144490142.issue15984@psf.upfronthosting.co.za> Brian Curtin added the comment: In the "Otherwise it coerces" sentence, obj should probably be ``obj``. ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 19:23:14 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Apr 2013 17:23:14 +0000 Subject: [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1367342594.95.0.0495277154873.issue15984@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 19:41:54 2013 From: report at bugs.python.org (=?utf-8?q?Guilherme_Sim=C3=B5es?=) Date: Tue, 30 Apr 2013 17:41:54 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1367343714.2.0.715384234739.issue17822@psf.upfronthosting.co.za> Guilherme Sim?es added the comment: I didn't test Roger's patch because I have limited access to Windows, but I think it should solve this specific issue. But the problem is actually more general. For example, the same odd behavior happens when you try to run a module without saving. On MacOS one modal dialog pops up, but in Windows you can open as many dialogs as you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 20:04:56 2013 From: report at bugs.python.org (Antonio Cavallo) Date: Tue, 30 Apr 2013 18:04:56 +0000 Subject: [issue17819] removes need for CONFIG_SITE external configuration In-Reply-To: <1366676555.13.0.0940928027778.issue17819@psf.upfronthosting.co.za> Message-ID: <1367345096.73.0.136154857046.issue17819@psf.upfronthosting.co.za> Changes by Antonio Cavallo : ---------- nosy: +benjamin.peterson, doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 20:56:00 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Apr 2013 18:56:00 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367348160.17.0.0401402206745.issue17857@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +benjamin.peterson, larry priority: normal -> release blocker status: closed -> open versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 20:58:08 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Apr 2013 18:58:08 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367348288.52.0.553543602125.issue12458@psf.upfronthosting.co.za> R. David Murray added the comment: The point is to print one logical line. Printing a fragment of the logical line is clearly not very helpful...I have found myself a number of times looking for the bug in the fragment printed, and (quickly, but still...) then remembering that the traceback just prints the last physical line and the problem might be earlier. Providing a caret is probably impossible. I don't think the bytecode contains enough information to even make a guess as to where a caret should go. I'm not even sure we can get the logical line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 20:59:07 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Apr 2013 18:59:07 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367348347.61.0.0251655567769.issue17857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this fix should be included in the next regression release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 21:03:40 2013 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Apr 2013 19:03:40 +0000 Subject: [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1367348620.45.0.983480324527.issue15984@psf.upfronthosting.co.za> R. David Murray added the comment: So (speaking from C API ignorance here), if you pass it a unicode subclass you get back an instance of the base unicode type? Is that what coercion means here? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 21:05:15 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Apr 2013 19:05:15 +0000 Subject: [issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths In-Reply-To: <1365391259.55.0.44522935247.issue17656@psf.upfronthosting.co.za> Message-ID: <1367348715.73.0.399903082196.issue17656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 21:12:13 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Apr 2013 19:12:13 +0000 Subject: [issue17585] IDLE - regression with exit() and quit() In-Reply-To: <1364715900.07.0.37447718586.issue17585@psf.upfronthosting.co.za> Message-ID: <1367349133.11.0.121148310254.issue17585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This fix introduces other bug (see issue17838). I think this fix with issue17838 fix should be included in next regression releases. ---------- nosy: +benjamin.peterson, georg.brandl, larry priority: critical -> release blocker status: closed -> open versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 21:24:42 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Apr 2013 19:24:42 +0000 Subject: [issue17838] Can't assign a different value for sys.stdin in IDLE In-Reply-To: <1366872984.94.0.234893757031.issue17838@psf.upfronthosting.co.za> Message-ID: <1367349882.28.0.900106155417.issue17838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Due to the coming of regression fix releases the fix for this issue urgently needed. It fixes a regression in issue17585 which fixes a regression in last bugfix releases. ---------- nosy: +benjamin.peterson, georg.brandl, larry priority: normal -> release blocker versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 21:30:47 2013 From: report at bugs.python.org (Kyle Roberts) Date: Tue, 30 Apr 2013 19:30:47 +0000 Subject: [issue15984] Wrong documentation for PyUnicode_FromObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1367350247.95.0.96827371341.issue15984@psf.upfronthosting.co.za> Kyle Roberts added the comment: Thanks for the quick responses. Brian: Nice catch, I'll add the ``obj`` shortly. R. David: You're correct, that's exactly what happens, and what coercion means here. The language is almost the same as PyUnicode_FromEncodedObject()'s documentation, but if it's unclear I don't mind changing both. The code's comment offers another way of describing the "type modification": /* For a Unicode subtype that's not a Unicode object, return a true Unicode object with the same data. */ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 21:43:48 2013 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Apr 2013 19:43:48 +0000 Subject: [issue15984] Wrong documentation for PyUnicode_FromObject() and PyUnicode_FromEncodedObject() In-Reply-To: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> Message-ID: <1367351028.28.0.763755270189.issue15984@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps we should correct a documentation for PyUnicode_FromEncodedObject() too. Coercing doesn't look as right term for decoding. ---------- title: Wrong documentation for PyUnicode_FromObject() -> Wrong documentation for PyUnicode_FromObject() and PyUnicode_FromEncodedObject() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 21:47:25 2013 From: report at bugs.python.org (Ben Read) Date: Tue, 30 Apr 2013 19:47:25 +0000 Subject: [issue17864] IDLE won't run In-Reply-To: <1367173337.57.0.3678200637.issue17864@psf.upfronthosting.co.za> Message-ID: <2DD64961-2AE0-4F0B-A4C6-1E503D193ECF@denmarkfarmbarn.co.uk> Ben Read added the comment: Good news - ran the sudo command, entered the password but I could still not make the directory, but I could within Finder - this time without a password. Tried the IDLE application again and it now works. Thank you once again for your help in resolving this. Regards, Ben Begin forwarded message: > From: Ben Read > Subject: Re: [issue17864] IDLE won't run > Date: 29 April 2013 22:12:03 BST > To: Python tracker > > Thank you for getting me this far - it's funny that Python has been the program to make this problem apparent, but looking closer, there are other issues such as not being able to create a new folder in the user folder without entering username and password. > > I appreciate your help in diagnosing the problem. > > Ben > > > On 29 Apr 2013, at 10:37, Ned Deily wrote: > >> >> Ned Deily added the comment: >> >> The "ls" shows that, for some reason, your home directory is owned by user "temp", not by user "ben". That's not good. Try doing this: >> >> sudo chown ben /Users/ben/ >> >> But we're way past an IDLE or Python problem here. This is a basic Unix system administration issue. >> >> ---------- >> >> _______________________________________ >> Python tracker >> >> _______________________________________ > ---------- title: IDLE fails to launch when it cannot create .idlerc directory -> IDLE won't run _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 21:55:49 2013 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Apr 2013 19:55:49 +0000 Subject: [issue17857] sqlite modules doesn't build with 2.7.4 on Mac OS X 10.4 In-Reply-To: <1367088365.18.0.161187485212.issue17857@psf.upfronthosting.co.za> Message-ID: <1367351749.9.0.908452519269.issue17857@psf.upfronthosting.co.za> Ned Deily added the comment: Georg, do you want a 3.2 patch for this as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 22:35:17 2013 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Apr 2013 20:35:17 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <3b0ZHT07csz7Lk4@mail.python.org> Roundup Robot added the comment: New changeset 474f28bf67b3 by Ezio Melotti in branch '3.3': #16518: add "bytes-like object" to the glossary. http://hg.python.org/cpython/rev/474f28bf67b3 New changeset 747cede24367 by Ezio Melotti in branch 'default': #16518: merge with 3.3. http://hg.python.org/cpython/rev/747cede24367 New changeset 1b92a0112f5d by Ezio Melotti in branch '2.7': #16518: add "bytes-like object" to the glossary. http://hg.python.org/cpython/rev/1b92a0112f5d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 23:05:16 2013 From: report at bugs.python.org (Zachary Ware) Date: Tue, 30 Apr 2013 21:05:16 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter Message-ID: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> New submission from Zachary Ware: Ezio, you brought up the fact that the 2.7 Windows buildbots were skipping the Tkinter tests in Terry's core-mentorship thread about tkinter on Windows last month, and I've finally learned what is causing that failure. It appears that when 689a813f4afc and df39b0bc4106 were committed, they were not backported to 2.7. Attached is a patch to backport those two changesets, which should make things (more) right. This only affects running tests via PCbuild/rt.bat (or Tools/buildbot/test.bat, which calls PCbuild/rt.bat), and doesn't do anything for finding the tcl/tk .dlls any other time. ---------- components: Tests, Tkinter, Windows files: 2.7_rt.bat_tcltk_fix.diff keywords: patch messages: 188184 nosy: ezio.melotti, terry.reedy, zach.ware priority: normal severity: normal status: open title: Fix buildbot testing of Tkinter type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file30080/2.7_rt.bat_tcltk_fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 23:06:46 2013 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 30 Apr 2013 21:06:46 +0000 Subject: [issue17825] Indentation.offset and SyntaxError.offset mismatch In-Reply-To: <1366789582.23.0.0218552351895.issue17825@psf.upfronthosting.co.za> Message-ID: <1367356006.0.0.155122652541.issue17825@psf.upfronthosting.co.za> Florent Xicluna added the comment: Patch updated with latest changes of trunk. ---------- Added file: http://bugs.python.org/file30081/patch_indenterror_offset_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 23:16:28 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 21:16:28 +0000 Subject: [issue17883] Fix buildbot testing of Tkinter In-Reply-To: <1367355915.98.0.26398929673.issue17883@psf.upfronthosting.co.za> Message-ID: <1367356588.45.0.289200812615.issue17883@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +roger.serwy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 23:19:18 2013 From: report at bugs.python.org (Dmi Baranov) Date: Tue, 30 Apr 2013 21:19:18 +0000 Subject: [issue17829] csv.Sniffer.snif doesn't set up the dialect properly for a csv created with dialect=csv.excel_tab and containing quote (") char In-Reply-To: <1366815960.68.0.342437673136.issue17829@psf.upfronthosting.co.za> Message-ID: <1367356758.33.0.679099863736.issue17829@psf.upfronthosting.co.za> Changes by Dmi Baranov : ---------- nosy: +dmi.baranov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 23:20:21 2013 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Apr 2013 21:20:21 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367356821.06.0.030867292176.issue12458@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >>> Printing a fragment of the logical line is clearly not very helpful Given the unbounded and recursive nature of 'logical line', I disagree with that as a general, versus special-case, statement. Consider: r(a()/b(), d()/e(), g=h()/i(), ) If either e() or i() returns 0, printing all 4 lines is less helpful, by adding noise (which line has the error?), than just printing the 1 line with the ZeroDivisionError. The context is irrelevant. Or consider: mymegalist = { a, b, ... <500 lines, one item per line> xyz, } If 1 of the expressions raises an error, do you really want all 500 lines in the traceback? Again, the context is probably irrelevant. Quite aside from this, 'd()/e(),' and 'g=h()/i(),' are both legal logical lines in themselves (though with different semantics) as well as being fragments of the r call. Moreover, the multiline r call above may itself be just a fragment of a call to another function (further indented). The practical difficulty for the proposal, even if limited to multiline calls, is that any bare call could either be part of a larger expression by returning something or be a statement operating through side-effects. Similarly, any 'var=f()' call could either be an assignment statement or keyword arg expression in some other call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 23:30:47 2013 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 30 Apr 2013 21:30:47 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1367357447.14.0.115903032386.issue12458@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Consider: > r(a()/b(), > d()/e(), > g=h()/i(), > ) I tried to run this, with e() == 0, and got: Traceback (most recent call last): File "deleteme.py", line 6, in d()/e(), ZeroDivisionError: division by zero This is actually a good point, because in this specific case the traceback is correct, and showing all the lines would make things worse. > If 1 of the expressions raises an error, do you really want > all 500 lines in the traceback? I assume it wouldn't be too difficult to limit the output to 3-5 lines max. Someone should try to fiddle with the code I indicated in msg144813, and see what can be done. If there are enough informations it might be possible to keep reporting a single line for the aforementioned case, but report more lines for the cases listed in the other messages; if there aren't enough informations we will have to abandon the idea (or find a way to retrieve them). ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 30 23:43:24 2013 From: report at bugs.python.org (Dmi Baranov) Date: Tue, 30 Apr 2013 21:43:24 +0000 Subject: [issue17630] Create a pure Python zipfile importer In-Reply-To: <1365026756.4.0.0705755124355.issue17630@psf.upfronthosting.co.za> Message-ID: <1367358204.54.0.687151038958.issue17630@psf.upfronthosting.co.za> Changes by Dmi Baranov : ---------- nosy: +dmi.baranov _______________________________________ Python tracker _______________________________________