From report at bugs.python.org Sat Feb 1 00:07:01 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 31 Jan 2014 23:07:01 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1391209621.97.0.659040378865.issue12915@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 00:34:26 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 31 Jan 2014 23:34:26 +0000 Subject: [issue17170] string method lookup is too slow In-Reply-To: <1360425571.01.0.152514473227.issue17170@psf.upfronthosting.co.za> Message-ID: <1391211266.43.0.0238394918212.issue17170@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 00:34:30 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 31 Jan 2014 23:34:30 +0000 Subject: [issue17170] string method lookup is too slow In-Reply-To: <1360425571.01.0.152514473227.issue17170@psf.upfronthosting.co.za> Message-ID: <1391211270.43.0.0695957687467.issue17170@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 00:37:17 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 31 Jan 2014 23:37:17 +0000 Subject: [issue13651] Improve redirection in urllib In-Reply-To: <1324577379.51.0.5468672041.issue13651@psf.upfronthosting.co.za> Message-ID: <1391211437.22.0.0511043546134.issue13651@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 00:40:30 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 Jan 2014 23:40:30 +0000 Subject: [issue13657] IDLE doesn't support sys.ps1 and sys.ps2. In-Reply-To: <1324640742.58.0.860347532783.issue13657@psf.upfronthosting.co.za> Message-ID: <1391211630.2.0.722868423827.issue13657@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If there is a discussion of sys.ps1 and sys.ps2 in the tutorial, then add a note that they are not supported in Idle. The only quick action on this issue would be to reject and close. I am still opposed to the proposal as presented, for reasons stated in my first message. To expand a bit on what I said before: the prompts 'work', at least for the Windows console because a) it is limited to fixed-pitch fonts, so that '>>>' and '...' have the same width; b) its selection box is always a rectangle, so if one starts with the first character of a line and move down and right, the prompts are excluded. I do not know what is true for *nix consoles, but neither is true for Idle. I would only tolerate the added nuisance of a secondary prompt if it were made to take up the same space (pixels) as the primary prompt so that indents could be 4 spaces instead of 8 space tabs. If we were to get the prompts from the remote process, they should be sent as part of every normal response output instead of being a separate enquiry. Part of my opposition to custom prompts is that the standard prompts, even though a nuisance, are instantly recognizable in messages. The can also be recognized and removed by code, as when pasting. See #1178, which I hope to act on soon. Neither is true of custom prompts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 00:45:11 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 31 Jan 2014 23:45:11 +0000 Subject: [issue17911] Extracting tracebacks does too much work In-Reply-To: <1367789486.16.0.484658151136.issue17911@psf.upfronthosting.co.za> Message-ID: <1391211911.01.0.7396597309.issue17911@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- keywords: -easy nosy: +yselivanov versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 00:46:10 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 31 Jan 2014 23:46:10 +0000 Subject: [issue18554] os.__all__ is incomplete In-Reply-To: <1374759898.69.0.624700414808.issue18554@psf.upfronthosting.co.za> Message-ID: <1391211970.53.0.839155894102.issue18554@psf.upfronthosting.co.za> Yury Selivanov added the comment: bump? ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 00:51:56 2014 From: report at bugs.python.org (Ethan Furman) Date: Fri, 31 Jan 2014 23:51:56 +0000 Subject: [issue20467] Confusing wording about __init__ In-Reply-To: <1391208094.95.0.178232051767.issue20467@psf.upfronthosting.co.za> Message-ID: <1391212316.01.0.365656051527.issue20467@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 00:58:40 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Jan 2014 23:58:40 +0000 Subject: [issue14665] faulthandler prints tracebacks in reverse order In-Reply-To: <1335305835.2.0.186027990116.issue14665@psf.upfronthosting.co.za> Message-ID: <1391212720.44.0.982595698485.issue14665@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue #19306 changed faulthandler output to mention explicitly the frame order. I'm still opposed to reverse_frames.patch for the reason I gave above. Can I close this issue as "wont fix"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:02:35 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 00:02:35 +0000 Subject: [issue17394] Add slicing support to collections.deque In-Reply-To: <1362972021.66.0.443403979058.issue17394@psf.upfronthosting.co.za> Message-ID: <1391212955.95.0.591736458632.issue17394@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:03:31 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 00:03:31 +0000 Subject: [issue14854] faulthandler: fatal error with "SystemError: null argument to internal routine" In-Reply-To: <1337417592.83.0.722972299314.issue14854@psf.upfronthosting.co.za> Message-ID: <1391213011.85.0.359594487065.issue14854@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, in fact I already fixed this issue long time ago in Python 3.3 and 3.4. --- changeset: 78341:2f1494d243ad user: Victor Stinner date: Tue Jul 31 02:55:49 2012 +0200 files: Lib/test/test_faulthandler.py Python/pythonrun.c description: Fix initialization of the faulthandler module faulthandler requires the importlib if "-X faulthandler" option is present on the command line, so initialize faulthandler after importlib. Add also an unit test. --- I'm closing the issue. Thanks for the report. ---------- resolution: -> fixed status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:05:29 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 01 Feb 2014 00:05:29 +0000 Subject: [issue20462] Python IDLE auto closed when creating a new file or open existing file In-Reply-To: <1391193371.56.0.893226127057.issue20462@psf.upfronthosting.co.za> Message-ID: <1391213129.17.0.638530319555.issue20462@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please ask for help debugging your system and installation on python-list, where more people, including some who know things I don't, can see and respond. Add more information about exactly what you did. On installation, install for one user or everyone. Did you select 'make default Python'? Then, how did you get 'Edit with IDLE'? The SO question, or one identical to it, was posted on python-list a couple of weeks ago. I asked for more info and gave detailed instructions on how to obtain such, but with no response have not been able to answer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:08:42 2014 From: report at bugs.python.org (A Hettinger) Date: Sat, 01 Feb 2014 00:08:42 +0000 Subject: [issue20469] ssl.getpeercert() should include extensions Message-ID: <1391213322.18.0.0407523257896.issue20469@psf.upfronthosting.co.za> New submission from A Hettinger: I have crafted an ssl cert which contains a custom extension, when I check the cert using OpenSSL on the commandline, I clearly see the extension, but when I have the server try to pprint.pprint(s.getpeercert()), I do not see these fields. Overall, I think it would be helpful to include extensions in ssl.getpeercert()'s returned list, but if there is a workaround for this (probably rare) issue, I would appreciate it. (I have only tested 3.4, not head) ---------- components: Extension Modules messages: 209850 nosy: oninoshiko priority: normal severity: normal status: open title: ssl.getpeercert() should include extensions versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:09:12 2014 From: report at bugs.python.org (A Hettinger) Date: Sat, 01 Feb 2014 00:09:12 +0000 Subject: [issue20469] ssl.getpeercert() should include extensions In-Reply-To: <1391213322.18.0.0407523257896.issue20469@psf.upfronthosting.co.za> Message-ID: <1391213352.95.0.0648585746785.issue20469@psf.upfronthosting.co.za> Changes by A Hettinger : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:11:48 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 00:11:48 +0000 Subject: [issue19404] Simplify per-instance control of help() output In-Reply-To: <1382772138.17.0.267743568288.issue19404@psf.upfronthosting.co.za> Message-ID: <1391213508.53.0.596164757715.issue19404@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:11:54 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 00:11:54 +0000 Subject: [issue19031] Make help() enum aware In-Reply-To: <1379289794.97.0.994378932185.issue19031@psf.upfronthosting.co.za> Message-ID: <1391213514.59.0.232587460957.issue19031@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:13:41 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 01 Feb 2014 00:13:41 +0000 Subject: [issue1178] IDLE - add "paste code" functionality In-Reply-To: <1190153010.77.0.038299898053.issue1178@psf.upfronthosting.co.za> Message-ID: <1391213621.03.0.816634980447.issue1178@psf.upfronthosting.co.za> Terry J. Reedy added the comment: By already implemented, I presume Mark was referring to the PastePyShell.py extension that is part of the IdleX package http://idlex.sourceforge.net/. I plan to take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:13:59 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 00:13:59 +0000 Subject: [issue18162] Add index attribute to IndexError In-Reply-To: <1370638259.99.0.240698145167.issue18162@psf.upfronthosting.co.za> Message-ID: <1391213639.36.0.979345128744.issue18162@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:23:38 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 00:23:38 +0000 Subject: [issue20271] urllib.parse.urlparse() accepts wrong URLs In-Reply-To: <1389789129.93.0.775761654638.issue20271@psf.upfronthosting.co.za> Message-ID: <1391214218.43.0.951112187862.issue20271@psf.upfronthosting.co.za> Yury Selivanov added the comment: I think we should start raising an exception in 3.5 (backwards incompatible change to back-port it) ---------- nosy: +yselivanov versions: +Python 3.5 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:51:39 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 00:51:39 +0000 Subject: [issue20319] concurrent.futures.wait() can block forever even if Futures have completed In-Reply-To: <1390263519.32.0.357208079457.issue20319@psf.upfronthosting.co.za> Message-ID: <3fGGvt60ZXz7Ll5@mail.python.org> Roundup Robot added the comment: New changeset 0bcf23a52d55 by Brian Quinlan in branch 'default': Issue #20319: concurrent.futures.wait() can block forever even if Futures have completed http://hg.python.org/cpython/rev/0bcf23a52d55 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 01:52:48 2014 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 01 Feb 2014 00:52:48 +0000 Subject: [issue20319] concurrent.futures.wait() can block forever even if Futures have completed In-Reply-To: <1390263519.32.0.357208079457.issue20319@psf.upfronthosting.co.za> Message-ID: <1391215968.4.0.594064316703.issue20319@psf.upfronthosting.co.za> Brian Quinlan added the comment: Thanks very much for the patch Glenn! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 02:03:46 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 01:03:46 +0000 Subject: [issue20319] concurrent.futures.wait() can block forever even if Futures have completed In-Reply-To: <3fGGvt60ZXz7Ll5@mail.python.org> Message-ID: STINNER Victor added the comment: > New changeset 0bcf23a52d55 by Brian Quinlan in branch 'default': > Issue #20319: concurrent.futures.wait() can block forever even if Futures have completed > http://hg.python.org/cpython/rev/0bcf23a52d55 Hum, the change also contains: +Fix warning message when `os.chdir()` fails inside + `test.support.temp_cwd()`. Patch by Chris Jerdonek. Is it related to this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 02:06:27 2014 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 01 Feb 2014 01:06:27 +0000 Subject: [issue20319] concurrent.futures.wait() can block forever even if Futures have completed In-Reply-To: Message-ID: <14BBD5E0-88EC-4DDE-9AC0-997CEC33A76A@sweetapp.com> Brian Quinlan added the comment: Oops, no. That was junk due to my sloppiness. I?ll fix it in a minute. On Jan 31, 2014, at 5:03 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > >> New changeset 0bcf23a52d55 by Brian Quinlan in branch 'default': >> Issue #20319: concurrent.futures.wait() can block forever even if Futures have completed >> http://hg.python.org/cpython/rev/0bcf23a52d55 > > Hum, the change also contains: > > +Fix warning message when `os.chdir()` fails inside > + `test.support.temp_cwd()`. Patch by Chris Jerdonek. > > Is it related to this issue? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 02:07:40 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 01:07:40 +0000 Subject: [issue20452] test_timeout_rounding() of test_asyncio fails on "x86 Ubuntu Shared 3.x" buildbot In-Reply-To: <1391156790.09.0.38396612237.issue20452@psf.upfronthosting.co.za> Message-ID: <1391216860.89.0.657147410065.issue20452@psf.upfronthosting.co.za> STINNER Victor added the comment: Debug info on the Windows failure: * The busy loop took 89.99 ms * time.motononic() (which is GetTickCount64()) has a resolution of 10.0144 ms http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7948/steps/test/logs/stdio ====================================================================== FAIL: test_time_and_call_at (test.test_asyncio.test_base_events.BaseEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_base_events.py", line 129, in test_time_and_call_at time.get_clock_info('monotonic'))) AssertionError: False is not true : (0.08999999985098839, 0.0100144, namespace(adjustable=False, implementation='GetTickCount64()', monotonic=True, resolution=0.0100144)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 02:21:03 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Feb 2014 01:21:03 +0000 Subject: [issue20319] concurrent.futures.wait() can block forever even if Futures have completed In-Reply-To: <1390263519.32.0.357208079457.issue20319@psf.upfronthosting.co.za> Message-ID: <1391217663.07.0.944037667921.issue20319@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Shouldn't it be fixed in 3.3 too? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 02:22:33 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 01:22:33 +0000 Subject: [issue20452] test_timeout_rounding() of test_asyncio fails on "x86 Ubuntu Shared 3.x" buildbot In-Reply-To: <1391156790.09.0.38396612237.issue20452@psf.upfronthosting.co.za> Message-ID: <3fGHbV48fWz7Lk9@mail.python.org> Roundup Robot added the comment: New changeset a090804862f8 by Victor Stinner in branch 'default': Issue #20452: test_asyncio checks also the granularity http://hg.python.org/cpython/rev/a090804862f8 New changeset 60a960434e5c by Victor Stinner in branch 'default': Issue #20452: Fix test_time_and_call_at() of test_asyncio on Windows http://hg.python.org/cpython/rev/60a960434e5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 02:41:31 2014 From: report at bugs.python.org (dongwm) Date: Sat, 01 Feb 2014 01:41:31 +0000 Subject: [issue20444] Reduce logging.config.Converting duplication of code In-Reply-To: <3fFY0F1QBzz7LjQ@mail.python.org> Message-ID: <1391218891.14.0.309901675803.issue20444@psf.upfronthosting.co.za> dongwm added the comment: yes, Your modification is better ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 02:42:27 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Feb 2014 01:42:27 +0000 Subject: [issue20469] ssl.getpeercert() should include extensions In-Reply-To: <1391213322.18.0.0407523257896.issue20469@psf.upfronthosting.co.za> Message-ID: <1391218947.71.0.847562565914.issue20469@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +christian.heimes, giampaolo.rodola, janssen, pitrou versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 03:30:10 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 02:30:10 +0000 Subject: [issue20470] "Fatal Python error: Bus error" on the SPARC Solaris 10 buildbot Message-ID: <1391221810.73.0.133738651444.issue20470@psf.upfronthosting.co.za> New submission from STINNER Victor: On the buildbot "SPARC Solaris 10 (cc, 64b) [SB] 3.x", Python crash randomly with bus error. It looks like a regression introduced since the build 1422. Since it's a crash, it probably comes from a change in C module and so I expected this changeset: http://hg.python.org/cpython/rev/2fbb3c77f1577acc60f57401e07d7feceea66841 "Issue #17919: Fixed integer overflow in the eventmask parameter." => see issue #17919 http://buildbot.python.org/all/builders/SPARC%20Solaris%2010%20%28cc%2C%2064b%29%20%5BSB%5D%203.x/builds/1422/ Change #34778 Category None Changed by R David Murray Changed at Sat 14 Dec 2013 16:26:20 Branch default Revision 561822250761b47d643656a0be9c71f9d770252b Comments #19970: fix additional typo in 3.4 asyncio docs. Changed files Doc/library/asyncio-protocol.rst Change #34781 Category None Changed by Serhiy Storchaka Changed at Sat 14 Dec 2013 17:19:15 Branch default Revision 2fbb3c77f1577acc60f57401e07d7feceea66841 Comments Issue #17919: Fixed integer overflow in the eventmask parameter. Changed files Lib/test/test_devpoll.py Lib/test/test_poll.py Misc/NEWS Modules/selectmodule.c Change #34784 Category None Changed by Serhiy Storchaka Changed at Sat 14 Dec 2013 18:43:21 Branch default Revision 804406d79b45d02b1ea0ae2da45cfd5769141830 Comments Issue #19623: Fixed writing to unseekable files in the aifc module. Changed files Lib/aifc.py Lib/test/audiotests.py Lib/test/test_aifc.py Lib/test/test_sunau.py Lib/test/test_wave.py Misc/NEWS Change #34786 Category None Changed by Serhiy Storchaka Changed at Sat 14 Dec 2013 19:08:18 Branch default Revision 953d8ec1aeb3bff787204343a1c1837a17dbf68c Comments Null merge Changed files Lib/test/test_getargs2.py Lib/test/test_index.py Lib/test/test_int.py Misc/NEWS Objects/abstract.c Objects/longobject.c ---------- messages: 209861 nosy: haypo priority: normal severity: normal status: open title: "Fatal Python error: Bus error" on the SPARC Solaris 10 buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 03:34:59 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 02:34:59 +0000 Subject: [issue20470] "Fatal Python error: Bus error" on the SPARC Solaris 10 buildbot In-Reply-To: <1391221810.73.0.133738651444.issue20470@psf.upfronthosting.co.za> Message-ID: <1391222099.76.0.793584773293.issue20470@psf.upfronthosting.co.za> STINNER Victor added the comment: Example 1: --- [ 15/388] test_tracemalloc Fatal Python error: Bus error Current thread 0x0000000000000001 (most recent call first): File "", line 321 in _call_with_frames_removed File "", line 1270 in load_module File "", line 549 in _requires_builtin_wrapper File "", line 1160 in _load_backward_compatible File "", line 1190 in _load_unlocked File "", line 2202 in _find_and_load_unlocked File "", line 2213 in _find_and_load File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/tracemalloc.py", line 8 in File "", line 321 in _call_with_frames_removed File "", line 1447 in exec_module File "", line 1128 in _exec File "", line 1199 in _load_unlocked File "", line 2202 in _find_and_load_unlocked File "", line 2213 in _find_and_load File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/test_tracemalloc.py", line 4 in File "", line 321 in _call_with_frames_removed File "", line 1447 in exec_module File "", line 1128 in _exec File "", line 1199 in _load_unlocked File "", line 2202 in _find_and_load_unlocked File "", line 2213 in _find_and_load File "", line 2230 in _gcd_import File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/importlib/__init__.py", line 104 in import_module File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 1271 in runtest_inner File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 967 in runtest File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 763 in main File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/regrtest.py", line 1565 in main_in_temp_cwd File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/__main__.py", line 3 in File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/runpy.py", line 86 in _run_code File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/runpy.py", line 171 in _run_module_as_main ... --- Example 2: --- [146/387/2] test_pydoc Fatal Python error: Bus error Thread 0x0000000000000054 (most recent call first): File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/threading.py", line 290 in wait File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/multiprocessing/queues.py", line 230 in _feed File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/threading.py", line 869 in run File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/threading.py", line 921 in _bootstrap_inner File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/threading.py", line 889 in _bootstrap Current thread 0x0000000000000001 (most recent call first): File "", line 321 in _call_with_frames_removed File "", line 1272 in load_module File "", line 549 in _requires_builtin_wrapper File "", line 1162 in _load_backward_compatible File "", line 1200 in _load_unlocked File "", line 2149 in _find_and_load_unlocked File "", line 2160 in _find_and_load File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/pydoc.py", line 1997 in run File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/pydoc.py", line 2053 in apropos File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/test_pydoc.py", line 577 in test_apropos_with_bad_package ... --- Example 3: --- [127/389] test_threading Fatal Python error: Bus error Current thread 0x0000000000000001 (most recent call first): File "", line 321 in _call_with_frames_removed File "", line 1270 in load_module File "", line 549 in _requires_builtin_wrapper File "", line 1160 in _load_backward_compatible File "", line 1190 in _load_unlocked File "", line 2202 in _find_and_load_unlocked File "", line 2213 in _find_and_load File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/tracemalloc.py", line 8 in File "", line 321 in _call_with_frames_removed File "", line 1447 in exec_module File "", line 1128 in _exec File "", line 1199 in _load_unlocked File "", line 2202 in _find_and_load_unlocked File "", line 2213 in _find_and_load File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/support/__init__.py", line 2167 in run_in_subinterp File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/test_threading.py", line 894 in test_threads_join ... --- Example 4: --- [ 41/389] test_capi Fatal Python error: Bus error Current thread 0x0000000000000001 (most recent call first): File "", line 321 in _call_with_frames_removed File "", line 1270 in load_module File "", line 549 in _requires_builtin_wrapper File "", line 1160 in _load_backward_compatible File "", line 1190 in _load_unlocked File "", line 2202 in _find_and_load_unlocked File "", line 2213 in _find_and_load File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/tracemalloc.py", line 8 in File "", line 321 in _call_with_frames_removed File "", line 1447 in exec_module File "", line 1128 in _exec File "", line 1199 in _load_unlocked File "", line 2202 in _find_and_load_unlocked File "", line 2213 in _find_and_load File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/support/__init__.py", line 2167 in run_in_subinterp File "/home/cpython/buildslave/cc-64/3.x.snakebite-sol10-sparc-cc-64/build/Lib/test/test_capi.py", line 240 in test_subinterps --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 03:39:19 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 02:39:19 +0000 Subject: [issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64 In-Reply-To: <1389100955.98.0.880527340764.issue20162@psf.upfronthosting.co.za> Message-ID: <3fGKJ655kwz7LlN@mail.python.org> Roundup Robot added the comment: New changeset caebb4f231da by Victor Stinner in branch 'default': Issue #20162: Fix an alignment issue in the siphash24() hash function which http://hg.python.org/cpython/rev/caebb4f231da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 03:40:01 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 02:40:01 +0000 Subject: [issue20162] Test test_hash_distribution fails on RHEL 6.5 / ppc64 In-Reply-To: <1389100955.98.0.880527340764.issue20162@psf.upfronthosting.co.za> Message-ID: <1391222401.19.0.484688492478.issue20162@psf.upfronthosting.co.za> STINNER Victor added the comment: I applied siphash_ppc64.patch. Thanks Yury V. Zaytsev for your report and your help to investigate this tricky bug. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 03:54:12 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 02:54:12 +0000 Subject: [issue20354] tracemalloc causes segfault in "make profile-opt" In-Reply-To: <1390417147.04.0.258721573187.issue20354@psf.upfronthosting.co.za> Message-ID: <3fGKdH4CCkz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset fb2cdec2c70c by Victor Stinner in branch 'default': Issue #20354: Fix alignment issue in the tracemalloc module on 64-bit http://hg.python.org/cpython/rev/fb2cdec2c70c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 03:56:28 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 02:56:28 +0000 Subject: [issue20470] "Fatal Python error: Bus error" on the SPARC Solaris 10 buildbot In-Reply-To: <1391221810.73.0.133738651444.issue20470@psf.upfronthosting.co.za> Message-ID: <1391223388.0.0.520292296073.issue20470@psf.upfronthosting.co.za> STINNER Victor added the comment: Since tracemalloc is present many times in the dump and the error is an unaligned memory access, it looks the issue #20354 which I just fixed. (I also fixed issue #20162 which is another alignment issue, but it may be unrelated to this one.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 04:07:19 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 03:07:19 +0000 Subject: [issue20354] tracemalloc causes segfault in "make profile-opt" In-Reply-To: <1390417147.04.0.258721573187.issue20354@psf.upfronthosting.co.za> Message-ID: <3fGKwQ70kfz7Lln@mail.python.org> Roundup Robot added the comment: New changeset 44b554454971 by Victor Stinner in branch 'default': Issue #20354: Mention the fix in Misc/NEWS http://hg.python.org/cpython/rev/44b554454971 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 04:08:02 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 03:08:02 +0000 Subject: [issue20354] tracemalloc causes segfault in "make profile-opt" In-Reply-To: <1390417147.04.0.258721573187.issue20354@psf.upfronthosting.co.za> Message-ID: <1391224082.16.0.56470722461.issue20354@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested "./configure --enable-shared && make profile-opt" with the fix and it worked. So I close the issue. Thanks for the report Jan Matejek. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 04:14:10 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 03:14:10 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot Message-ID: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/6302/steps/test/logs/stdio ====================================================================== ERROR: test_signature_on_class (test.test_inspect.TestSignatureObject) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_inspect.py", line 2198, in test_signature_on_class self.assertEqual(str(inspect.signature(C)), '()') File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/inspect.py", line 1734, in signature return signature(object) File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/inspect.py", line 1695, in signature return Signature.from_builtin(obj) File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/inspect.py", line 2196, in from_builtin raise ValueError("no signature found for builtin {!r}".format(func)) ValueError: no signature found for builtin ---------- messages: 209869 nosy: haypo, larry priority: normal severity: normal status: open title: test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 04:20:19 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 03:20:19 +0000 Subject: [issue20472] test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot Message-ID: <1391224819.03.0.550911452449.issue20472@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/7801/steps/test/logs/stdio ====================================================================== FAIL: test_write_pty (test.test_asyncio.test_events.PollEventLoopTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_events.py", line 1105, in test_write_pty self.assertEqual(b'1', data) AssertionError: b'1' != b'' ---------- messages: 209870 nosy: gvanrossum, haypo, pitrou priority: normal severity: normal status: open title: test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 04:42:17 2014 From: report at bugs.python.org (Larry Hastings) Date: Sat, 01 Feb 2014 03:42:17 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly Message-ID: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> New submission from Larry Hastings: Yury: In revision 9433b380ad33 you changed inspect.Signature so that it cannot handle builtin classes. Please fix it. >>> import _pickle >>> import inspect >>> str(inspect.signature(_pickle.Pickler)) '()' >>> _pickle.Pickler.__text_signature__ '(file, protocol=None, fix_imports=True)' Those two strings should be the same. I don't know any guaranteed way to tell a builtin class from a user class. So if you pass in a class, the best approach is to do what it used to do: try from_builtin, and if it fails fail over to the isinstance(obj, type) code. You changed it to if _signature_is_builtin(obj): return Signature.from_builtin(obj) This unambiguously returns the result from from_builtin. Either find a way that you can determine a class is a builtin 100% reliably, or change this to *try* from_builtin but only return its result if it's successful. Your changes might have also caused #20471; that wasn't failing before. I'm still investigating. ---------- assignee: yselivanov messages: 209871 nosy: larry, yselivanov priority: normal severity: normal stage: needs patch status: open title: inspect.Signature no longer handles builtin classes correctly type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 04:47:44 2014 From: report at bugs.python.org (Larry Hastings) Date: Sat, 01 Feb 2014 03:47:44 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot In-Reply-To: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> Message-ID: <1391226464.32.0.106916073633.issue20471@psf.upfronthosting.co.za> Larry Hastings added the comment: I'd like to investigate this, but I can't reproduce it. So far it only happens on the "AMD64 FreeBSD 9.0 3.x" buildbot. Is there a way I can get remote access to that machine? ---------- assignee: -> larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 05:12:57 2014 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 01 Feb 2014 04:12:57 +0000 Subject: [issue20472] test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot In-Reply-To: <1391224819.03.0.550911452449.issue20472@psf.upfronthosting.co.za> Message-ID: <1391227977.08.0.785583749106.issue20472@psf.upfronthosting.co.za> Guido van Rossum added the comment: Well, there were other pty problems on OS X versions before Mavericks (10.9) -- let's just disable this test too using the same approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 07:03:31 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 06:03:31 +0000 Subject: [issue20456] Argument Clinic rollup patch, 2014/01/31 In-Reply-To: <1391174310.68.0.164884497366.issue20456@psf.upfronthosting.co.za> Message-ID: <3fGPql0SgkzMFN@mail.python.org> Roundup Robot added the comment: New changeset 19d81cc213d7 by Larry Hastings in branch 'default': #Issue 20456: Several improvements and bugfixes for Argument Clinic, http://hg.python.org/cpython/rev/19d81cc213d7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 07:04:38 2014 From: report at bugs.python.org (Larry Hastings) Date: Sat, 01 Feb 2014 06:04:38 +0000 Subject: [issue20456] Argument Clinic rollup patch, 2014/01/31 In-Reply-To: <1391174310.68.0.164884497366.issue20456@psf.upfronthosting.co.za> Message-ID: <1391234678.45.0.0468136835467.issue20456@psf.upfronthosting.co.za> Larry Hastings added the comment: Checked in! I think that's the last new feature for Argument Clinic until after 3.4 ships. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 08:02:11 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 07:02:11 +0000 Subject: [issue19761] test_tk fails on OS X with multiple test case failures with both Tk 8.5 and 8.4 In-Reply-To: <1385337935.63.0.262182292505.issue19761@psf.upfronthosting.co.za> Message-ID: <1391238131.07.0.720424481499.issue19761@psf.upfronthosting.co.za> Ned Deily added the comment: There are three different classes of errors here: 1. test_debug AssertionError: '0' != 0 This has already been fixed by 7dab4feec126/05e84d3ecd1e/e7d922d8ee03 for Issue6517. 2. test_bitmap checks for invalid bitmap values do not fail as expected with Cocoa Tk This appears to be a bug in Cocoa Tk, reproducible with the wish shell. I've opened a Tk issue for it: https://core.tcl.tk/tk/tktview?name=31cd33dbf0 The simplest approach would be to just skip test_bitmap for OS X until this is fixed. A more focused workaround patch would be to only skip the checkInvalidParam test when running under Cocoa Tk: 'aqua' in root.tk.call('tk', 'windowingsystem') and 'AppKit' in root.tk.call('winfo', 'server', '.') 3. test_insertborderwidth failures for Entry and Spinbox widgets After a little investigation, I think this is a test case error. at least for Entry. According to third-party Tkinter documentation (http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/entry.html) for the Entry widget: "By default, the insertion cursor is a simple rectangle. You can get the cursor with the tk.RAISED relief effect (see Section 5.6, 'Relief styles') by setting insertborderwidth to the dimension of the 3-d border. If you do, make sure that the insertwidth option is at least twice that value." It looks like for both the OS X Carbon (8.4) and Cocoa (8.5 and 8.6) Tks, the restriction about insertwidth is enforced, but with the X11 Tk, it is not. Some examples using Cocoa Tk (8.5.15) and 3.4.0b3: >>> from tkinter import *; r = Tk() >>> w = Entry(r, insertborderwidth=1.3); w.pack(); w['insertborderwidth'] 0 >>> w = Entry(r, insertborderwidth=1.3, insertwidth=10); w.pack(); w['insertborderwidth'] 1 >>> w = Entry(r, insertborderwidth=2); w.pack(); w['insertborderwidth'] 0 >>> w = Entry(r, insertborderwidth=2, insertwidth=10); w.pack(); w['insertborderwidth'] 2 >>> w = Entry(r, insertborderwidth='10p'); w.pack(); w['insertborderwidth'] 0 >>> w = Entry(r, insertborderwidth='10p', insertwidth=10); w.pack(); w['insertborderwidth'] 5 Using X11 Tk (8.6.1) on OS X: >>> from tkinter import *; r = Tk() >>> w = Entry(r, insertborderwidth=1.3); w.pack(); w['insertborderwidth'] 1 >>> w = Entry(r, insertborderwidth=1.3, insertwidth=10); w.pack(); w['insertborderwidth'] 1 >>> w = Entry(r, insertborderwidth=2); w.pack(); w['insertborderwidth'] 1 >>> w = Entry(r, insertborderwidth=2, insertwidth=10); w.pack(); w['insertborderwidth'] 2 >>> w = Entry(r, insertborderwidth='10p'); w.pack(); w['insertborderwidth'] 1 >>> w = Entry(r, insertborderwidth='10p', insertwidth=10); w.pack(); w['insertborderwidth'] 5 So it appears the tests could be made to pass on OS X Cocoa and Carbon Tks and on X11 Tks if insertwidth is also set on the insertborderwidth tests. That would need to be tested with Windows Tk. ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 08:07:49 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 07:07:49 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1391238469.62.0.749489054677.issue19654@psf.upfronthosting.co.za> Ned Deily added the comment: The failures in test_tk here are the same ones documented in Issue19761 for Tk 8.4 so this issue could be closed as a duplicate of that one. The mystery remains why test_tk appears to alternately pass and fail on this buildbot. I don't see why it doesn't always fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 08:08:38 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 07:08:38 +0000 Subject: [issue19654] test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1391238518.78.0.399858731708.issue19654@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: ronaldoussoren -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 09:31:17 2014 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Feb 2014 08:31:17 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1391243477.57.0.620303662669.issue12915@psf.upfronthosting.co.za> Vinay Sajip added the comment: Another question to consider: is inspect the best place for this? I don't think it is, because (a) It's not really an inspection facility (b) Importing inspect to get this functionality would pull in lots of stuff which wouldn't be used in the typical use case. I think it makes more sense for it to be in importlib. Accordingly adding Brett to nosy, for his thoughts. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 09:41:32 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 08:41:32 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot In-Reply-To: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> Message-ID: <1391244092.61.0.595222996233.issue20471@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 09:44:38 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 08:44:38 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391244278.14.0.178773720826.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: OK, I'll take a look tomorrow. Don't think it's related to #20471 though, as in there, if fails to find a signature for the 'builtin.object' (but I may be wrong). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 10:22:23 2014 From: report at bugs.python.org (Berker Peksag) Date: Sat, 01 Feb 2014 09:22:23 +0000 Subject: [issue18622] reset_mock on mock created by mock_open causes infinite recursion In-Reply-To: <1375391057.28.0.108463427813.issue18622@psf.upfronthosting.co.za> Message-ID: <1391246543.53.0.912826063845.issue18622@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 10:38:53 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 09:38:53 +0000 Subject: [issue20472] test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot In-Reply-To: <1391224819.03.0.550911452449.issue20472@psf.upfronthosting.co.za> Message-ID: <1391247533.76.0.293087968844.issue20472@psf.upfronthosting.co.za> Ned Deily added the comment: FYI, besides 10.4 (Tiger), the test also fails on OS X 10.5 but appears to pass on 10.6 and later releases. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 11:04:22 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 10:04:22 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391249062.59.0.367878980877.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: OK, there was no unit-test for this... looking into the problem, the first questing is: why is __text_signature__ is on the '_pickle.Pickler' object, not on '_pickle.Pickler.__init__'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 11:11:49 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 10:11:49 +0000 Subject: [issue20474] test_socket failures on OS X due to fixed "expected failures" Message-ID: <1391249509.61.0.504777849278.issue20474@psf.upfronthosting.co.za> New submission from Ned Deily: Three "send timeout" test cases in test_socket were changed by a4e4facad164 for Issue12958 to be "expected failures" on OS X because of observed failures on the OS X buildbots running OS X 10.6 (Snow Leopard) and earlier. testInterruptedSendTimeout (test.test_socket.InterruptedSendTimeoutTest) ... unexpected success testInterruptedSendmsgTimeout (test.test_socket.InterruptedSendTimeoutTest) ... unexpected success testInterruptedSendtoTimeout (test.test_socket.InterruptedSendTimeoutTest) ... unexpected success It seems that the platform bugs causing the failures were fixed in OS X 10.7 so that the "expected failures" no longer fail. However, the change in behavior had not been noticed because, until the recent change to unittest in Issue20165, unittest did not fail when there were unexpected successes. Now it does fail, causing test_socket to fail on OS X 10.7+ for 3.4. On 3.3 the "unexpected success" failures are silently skipped. The attached patch changes the test cases to be skipped for OS X versions prior to 10.7 rather than to always expect failure on OS X. ---------- components: Tests messages: 209882 nosy: larry, ncoghlan, ned.deily priority: high severity: normal stage: patch review status: open title: test_socket failures on OS X due to fixed "expected failures" versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 11:13:34 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 10:13:34 +0000 Subject: [issue20474] test_socket failures on OS X due to fixed "expected failures" In-Reply-To: <1391249509.61.0.504777849278.issue20474@psf.upfronthosting.co.za> Message-ID: <1391249614.96.0.10844459224.issue20474@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- keywords: +patch Added file: http://bugs.python.org/file33842/issue20474.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 11:15:06 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 10:15:06 +0000 Subject: [issue20474] test_socket failures on OS X due to fixed "expected failures" In-Reply-To: <1391249509.61.0.504777849278.issue20474@psf.upfronthosting.co.za> Message-ID: <1391249706.16.0.545744462475.issue20474@psf.upfronthosting.co.za> Changes by Ned Deily : Removed file: http://bugs.python.org/file33842/issue20474.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 11:15:22 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 10:15:22 +0000 Subject: [issue20474] test_socket failures on OS X due to fixed "expected failures" In-Reply-To: <1391249509.61.0.504777849278.issue20474@psf.upfronthosting.co.za> Message-ID: <1391249721.99.0.132253125953.issue20474@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file33843/issue20474.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 11:18:33 2014 From: report at bugs.python.org (Larry Hastings) Date: Sat, 01 Feb 2014 10:18:33 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391249913.53.0.149529407718.issue20473@psf.upfronthosting.co.za> Larry Hastings added the comment: Because slots like tp_init and tp_call don't have docstrings. So it has to go in the class's docstring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 11:21:12 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Feb 2014 10:21:12 +0000 Subject: [issue12958] test_socket failures on Mac OS X In-Reply-To: <1315719643.71.0.858357749479.issue12958@psf.upfronthosting.co.za> Message-ID: <1391250072.65.0.591365632362.issue12958@psf.upfronthosting.co.za> Ned Deily added the comment: FYI, the OS X platform bugs causing the three "send timeout" test failures were fixed in OS X 10.7 causing those test cases to have previously silently skipped "unexpected successes". See Issue20474 for more details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 11:44:48 2014 From: report at bugs.python.org (Stefan Krah) Date: Sat, 01 Feb 2014 10:44:48 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot In-Reply-To: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> Message-ID: <1391251488.24.0.962714780988.issue20471@psf.upfronthosting.co.za> Stefan Krah added the comment: The build is --without-doc-strings. That should do the trick. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 12:20:58 2014 From: report at bugs.python.org (Larry Hastings) Date: Sat, 01 Feb 2014 11:20:58 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391253658.2.0.769932114161.issue20473@psf.upfronthosting.co.za> Larry Hastings added the comment: I meant to say "slots like tp_new and tp_init". But fwiw it's true of tp_call too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 12:22:57 2014 From: report at bugs.python.org (Larry Hastings) Date: Sat, 01 Feb 2014 11:22:57 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391253777.32.0.522462306336.issue20473@psf.upfronthosting.co.za> Larry Hastings added the comment: And, I don't see how your changes to inspect.py could have caused the failures on the buildbot either. But, then, I don't see how *anything* could cause the failures on the buildbot. And your changes to inspect.py happened at (I think) roughly the same time. Correlation isn't causation, but it's all I have to go on right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 12:23:49 2014 From: report at bugs.python.org (Larry Hastings) Date: Sat, 01 Feb 2014 11:23:49 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot In-Reply-To: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> Message-ID: <1391253829.11.0.314688065634.issue20471@psf.upfronthosting.co.za> Larry Hastings added the comment: Good thinking! I don't know when I can get to it though, maybe Sunday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 12:36:25 2014 From: report at bugs.python.org (Stefan Krah) Date: Sat, 01 Feb 2014 11:36:25 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot In-Reply-To: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> Message-ID: <1391254585.1.0.476074708195.issue20471@psf.upfronthosting.co.za> Stefan Krah added the comment: I think you just need to use the @requires_docstrings decorator for the test. -- To me the failure looks expected if there aren't any docstrings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 13:06:00 2014 From: report at bugs.python.org (Larry Hastings) Date: Sat, 01 Feb 2014 12:06:00 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391256360.97.0.0187905974653.issue20473@psf.upfronthosting.co.za> Larry Hastings added the comment: Stefan Krah suggests that the failure in 20473 is because that platform builds without docstrings, and the test requires them. So that should be an easy fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 16:35:16 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 01 Feb 2014 15:35:16 +0000 Subject: [issue20456] Argument Clinic rollup patch, 2014/01/31 In-Reply-To: <1391174310.68.0.164884497366.issue20456@psf.upfronthosting.co.za> Message-ID: <1391268916.25.0.814304806554.issue20456@psf.upfronthosting.co.za> Vajrasky Kok added the comment: The converters argument in command line is still broken. [sky at localhost cpython3.4]$ hg pull -u pulling from http://hg.python.org/cpython searching for changes no changes found [sky at localhost cpython3.4]$ ./python Tools/clinic/clinic.py --converters Legacy converters: Traceback (most recent call last): File "Tools/clinic/clinic.py", line 4131, in sys.exit(main(sys.argv[1:])) File "Tools/clinic/clinic.py", line 4063, in main print(' ' + ' '.join(c for c in legacy if c[0].isupper())) File "Tools/clinic/clinic.py", line 4063, in print(' ' + ' '.join(c for c in legacy if c[0].isupper())) IndexError: string index out of range Unit test for exercising Tools/clinic/clinic.py using assert_python_ok would be good, but that deserves a dedicated ticket. Here is the patch to fix the bug. ---------- nosy: +vajrasky Added file: http://bugs.python.org/file33844/fix_clinic_converters_cmd_line.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 16:43:40 2014 From: report at bugs.python.org (Hendrik) Date: Sat, 01 Feb 2014 15:43:40 +0000 Subject: [issue2008] cookielib lacks FileCookieJar class for Safari In-Reply-To: <1202153846.32.0.869416159529.issue2008@psf.upfronthosting.co.za> Message-ID: <1391269420.75.0.302271689644.issue2008@psf.upfronthosting.co.za> Hendrik added the comment: I found a solution for reading Safari cookies, but struggling around with hg diff. Because always when i typ hg diff Lib/http/cookiejar.py it returns me the complete file not only my changes.. ---------- nosy: +Hendrik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 16:45:58 2014 From: report at bugs.python.org (Brett Cannon) Date: Sat, 01 Feb 2014 15:45:58 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1391269557.99.0.922493489834.issue12915@psf.upfronthosting.co.za> Brett Cannon added the comment: importlib.util.resolve_name() already exists for resolving an explicit relative import name to an absolute one, so closing this as out of date. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:06:27 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 01 Feb 2014 16:06:27 +0000 Subject: [issue20440] Use Py_REPLACE/Py_XREPLACE macros In-Reply-To: <1391019258.76.0.341506038923.issue20440@psf.upfronthosting.co.za> Message-ID: <1391270787.4.0.814370241556.issue20440@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think Raymond's original concern still applies: The macros do add to the learning curve. I would personally expect that Py_REPLACE(op, op2) does an INCREF on op2, but it does not. Explicit is better than implicit. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:19:23 2014 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Feb 2014 16:19:23 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1391271563.66.0.634790175679.issue12915@psf.upfronthosting.co.za> Vinay Sajip added the comment: > importlib.util.resolve_name() already exists But that's not what the proposed functionality is for, is it? This covers finding values inside an imported module which can be accessed via a dotted path from the module globals. ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:20:48 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Feb 2014 16:20:48 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391271648.36.0.912009382575.issue17159@psf.upfronthosting.co.za> Stefan Behnel added the comment: Hmm, I now notice that I was mistaken about this working: ''' import inspect def test_isfunction(): """ >>> test_isfunction() True """ return inspect.isfunction(test_isfunction) ''' It only worked in Cython's test suite because its test runner monkey patches "inspect.isfunction", and I had completely forgotten about it. Sorry for the confusion. The thing is that Cython's function type isn't really a Python function (obviously), it inherits from PyCFunction, so it should return True for isbuiltin(). A problem on our side prevented that. If I fix it up, then the newly added duck-typing code actually ends up not being used, because signature() tests for isbuiltin() first and runs into Signature.from_builtin(), which is the Argument Clinic code path that expects a textual signature representation. Cython functions don't have that, because they are compatible with Python functions. This situation could be helped in inspect.signature() by reversing the test order, i.e. by changing this code if _signature_is_builtin(obj): return Signature.from_builtin(obj) if isfunction(obj) or _signature_is_functionlike(obj): # If it's a pure Python function, or an object that is duck type # of a Python function (Cython functions, for instance), then: return Signature.from_function(obj) into this: if isfunction(obj) or _signature_is_functionlike(obj): # If it's a pure Python function, or an object that is duck type # of a Python function (Cython functions, for instance), then: return Signature.from_function(obj) if _signature_is_builtin(obj): return Signature.from_builtin(obj) Would this be ok? I would also argue that the implementation of _signature_is_builtin() is, well, not ideal, because what it should test for according to the comment at the top of the function is the existance of "__text_signature__". Instead, it does several type tests, one of which goes wrong in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:32:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 16:32:52 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <3fGgnv43kYz7Lk8@mail.python.org> Roundup Robot added the comment: New changeset fed468670866 by Mark Dickinson in branch '2.7': Issue #19683: Add __closure__ and other missing attributes to function docs. http://hg.python.org/cpython/rev/fed468670866 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:34:20 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Feb 2014 16:34:20 +0000 Subject: [issue19863] Missing function attributes in 2.7 docs. In-Reply-To: <1386010673.68.0.260580445507.issue19863@psf.upfronthosting.co.za> Message-ID: <1391272460.35.0.0624728557135.issue19863@psf.upfronthosting.co.za> Mark Dickinson added the comment: New changeset fed468670866 by Mark Dickinson in branch '2.7': Issue #19683: Add __closure__ and other missing attributes to function docs. http://hg.python.org/cpython/rev/fed468670866 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:34:56 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Feb 2014 16:34:56 +0000 Subject: [issue19683] test_minidom has many empty tests In-Reply-To: <1385047059.66.0.790496754317.issue19683@psf.upfronthosting.co.za> Message-ID: <1391272496.18.0.71693092335.issue19683@psf.upfronthosting.co.za> Mark Dickinson added the comment: Whoops; wrong issue number. That commit message was for issue 19863. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:35:36 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Feb 2014 16:35:36 +0000 Subject: [issue19863] Missing function attributes in 2.7 docs. In-Reply-To: <1386010673.68.0.260580445507.issue19863@psf.upfronthosting.co.za> Message-ID: <1391272536.98.0.351025526804.issue19863@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 18:00:36 2014 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Sat, 01 Feb 2014 17:00:36 +0000 Subject: [issue10740] sqlite3 module breaks transactions and potentially corrupts data In-Reply-To: <1292868135.81.0.257293444934.issue10740@psf.upfronthosting.co.za> Message-ID: <1391274036.39.0.571333516023.issue10740@psf.upfronthosting.co.za> Ronny Pfannschmidt added the comment: could we please get the option to opt-out of that behaviour, as a extra connection option maybe with the normal python sqlite bindings its impossible to have database migrations work safely which IMHO makes this a potential data-loss issue ---------- nosy: +Ronny.Pfannschmidt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 18:25:13 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Feb 2014 17:25:13 +0000 Subject: [issue10740] sqlite3 module breaks transactions and potentially corrupts data In-Reply-To: <1292868135.81.0.257293444934.issue10740@psf.upfronthosting.co.za> Message-ID: <1391275513.76.0.76356785159.issue10740@psf.upfronthosting.co.za> R. David Murray added the comment: Opt out of what behavior? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 18:32:30 2014 From: report at bugs.python.org (Brett Cannon) Date: Sat, 01 Feb 2014 17:32:30 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1391275950.96.0.511113720212.issue12915@psf.upfronthosting.co.za> Brett Cannon added the comment: Importlib already has importlib.import_module() (since Python 2.7) and that's as far as I'm willing to go for finding a module by name. Anything past that is a getarr() call on the resulting module and thus not worth adding to importlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 18:58:05 2014 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 01 Feb 2014 17:58:05 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1391277485.45.0.501026269822.issue12915@psf.upfronthosting.co.za> Vinay Sajip added the comment: > and thus not worth adding to importlib. Okay, fair enough. It's not purely an import function, though partly related to imports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:17:50 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 18:17:50 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391278670.9.0.516706701795.issue17159@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:20:30 2014 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Sat, 01 Feb 2014 18:20:30 +0000 Subject: [issue10740] sqlite3 module breaks transactions and potentially corrupts data In-Reply-To: <1292868135.81.0.257293444934.issue10740@psf.upfronthosting.co.za> Message-ID: <1391278830.83.0.594815923592.issue10740@psf.upfronthosting.co.za> Ronny Pfannschmidt added the comment: the sqlite binding deciding how to handle transactions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:21:25 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Feb 2014 18:21:25 +0000 Subject: [issue17444] multiprocessing.cpu_count() should use hw.availcpu on Mac OS X In-Reply-To: <1363518970.43.0.663033914557.issue17444@psf.upfronthosting.co.za> Message-ID: <1391278885.42.0.0742315306234.issue17444@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The current os.cpu_count implementation calls sysconf(_SC_NPROCESSORS_ONLN), which is apparently defined under OS X, and returns the number of online CPUs (logical?): https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/sysconf.3.html multiprocessing has been modified to re-use os.cpu_count(), so I suggest closing this issue as out-of-date. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:29:27 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 18:29:27 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391279367.46.0.320181245409.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Stefan Krah suggests that the failure in 20473 is because that platform builds without docstrings, and the test requires them. So that should be an easy fix. Good news ;) OK, I'll decorate the test. > Because slots like tp_init and tp_call don't have docstrings. So it has to go in the class's docstring. So what's going on and why is it broken: - from_builtin wasn't checking the incoming 'func' argument's type, it started to work with its '__text_signature__' right away. That was fixed. - in 'inspect.signature' we checked (isinstance(obj, _NonUserDefinedCallables) or ismethoddescriptor(obj) or isinstance(obj, type)) so *classes* were tried in 'from_builtin' too. And that's why it worked. Any class (even used-defined in pure Python) that had '__text_signature__' was passed to the 'Signature.from_builtin' and it did the right job. Now, I don't want to completely rollback my commits, as I still think that 'from_builtin' should strictly check what object is it working with, and raise appropriate exceptions. What we need to do is to separate parsing of '__text_signature__' into a private inspect module helper, so that 'from_builtin' becomes a tiny wrapper. Then, in 'signature.inspect' we need to find a way of testing if the given object is a builtin class, and call the parsing helper on it if it has the '__text_signature__' attribute. I'm looking into this. BTW, are you sure we can't somehow add '__text_signature__' to builtin class' '__init__'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:39:24 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 18:39:24 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391279964.95.0.39325354624.issue17159@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Would this be ok? Probably. I need to take a closer look. I'm not sure I like the idea that Cython functions are "chimeras" of some sort, i.e. they have a type of python builtin functions, hence, logically, Signature.from_builtin should work on them (and they have to follow __text_signature__ API), and on the other hand, they try to mimic pure python functions (being a builtin type) with all its guts like '__code__' object etc. Perhaps, what we need to do, is to modify 'Signature.from_builtin' to check for pure-python function duck type too, and fallback to 'Signature.from_function' in this case. Larry, Nick, what do you think? > I would also argue that the implementation of _signature_is_builtin() is, well, not ideal, because what it should test for according to the comment at the top of the function is the existance of "__text_signature__". Instead, it does several type tests, one of which goes wrong in this case. 'from_builtin' needs to have those type checks. Duck typing is good, but some minimal type safety is good too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:49:47 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 18:49:47 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot In-Reply-To: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> Message-ID: <3fGkqv053Lz7Llw@mail.python.org> Roundup Robot added the comment: New changeset b1f214165471 by Yury Selivanov in branch 'default': inspect.tests: Fix tests to work on python built with '--without-doc-strings' #20471 http://hg.python.org/cpython/rev/b1f214165471 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:50:46 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 18:50:46 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot In-Reply-To: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> Message-ID: <1391280646.59.0.874279648291.issue20471@psf.upfronthosting.co.za> Yury Selivanov added the comment: Should be OK now. Thank you guys for the report and for the hint of what was going on ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:50:55 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 18:50:55 +0000 Subject: [issue20471] test_signature_on_class() of test_inspect fails on "AMD64 FreeBSD 9.0 3.x" buildbot In-Reply-To: <1391224450.54.0.294439950021.issue20471@psf.upfronthosting.co.za> Message-ID: <1391280655.17.0.339568319225.issue20471@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 19:58:01 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 18:58:01 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391281081.98.0.286815996815.issue20473@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 20:07:20 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Feb 2014 19:07:20 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1391279964.95.0.39325354624.issue17159@psf.upfronthosting.co.za> Message-ID: <52ED45E7.60907@behnel.de> Stefan Behnel added the comment: > I'm not sure I like the idea that Cython functions are "chimeras" of > some sort, i.e. they have a type of python builtin functions, hence, > logically, Signature.from_builtin should work on them (and they have to > follow __text_signature__ API), and on the other hand, they try to mimic > pure python functions (being a builtin type) with all its guts like > '__code__' object etc. That's one way of looking at it. The way I see it is that CPython's builtin functions should rather behave exactly like Python functions. The fact that there is such a thing as a "__text_signature__" and general special casing of builtins is IMHO a rather annoying but truly long standing bug. The only necessary difference is that one of them contains byte code and the other doesn't, everything else should eventually be aligned. > Perhaps, what we need to do, is to modify 'Signature.from_builtin' to > check for pure-python function duck type too, and fallback to > 'Signature.from_function' in this case. In any case, I think that a complete Python function(-like) interface should always be preferred to work-arounds like "__text_signature__", regardless of where it comes from. > 'from_builtin' needs to have those type checks. Duck typing is good, but > some minimal type safety is good too. I don't really see why. The code doesn't seem to be doing that much more than text processing of the "__text_signature__", plus a tiny bit of optional(!) attribute checking ("__module__" and "__self__"). The restrictive type checks appear to be the only thing that prevents users from doing this: class myfunc: __text_signature__ = '(a,b,c,d)' sig = Signature.from_builtin(myfunc()) Granted, the name of that method doesn't really fit well in that case, and a simpler interface than having to define a class would also not hurt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 20:13:40 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 01 Feb 2014 19:13:40 +0000 Subject: [issue20288] HTMLParse handing of non-numeric charrefs broken In-Reply-To: <1389967573.45.0.115549710544.issue20288@psf.upfronthosting.co.za> Message-ID: <1391282020.91.0.818754189682.issue20288@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch against 2.7. ---------- keywords: +patch Added file: http://bugs.python.org/file33845/issue20288.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 20:15:04 2014 From: report at bugs.python.org (George Kouryachy) Date: Sat, 01 Feb 2014 19:15:04 +0000 Subject: [issue20445] HAVE_BROKEN_NICE detected incorrectly due to configure.ac typo In-Reply-To: <1391086661.44.0.32383692097.issue20445@psf.upfronthosting.co.za> Message-ID: <1391282104.87.0.764103347768.issue20445@psf.upfronthosting.co.za> George Kouryachy added the comment: Oops, looks like my local build system artifact. Thank you for your attention, all-clear. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 20:21:14 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 19:21:14 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391282474.29.0.834513582354.issue17159@psf.upfronthosting.co.za> Yury Selivanov added the comment: > That's one way of looking at it. The way I see it is that CPython's builtin > functions should rather behave exactly like Python functions. The fact that > there is such a thing as a "__text_signature__" and general special casing > of builtins is IMHO a rather annoying but truly long standing bug. The only > necessary difference is that one of them contains byte code and the other > doesn't, everything else should eventually be aligned. I see your point. I think that modifying 'from_builtin' as I suggested in my previous comment is the right thing to do. I'll make a new patch soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 20:23:11 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 19:23:11 +0000 Subject: [issue20288] HTMLParse handing of non-numeric charrefs broken In-Reply-To: <1389967573.45.0.115549710544.issue20288@psf.upfronthosting.co.za> Message-ID: <3fGlZR0s0rz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 0d50b5851f38 by Ezio Melotti in branch '2.7': #20288: fix handling of invalid numeric charrefs in HTMLParser. http://hg.python.org/cpython/rev/0d50b5851f38 New changeset 32097f193892 by Ezio Melotti in branch '3.3': #20288: fix handling of invalid numeric charrefs in HTMLParser. http://hg.python.org/cpython/rev/32097f193892 New changeset 92b3928bfde1 by Ezio Melotti in branch 'default': #20288: merge with 3.3. http://hg.python.org/cpython/rev/92b3928bfde1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 20:51:58 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 01 Feb 2014 19:51:58 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391284318.07.0.331065206661.issue17159@psf.upfronthosting.co.za> Stefan Behnel added the comment: Attached is a minimal patch that does what I think you meant. ---------- Added file: http://bugs.python.org/file33846/divert_from_builtin.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 22:10:18 2014 From: report at bugs.python.org (Paul Sokolovsky) Date: Sat, 01 Feb 2014 21:10:18 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 Message-ID: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> New submission from Paul Sokolovsky: http://docs.python.org/3.3/library/time.html#time.clock says that it's deprecated, but pystone.py in Python-3.4.0b3 tarball still uses it. Please kindly consider switching it to plain time.time() and not to some other novelties. My usecase is: I'm working on alternative Python implementation, I of course want to benchmark it, and of course want to claim that I ran unmodified pystone.py. Now to achieve that, I need to implement deprecated function. ---------- messages: 209916 nosy: pfalcon priority: normal severity: normal status: open title: pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 22:10:36 2014 From: report at bugs.python.org (Paul Sokolovsky) Date: Sat, 01 Feb 2014 21:10:36 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391289036.73.0.201948899658.issue20475@psf.upfronthosting.co.za> Changes by Paul Sokolovsky : ---------- components: +Benchmarks versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 22:11:03 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Feb 2014 21:11:03 +0000 Subject: [issue10740] sqlite3 module breaks transactions and potentially corrupts data In-Reply-To: <1292868135.81.0.257293444934.issue10740@psf.upfronthosting.co.za> Message-ID: <1391289063.29.0.514094799451.issue10740@psf.upfronthosting.co.za> R. David Murray added the comment: As noted above you get that by setting isolation_level to None. That feature has always been available. (With isolation_level set to None, the sqlite wrapper module itself never issues any BEGIN statements.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 22:48:00 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 21:48:00 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391291280.96.0.259516702851.issue17159@psf.upfronthosting.co.za> Yury Selivanov added the comment: Stefan, Please try the attached patch (sig_cython_01.patch) ---------- Added file: http://bugs.python.org/file33847/sig_cython_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 22:53:39 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 21:53:39 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391291619.8.0.336468249843.issue20475@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 22:54:37 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Feb 2014 21:54:37 +0000 Subject: [issue20400] Add create_read_pipe_protocol/create_write_pipe_protocol to asyncio.SubprocessProtocol In-Reply-To: <1390779611.0.0.029550213682.issue20400@psf.upfronthosting.co.za> Message-ID: <3fGpx86Y2Tz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset d7ac90c0463a by Victor Stinner in branch 'default': Issue #20400: Merge Tulip into Python: add the new asyncio.subprocess module http://hg.python.org/cpython/rev/d7ac90c0463a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 22:57:03 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 01 Feb 2014 21:57:03 +0000 Subject: [issue20400] Add create_read_pipe_protocol/create_write_pipe_protocol to asyncio.SubprocessProtocol In-Reply-To: <1390779611.0.0.029550213682.issue20400@psf.upfronthosting.co.za> Message-ID: <1391291823.07.0.994023113936.issue20400@psf.upfronthosting.co.za> STINNER Victor added the comment: asyncio has a new asyncio.subprocess module which implements my feature request. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 23:08:05 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Feb 2014 22:08:05 +0000 Subject: [issue20476] If new email policies are used, default message factory should be EmailMessage Message-ID: <1391292485.67.0.381493162498.issue20476@psf.upfronthosting.co.za> New submission from R. David Murray: This was part of the design of the new stuff added in 3.4, so it is a bug that it doesn't work...somehow I missed implementing this detail. The full implementation should make this a policy setting, so that a custom policy could specify its own factory. However, since 3.4 is in beta it would be a bad time to add that to the policy. The patch proposed here implements the required behavior by hardcoding any non-compat32 policy to use EmailMessage instead of Message in feedparser. ---------- components: email files: use_emailmessage.patch keywords: patch messages: 209921 nosy: barry, r.david.murray priority: high severity: normal stage: commit review status: open title: If new email policies are used, default message factory should be EmailMessage type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33848/use_emailmessage.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 23:09:16 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 01 Feb 2014 22:09:16 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391292556.01.0.0474203271725.issue17159@psf.upfronthosting.co.za> Changes by Yury Selivanov : Added file: http://bugs.python.org/file33849/sig_cython_02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 23:45:58 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Feb 2014 22:45:58 +0000 Subject: [issue20477] Add examples of using the new contentmanager api to the email docs Message-ID: <1391294758.28.0.146811184979.issue20477@psf.upfronthosting.co.za> New submission from R. David Murray: Here are the examples I promised to write in issue 18891. ---------- assignee: docs at python components: Documentation, email files: contentmanager-examples.patch keywords: patch messages: 209922 nosy: barry, docs at python, r.david.murray priority: normal severity: normal stage: commit review status: open title: Add examples of using the new contentmanager api to the email docs type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33850/contentmanager-examples.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 23:46:41 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 01 Feb 2014 22:46:41 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391294801.85.0.173548984656.issue20473@psf.upfronthosting.co.za> Nick Coghlan added the comment: Those are C level descriptors, so we'd have to add new fields to the structs, and that's not going to happen at this stage of the release cycle. However, there's also the fact that tp_new and tp_init are required to have the *same* signature, and those override the apparent signature of __call__ on the metaclass, so it's actually better to just document it once on the class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 23:47:07 2014 From: report at bugs.python.org (Ronny Pfannschmidt) Date: Sat, 01 Feb 2014 22:47:07 +0000 Subject: [issue10740] sqlite3 module breaks transactions and potentially corrupts data In-Reply-To: <1292868135.81.0.257293444934.issue10740@psf.upfronthosting.co.za> Message-ID: <1391294827.43.0.807929281077.issue10740@psf.upfronthosting.co.za> Ronny Pfannschmidt added the comment: http://hg.python.org/releasing/3.4/file/447c758cdc26/Modules/_sqlite/cursor.c#l789 also i dont see the isolation level being taking into account in other parts of the code ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 23:50:02 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Feb 2014 22:50:02 +0000 Subject: [issue18891] Master patch for content manager addition to email package In-Reply-To: <1377918603.72.0.362957249668.issue18891@psf.upfronthosting.co.za> Message-ID: <1391295002.01.0.0476566255687.issue18891@psf.upfronthosting.co.za> R. David Murray added the comment: Opened issue 20477 with the proposed examples. ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 00:39:22 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 01 Feb 2014 23:39:22 +0000 Subject: [issue14665] faulthandler prints tracebacks in reverse order In-Reply-To: <1335305835.2.0.186027990116.issue14665@psf.upfronthosting.co.za> Message-ID: <1391297962.5.0.0279219483006.issue14665@psf.upfronthosting.co.za> Nick Coghlan added the comment: For additional context, Guido's patch in issue 19306 changed "Traceback" to "Stack" and added the "(most recent call first)" to some places where it was missing. Given the technical arguments in favour of keeping this code as simple as possible, agreed this is a "Won't Fix". ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 00:45:53 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 01 Feb 2014 23:45:53 +0000 Subject: [issue19157] ipaddress.IPv6Network.hosts function omits network and broadcast addresses In-Reply-To: <1380840691.26.0.505062253334.issue19157@psf.upfronthosting.co.za> Message-ID: <1391298353.79.0.960943324734.issue19157@psf.upfronthosting.co.za> Nick Coghlan added the comment: Peter, could you take a look at this one? The status quo seems reasonable to me (and I assume to you since the stdlib ipaddress matches the way ipaddr handles this case), but there are details to Michiel's proposal that I'm not able to adequately assess. However, also changing the target version to 3.5 - even if this behaviour was tweaked, it's unlikely to be something we would adjust in a maintenance release. ---------- nosy: +pmoody versions: +Python 3.5 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 01:42:50 2014 From: report at bugs.python.org (John Malmberg) Date: Sun, 02 Feb 2014 00:42:50 +0000 Subject: [issue16136] Removal of VMS support In-Reply-To: <1349389263.57.0.925729224322.issue16136@psf.upfronthosting.co.za> Message-ID: <1391301770.46.0.37207390135.issue16136@psf.upfronthosting.co.za> John Malmberg added the comment: Encompasserve.org is now back up. It took a little longer than expected. Should be no issues now in getting free hobby license keys for VMS on VAX, Alpha, and Itanium by using the web forms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:12:36 2014 From: report at bugs.python.org (pmoody) Date: Sun, 02 Feb 2014 01:12:36 +0000 Subject: [issue19157] ipaddress.IPv6Network.hosts function omits network and broadcast addresses In-Reply-To: <1380840691.26.0.505062253334.issue19157@psf.upfronthosting.co.za> Message-ID: <1391303556.97.0.230166260093.issue19157@psf.upfronthosting.co.za> pmoody added the comment: Ack. My first impression is that #1 is probably the right way to do this. I'm arguing with hg about the right way to stash a change, but I'll get this fixed. ---------- assignee: -> pmoody _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:16:30 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 01:16:30 +0000 Subject: [issue20478] Avoid inadvertently special casing Counter in statistics module Message-ID: <1391303789.61.0.448801013488.issue20478@psf.upfronthosting.co.za> New submission from Nick Coghlan: As per the python-ideas thread at https://mail.python.org/pipermail/python-ideas/2014-February/025226.html the statistics.mode() function currently passes its argument directly to the collections.Counter() constructor. This results in Counter() objects being special-cased rather than treated as ordinary iterables. For the main API, it seems more appropriate to force treatment as an iterable by calling iter() on the argument before passing it to the Counter() constructor. I'll file a separate RFE about making it easier and more efficient to use the statistics module with weight/frequency mappings. ---------- components: Library (Lib) messages: 209930 nosy: gregory.p.smith, larry, ncoghlan, oscarbenjamin, stevenjd, wolma priority: release blocker severity: normal stage: test needed status: open title: Avoid inadvertently special casing Counter in statistics module type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:21:11 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 01:21:11 +0000 Subject: [issue20479] Efficiently support weight/frequency mappings in the statistics module Message-ID: <1391304071.38.0.177384686096.issue20479@psf.upfronthosting.co.za> New submission from Nick Coghlan: Issue 20478 suggests ensuring that even weight/frequency mappings like collections.Counter are consistently handled as iterables in the current statistics module API. However, it likely makes sense to provide public APIs that support efficiently working with such weight/frequency mappings directly, rather than requiring that they be expanded to a full iterable all the time. One possibility would be to provide parallel APIs with the _map suffix, similar to the format() vs format_map() distinction in the string formatting APIs. ---------- components: Library (Lib) messages: 209931 nosy: gregory.p.smith, ncoghlan, oscarbenjamin, stevenjd, wolma priority: normal severity: normal stage: needs patch status: open title: Efficiently support weight/frequency mappings in the statistics module type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:22:14 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 01:22:14 +0000 Subject: [issue20478] Avoid inadvertently special casing Counter in statistics module In-Reply-To: <1391303789.61.0.448801013488.issue20478@psf.upfronthosting.co.za> Message-ID: <1391304134.0.0.0370589418477.issue20478@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 20479 covers providing tools for efficiently working with weight/frequency mappings in 3.5 (and presumably the statslib PyPI module) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:22:28 2014 From: report at bugs.python.org (Leon Weber) Date: Sun, 02 Feb 2014 01:22:28 +0000 Subject: [issue20480] Add ipaddress property to get reverse DNS name Message-ID: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> New submission from Leon Weber: I was missing a method to compute the reverse DNS name for an IP address, and I felt this is something that would belong in the ipaddress module; so here?s a patch for the ipaddress module adding a reverse_name property to IPv?Address. This is an example: >>> ipaddress.ip_address("127.0.0.1").reverse_name '1.0.0.127.in-addr.arpa.' >>> ipaddress.ip_address("2001:db8::1").reverse_name '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.' Would this be an acceptable feature for inclusion in the ipaddress module? ---------- components: Library (Lib) files: ipaddress_reverse_names.patch keywords: patch messages: 209933 nosy: leonn, ncoghlan, pmoody priority: normal severity: normal status: open title: Add ipaddress property to get reverse DNS name type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file33851/ipaddress_reverse_names.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:22:52 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 01:22:52 +0000 Subject: [issue20479] Efficiently support weight/frequency mappings in the statistics module In-Reply-To: <1391304071.38.0.177384686096.issue20479@psf.upfronthosting.co.za> Message-ID: <1391304172.34.0.893989824162.issue20479@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +Avoid inadvertently special casing Counter in statistics module versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:31:51 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 01:31:51 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module Message-ID: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> New submission from Nick Coghlan: I haven't completely following the type coercion discussion on python-ideas. but the statistics module at least needs a docs clarification (to explain that the current behaviour when mixing input types is not fully defined, especially when Decimal is involved), and potentially a behavioural change to disallow certain type combinations where the behaviour may change in the future (see https://mail.python.org/pipermail/python-ideas/2014-February/025214.html for example) Either option seems reasonable to me (with a slight preference for the latter), but it's at least clear that we need to avoid locking ourselves into the exact coercion behaviour of the current implementation indefinitely. ---------- components: Library (Lib) messages: 209934 nosy: gregory.p.smith, larry, ncoghlan, oscarbenjamin, stevenjd, wolma priority: release blocker severity: normal stage: needs patch status: open title: Clarify type coercion rules in statistics module type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:33:20 2014 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 02 Feb 2014 01:33:20 +0000 Subject: [issue20480] Add ipaddress property to get reverse DNS name In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391304800.3.0.990961713166.issue20480@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think the functionality is reasonable for this module. When I originally read the bug title, I was concerned that it was actually doing a reverse DNS lookup, which would not be appropriate. But now I realize it's just computing the name that would be used for the reverse lookup. I'm not sure "reverse_name" is the best name for this, but I don't have any better suggestions, and I could live with this name. Changing version to 3.5, since that's the first version this could be added to. ---------- nosy: +eric.smith versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:47:50 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 01:47:50 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS pointer In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391305670.08.0.320516121347.issue20480@psf.upfronthosting.co.za> Nick Coghlan added the comment: Heh, my initial reaction based on the issue title was the same as Eric's, but yes, I agree the pure text manipulation proposed in the patch is actually a good fit. Rather than "reverse_name" (which I feel is ambiguous about whether or not it does the DNS lookup to resolve back to the canonical name for the address), I would suggest the attribute name "reverse_pointer" or "reverse_record" (with a slight preference for the former, as indicated in the updated issue title). ---------- title: Add ipaddress property to get reverse DNS name -> Add ipaddress property to get name of reverse DNS pointer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 02:55:07 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 01:55:07 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS pointer In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391306107.29.0.430870683664.issue20480@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the patch, Leon. Is the trailing dot actually desired? >>> ipaddress.ip_address("127.0.0.1").reverse_name '1.0.0.127.in-addr.arpa.' Also, to accept your contribution, we will need you to fill a contributor's agreement. See http://www.python.org/psf/contrib/ ---------- nosy: +pitrou stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:13:20 2014 From: report at bugs.python.org (Leon Weber) Date: Sun, 02 Feb 2014 02:13:20 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS pointer In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391307200.31.0.739551314448.issue20480@psf.upfronthosting.co.za> Leon Weber added the comment: Thanks for the feedback, I agree "reverse_pointer" is a better, less ambiguous name for the property. I?ve amended the patch to reflect this suggestion. Regarding the trailing dot, I felt it more appropriate to have it that to leave it out, but I don?t have a strong opinion on this. It has to be there in the DNS query, but most tools will automatically add it to the query if it?s not specified. The "host" tool from bind-utils is undecided as well when printing the output, it includes the trailing dot when querying IPv4 addresses, but not for IPv6 addresses. Including the trailing dot has the advantage that the output could be directly fed into other code that strictly requires it, like the dnspython module. I?ll sign and submit the contributor?s agreement as soon as I?m within reach of a printer (likely within the next 24 hours). ---------- Added file: http://bugs.python.org/file33852/ipaddress_reverse_names_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:18:50 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 02:18:50 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS pointer In-Reply-To: <1391307200.31.0.739551314448.issue20480@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Gah, we still haven't fixed the contributor license docs on the main CLA page (hopefully we'll finally have that sorted later this month). In the meantime, if you go directly to http://www.python.org/psf/contrib/contrib-form/ it should give you the option to sign electronically: http://www.python.org/psf/contrib/contrib-form/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:21:23 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 02:21:23 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391307683.93.0.363103451945.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: Please review the attached patch (sig_builtins_01.patch). Some details: - All parsing code from Signature.from_builtin was moved in a separate helper '_signature_fromstr' - Signature.from_builtin calls '_signature_fromstr'. All its validation logic is untouched. - 'inspect.signature' was tweaked a bit: when it's certain that the object is a class and there is no user-defined __init__ or __new__ or its meta's __call__, it traverses the MRO to find non-empty __text_signature__. If it finds one -- it returns with _signature_fromstr(). If not, it checks if __init__ is type.__init__ or object.__init__. The last check is a bit tricky -- the only way of doing that check (I think) is to use __qualname__. Since the patch is non-trivial, any review/comments would be greatly appreciated. ---------- keywords: +patch Added file: http://bugs.python.org/file33853/sig_builtincls_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:28:46 2014 From: report at bugs.python.org (Leon Weber) Date: Sun, 02 Feb 2014 02:28:46 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS pointer In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391308126.3.0.990239485827.issue20480@psf.upfronthosting.co.za> Leon Weber added the comment: Oh nice, then fewer trees have to die. I?ve now signed the contributor?s agreement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:32:43 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 02:32:43 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391308363.03.0.416294186267.issue17159@psf.upfronthosting.co.za> Changes by Yury Selivanov : Added file: http://bugs.python.org/file33854/sig_cython_03.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:33:15 2014 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 02 Feb 2014 02:33:15 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1391308395.91.0.8002994489.issue15216@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Wow, I didn't realize that programming Python using the C interface was that tedious and verbose. I have attached a work-in-progress patch. It is not complete yet, but maybe somebody could already take a look to make sure that I'm not heading completely in the wrong direction. Regarding StringIO.set_encoding(): I thought about this a bit, but I couldn't come up with a convincing scenario where having a no-op implementation would clearly help or or clearly hurt. Personally I would therefore to not provide it for now. If it turns out to be a problem, it can easily be added. But if we add it now and it turns out to have been a bad choice, it's probably much harder to remove it again. ---------- Added file: http://bugs.python.org/file33855/set_encoding-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:41:28 2014 From: report at bugs.python.org (yegle) Date: Sun, 02 Feb 2014 02:41:28 +0000 Subject: [issue20482] smtplib.SMTP.sendmail: improve exception message Message-ID: <1391308888.03.0.522502415802.issue20482@psf.upfronthosting.co.za> New submission from yegle: Currently the `msg` argument of `smtplib.SMTP.sendmail` accept a `str` in Py3k if every characters in this `str` is in ASCII range, or a `bytes`. This is confusing for new comer because: 1. When you send your mail using only ASCII characters, everything is fine (no matter you use bytes or str). 2. When sometimes you included non-ASCII characters in your email, the traceback is hard to understand. Here's an example of such traceback: Traceback (most recent call last): File "./manage.py", line 113, in manager.run() File "/data/web/cgi-bin/venv/lib/python3.3/site-packages/flask_script/__init__.py", line 405, in run result = self.handle(sys.argv[0], sys.argv[1:]) File "/data/web/cgi-bin/venv/lib/python3.3/site-packages/flask_script/__init__.py", line 384, in handle return handle(app, *positional_args, **kwargs) File "/data/web/cgi-bin/venv/lib/python3.3/site-packages/flask_script/commands.py", line 145, in handle return self.run(*args, **kwargs) File "./manage.py", line 108, in run conn.send(msg) File "/data/web/cgi-bin/venv/lib/python3.3/site-packages/flask_mail.py", line 168, in send message.as_string()) File "/data/web/cgi-bin/python-3.3.3/lib/python3.3/smtplib.py", line 747, in sendmail msg = _fix_eols(msg).encode('ascii') UnicodeEncodeError: 'ascii' codec can't encode character '\u9f99' in position 646: ordinal not in range(128) Here's my proposal: --- smtplib.py.orig 2014-02-01 21:26:47.000000000 -0500 +++ smtplib.py 2014-02-01 21:37:51.000000000 -0500 @@ -744,7 +744,12 @@ esmtp_opts = [] print(msg) if isinstance(msg, str): - msg = _fix_eols(msg).encode('ascii') + try: + msg = _fix_eols(msg).encode('ascii') + except UnicodeEncodeError: + raise SMTPException( + "msg may be a string containing characters in the " + "ASCII range, or a byte string.") if self.does_esmtp: # Hmmm? what's this? -ddm # self.esmtp_features['7bit']="" ---------- components: email messages: 209943 nosy: barry, r.david.murray, yegle priority: normal severity: normal status: open title: smtplib.SMTP.sendmail: improve exception message type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:42:57 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 02:42:57 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391308977.06.0.585359096127.issue20475@psf.upfronthosting.co.za> Yury Selivanov added the comment: Well, I guess we can replace from time import clock with something like try: from time import monotonic as clock except ImportError: from time import time as clock Victor, what do you think? ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:44:32 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 02:44:32 +0000 Subject: [issue20482] smtplib.SMTP.sendmail: improve exception message In-Reply-To: <1391308888.03.0.522502415802.issue20482@psf.upfronthosting.co.za> Message-ID: <1391309072.48.0.454844104571.issue20482@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 03:55:42 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 02:55:42 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391309742.48.0.775678350569.issue20475@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 05:31:02 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Feb 2014 04:31:02 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1391315462.58.0.860735491846.issue9974@psf.upfronthosting.co.za> Terry J. Reedy added the comment: One could argue that "The guarantee applies only to the token type and token string as the spacing between tokens (column positions) may change." covers merging of lines, but total elimination of needed whitespace is definitely a bug. ---------- nosy: +terry.reedy stage: -> patch review versions: +Python 3.3, Python 3.4 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 05:42:54 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Feb 2014 04:42:54 +0000 Subject: [issue20387] tokenize/untokenize roundtrip fails with tabs In-Reply-To: <1390603875.19.0.598751073352.issue20387@psf.upfronthosting.co.za> Message-ID: <1391316174.29.0.256297004707.issue20387@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Whitespace equivalence is explicitly disclaimed. "The guarantee applies only to the token type and token string as the spacing between tokens (column positions) may change." The assert is not a valid test. I think you should close this. (Note that there are several issues for bugs where untokenize results in a sematically different text.) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 05:59:35 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 04:59:35 +0000 Subject: [issue20483] Missing network resource checks in test_urllib2 & test_smtplib Message-ID: <1391317175.95.0.400221944155.issue20483@psf.upfronthosting.co.za> New submission from Nick Coghlan: These two tests appear to rely on DNS lookups or other network access that isn't guarded by the network resource (my internet dropped out and these two tests failed, but they work correctly now the internet connection is back up). ---------- components: Tests messages: 209947 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Missing network resource checks in test_urllib2 & test_smtplib type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 06:08:59 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 05:08:59 +0000 Subject: [issue20404] Delayed exception using non-text encodings with TextIOWrapper In-Reply-To: <1390798876.83.0.936873438895.issue20404@psf.upfronthosting.co.za> Message-ID: <1391317739.93.0.74216920553.issue20404@psf.upfronthosting.co.za> Nick Coghlan added the comment: Revised patch that avoids doing multiple lookups of the same codec name while creating the stream. Absent any comments, I'll commit this version with appropriate NEWS and What's New updates tomorrow. ---------- Added file: http://bugs.python.org/file33856/issue20404_check_valid_textio_codec_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 06:16:00 2014 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 02 Feb 2014 05:16:00 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1391318160.61.0.852214999649.issue15216@psf.upfronthosting.co.za> Changes by Nikolaus Rath : Added file: http://bugs.python.org/file33857/set_encoding-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 06:26:57 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 05:26:57 +0000 Subject: [issue20404] Delayed exception using non-text encodings with TextIOWrapper In-Reply-To: <1390798876.83.0.936873438895.issue20404@psf.upfronthosting.co.za> Message-ID: <1391318817.41.0.868540776745.issue20404@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, just noticed the test case is still using the overly specific check for the exception wording. I'll fix that, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 06:44:00 2014 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 02 Feb 2014 05:44:00 +0000 Subject: [issue18823] Idle: use pipes instead of sockets to talk with user subprocess In-Reply-To: <1377300904.13.0.124289838176.issue18823@psf.upfronthosting.co.za> Message-ID: <1391319840.13.0.120322893656.issue18823@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 06:44:46 2014 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 02 Feb 2014 05:44:46 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1391319886.42.0.666370281336.issue16123@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 06:46:03 2014 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 02 Feb 2014 05:46:03 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1391319963.45.0.130658314974.issue15663@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 06:57:28 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 05:57:28 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391320648.66.0.505189129632.issue20473@psf.upfronthosting.co.za> Changes by Yury Selivanov : Added file: http://bugs.python.org/file33858/sig_builtincls_02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 06:57:57 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Feb 2014 05:57:57 +0000 Subject: [issue20484] test_pydoc can alter execution environment causing subsequent test failures Message-ID: <1391320676.2.0.0607136124043.issue20484@psf.upfronthosting.co.za> New submission from Ned Deily: With the "pydoc.synopsis() for 'binary' modules" changes (d6c3fb8d5f84) to pydoc and test_pydoc for Issue20123, running test_pydoc can leave the regrtest environment altered and cause subsequent tests to fail in strange ways. I ran into this issue running regression tests for 3.4.0 and was able to isolate the failure to this change set. A somewhat simplified (if not necessarily minimal) set of steps to reproduce follow. I've not had time to further investigate the cause. I've also only seen the problem when running the tests with an installed Python or from a build directory when there is also a Python installed in the configured prefix but not from the build directory with no Python installed at the configured prefix. I've reproduced the failure on both Debian Linux and on OS X. The following output is from the former. $ rm -rf /tmp/root/* $ hg purge --all $ hg update 6d72617cae64 # the parent change set of d6c3fb8d5f84 $ hg log -r . changeset: 88306:6d72617cae64 user: R David Murray date: Sat Jan 04 21:17:52 2014 -0500 summary: whatsnew: removal of TYPE_INT64 from marshal. $ ./configure --prefix=/tmp/root $ make && make install $ ( cd /tmp && /tmp/root/bin/python3.4 -m test -w test_pydoc test_distutils ) [1/2] test_pydoc [2/2] test_distutils All 2 tests OK. $ hg update d6c3fb8d5f84 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log -r . changeset: 88307:d6c3fb8d5f84 user: Eric Snow date: Sat Jan 04 20:38:11 2014 -0700 summary: Issue 20123: Fix pydoc.synopsis() for "binary" modules. $ make && make install $ ( cd /tmp && /tmp/root/bin/python3.4 -m test -w test_pydoc test_distutils ) [1/2] test_pydoc Warning -- warnings.filters was modified by test_pydoc Warning -- logging._handlerList was modified by test_pydoc [2/2] test_distutils test test_distutils failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_distutils 1 test altered the execution environment: test_pydoc Re-running failed tests in verbose mode Re-running test 'test_distutils' in verbose mode test_simple_built (distutils.tests.test_bdist_dumb.BuildDumbTestCase) ... FAIL test_check_all (distutils.tests.test_check.CheckTestCase) ... ok [...] ====================================================================== ERROR: test_metadata_check_option (distutils.tests.test_sdist.SDistTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_sdist.py", line 247, in test_metadata_check_option cmd.run() File "/tmp/root/lib/python3.4/distutils/command/sdist.py", line 158, in run self.get_file_list() File "/tmp/root/lib/python3.4/distutils/command/sdist.py", line 204, in get_file_list self.add_defaults() File "/tmp/root/lib/python3.4/distutils/command/sdist.py", line 262, in add_defaults self.filelist.extend(build_py.get_source_files()) File "/tmp/root/lib/python3.4/distutils/command/build_py.py", line 301, in get_source_files return [module[-1] for module in self.find_all_modules()] File "/tmp/root/lib/python3.4/distutils/command/build_py.py", line 295, in find_all_modules package_dir = self.get_package_dir(package) File "/tmp/root/lib/python3.4/site-packages/setuptools/command/build_py.py", line 187, in get_package_dir return os.path.join(self.distribution.src_root, res) File "/tmp/root/lib/python3.4/posixpath.py", line 83, in join path += b TypeError: unsupported operand type(s) for +=: 'dict' and 'str' ====================================================================== ERROR: test_debug_mode (distutils.tests.test_install.InstallTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_install.py", line 236, in test_debug_mode self.test_record() File "/tmp/root/lib/python3.4/distutils/tests/test_install.py", line 186, in test_record cmd.run() File "/tmp/root/lib/python3.4/distutils/command/install.py", line 566, in run self.run_command(cmd_name) File "/tmp/root/lib/python3.4/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/tmp/root/lib/python3.4/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/install_scripts.py", line 18, in run self.run_command("egg_info") File "/tmp/root/lib/python3.4/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/tmp/root/lib/python3.4/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 163, in run self.find_sources() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 186, in find_sources mm.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 246, in run self.add_defaults() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 282, in add_defaults sdist.add_defaults(self) File "/tmp/root/lib/python3.4/site-packages/setuptools/command/sdist.py", line 148, in add_defaults if os.path.exists(fn): File "/tmp/root/lib/python3.4/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: can't specify None for path argument ====================================================================== ERROR: test_record (distutils.tests.test_install.InstallTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_install.py", line 186, in test_record cmd.run() File "/tmp/root/lib/python3.4/distutils/command/install.py", line 566, in run self.run_command(cmd_name) File "/tmp/root/lib/python3.4/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/tmp/root/lib/python3.4/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/install_scripts.py", line 18, in run self.run_command("egg_info") File "/tmp/root/lib/python3.4/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/tmp/root/lib/python3.4/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 163, in run self.find_sources() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 186, in find_sources mm.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 246, in run self.add_defaults() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 282, in add_defaults sdist.add_defaults(self) File "/tmp/root/lib/python3.4/site-packages/setuptools/command/sdist.py", line 148, in add_defaults if os.path.exists(fn): File "/tmp/root/lib/python3.4/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: can't specify None for path argument ====================================================================== ERROR: test_record_extensions (distutils.tests.test_install.InstallTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_install.py", line 217, in test_record_extensions cmd.run() File "/tmp/root/lib/python3.4/distutils/command/install.py", line 566, in run self.run_command(cmd_name) File "/tmp/root/lib/python3.4/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/tmp/root/lib/python3.4/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/install_egg_info.py", line 29, in run self.run_command('egg_info') File "/tmp/root/lib/python3.4/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/tmp/root/lib/python3.4/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 163, in run self.find_sources() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 186, in find_sources mm.run() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 246, in run self.add_defaults() File "/tmp/root/lib/python3.4/site-packages/setuptools/command/egg_info.py", line 282, in add_defaults sdist.add_defaults(self) File "/tmp/root/lib/python3.4/site-packages/setuptools/command/sdist.py", line 148, in add_defaults if os.path.exists(fn): File "/tmp/root/lib/python3.4/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: can't specify None for path argument ====================================================================== ERROR: test_get_inputs (distutils.tests.test_install_lib.InstallLibTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_install_lib.py", line 91, in test_get_inputs inputs = cmd.get_inputs() File "/tmp/root/lib/python3.4/distutils/command/install_lib.py", line 211, in get_inputs inputs.extend(build_py.get_outputs()) File "/tmp/root/lib/python3.4/distutils/command/build_py.py", line 308, in get_outputs modules = self.find_all_modules() File "/tmp/root/lib/python3.4/distutils/command/build_py.py", line 295, in find_all_modules package_dir = self.get_package_dir(package) File "/tmp/root/lib/python3.4/site-packages/setuptools/command/build_py.py", line 187, in get_package_dir return os.path.join(self.distribution.src_root, res) File "/tmp/root/lib/python3.4/posixpath.py", line 83, in join path += b TypeError: unsupported operand type(s) for +=: 'dict' and 'str' ====================================================================== ERROR: test_get_outputs (distutils.tests.test_install_lib.InstallLibTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_install_lib.py", line 71, in test_get_outputs outputs = cmd.get_outputs() File "/tmp/root/lib/python3.4/distutils/command/install_lib.py", line 188, in get_outputs self.install_dir) File "/tmp/root/lib/python3.4/distutils/command/install_lib.py", line 148, in _mutate_outputs build_files = build_cmd.get_outputs() File "/tmp/root/lib/python3.4/distutils/command/build_py.py", line 308, in get_outputs modules = self.find_all_modules() File "/tmp/root/lib/python3.4/distutils/command/build_py.py", line 295, in find_all_modules package_dir = self.get_package_dir(package) File "/tmp/root/lib/python3.4/site-packages/setuptools/command/build_py.py", line 187, in get_package_dir return os.path.join(self.distribution.src_root, res) File "/tmp/root/lib/python3.4/posixpath.py", line 83, in join path += b TypeError: unsupported operand type(s) for +=: 'dict' and 'str' ====================================================================== FAIL: test_simple_built (distutils.tests.test_bdist_dumb.BuildDumbTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_bdist_dumb.py", line 91, in test_simple_built self.assertEqual(contents, sorted(wanted)) AssertionError: Lists differ: ['PKG-INFO', 'SOURCES.txt', 'dependency_lin[52 chars]txt'] != ['foo-0.1-py3.4.egg-info', 'foo.cpython-34.pyc', 'foo.py'] First differing element 0: PKG-INFO foo-0.1-py3.4.egg-info First list contains 3 additional elements. First extra element 3: foo.cpython-34.pyc + ['foo-0.1-py3.4.egg-info', 'foo.cpython-34.pyc', 'foo.py'] - ['PKG-INFO', - 'SOURCES.txt', - 'dependency_links.txt', - 'foo.cpython-34.pyc', - 'foo.py', - 'top_level.txt'] ====================================================================== FAIL: test_formats (distutils.tests.test_bdist.BuildTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_bdist.py", line 26, in test_formats self.assertEqual(found, formats) AssertionError: Lists differ: ['bztar', 'egg', 'gztar', 'msi', 'rpm', 'tar', 'wininst', 'zip', 'ztar'] != ['bztar', 'gztar', 'msi', 'rpm', 'tar', 'wininst', 'zip', 'ztar'] First differing element 1: egg gztar First list contains 1 additional elements. First extra element 8: ztar - ['bztar', 'egg', 'gztar', 'msi', 'rpm', 'tar', 'wininst', 'zip', 'ztar'] ? ------- + ['bztar', 'gztar', 'msi', 'rpm', 'tar', 'wininst', 'zip', 'ztar'] ====================================================================== FAIL: test_dir_in_package_data (distutils.tests.test_build_py.BuildPyTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_build_py.py", line 153, in test_dir_in_package_data dist.run_commands() distutils.errors.DistutilsFileError: can't copy 'pkg/doc/otherdir': doesn't exist or not a regular file During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_build_py.py", line 155, in test_dir_in_package_data self.fail("failed package_data when data dir includes a dir") AssertionError: failed package_data when data dir includes a dir ====================================================================== FAIL: test_empty_package_dir (distutils.tests.test_build_py.BuildPyTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_build_py.py", line 87, in test_empty_package_dir dist.run_commands() distutils.errors.DistutilsFileError: can't copy 'oc/testfile': doesn't exist or not a regular file During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/root/lib/python3.4/distutils/tests/test_build_py.py", line 89, in test_empty_package_dir self.fail("failed package_data test when package_dir is ''") AssertionError: failed package_data test when package_dir is '' ---------------------------------------------------------------------- Ran 201 tests in 0.915s FAILED (failures=4, errors=6, skipped=19) test test_distutils failed $ rm -rf /tmp/root/* $ hg purge --all $ hg update default # current tip 339 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg log -r . changeset: 88889:d7ac90c0463a tag: tip user: Victor Stinner date: Sat Feb 01 22:49:59 2014 +0100 summary: Issue #20400: Merge Tulip into Python: add the new asyncio.subprocess module $ ./configure --prefix=/tmp/root $ make && make install $ ( cd /tmp && /tmp/root/bin/python3.4 -m test -w test_pydoc test_distutils ) [1/2] test_pydoc Warning -- warnings.filters was modified by test_pydoc Warning -- logging._handlerList was modified by test_pydoc [2/2] test_distutils test test_distutils failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_distutils 1 test altered the execution environment: test_pydoc Re-running failed tests in verbose mode Re-running test 'test_distutils' in verbose mode test_simple_built (distutils.tests.test_bdist_dumb.BuildDumbTestCase) ... FAIL [...] ---------------------------------------------------------------------- Ran 201 tests in 0.959s FAILED (failures=4, errors=6, skipped=19) test test_distutils failed $ # problem still exists ---------- assignee: eric.snow components: Library (Lib), Tests messages: 209950 nosy: eric.snow, ned.deily priority: high severity: normal stage: needs patch status: open title: test_pydoc can alter execution environment causing subsequent test failures versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 07:05:59 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 06:05:59 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391321159.49.0.507578154792.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: Second patch attached: sig_builtincls_02.patch, with a fix, that Nick suggested. Larry, I'd like you to take a quick look at it as well, before I commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 07:10:49 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Sun, 02 Feb 2014 06:10:49 +0000 Subject: [issue20451] os.exec* mangles argv on windows (splits on spaces, etc) In-Reply-To: <1391152839.26.0.437112268275.issue20451@psf.upfronthosting.co.za> Message-ID: <1391321449.19.0.852015722882.issue20451@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: i have tried a workaround for this issue by explicitly escaping args so that same result is produced on all platforms.this patch does NOT change the behavior on non-NT platforms. If this patch is accepted,i also recommend to specify on the help pages,that there is no need to escape the args as it will done automatically. ---------- keywords: +patch nosy: +sahutd Added file: http://bugs.python.org/file33859/issue20451.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 07:38:42 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 06:38:42 +0000 Subject: [issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140504.71.0.617730511292.issue20184@psf.upfronthosting.co.za> Message-ID: <1391323122.27.0.683912453311.issue20184@psf.upfronthosting.co.za> Nick Coghlan added the comment: Larry, if this version looks good to you, I'd like to commit it. - id() is now back to being a properly generated AC function (since AC can now preserve the old C level signature) - sorted() is partially converted and has a __text_signature__ compatible docstring. However, full conversion will have to wait for the ability to preserve the kwds dict, since that's the API exposed by the list object. - with the new never-triggered-by-accident AC syntax, the test case now ensures that all the builtins that are expected to *not* expose signature info at this point, don't. As they're converted for 3.5, that will force them to be added to the list of functions that are checked for compatibility. I'm thinking it's probably worth flagging this new test as a CPython implementation detail test, though. ---------- Added file: http://bugs.python.org/file33860/issue20184_builtin_conversion_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 07:42:38 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 06:42:38 +0000 Subject: [issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140504.71.0.617730511292.issue20184@psf.upfronthosting.co.za> Message-ID: <1391323358.44.0.98548965952.issue20184@psf.upfronthosting.co.za> Changes by Nick Coghlan : Added file: http://bugs.python.org/file33861/issue20184_builtin_conversion_v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 08:01:36 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 02 Feb 2014 07:01:36 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1391308363.08.0.843068039753.issue17159@psf.upfronthosting.co.za> Message-ID: <52EDED4F.7010806@behnel.de> Stefan Behnel added the comment: I tried the third patch and it works, but when I write this into a docstring: def func(x, *, y=None): """sig=(a,b)""" then it fails to extract the signature again and returns (a,b) instead. I also tried putting in some math term as (non-signature) documentation: def sig(a, b): """sig=(a*b)""" and it raises a ValueError telling me that the signature is invalid. So, I still think it should prefer a full function interface over the risky "__text_signature__" quirk whenever it can. I also think it shouldn't raise an error if the docstring isn't something that it can parse, but that's not part of this ticket, I guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 08:22:10 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 02 Feb 2014 07:22:10 +0000 Subject: [issue20326] Argument Clinic should use a non-error-prone syntax to mark text signatures In-Reply-To: <1390298749.1.0.12762219489.issue20326@psf.upfronthosting.co.za> Message-ID: <1391325730.41.0.931900059004.issue20326@psf.upfronthosting.co.za> Stefan Behnel added the comment: I tried this in Cython and ISTM that the C level parser is a bit too forgiving: def sig(a, b): """sig=(a*b)""" return a * b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 08:45:08 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sun, 02 Feb 2014 07:45:08 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391327108.86.0.709092988753.issue20481@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Thanks Nick for filing this! I've been working on modifications to statistics._sum and statistics._coerce_types that together make the module's behaviour independent of the order of input types (by making the decision based on the set of input types) and, specifically, disallow certain combinations involving Decimal reliably. Specifically, my modified version, like the original, returns the input type if there is only one; for mixed input types, differently than the original, it tries to return the most basic representative of the most narrow number type from the numbers tower (i.e., int if all input types are Integral, Fraction if all are Rational, float with all Real); Decimal is treated in the following way: if Decimal is the only input type or if the input types consist of only Decimal and Integral, Decimal is returned; my two versions of _coerce_types differ in that the first raises TypeError with any other combination involving Decimal, the second allows combinations of Decimal with float (returning float) and raises TypeError with all others. I sent the first version to Steven D'Aprano and Oscar Benjamin for review. ---------- Added file: http://bugs.python.org/file33862/_sum_coerce.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 09:01:31 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 08:01:31 +0000 Subject: [issue8743] set() operators don't work with collections.Set instances In-Reply-To: <1274122246.37.0.692277131409.issue8743@psf.upfronthosting.co.za> Message-ID: <1391328091.74.0.419613924035.issue8743@psf.upfronthosting.co.za> Nick Coghlan added the comment: I updated the patch to apply cleanly to the default branch. I also added several new test cases which uncovered issues with Daniel's previous patch. Specifically: - the reverse functions were not be tested properly (added a separate test to ensure they all return NotImplemented when appropriate) - the checks in the in-place operands were not being tested, and were also too strict (added tests for their input checking, and also ensured they still accepted arbitrary iterables as input) I've also reduced the target versions to just 3.4 - this will require a porting note in the What's New, since the inappropriate handling of arbitrary iterables in the ABC methods has been removed, which means that things that previously worked when they shouldn't (like accepting a list as the RHS of a binary set operator) will now throw TypeError. Python 3.3: >>> set() | list() Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for |: 'set' and 'list' >>> from test.test_collections import WithSet >>> WithSet() | list() After applying the attached patch: >>> set() | list() Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for |: 'set' and 'list' >>> from test.test_collections import WithSet >>> WithSet() | list() Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for |: 'WithSet' and 'list' ---------- versions: -Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file33863/issue8743-set-ABC-interoperability.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 09:06:49 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 08:06:49 +0000 Subject: [issue2226] Small _abcoll Bugs / Oddities In-Reply-To: <1204579501.7.0.0188509512316.issue2226@psf.upfronthosting.co.za> Message-ID: <1391328409.98.0.854256823615.issue2226@psf.upfronthosting.co.za> Nick Coghlan added the comment: With the only remaining issue here being the misbehaviour of the Set and MutableSet ABCs when dealing with other types (the other issues in Armin's original report were much simpler and fixed promptly), I'm closing this as a duplicate of issue 8743 (where I just uploaded an up to date patch based on the patch Daniel linked to above) ---------- resolution: -> duplicate status: open -> closed superseder: -> set() operators don't work with collections.Set instances _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 09:07:12 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 08:07:12 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391309742.54.0.0915451689709.issue20475@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: time.monotonic() has a bad resolution (15.6 ms) on Windows. To measure performances, use time.perf_counter() or time.process_time() as proposed in tome.clock() documentation. It depends if you want to include time elapsed during sleep. Usually time.perf_counter() is the expected function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 09:07:34 2014 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 02 Feb 2014 08:07:34 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391328454.61.0.104178115712.issue20480@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'd prefer to leave the trailing dots. It's the technically correct thing to do. And as they say, technically correct is the best kind of correct! ---------- title: Add ipaddress property to get name of reverse DNS pointer -> Add ipaddress property to get name of reverse DNS PTR record _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 09:12:57 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 08:12:57 +0000 Subject: [issue8743] set() operators don't work with collections.Set instances In-Reply-To: <1274122246.37.0.692277131409.issue8743@psf.upfronthosting.co.za> Message-ID: <1391328777.71.0.482156983832.issue8743@psf.upfronthosting.co.za> Nick Coghlan added the comment: I initially missed Mark's suggestion above to avoid the recursive subtraction operation in __rsub__. v2 of my patch includes that tweak. ---------- Added file: http://bugs.python.org/file33864/issue8743-set-ABC-interoperability_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 09:25:50 2014 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 02 Feb 2014 08:25:50 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391329550.19.0.87686287652.issue20480@psf.upfronthosting.co.za> Eric V. Smith added the comment: The patch looks good to me, save for a versionadded tag in the docs. I've mentioned it on Rietveld. Not to get in to bikeshedding on the name, but I'd prefer something with PTR in the name. I'm an old-timer, and think of these as "PTR lookups" (because they are!). If I were looking for it, that's what I'd search for. And if not in the property name, then at least the documentation should mention it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 09:26:57 2014 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 02 Feb 2014 08:26:57 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391329617.53.0.985438889506.issue20480@psf.upfronthosting.co.za> Eric V. Smith added the comment: Or, now that I think about it some more, maybe leave the name as reverse_pointer and just mention PTR records in the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 09:30:17 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Feb 2014 08:30:17 +0000 Subject: [issue20387] tokenize/untokenize roundtrip fails with tabs In-Reply-To: <1390603875.19.0.598751073352.issue20387@psf.upfronthosting.co.za> Message-ID: <1391329817.53.0.82097480776.issue20387@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I read the manual more carefully and noticed that the guarantee is that tokenizing the result of untokenize matches the input to untokenize. " The result is guaranteed to tokenize back to match the input so that the conversion is lossless and round-trips are assured." I ran the test in 3.4 and noticed the exactness and direction of the matching does not matter because only the 2nd \t is replaced by a space, making the invalid code that raises IndentationError. So this is definitely a bug and I withdraw the close suggestion. I believe the test should be that both lines of the body begin with the same indent. from tokenize import tokenize, untokenize import io def test_tab_indent(self): code = b"if False:\n\tx=3\n\ty=3\n" codelines = untokenize(tokenize(io.BytesIO(s).readline)).split(\n) assertEqual(codelines[1], codelines[2]) Of course, the test of tokenize and untokenize should be separated. ---------- stage: -> needs patch versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 11:08:37 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Feb 2014 10:08:37 +0000 Subject: [issue20387] tokenize/untokenize roundtrip fails with tabs In-Reply-To: <1390603875.19.0.598751073352.issue20387@psf.upfronthosting.co.za> Message-ID: <1391335717.21.0.611324167521.issue20387@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think the problem is with untokenize. s =b"if False:\n\tx=3\n\ty=3\n" t = tokenize(io.BytesIO(s).readline) for i in t: print(i) produces a token stream that seems correct. TokenInfo(type=56 (ENCODING), string='utf-8', start=(0, 0), end=(0, 0), line='') TokenInfo(type=1 (NAME), string='if', start=(1, 0), end=(1, 2), line='if False:\n') TokenInfo(type=1 (NAME), string='False', start=(1, 3), end=(1, 8), line='if False:\n') TokenInfo(type=52 (OP), string=':', start=(1, 8), end=(1, 9), line='if False:\n') TokenInfo(type=4 (NEWLINE), string='\n', start=(1, 9), end=(1, 10), line='if False:\n') TokenInfo(type=5 (INDENT), string='\t', start=(2, 0), end=(2, 1), line='\tx=3\n') TokenInfo(type=1 (NAME), string='x', start=(2, 1), end=(2, 2), line='\tx=3\n') TokenInfo(type=52 (OP), string='=', start=(2, 2), end=(2, 3), line='\tx=3\n') TokenInfo(type=2 (NUMBER), string='3', start=(2, 3), end=(2, 4), line='\tx=3\n') TokenInfo(type=4 (NEWLINE), string='\n', start=(2, 4), end=(2, 5), line='\tx=3\n') TokenInfo(type=1 (NAME), string='y', start=(3, 1), end=(3, 2), line='\ty=3\n') TokenInfo(type=52 (OP), string='=', start=(3, 2), end=(3, 3), line='\ty=3\n') TokenInfo(type=2 (NUMBER), string='3', start=(3, 3), end=(3, 4), line='\ty=3\n') TokenInfo(type=4 (NEWLINE), string='\n', start=(3, 4), end=(3, 5), line='\ty=3\n') TokenInfo(type=6 (DEDENT), string='', start=(4, 0), end=(4, 0), line='') TokenInfo(type=0 (ENDMARKER), string='', start=(4, 0), end=(4, 0), line='') The problem with untokenize and indents is this: In the old untokenize duples function, now called 'compat', INDENT strings were added to a list and popped by the corresponding DEDENT. While compat has the minor problem of returning a string instead of bytes (which is actually as I think it should be) and adding extraneous spaces within and at the end of lines, it correctly handles tabs in your example and this: s =b"if False:\n\tx=1\n\t\ty=2\n\t\t\tz=3\n" t = tokenize(io.BytesIO(s).readline) print(untokenize(i[:2] for i in t).encode()) >>> b'if False :\n\tx =1 \n\t\ty =2 \n\t\t\tz =3 \n' When tokenize was changed to producing 5-tuples, untokenize was changed to use the start and end coordinates, but all special processing of indents was cut in favor of .add_space(). So this issue is a regression due in inadequate testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 11:20:37 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 02 Feb 2014 10:20:37 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391336437.39.0.247680865555.issue17159@psf.upfronthosting.co.za> Larry Hastings added the comment: In case a little background would help: while developing support for '__text_signature__' I had to move the test and the from_builtin() call to the top. It used to be more in the middle-ish. I don't have notes specifically on why I moved it, but I dimly recall that if I didn't try from_builtin first, there were other approaches that would succeed on the callable, that approach would fail on a builtin, so it'd throw an exception, and from_builtin wouldn't get a chance to try. Also, I assumed that anything that had a __text_signature__ wasn't going to have any other kind of signature information. Therefore, if the object had a __text_signature__ attribute, then I already knew that's the best approach and it should definitely be first. Also also, I remember specifically that the isinstance(type) code would fail builtin classes. But there's no generic way (that I know of) to tell whether a class is a user class or a builtin class. So I wanted from_builtin to try handling a class first before the isinstance(type) class. Are there callables in CPython that have *both* a __text_signature__ *and* have signature information derivable from another source, where you *don't* want to use __text_signature__? Stefan: yes, you can write any garbage you want after "sig=(" and the C function that detects signatures will still assume you have a text signature. That reminds me of a good joke. Patient: Doctor, it hurts whenever I move my arm in this funny way. *demonstrates* Doctor: Well, then, don't do that. I would be very interested if you knew of docstrings in the wild that innocently start with "sig=(" and yet aren't intended to be text signatures compatible with inspect.Signature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 11:30:38 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 02 Feb 2014 10:30:38 +0000 Subject: [issue20387] tokenize/untokenize roundtrip fails with tabs In-Reply-To: <1390603875.19.0.598751073352.issue20387@psf.upfronthosting.co.za> Message-ID: <1391337038.57.0.708483911449.issue20387@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The untokenize docstring has a stronger guarantee, and in the direction you were claiming. "Round-trip invariant for full input: Untokenized source will match input source exactly". For this to be true, the indent strings must be saved and not replaced by spaces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 12:14:24 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 02 Feb 2014 11:14:24 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1391336437.39.0.247680865555.issue17159@psf.upfronthosting.co.za> Message-ID: <52EE288E.8080907@behnel.de> Stefan Behnel added the comment: > I assumed that anything that had a __text_signature__ wasn't going > to have any other kind of signature information. Therefore, if the > object had a __text_signature__ attribute, then I already knew that's > the best approach and it should definitely be first. That's likely true for CPython itself, at least currently. I don't think it's generally a safe assumption in the CPython ecosystem, which includes things like Cython, Numba, Nuitka and others, i.e. a growing number of tools that can create function-like native callables with a signature that is worth introspecting. They may or may not provide a function-like signature, but if they do (and at least Cython and Nuitka provide one), then that's the best you can get. Reducing it to a string representation, especially now that we have annotations for Python signatures, sounds like a major step backwards. > Are there callables in CPython that have *both* a __text_signature__ > *and* have signature information derivable from another source, where > you *don't* want to use __text_signature__? Anything that inherits from PyCFunction will inherit "__text_signature__" automatically. I should mention that this inheritance is actually not allowed, according to the type flags in PyCFunction_Type. It's just that Cython has been doing it that way for years, mainly because there are some barriers in CPython (don't remember which) that prevent other types from doing similar things. > I would be very interested if you knew of docstrings in the wild that > innocently start with "sig=(" and yet aren't intended to be text > signatures compatible with inspect.Signature. I agree that it's an unlikely start for a docstring. That's why it was chosen, after all. Safer ways to do it would be extending the type, or adding a flag in some way, but that's going to a) hurt more than the current situation, and b) become wasteful at some point when the __text_signature__ actually gets replaced by a proper function interface for CPython builtins. The fact that that wasn't doable for Py3.4 any more doesn't mean it shouldn't be done at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 12:15:36 2014 From: report at bugs.python.org (Peter Santoro) Date: Sun, 02 Feb 2014 11:15:36 +0000 Subject: [issue18577] lru_cache enhancement: lru_timestamp helper function In-Reply-To: <1375014771.52.0.855210720887.issue18577@psf.upfronthosting.co.za> Message-ID: <1391339736.75.0.793481192082.issue18577@psf.upfronthosting.co.za> Peter Santoro added the comment: As requested, I published this for review on http://code.activestate.com/recipes/578817-lru_timestamp-cache-entry-aging-for-functoolslru_c/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 12:17:18 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 11:17:18 +0000 Subject: [issue20404] Delayed exception using non-text encodings with TextIOWrapper In-Reply-To: <1390798876.83.0.936873438895.issue20404@psf.upfronthosting.co.za> Message-ID: <1391339838.84.0.730730119123.issue20404@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The _PyCodec_GetIncrementalDecoder name looks too similar to PyCodec_IncrementalDecoder. It would be better to use more different name. And please note my minor comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 12:23:58 2014 From: report at bugs.python.org (Hendrik) Date: Sun, 02 Feb 2014 11:23:58 +0000 Subject: [issue2008] cookielib lacks FileCookieJar class for Safari In-Reply-To: <1202153846.32.0.869416159529.issue2008@psf.upfronthosting.co.za> Message-ID: <1391340238.38.0.517403783114.issue2008@psf.upfronthosting.co.za> Hendrik added the comment: Ok, i've got it. --- a/Lib/http/cookiejar.py Wed Dec 18 15:37:03 2013 -0600 +++ b/Lib/http/cookiejar.py Sat Feb 01 15:12:01 2014 +0100 @@ -11,17 +11,17 @@ distributed with the Python standard library, but are available from http://wwwsearch.sf.net/): - CookieJar____ - / \ \ - FileCookieJar \ \ - / | \ \ \ - MozillaCookieJar | LWPCookieJar \ \ - | | \ - | ---MSIEBase | \ - | / | | \ - | / MSIEDBCookieJar BSDDBCookieJar - |/ - MSIECookieJar + CookieJar____ + / \ \ + FileCookieJar \ \ + / / | \ \ \ + SafariCookieJar / | LWPCookieJar \ \ + / | | \ + MozillaCookieJar | ---MSIEBase | \ + | / | | \ + | / MSIEDBCookieJar BSDDBCookieJar + |/ + MSIECookieJar """ @@ -31,8 +31,11 @@ import copy import datetime import re +import getpass import time import urllib.parse, urllib.request +import struct +import io try: import threading as _threading except ImportError: @@ -40,6 +43,9 @@ import http.client # only for the default HTTP port from calendar import timegm +import difflib +#from difflib_data import * + debug = False # set to True to enable debugging via the logging module logger = None @@ -1938,6 +1944,109 @@ raise LoadError("invalid Set-Cookie3 format file %r: %r" % (filename, line)) +class SafariCookieJar(FileCookieJar): + """ + Read Cookies from Safari + + """ + def load(self, filename=None): + if filename == None: + username = getpass.getuser() + path = '/Users/' + username + '/Library/Cookies/Cookies.binarycookies' + else: + path = filename + + bf=open(path,mode='rb') + scook = bf.read(4).decode("UTF-8") + if scook == 'cook': + NumberOfPages=struct.unpack('>i',bf.read(4))[0] + page_sizes=[] + for np in range(NumberOfPages): + page_sizes.append(struct.unpack('>i',bf.read(4))[0]) + pages=[] + for ps in page_sizes: + pages.append(bf.read(ps)) + + for page in pages: + page=io.BytesIO(page) + page.read(4) + num_cookies=struct.unpack(' _______________________________________ From report at bugs.python.org Sun Feb 2 12:42:14 2014 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 02 Feb 2014 11:42:14 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391341334.54.0.46898611667.issue17159@psf.upfronthosting.co.za> Stefan Behnel added the comment: Ok, I think I figured it out now. Essentially, Cython's functions type, despite starting with the same struct layout as PyCFunction, must not visibly inherit from PyCFunction. Consequently, inspect.isbuiltin() returns False, as does inspect.isfunction() - sadly. With Yury's changes that are currently committed, this triggers the fallback that checks for the function-like signature, which in turn makes Signature.from_function() properly analyse the signature, including default arguments, annotations, etc. So, nothing left to change on CPython side for this ticket. And thanks again for the help. Closing as fixed. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 12:45:51 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 02 Feb 2014 11:45:51 +0000 Subject: [issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module In-Reply-To: <1390653440.27.0.247965137131.issue20389@psf.upfronthosting.co.za> Message-ID: <1391341551.3.0.635786627514.issue20389@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- assignee: -> stevenjd nosy: +stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 12:55:18 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 02 Feb 2014 11:55:18 +0000 Subject: [issue20479] Efficiently support weight/frequency mappings in the statistics module In-Reply-To: <1391304071.38.0.177384686096.issue20479@psf.upfronthosting.co.za> Message-ID: <1391342118.07.0.0321708389756.issue20479@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Off the top of my head, I can think of three APIs: (1) separate functions, as Nick suggests: mean vs weighted_mean, stdev vs weighted_stdev (2) treat mappings as an implied (value, frequency) pairs (3) take an additional argument to switch between unweighted and weighted modes. I dislike #3, but will consider the others for 3.5. ---------- assignee: -> stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 12:57:25 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 02 Feb 2014 11:57:25 +0000 Subject: [issue20478] Avoid inadvertently special casing Counter in statistics module In-Reply-To: <1391303789.61.0.448801013488.issue20478@psf.upfronthosting.co.za> Message-ID: <1391342245.54.0.706612902234.issue20478@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- assignee: -> stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 12:57:55 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 02 Feb 2014 11:57:55 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391342275.99.0.92207122312.issue20481@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- assignee: -> stevenjd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:02:49 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 12:02:49 +0000 Subject: [issue19654] test_tkinter sporadic skipped on "x86 Tiger 3.x" buildbot In-Reply-To: <1384868641.08.0.388268151531.issue19654@psf.upfronthosting.co.za> Message-ID: <1391342569.29.0.247811169654.issue19654@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The mystery remains why test_tk appears to alternately pass and fail on this buildbot. I don't see why it doesn't always fail. test_tk not fails in case when it is just skipped. And why it is sporadic skipped, this is very interesting question. ---------- title: test_tkinter sporadic failures on "x86 Tiger 3.x" buildbot -> test_tkinter sporadic skipped on "x86 Tiger 3.x" buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:09:32 2014 From: report at bugs.python.org (Hendrik) Date: Sun, 02 Feb 2014 12:09:32 +0000 Subject: [issue2008] cookielib lacks FileCookieJar class for Safari In-Reply-To: <1202153846.32.0.869416159529.issue2008@psf.upfronthosting.co.za> Message-ID: <1391342972.63.0.702723857694.issue2008@psf.upfronthosting.co.za> Changes by Hendrik : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:12:32 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Sun, 02 Feb 2014 12:12:32 +0000 Subject: [issue20479] Efficiently support weight/frequency mappings in the statistics module In-Reply-To: <1391342118.07.0.0321708389756.issue20479@psf.upfronthosting.co.za> Message-ID: Oscar Benjamin added the comment: On 2 February 2014 11:55, Steven D'Aprano wrote: > > (1) separate functions, as Nick suggests: > mean vs weighted_mean, stdev vs weighted_stdev This would be my preferred approach. It makes it very clear which functions are available for working with map style data. It will be clear from both the module documentation and a casual introspection of the module that those APIs are present for those who might want them. Also apart from mode() the implementation of each function on map-format data will be completely different from the iterable version so you'd want to have it as a separate function at least internally anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:33:38 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Sun, 02 Feb 2014 12:33:38 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391342276.01.0.280122354555.issue20481@psf.upfronthosting.co.za> Message-ID: Oscar Benjamin added the comment: Wolfgang have you tested this with any third party numeric types from sympy, gmpy2, mpmath etc.? Last I checked no third party types implement the numbers ABCs e.g.: >>> import sympy, numbers >>> r = sympy.Rational(1, 2) >>> r 1/2 >>> isinstance(r, numbers.Rational) False AFAICT testing against the numbers ABCs is just a slow way of testing against the stdlib types: $ python -m timeit -s 'from numbers import Integral' 'isinstance(1, Integral)' 100000 loops, best of 3: 2.59 usec per loop $ python -m timeit -s 'from numbers import Integral' 'isinstance(1, int)' 1000000 loops, best of 3: 0.31 usec per loop You can at least make it faster using a tuple: $ python -m timeit -s 'from numbers import Integral' 'isinstance(1, (int, Integral))' 1000000 loops, best of 3: 0.423 usec per loop I'm not saying that this is necessarily a worthwhile optimisation but rather that the numbers ABCs are in practice not really very useful (AFAICT). I don't know how well the statistics module currently handles third party numeric types but if the type coercion is to be changed then this something to look at. The current implementation tries to duck-type to some extent and yours uses ABCs but does either approach actually have any practical gain for interoperability with non-stdlib numeric types? If not then it would be simpler just to explicitly hard-code exactly how it works for the powerset of stdlib types. OTOH if it could be made to do sensible things with non-stdlib types then that would be great. Falling back on float isn't a bad choice but if it can be made to do exact things for exact types (e.g. sympy.Rational) then that would be great. Similarly mpmath.mpf provides multi-precision floats. It would be great to be able to take advantage of that higher precision rather than downgrade everything to float. This is in general a hard problem though so I don't think it's unreasonable to make restrictions about what types it can work with - achieving optimal accuracy for all types without restrictions is basically impossible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:49:35 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 12:49:35 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391328454.61.0.104178115712.issue20480@psf.upfronthosting.co.za> Message-ID: <1391345372.2292.7.camel@fsol> Antoine Pitrou added the comment: > I'd prefer to leave the trailing dots. It's the technically correct thing to do. It depends what we're talking about. Hostnames (in the general sense) don't carry a trailing dot except in DNS queries. So I'd argue the trailing dot is more part of the DNS protocol than of the hostname itself. As for what the "host" command does, it doesn't add any trailing dots here: $ host 127.0.0.1 1.0.0.127.in-addr.arpa domain name pointer XXX. $ host ::1 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa domain name pointer XXX. (this is bind9-host from Ubuntu) The Wikipedia page doesn't use trailing dots: http://en.wikipedia.org/wiki/Reverse_DNS_lookup Neither do the examples from the RIPE itself: http://www.ripe.net/data-tools/dns/reverse-dns/how-to-set-up-reverse-delegation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:49:36 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 12:49:36 +0000 Subject: [issue20453] json.load() error message changed in 3.4 In-Reply-To: <1391162931.99.0.108127691347.issue20453@psf.upfronthosting.co.za> Message-ID: <1391345376.36.0.542650302285.issue20453@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: "No JSON object could be decoded, expecting value" is too expensive and second part of this message just repeat first part. The message can be shortened to "No JSON object could be decoded". But this is not fully correct. JSON term "object" corresponds to Python dict. But this error raised when arbitrary JSON value expected: "object", "array" (corresponded to Python list), string, number or boolean. That is why I had changed "object" to "value". So may be the "No JSON value could be decoded" is more correct. Also note other differences between 3.3 and 3.4: json.loads('[') 3.3: Expecting object: line 1 column 1 (char 0) 3.4: Expecting value: line 1 column 2 (char 1) json.loads('[,') 3.3: No JSON object could be decoded 3.4: Expecting value: line 1 column 2 (char 1) json.loads('[42') 3.3: Expecting object: line 1 column 3 (char 2) 3.4: Expecting ',' delimiter: line 1 column 4 (char 3) json.loads('[42,') 3.3: Expecting object: line 1 column 4 (char 3) 3.4: Expecting value: line 1 column 5 (char 4) json.loads('["') 3.3: end is out of bounds 3.4: Unterminated string starting at: line 1 column 2 (char 1) json.loads('["foo') 3.3: Unterminated string starting at: line 1 column 2 (char 1) 3.4: Unterminated string starting at: line 1 column 2 (char 1) To me new error messages look more informative and more correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:51:05 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 12:51:05 +0000 Subject: [issue20453] json.load() error message changed in 3.4 In-Reply-To: <1391345376.36.0.542650302285.issue20453@psf.upfronthosting.co.za> Message-ID: <1391345463.2292.8.camel@fsol> Antoine Pitrou added the comment: > To me new error messages look more informative and more correct. Yes, I agree with you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:53:45 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 12:53:45 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1390214008.55.0.184258286527.issue20311@psf.upfronthosting.co.za> Message-ID: <1391345625.15.0.375106786904.issue20311@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 13:54:20 2014 From: report at bugs.python.org (Leon Weber) Date: Sun, 02 Feb 2014 12:54:20 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391345660.54.0.136882447457.issue20480@psf.upfronthosting.co.za> Leon Weber added the comment: I?ve changed the wording in the documentation a bit and added an explanatory sentence, how about this? I think this should make pretty clear what it does and does not, and also easy to find in the documentation when searching for ?reverse?, ?PTR? and ?pointer? (which is what I can think of what one would be looking for). (Not sure whether to add further patches in roundup or rietveld, but a quick google search reveals patches are periodically added to rietveld automatically, so I?ll just add it here. Please let me know if this is not correct :)) ---------- Added file: http://bugs.python.org/file33865/ipaddress_reverse_names_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 14:12:46 2014 From: report at bugs.python.org (Leon Weber) Date: Sun, 02 Feb 2014 13:12:46 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391345372.2292.7.camel@fsol> Message-ID: <20140202131245.GB10572@dirac.q-ix.net> Leon Weber added the comment: > As for what the "host" command does, it doesn't add any trailing dots > here: Oh, interesting. It does on Fedora 19 with version 9.9.3, but not on my Ubuntu installation with version 9.8.1. So it seems this was added between 9.8.1 and 9.9.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 14:32:56 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 13:32:56 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <20140202131245.GB10572@dirac.q-ix.net> Message-ID: <1391347974.2292.9.camel@fsol> Antoine Pitrou added the comment: > Oh, interesting. It does on Fedora 19 with version 9.9.3, but not on > my Ubuntu installation with version 9.8.1. So it seems this was added > between 9.8.1 and 9.9.3. According to apt-cache, the version I tried with is 1:9.9.3.dfsg.P2-4ubuntu1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 14:33:14 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 13:33:14 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1391347994.09.0.62410933882.issue15216@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about other TextIOWrapper parameters? I think "newline" should be changed in same cases as "encoding" and "errors". And changing "buffering" and "line_buffering" can be useful too. What if add the "configure" or "reopen" method which accepts all this parameters? This will decrease the swelling of interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 14:53:28 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 13:53:28 +0000 Subject: [issue20440] Use Py_REPLACE/Py_XREPLACE macros In-Reply-To: <1391019258.76.0.341506038923.issue20440@psf.upfronthosting.co.za> Message-ID: <1391349208.63.0.515963951654.issue20440@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I think Raymond's original concern still applies: The macros do add to the learning curve. I agree. But alternative solution is Victor's original patch which replaces potential bugs by inlined body of Py_REPLACE/Py_XREPLACE. This is explicit, but more verbose (2 lines are replaced by 5 lines with one new variable, with macros it would be one line), less clear and more errorprone. I believe that given the popularity of such a code and the possibility of mistakes, it is worth introducing special macros. Here apply the same reasoning as for Py_CLEAR. Of course these macros shouldn't be a part of stable API in 2.7 and 3.3 (and may be even in 3.4). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 14:55:05 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 13:55:05 +0000 Subject: [issue20479] Efficiently support weight/frequency mappings in the statistics module In-Reply-To: <1391304071.38.0.177384686096.issue20479@psf.upfronthosting.co.za> Message-ID: <1391349305.9.0.925701251224.issue20479@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue18844. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 15:02:09 2014 From: report at bugs.python.org (Leon Weber) Date: Sun, 02 Feb 2014 14:02:09 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391347974.2292.9.camel@fsol> Message-ID: <20140202140208.GC10572@dirac.q-ix.net> Leon Weber added the comment: > According to apt-cache, the version I tried with is > 1:9.9.3.dfsg.P2-4ubuntu1 Ok, then it depends on something else apparently. It?s not so relevant anyway because even with the trailing dot, ?host? is inconsistent between IPv4 and IPv6, and we should choose a consistent variant. I?m still slightly in favour of having the trailing dot, because it is the correct representation of the DNS name. RFC1034 section 3.1 explicitly states that ?Since a complete domain name ends with the root label, this leads to a printed form which ends in a dot.?. It goes on to explain that relative names (names not ending in a dot) ?appear mostly at the user interface, where their interpretation varies from implementation to implementation? and that the most common interpretation is relative to the root zone. So leaving the dot off is merely a convention, which is good enough for Wikipedia and RIPE documents; however I think in an API we should implement the more strict option. Also, I don?t see anything breaking with the dot, while without the dot, a user needs to take extra care when feeding the name to dnspython?s dns.resolver.query(), which would do undesired things without the trailing dot (append a search domain if there is one in /etc/resolv.conf). Any other opinions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 15:09:47 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 14:09:47 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391350187.1.0.236284423635.issue20480@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well that convention is also used in existing APIs: >>> socket.gethostbyaddr("8.8.8.8") ('google-public-dns-a.google.com', [], ['8.8.8.8']) (note that this merely reflects a POSIX API) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 15:20:28 2014 From: report at bugs.python.org (Suzumizaki) Date: Sun, 02 Feb 2014 14:20:28 +0000 Subject: [issue20485] Enable 'import .pyd' Message-ID: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> New submission from Suzumizaki: Currently, the name of .pyd modules is limited within 7 bit US-ASCII. I want to do "import X" to import X.pyd, where X contains Unicode characters. I tried to make the patch and my work seems to be done successfully. I will post the patch with this issue, and next what should I do? About the solution: To make the export entry 'PyInit_xxx' kept inside 7 bit, I use the simple encoding 'szm62' for unicode, called in the patch. 1) 'szm62' is used once per module(.pyd), only for 'PyInit_xxx'. 2) 'szm62' is used only when non-ASCII characters are in the name of the module. 3) 'szm62' generates short string as UTF-8, except 0-9A-Za-z are encoded to 2 bytes. 4) 'szm62' is very simple, much easier than UTF-8. 5) I tested it only with MS VC++, but I believe highly compatible with other environments. 6) 'szm62' also can decode 7 bits to unicode, but only the encoding is used for this issue. Notes: The simplicity is important for the project like Cython -- it generates .pyd files. The codepoints over 16bits are also simply supported. They will be encoded to 4 alnum(0-9A-Za-z) characters. 0-9A-Za-z are (always) encoded to 2 alnums. They will be simply prefixed with '0'(U+000030). When the generating 'Non-ASCII.pyd' with MSVC toolkit, the report 'LINK : warning LNK4232' will be raised on linking. But no problem. The warning says "When someone try to link with LoadLibraryEx'A' function, it may or may not fail, depends on the user locale." Our Python.exe uses always LoadLibraryEx'W', it never fail with locale issue. Or if you have any question, please tell me that. Regards, Suzumizaki-Kimitaka ---------- components: Interpreter Core files: 20140202_patch_for_python_default_branch_88885.patch keywords: patch messages: 209988 nosy: Suzumizaki priority: normal severity: normal status: open title: Enable 'import .pyd' type: behavior versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file33866/20140202_patch_for_python_default_branch_88885.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 15:21:37 2014 From: report at bugs.python.org (Suzumizaki) Date: Sun, 02 Feb 2014 14:21:37 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391350897.87.0.900492593382.issue20485@psf.upfronthosting.co.za> Changes by Suzumizaki : Added file: http://bugs.python.org/file33867/20140202_patch_for_python3.3_88884.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 15:24:06 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 14:24:06 +0000 Subject: [issue8743] set() operators don't work with collections.Set instances In-Reply-To: <1274122246.37.0.692277131409.issue8743@psf.upfronthosting.co.za> Message-ID: <1391351046.29.0.0851413324653.issue8743@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think set operations with iterable (but not set) should be tested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 15:27:47 2014 From: report at bugs.python.org (Suzumizaki) Date: Sun, 02 Feb 2014 14:27:47 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391351267.72.0.161658947674.issue20485@psf.upfronthosting.co.za> Changes by Suzumizaki : Added file: http://bugs.python.org/file33868/sample_importing_non_ascii_pyd.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 15:41:25 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Sun, 02 Feb 2014 14:41:25 +0000 Subject: [issue20466] Example in Doc/extending/embedding.rst fails to compile cleanly In-Reply-To: <1391206449.61.0.838795178148.issue20466@psf.upfronthosting.co.za> Message-ID: <1391352085.24.0.451822266189.issue20466@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: Patch fixes the mistake. Looks like it was copied over from earlier version. ---------- keywords: +patch nosy: +sahutd Added file: http://bugs.python.org/file33869/issue20466.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:11:35 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 15:11:35 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391353895.26.0.223424252585.issue20485@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon, eric.snow, haypo, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:27:22 2014 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 02 Feb 2014 15:27:22 +0000 Subject: [issue20166] window x64 c-extensions not works on python3.4.0b2 In-Reply-To: <1389124118.85.0.0740185864803.issue20166@psf.upfronthosting.co.za> Message-ID: <1391354842.97.0.0575942243293.issue20166@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Issue #16779 has a patch that suppresses the warning for 64-bit builds that would also "fix" #9709. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:37:29 2014 From: report at bugs.python.org (=?utf-8?b?0JjQs9C+0YDRjCDQqNCw0YPQu9Cw?=) Date: Sun, 02 Feb 2014 15:37:29 +0000 Subject: [issue20486] msilib: can't close opened database Message-ID: <1391355449.68.0.999858284587.issue20486@psf.upfronthosting.co.za> New submission from ????? ?????: In Python 2.7.6 can't find any way to close MSI database after finish working with it. As a result database is locked and can't be opened by any other application until Python process is finished. import msilib db = msilib.OpenDatabase('test.msi', msilib.MSIDBOPEN_TRANSACT) view = db.OpenView("SELECT File, Component_, FileName FROM File") view.Execute(None) r1 = view.Fetch() r1.SetString(3,"test.txt") view.Modify(msilib.MSIMODIFY_UPDATE, r1) view.Close() db.Commit() del db db2 = msilib.OpenDatabase('test.msi', msilib.MSIDBOPEN_TRANSACT) MSIError: 1: 2203 2: test.msi 3: -2147287008 ---------- components: Library (Lib), Windows messages: 209992 nosy: gentoo90 priority: normal severity: normal status: open title: msilib: can't close opened database type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:38:27 2014 From: report at bugs.python.org (INADA Naoki) Date: Sun, 02 Feb 2014 15:38:27 +0000 Subject: [issue20487] Odd words in unittest.mock document. Message-ID: <1391355507.86.0.158179018907.issue20487@psf.upfronthosting.co.za> New submission from INADA Naoki: http://docs.python.org/3.3/library/unittest.mock.html#magic-mock > The two equality method, __eq__ and __ne__, are special. They do the default equality comparison on identity, using a side effect, unless you change their return value to return something else: What "using a side effect" means? ---------- assignee: docs at python components: Documentation messages: 209993 nosy: docs at python, michael.foord, naoki priority: normal severity: normal status: open title: Odd words in unittest.mock document. versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:41:58 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 02 Feb 2014 15:41:58 +0000 Subject: [issue20488] importlib title and introduction are out of date Message-ID: <1391355718.64.0.231740167188.issue20488@psf.upfronthosting.co.za> New submission from R. David Murray: Now that importlib *is* the import system in CPython, the title ("An Implementation of import") and the intro ("a reference implementation that is easier to comprehend than..." seem to me like they are out of date and should be reworded. ---------- assignee: docs at python components: Documentation messages: 209994 nosy: brett.cannon, docs at python, eric.snow, r.david.murray priority: normal severity: normal status: open title: importlib title and introduction are out of date type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:51:58 2014 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 02 Feb 2014 15:51:58 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391356318.76.0.372941677235.issue20480@psf.upfronthosting.co.za> Eric V. Smith added the comment: I concede the point on the trailing dot. The reason we used to always use it is that it prevented the local resolver from first trying to append the host's default domain name (as, for example, defined in /etc/resolv.conf as "search"). I have no idea if resolvers still do that. Some quick research shows that that's probably not their behavior any more, at least if the domain name contains at least one dot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:52:53 2014 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 02 Feb 2014 15:52:53 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391356373.63.0.185774366952.issue20480@psf.upfronthosting.co.za> Eric V. Smith added the comment: The documentation change looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:53:04 2014 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Sun, 02 Feb 2014 15:53:04 +0000 Subject: [issue18321] Multivolume support in tarfile module In-Reply-To: <1372406777.07.0.523288075904.issue18321@psf.upfronthosting.co.za> Message-ID: <1391356384.98.0.935159192528.issue18321@psf.upfronthosting.co.za> Lars Gust?bel added the comment: I had the following idea: What about a separate class, let's call it TarVolumeSet for now, that maps a set of (virtual) volumes onto one big file-like object. This TarVolumeSet will be passed to a TarFile constructor as the fileobj argument. It is subclassable for implementing custom behavior. class MyTarVolumeSet(tarfile.TarVolumeSet): def __init__(self, template): self.template = template def open_volume(self, volume_number): return open(self.template % volume_number, "rb") volumes = MyTarVolumesSet("test.tar.%03d") with tarfile.open(fileobj=volumes, mode="r:") as tar: for t in tar: print(t.name) In my opinion, this approach has a number of advantages: Most importantly, it separates the multi-volume code from the TarFile class, which reduces the invasiveness, complexity and maintenance burden of the original approach. The TarFile class would be totally agnostic about the concept of multiple volumes, TarVolumeSet looks just like another file-object to TarFile. Looks like the cleanest solution to me so far. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 17:14:05 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 16:14:05 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391357645.45.0.499527931026.issue20485@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that if you need a module with non-ASCII name, you can wrap it in Python module. === sp?m.py === from _spam import * from _spam import __all__, __doc__ === sp?m.py === ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 17:15:48 2014 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 02 Feb 2014 16:15:48 +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: <1391357748.84.0.657370954238.issue15955@psf.upfronthosting.co.za> Nadeem Vawda added the comment: After some consideration, I've come to agree with Serhiy that it would be better to keep a private internal buffer, rather than having the user manage unconsumed input data. I'm also in favor of having a flag to indicate whether the decompressor needs more input to produce more decompressed data. (I'd prefer to call it 'needs_input' or similar, though - 'data_ready' feels too vague to me.) In msg176883 and msg177228, Serhiy raises the possibility that the compressor might be unable to produce decompressed output from a given piece of (non-empty) input, but will still leave the input unconsumed. I do not think that this can actually happen (based on the libraries' documentation), but this API will work even if that situation can occur. So, to summarize, the API will look like this: class LZMADecompressor: ... def decompress(self, data, max_length=-1): """Decompresses *data*, returning uncompressed data as bytes. If *max_length* is nonnegative, returns at most *max_length* bytes of decompressed data. If this limit is reached and further output can be produced, *self.needs_input* will be set to False. In this case, the next call to *decompress()* should provide *data* as b'' to obtain more of the output. If all of the input data was decompressed and returned (either because this was less than *max_length* bytes, or because *max_length* was negative), *self.needs_input* will be set to True. """ ... Data not consumed due to the use of 'max_length' should be saved in an internal buffer (that is not exposed to Python code at all), which is then prepended to any data provided in the next call to decompress() before providing the data to the underlying compression library. The cases where either the internal buffer or the new data are empty should be optimized to avoid unnecessary allocations or copies, since these will be the most common cases. Note that this API does not need a Python-level 'unconsumed_tail' attribute - its role is served by the internal buffer (which is private to the C module implementation). This is not to be confused with the already-existing 'unused_data' attribute that stores data found after the end of the compressed stream. 'unused_data' should continue to work as before, regardless of whether decompress() is called with a max_length argument or not. As a starting point I would suggest writing a patch for LZMADecompressor first, since its implementation is a bit simpler than BZ2Decompressor. Once this patch and an analogous one for BZ2Decompressor have been committed, we can then convert GzipFile, BZ2File and LZMAFile to use this feature. If you have any questions while you're working on this issue, feel free to send them my way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 17:31:43 2014 From: report at bugs.python.org (Leon Weber) Date: Sun, 02 Feb 2014 16:31:43 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391358703.52.0.432372081905.issue20480@psf.upfronthosting.co.za> Leon Weber added the comment: I can live without the trailing dot, although I?d find it ?more correct? to have it. I?ve attached an alternative patch that doesn?t return a trailing dot, it?s up to you guys to decide which one you prefer. ---------- Added file: http://bugs.python.org/file33870/ipaddress_reverse_names_v3_alt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 18:05:49 2014 From: report at bugs.python.org (Stefan Krah) Date: Sun, 02 Feb 2014 17:05:49 +0000 Subject: [issue16779] Fix compiler warning when building extension modules on 64-bit Windows In-Reply-To: <1356460734.84.0.660480375945.issue16779@psf.upfronthosting.co.za> Message-ID: <1391360749.38.0.874404512862.issue16779@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- assignee: eric.araujo -> resolution: duplicate -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 18:07:08 2014 From: report at bugs.python.org (Stefan Krah) Date: Sun, 02 Feb 2014 17:07:08 +0000 Subject: [issue16779] Fix compiler warning when building extension modules on 64-bit Windows In-Reply-To: <1356460734.84.0.660480375945.issue16779@psf.upfronthosting.co.za> Message-ID: <1391360828.57.0.926387115567.issue16779@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 18:12:02 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 17:12:02 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects Message-ID: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: >>> import zlib >>> d = zlib.decompressobj() >>> d >>> c = zlib.compressobj() >>> c >>> zlib.DEF_BUF_SIZE 16384 >>> zlib.Z_FINISH 4 >>> help(c) Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/inspect.py", line 2243, in wrap_value value = eval(s, module_dict) File "", line 1, in NameError: name 'Z_FINISH' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/inspect.py", line 2246, in wrap_value value = eval(s, sys_module_dict) File "", line 1, in NameError: name 'Z_FINISH' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/_sitebuiltins.py", line 99, in __call__ return pydoc.help(*args, **kwds) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1799, in __call__ self.help(request) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1849, in help else: doc(request, 'Help on %s:', output=self._output) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1585, in doc pager(render_doc(thing, title, forceload)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1578, in render_doc return title % desc + '\n\n' + renderer.document(object, name) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 357, in document if inspect.isclass(object): return self.docclass(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1276, in docclass lambda t: t[1] == 'method') File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1225, in spill name, mod, object)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 358, in document if inspect.isroutine(object): return self.docroutine(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1328, in docroutine signature = inspect.signature(object) File "/home/serhiy/py/cpython/Lib/inspect.py", line 1695, in signature return Signature.from_builtin(obj) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2298, in from_builtin p(name, default) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2284, in p default_node = RewriteSymbolics().visit(default_node) File "/home/serhiy/py/cpython/Lib/ast.py", line 245, in visit return visitor(node) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2276, in visit_Name return wrap_value(node.id) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2248, in wrap_value raise RuntimeError() RuntimeError >>> help(d) Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/inspect.py", line 2243, in wrap_value value = eval(s, module_dict) File "", line 1, in NameError: name 'DEF_BUF_SIZE' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/inspect.py", line 2246, in wrap_value value = eval(s, sys_module_dict) File "", line 1, in NameError: name 'DEF_BUF_SIZE' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/_sitebuiltins.py", line 99, in __call__ return pydoc.help(*args, **kwds) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1799, in __call__ self.help(request) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1849, in help else: doc(request, 'Help on %s:', output=self._output) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1585, in doc pager(render_doc(thing, title, forceload)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1578, in render_doc return title % desc + '\n\n' + renderer.document(object, name) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 357, in document if inspect.isclass(object): return self.docclass(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1276, in docclass lambda t: t[1] == 'method') File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1225, in spill name, mod, object)) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 358, in document if inspect.isroutine(object): return self.docroutine(*args) File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1328, in docroutine signature = inspect.signature(object) File "/home/serhiy/py/cpython/Lib/inspect.py", line 1695, in signature return Signature.from_builtin(obj) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2298, in from_builtin p(name, default) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2284, in p default_node = RewriteSymbolics().visit(default_node) File "/home/serhiy/py/cpython/Lib/ast.py", line 245, in visit return visitor(node) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2276, in visit_Name return wrap_value(node.id) File "/home/serhiy/py/cpython/Lib/inspect.py", line 2248, in wrap_value raise RuntimeError() RuntimeError ---------- components: Library (Lib) messages: 210001 nosy: larry, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: help() fails for zlib Compress and Decompress objects type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 18:53:05 2014 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 02 Feb 2014 17:53:05 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391363585.22.0.438598684374.issue20485@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I'd use a much simpler encoding. Maybe something like name.encode('unicode-escape').replace(b'\\', b'_') As you said, simplicity is important for tools which generate code! ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 18:53:20 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 17:53:20 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391363600.22.0.898281295063.issue17159@psf.upfronthosting.co.za> Yury Selivanov added the comment: Stefan, > inspect.isbuiltin() returns False Are you absolutely sure about this? Please check that everything works with this latest change http://hg.python.org/cpython/rev/48c3c42e3e5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 18:56:23 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 17:56:23 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391363783.89.0.740159702927.issue17159@psf.upfronthosting.co.za> Yury Selivanov added the comment: Larry, > Also, I assumed that anything that had a __text_signature__ wasn't going to have any other kind of signature information. Therefore, if the object had a __text_signature__ attribute, then I already knew that's the best approach and it should definitely be first. I think that __text_signature__ is similar to the __signature__ attribute, i.e. if an object has it, then it should blindly use it, without trying anything else (where __signature__ should have a higher priority than __text_signature__) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 19:09:31 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 18:09:31 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391364571.54.0.641040971787.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: Larry, Quoting your reply from #17159: > Also also, I remember specifically that the isinstance(type) code would fail builtin classes. Could you please find an example of this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 20:04:48 2014 From: report at bugs.python.org (Ram Rachum) Date: Sun, 02 Feb 2014 19:04:48 +0000 Subject: [issue20490] Show clear error message on circular import Message-ID: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> New submission from Ram Rachum: If there's a circular import in my program, I don't want to see an error message, "Cannot import name 'foo'" and then say in my mind, "ah, I'm an experienced Python developer, I know that when Python says that it often means that there's a circular import problem." I want the error message to **say there's a circular import problem**, so (a) I won't have to remember this piece of trivia and (b) less experienced developers won't have to bang their heads on their desks trying to figure out why the import isn't working. Bonus points if the error message actually shows which module is trying to import a module that imports itself, so we'll know where to fix. ---------- components: Interpreter Core messages: 210006 nosy: cool-RR priority: normal severity: normal status: open title: Show clear error message on circular import type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 20:20:07 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 19:20:07 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1391368807.64.0.810465453298.issue20490@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 20:20:15 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 02 Feb 2014 19:20:15 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1391368815.41.0.917784646714.issue20490@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 20:34:13 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 02 Feb 2014 19:34:13 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1391369653.11.0.671913073516.issue20490@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 20:39:31 2014 From: report at bugs.python.org (Michael Foord) Date: Sun, 02 Feb 2014 19:39:31 +0000 Subject: [issue20487] Odd words in unittest.mock document. In-Reply-To: <1391355507.86.0.158179018907.issue20487@psf.upfronthosting.co.za> Message-ID: <1391369971.58.0.219937411535.issue20487@psf.upfronthosting.co.za> Michael Foord added the comment: A "side effect" is a mechanism Mock provides for mocks to have special behaviour when called. http://docs.python.org/3.3/library/unittest.mock.html#unittest.mock.Mock.side_effect The term is used very widely throughout the mock documentation, so I don't think it's appropriate to link *every* usage to the side_effect documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:24:02 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 20:24:02 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1390214008.55.0.184258286527.issue20311@psf.upfronthosting.co.za> Message-ID: <1391372642.32.0.517984737792.issue20311@psf.upfronthosting.co.za> STINNER Victor added the comment: Buildbots are happy, I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:31:25 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Feb 2014 20:31:25 +0000 Subject: [issue20102] shutil._make_zipfile possible resource leak In-Reply-To: <1388575277.51.0.394331001558.issue20102@psf.upfronthosting.co.za> Message-ID: <3fHP2h2B8wz7Ljb@mail.python.org> Roundup Robot added the comment: New changeset 767d034b3feb by Benjamin Peterson in branch '2.7': use with statement to ensure zipfile is always closed (closes #20102) http://hg.python.org/cpython/rev/767d034b3feb New changeset 838674d15b5b by Benjamin Peterson in branch '3.3': use with statement to ensure zipfile is always closed (closes #20102) http://hg.python.org/cpython/rev/838674d15b5b New changeset 20aa07f93ca7 by Benjamin Peterson in branch 'default': merge 3.3 (#20102) http://hg.python.org/cpython/rev/20aa07f93ca7 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:38:54 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 20:38:54 +0000 Subject: [issue19761] test_tk fails on OS X with multiple test case failures with both Tk 8.5 and 8.4 In-Reply-To: <1385337935.63.0.262182292505.issue19761@psf.upfronthosting.co.za> Message-ID: <1391373534.0.0.257083071196.issue19761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ned for your great investigation. Here is a patch for these two bugs. A test for invalid bitmap is skipped (also added a test for bitmap specified in external file). For insertborderwidth tests the insertwidth value is explicitly increased (yes, the Tk source code bounds insertborderwidth by insertwidth/2). ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file33871/issue19761.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:43:34 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 20:43:34 +0000 Subject: [issue20350] Replace tkapp.split() to tkapp.splitlist() In-Reply-To: <1390411522.89.0.349086871577.issue20350@psf.upfronthosting.co.za> Message-ID: <1391373814.91.0.719134194503.issue20350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are no objections I'll commit this patch tomorrow. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:44:03 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 20:44:03 +0000 Subject: [issue20368] Tkinter: handle the null character In-Reply-To: <1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> Message-ID: <1391373843.9.0.698844788137.issue20368@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are no objections I'll commit this patch tomorrow. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:46:37 2014 From: report at bugs.python.org (Kaarle Ritvanen) Date: Sun, 02 Feb 2014 20:46:37 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored Message-ID: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> New submission from Kaarle Ritvanen: The textwrap module does not distinguish non-breaking space (\xa0) from other whitespace when determining word boundaries. In the beginning of the module, the _whitespace variable is defined to address this issue but is not used in the regular expressions determining the splitting rules. ---------- components: Library (Lib) files: textwrap-honor-non-breaking-spaces.patch keywords: patch messages: 210013 nosy: kunkku priority: normal severity: normal status: open title: textwrap: Non-breaking space not honored type: behavior versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file33872/textwrap-honor-non-breaking-spaces.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:47:19 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 02 Feb 2014 20:47:19 +0000 Subject: [issue20492] test_tcl is failing on windows 2.7 Message-ID: <1391374039.08.0.285544417854.issue20492@psf.upfronthosting.co.za> New submission from Benjamin Peterson: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%202.7/builds/833/steps/test/logs/stdio ---------- assignee: serhiy.storchaka messages: 210014 nosy: benjamin.peterson, serhiy.storchaka priority: normal severity: normal status: open title: test_tcl is failing on windows 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:47:20 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 20:47:20 +0000 Subject: [issue20384] os.open() exception doesn't contain file name on Windows In-Reply-To: <1390592079.62.0.820816905232.issue20384@psf.upfronthosting.co.za> Message-ID: <1391374040.35.0.457458545208.issue20384@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Larry, what would you say about os.open() error? ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 21:51:21 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 20:51:21 +0000 Subject: [issue16074] Bad error message in os.rename, os.link, and os.symlink In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1391374281.81.0.865483844246.issue16074@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Larry, are you agree with this solution (remove ambiguous filename attribute from OSError raised by functions with two filename arguments)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:05:40 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Feb 2014 21:05:40 +0000 Subject: [issue19320] Tkinter tests ran with wantobjects is false In-Reply-To: <1382302056.06.0.500513298536.issue19320@psf.upfronthosting.co.za> Message-ID: <3fHPpD096Tz7LkP@mail.python.org> Roundup Robot added the comment: New changeset 515e6afd2f0f by Serhiy Storchaka in branch '2.7': Issue #19320: Fixed split/splitlist tests in test_tcl for Tcl 8.5.0-8.5.5. http://hg.python.org/cpython/rev/515e6afd2f0f New changeset e6363a42a9f0 by Serhiy Storchaka in branch '3.3': Issue #19320: Fixed split/splitlist tests in test_tcl for Tcl 8.5.0-8.5.5. http://hg.python.org/cpython/rev/e6363a42a9f0 New changeset f2fdafe73ab6 by Serhiy Storchaka in branch 'default': Issue #19320: Fixed split/splitlist tests in test_tcl for Tcl 8.5.0-8.5.5. http://hg.python.org/cpython/rev/f2fdafe73ab6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:06:39 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 21:06:39 +0000 Subject: [issue20492] test_tcl is failing on windows 2.7 In-Reply-To: <1391374039.08.0.285544417854.issue20492@psf.upfronthosting.co.za> Message-ID: <1391375199.36.0.890897116047.issue20492@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Benjamin, I just have fixed it in issue19320. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Tkinter tests ran with wantobjects is false _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:16:47 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 21:16:47 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1391375807.83.0.576820408226.issue20491@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +georg.brandl, serhiy.storchaka stage: -> test needed versions: +Python 2.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:39:07 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 21:39:07 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <1391377147.02.0.470607396008.issue20435@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It's a bug in _pyio.StringIO.getvalue(). Attaching patch. ---------- keywords: +patch Added file: http://bugs.python.org/file33873/stringio_getvalue.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:51:28 2014 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 02 Feb 2014 21:51:28 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1391377888.49.0.123388145316.issue15216@psf.upfronthosting.co.za> Nikolaus Rath added the comment: The attached patch now passes all testcases. However, every invocation of set_encoding() when there is buffered data leaks one reference. I haven't been able to find the error yet. As for adding a reopen() or configure() method: I don't like it very much, but for the same reasons that I still don't like set_encoding() itself: it makes a rather fragile operation appear well-supported. set_encoding already inserts BOM in the middle of non-seekable streams, and invalidates tell cookies for seekable streams. Changing the buffering would probably face similar problems if there is buffered data but buffering is supposed to be turned off. I think it would be better to restrict this functionality strictly to sys.stdin/out/err and in all other situations fix the API that results in the TextIO object with undesired parameters. For example, in the case of the subprocess module, wouldn't it be better to return pipes as byte streams and have the caller wrap them into text streams? ---------- Added file: http://bugs.python.org/file33874/set_encoding-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:51:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Feb 2014 21:51:52 +0000 Subject: [issue20423] io.StringIO newline param has wrong default In-Reply-To: <1390937078.16.0.885697814935.issue20423@psf.upfronthosting.co.za> Message-ID: <3fHQqX1b7Sz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 82cfab2ad98d by Antoine Pitrou in branch '3.3': Issue #20423: fix documentation of io.StringIO's newline parameter http://hg.python.org/cpython/rev/82cfab2ad98d New changeset 69a2cc048c80 by Antoine Pitrou in branch '2.7': Issue #20423: fix documentation of io.StringIO's newline parameter http://hg.python.org/cpython/rev/69a2cc048c80 New changeset df2efd48227e by Antoine Pitrou in branch 'default': Issue #20423: fix documentation of io.StringIO's newline parameter http://hg.python.org/cpython/rev/df2efd48227e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:52:34 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 21:52:34 +0000 Subject: [issue20423] io.StringIO newline param has wrong default In-Reply-To: <1390937078.16.0.885697814935.issue20423@psf.upfronthosting.co.za> Message-ID: <1391377954.05.0.688128804104.issue20423@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The docs are now fixed, thank you! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:57:10 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 02 Feb 2014 21:57:10 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1391372642.32.0.517984737792.issue20311@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: Well, now that timeouts are properly rounded, the granularity is useless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:58:48 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 21:58:48 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1390214008.55.0.184258286527.issue20311@psf.upfronthosting.co.za> Message-ID: <1391378328.31.0.0360623928125.issue20311@psf.upfronthosting.co.za> STINNER Victor added the comment: > Well, now that timeouts are properly rounded, the granularity is useless. I don't think so. Please read again the issue #20452, for example this message: http://bugs.python.org/issue20452#msg209772 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:59:18 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 21:59:18 +0000 Subject: [issue20452] test_timeout_rounding() of test_asyncio fails on "x86 Ubuntu Shared 3.x" buildbot In-Reply-To: <1391156790.09.0.38396612237.issue20452@psf.upfronthosting.co.za> Message-ID: <1391378358.2.0.197686285913.issue20452@psf.upfronthosting.co.za> STINNER Victor added the comment: Buildbots are happy, I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:00:49 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 22:00:49 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1391378449.24.0.253151315674.issue20491@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the patch, Kaarle. Could you add some tests in Lib/test/test_textwrap? Also, for your contribution to be integrated, we'll need you to sign a contributor's agreement: http://www.python.org/psf/contrib/contrib-form/ ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:01:31 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Feb 2014 22:01:31 +0000 Subject: [issue19990] Add unittests for imghdr module In-Reply-To: <1387146470.57.0.419345603545.issue19990@psf.upfronthosting.co.za> Message-ID: <3fHR2b5nBXz7LjR@mail.python.org> Roundup Robot added the comment: New changeset e2d013e90e88 by Ned Deily in branch '2.7': Issue #19990: Install test/imghdrdata. http://hg.python.org/cpython/rev/e2d013e90e88 New changeset 5fbe155e62b0 by Ned Deily in branch '3.3': Issue #19990: Install test/imghdrdata. http://hg.python.org/cpython/rev/5fbe155e62b0 New changeset b41ba99a276c by Ned Deily in branch 'default': Issue #19990: Install test/imghdrdata. http://hg.python.org/cpython/rev/b41ba99a276c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:02:26 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 22:02:26 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <1391378546.87.0.402631133303.issue20435@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I rather think that it's a bug in _io.StringIO.getvalue(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:03:52 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 02 Feb 2014 22:03:52 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1391378328.31.0.0360623928125.issue20311@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I don't think so. Please read again the issue #20452, for example this message: > > http://bugs.python.org/issue20452#msg209772 """ Ok, it looks better: waiting 99.9 ms took 99.6 ms and 99.9 ms, and waiting 9.9 ms took 9.7 ms. So as I said, the granularity (of 1 ms) is still needed in asyncio (dt < timeout is sometimes False, but dt+granulary >= timeout is always True). """ Sorry, I still fail to see how waking up after 99.6ms instead of 99.9ms is an issue: I've asked you several times to provide an actual example of a problem, and you still haven't. Once again: a slight early wakeup isn't an issue, you'll just call epoll()/select() once again. All even loops work this way, and noone ever complained. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:04:17 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sun, 02 Feb 2014 22:04:17 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391378657.6.0.445623565529.issue20481@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Hi Oscar, well, I haven't used sympy much, and I have no experience with the others, but in light of your comment I quickly checked sympy and gmpy2. You are right about them still not using the numbers ABCs, however, on your advise I also checked how the current statistics module implementation handles their numeric types and the answer is: it doesn't, and this is totally independent of the _coerce_types issue. For sympy: the problem lies with statistics._exact_ratio, which cannot convert sympy numeric types to a numerator/denominator tuple (a prerequisite for _sum) For gmpy2: the problem occurs just one step further down the road. gmpy2.Rationals have numerator and denominator properties, so _exact_ratio knows how to handle them, but the elements of the returned tuple are of type gmpy2.mpz (gmpy2's integer equivalent) and when _sum tries to convert the tuple into a Fraction you get: TypeError: both arguments should be Rational instances which is precisely because the mpz type is not integrated into the numbers tower. This last example is very illustrative I think because it shows that already now the standard library (the fractions module in this case) requires numeric types to comply with the numeric tower, so statistics would not be without precedent, and I think this is totally justified: after all this is the standard library (can't believe I'm saying this since I really got into this sort of by accident) and third party libraries should seek compatibility, but the standard library just needs to be self-consistent. I guess using ABCs over a duck-typing approach when coercing types, in fact, offers a huge advantage for third party libraries since they only need to register their types with the numbers ABC to achieve compatibility, while they need to consider complicated subclassing schemes with the current approach (of course, I am only talking about compatibility with _coerce_types here, which is the focus of this issue. Other parts of statistics may impose further restrictions as we've just seen for _sum). Finally, regarding speed. The fundamental difference between the current implementation and my proposed change is that the current version calls _coerce_types for every number in the input sequence, so performance is critical here, but in my version _coerce_types gets called only once and then operates on a really small set of input types, so it is absolutely not the time-critical step in the overall performance of _sum. For this very reason I made no effort at all to optimize the code, but just tried to keep it as simple and clear as possible. This, in fact, is IMHO the second major benefit of my proposal for _coerce_types (besides making its result order-independent). Read the current code for _coerce_types, then the proposed one. Try to consider all their ramifications and side-effects and decide which one's easier to understand and maintain. Best, Wolfgang ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:06:56 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 22:06:56 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <1391378816.89.0.42135298912.issue20435@psf.upfronthosting.co.za> Antoine Pitrou added the comment: With the patch, getvalue() is consistent with read() and other methods. Without the patch, _pyio.StringIO.getvalue() returns a different value from _pyio.StringIO.read() *and* from _io.StringIO.getvalue(). Changing _pyio.StringIO.getvalue() is the path of least resistance here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:07:16 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Feb 2014 22:07:16 +0000 Subject: [issue19761] test_tk fails on OS X with multiple test case failures with both Tk 8.5 and 8.4 In-Reply-To: <1385337935.63.0.262182292505.issue19761@psf.upfronthosting.co.za> Message-ID: <1391378836.71.0.567821069454.issue19761@psf.upfronthosting.co.za> Ned Deily added the comment: The supplied patch fixed all of the failing test cases on OS X, tested on 3.3 and default with Cocoa Tk 8.5 & 8.6, Carbon Tk 8.4, and X11 Tk 8.6. I'll test on 2.7 after the modified patch is applied. Thanks, Serhiy! ---------- stage: patch review -> commit review versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:09:07 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 22:09:07 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <1391378947.56.0.635226619897.issue20435@psf.upfronthosting.co.za> Antoine Pitrou added the comment: In other words, the bug is that _pyio.StringIO.getvalue() doesn't do any newline conversion; the patch fixes that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:10:15 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 22:10:15 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1390214008.55.0.184258286527.issue20311@psf.upfronthosting.co.za> Message-ID: <1391379015.03.0.0242959256796.issue20311@psf.upfronthosting.co.za> STINNER Victor added the comment: > Once again: a slight early wakeup isn't an issue That's your opinion, but I disagree. Please open a new issue with a patch, or reopen at least this issue because it is now closed. I already spent to much time on this issue. Buildbots are now happy, I don't want to change this again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:16:47 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 22:16:47 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391379407.15.0.467971463744.issue20475@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem with pystone is that such tool is used to compare performances between different versions of Python. If pystone uses a different clock in Python 3.4, you may not be able to compare compare results with older Python versions. In my opinion, such change should not be done before Python 3.5. 3.4 beta 3 has already been released. ---------- versions: +Python 3.5 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:19:34 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 22:19:34 +0000 Subject: [issue20472] test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot In-Reply-To: <1391224819.03.0.550911452449.issue20472@psf.upfronthosting.co.za> Message-ID: <1391379574.55.0.486538226122.issue20472@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch to skip the tests for SelectSelector on Mac OS X older than 10.6 (Snow Leopard). @Ned: Could you please try it? I don't have access to such old Mac OS X versions. (I now only have a iMac running 10.9). ---------- keywords: +patch Added file: http://bugs.python.org/file33875/asyncio_pty_osx.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:20:58 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 22:20:58 +0000 Subject: [issue20470] "Fatal Python error: Bus error" on the SPARC Solaris 10 buildbot In-Reply-To: <1391221810.73.0.133738651444.issue20470@psf.upfronthosting.co.za> Message-ID: <1391379658.14.0.144841646461.issue20470@psf.upfronthosting.co.za> STINNER Victor added the comment: Cool, the tests are no more crashing on this buildbot. I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:21:33 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 22:21:33 +0000 Subject: [issue20455] test_asyncio hangs on Windows In-Reply-To: <1391174100.63.0.591447461885.issue20455@psf.upfronthosting.co.za> Message-ID: <1391379693.22.0.582798674522.issue20455@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:27:09 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sun, 02 Feb 2014 22:27:09 +0000 Subject: [issue20479] Efficiently support weight/frequency mappings in the statistics module In-Reply-To: <1391304071.38.0.177384686096.issue20479@psf.upfronthosting.co.za> Message-ID: <1391380029.88.0.0457298939895.issue20479@psf.upfronthosting.co.za> Wolfgang Maier added the comment: > -----Urspr?ngliche Nachricht----- > Von: Steven D'Aprano [mailto:report at bugs.python.org] > Gesendet: Sonntag, 2. Februar 2014 12:55 > An: wolfgang.maier at biologie.uni-freiburg.de > Betreff: [issue20479] Efficiently support weight/frequency mappings in the > statistics module > > > Steven D'Aprano added the comment: > > Off the top of my head, I can think of three APIs: > > (1) separate functions, as Nick suggests: > mean vs weighted_mean, stdev vs weighted_stdev > > (2) treat mappings as an implied (value, frequency) pairs > (2) is clearly my favourite. (1) may work well, if you have a module with a small fraction of functions, for which you need an alternate API. In the statistics module, however, almost all of its current functions could profit from having a way to treat mappings specially. In such a case, (1) is prone to create lots of redundancies. I do not share Oscar's opinion that > apart from mode() the implementation of each function on > map-format data will be completely different from the iterable version > so you'd want to have it as a separate function at least internally > anyway. Consider _sum's current code (docstring omitted for brevity): def _sum(data, start=0): n, d = _exact_ratio(start) T = type(start) partials = {d: n} # map {denominator: sum of numerators} # Micro-optimizations. coerce_types = _coerce_types exact_ratio = _exact_ratio partials_get = partials.get # Add numerators for each denominator, and track the "current" type. for x in data: T = _coerce_types(T, type(x)) n, d = exact_ratio(x) partials[d] = partials_get(d, 0) + n if None in partials: assert issubclass(T, (float, Decimal)) assert not math.isfinite(partials[None]) return T(partials[None]) total = Fraction() for d, n in sorted(partials.items()): total += Fraction(n, d) if issubclass(T, int): assert total.denominator == 1 return T(total.numerator) if issubclass(T, Decimal): return T(total.numerator)/total.denominator return T(total) all you'd have to do to treat mappings as proposed here is to add a check whether we are dealing with a mapping, then in this case, instead of the for loop: for x in data: T = _coerce_types(T, type(x)) n, d = exact_ratio(x) partials[d] = partials_get(d, 0) + n use this: for x,m in data.items(): T = _coerce_types(T, type(x)) n, d = exact_ratio(x) partials[d] = partials_get(d, 0) + n*m and no other changes (though I haven't tested this carefully). Wolfgang ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:28:06 2014 From: report at bugs.python.org (Paul Sokolovsky) Date: Sun, 02 Feb 2014 22:28:06 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391380086.21.0.849327113314.issue20475@psf.upfronthosting.co.za> Paul Sokolovsky added the comment: > The problem with pystone is that such tool is used to compare performances between different versions of Python. That's why I just propose to switch it to time.time(), which surely is available on each and every Python version and implementation. If there's a concern that some implementation may have only 1-second precision, then: 1) well, pystone has limits to its "scientificity", it's more like quick-run-anywhere, there's pybench for "real" testing (it's maintained and supported I hope); 2) number of iteratations can be bumped from 50K to 200K-500K. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:31:31 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 22:31:31 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391380291.45.0.294350626196.issue20475@psf.upfronthosting.co.za> STINNER Victor added the comment: > That's why I just propose to switch it to time.time(), which surely is available on each and every Python version and implementation. It's not the same clock. time.clock() measures the process time, which is different from the wall clock time. Compare time.get_clock_info('clock') to time.get_clock_info('time') and time.get_clock_info('perf_counter'). See also the PEP 418 which lists all these clocks and explain why time.clock() was deprecated: http://www.python.org/dev/peps/pep-0418/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:31:49 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Feb 2014 22:31:49 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <1391380309.45.0.334751128789.issue20435@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But how then other values of newline except '\n' can be useful? The problem is that newline converting is applied twice, in write() and in read(). When constructor uses write() and getvalue() returns same value as read(), we have no chance to get newlines encoded or decoded only once. Current results for newline != '\n' looks meanless to me. Here is my half-baked patch. It fixes only _pyio.StringIO, but _io.StringIO are still partially broken. The patch also contains new tests. ---------- Added file: http://bugs.python.org/file33876/stringio_newline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:33:23 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 02 Feb 2014 22:33:23 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1390214008.55.0.184258286527.issue20311@psf.upfronthosting.co.za> Message-ID: <1391380403.35.0.200555591078.issue20311@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > > Once again: a slight early wakeup isn't an issue > > That's your opinion, but I disagree. > > Please open a new issue with a patch, or reopen at least this issue because it is now closed. > > I already spent to much time on this issue. Buildbots are now happy, I don't want to change this again. So, to sum up: - you write a fragile and unelegant patch without a good reason - you commit it without review - you're asked several times to provide an example of the problems your patch is supposed to solve, but don't give any - you don't take into account the fact that all proven and successful event loops work just fine without a similar patch - you insist, and won't neither back your claims by examples, nor revert your patch Fine, keep it this way, but I'm done with this, I've lost enough time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:36:54 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 22:36:54 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <1391380614.81.0.623038880031.issue20435@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Current results for newline != '\n' looks meanless to me. They don't look meaningless to me, e.g.: >>> io.StringIO("a\r\nc\rd", newline=None).getvalue() 'a\nc\nd' >>> sio = io.StringIO(newline=None); sio.write("a\r\nc\rd"); sio.getvalue() 6 'a\nc\nd' There may be other cases where they make less sense, but that's a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:40:56 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Feb 2014 22:40:56 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <3fHRw80fQfz7LkG@mail.python.org> Roundup Robot added the comment: New changeset 99168e7d4a3d by Antoine Pitrou in branch '3.3': Issue #20435: Fix _pyio.StringIO.getvalue() to take into account newline translation settings. http://hg.python.org/cpython/rev/99168e7d4a3d New changeset aadcc71a4967 by Antoine Pitrou in branch 'default': Issue #20435: Fix _pyio.StringIO.getvalue() to take into account newline translation settings. http://hg.python.org/cpython/rev/aadcc71a4967 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:42:04 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Feb 2014 22:42:04 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <3fHRxR3rXJz7LkG@mail.python.org> Roundup Robot added the comment: New changeset 3e61d8e06ef7 by Antoine Pitrou in branch '2.7': Issue #20435: Fix _pyio.StringIO.getvalue() to take into account newline translation settings. http://hg.python.org/cpython/rev/3e61d8e06ef7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:42:49 2014 From: report at bugs.python.org (Paul Sokolovsky) Date: Sun, 02 Feb 2014 22:42:49 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391380969.25.0.613817641283.issue20475@psf.upfronthosting.co.za> Paul Sokolovsky added the comment: Yes, and my note about "scientificity" above. Also compare with your own account of time.perf_counter() above ("Usually time.perf_counter() is the expected function.") Also, I didn't want to start discussion on how to do benchmarking right, just to point out a small inconsistency, and suggest a fix which balances on (down-to-earth) correctness and practicality. It even can be ignored, except that such small inconsistencies accumulate and then some time later stick from every hole if not addressed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:42:50 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 22:42:50 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <1391380970.32.0.693479915723.issue20435@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've fixed the reported bug. If other problems need fixing, better open a new issue :-) ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:54:43 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 22:54:43 +0000 Subject: [issue20426] Compiling a regex with re.DEBUG should force a recompile In-Reply-To: <1390946978.37.0.473480948512.issue20426@psf.upfronthosting.co.za> Message-ID: <1391381683.79.0.0540819390845.issue20426@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A simple workaround is to bypass the cache when DEBUG is passed. See attached patch. (not sure this applies as a bug fix, but DEBUG probably isn't used in production anyway: the potential for breakage is low) ---------- keywords: +patch stage: test needed -> patch review versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.5 Added file: http://bugs.python.org/file33877/re_debug_cache.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 23:59:04 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 22:59:04 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391358703.52.0.432372081905.issue20480@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: >From a "principle of least surprise" point of view, non-specialists would likely be puzzled by a trailing dot and wonder why it was there. By contrast, specialists that know the trailing dot is technically *supposed* to be there are already going to be accustomed to seeing it left out (because it is already left out in so many other contexts). So I'm +1 for leaving out the trailing dot, as that likely won't surprise *any* users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 00:15:10 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Feb 2014 23:15:10 +0000 Subject: [issue20486] msilib: can't close opened database In-Reply-To: <1391355449.68.0.999858284587.issue20486@psf.upfronthosting.co.za> Message-ID: <1391382910.28.0.935987725097.issue20486@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 00:18:41 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 02 Feb 2014 23:18:41 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1391377888.49.0.123388145316.issue15216@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: It's a blunt instrument to be sure, but a necessary one, I think - otherwise we end with a scattering of API specific solutions rather than a single consistent approach. Here's a thought, though: what if we went with Serhiy's "reconfigure" idea, limited that to seekable streams (resetting then back to the start of the file) and then also had a "force_reconfigure" that bypassed the safety checks? The main problem I see with that idea is that some changes (binary vs text, universal newlines or not, buffered or not) would potentially require adding or removing a class from the stream's IO stack, thus rendering it difficult to handle as an in-place operation. However the "seekable streams only by default, flag or separate method to force an encoding change for a non-seekable stream" approach would be applicable even for the basic "set_encoding" API. I'm beginning to think that this is all complicated enough that it should be written up in a PEP for 3.5 before we actually commit anything (even if what we end up committing is just set_encoding with a "force=False" keyword only parameter). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 00:22:32 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 02 Feb 2014 23:22:32 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391383352.77.0.215087637968.issue17159@psf.upfronthosting.co.za> Larry Hastings added the comment: > That's likely true for CPython itself, at least currently. > I don't think it's generally a safe assumption in the CPython > ecosystem, which includes things like Cython, Numba, Nuitka and others, While I'm happy to accommodate these other projects if it's easy to do so, my primary concern is what's best for CPython. > Reducing it to a string representation, especially now that we > have annotations for Python signatures, sounds like a major step > backwards. What nonsense. CPython has never had signature information for builtins before. And, the format of __text_signature__ allows expressing a signature that uses every feature available in inspect.Signature. This cannot legitimately be called a "major step backwards". Also, PEP 8 forbids using annotations in the CPython library, which includes all of CPython's builtins. So using annotations in any way for this was off the table. > Safer ways to do it would be extending the type, or adding a flag > in some way, but that's going to a) hurt more than the current > situation, and b) become wasteful at some point when the > __text_signature__ actually gets replaced by a proper function > interface for CPython builtins. The fact that that wasn't doable > for Py3.4 any more doesn't mean it shouldn't be done at all. You imply that __text_signature__ is improper and unsafe. We debated how to communicate static signature information from C to Python at runtime, and this was easily the best--most expressive, most compact. So it is entirely proper. Hiding it in the docstring was a cheap hack, I'll admit, but with an appropriately unlikely signature ('sig=') it seems perfectly safe. If in the future we need to change how we represent signatures, we can remove it. It's an undocumented internal implementation detail and we have free license to do so. So even if we changed our mind in the future I don't see how it would be "wasteful". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 00:25:16 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 23:25:16 +0000 Subject: [issue20472] test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot In-Reply-To: <1391224819.03.0.550911452449.issue20472@psf.upfronthosting.co.za> Message-ID: <1391383516.15.0.436564742011.issue20472@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, Ned told me that tests using the PollSelector are still failing. I forgot that poll() is also supported on OS X. Please try this new patch. ---------- Added file: http://bugs.python.org/file33878/asyncio_pty_osx-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 00:31:21 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 02 Feb 2014 23:31:21 +0000 Subject: [issue20472] test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot In-Reply-To: <1391224819.03.0.550911452449.issue20472@psf.upfronthosting.co.za> Message-ID: <1391383881.88.0.685914850733.issue20472@psf.upfronthosting.co.za> Ned Deily added the comment: With asyncio_pty_osx-2.patch, test_asyncio now passes on OS X 10.4.11 and 10.5.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 00:37:20 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Feb 2014 23:37:20 +0000 Subject: [issue20472] test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot In-Reply-To: <1391224819.03.0.550911452449.issue20472@psf.upfronthosting.co.za> Message-ID: <3fHT9D0H15z7LjX@mail.python.org> Roundup Robot added the comment: New changeset 21a4ebf5a170 by Victor Stinner in branch 'default': Issue #20472: test_asyncio: skip PTY tests on Mac OS X older than 10.6 http://hg.python.org/cpython/rev/21a4ebf5a170 New changeset 0a71d29b970a by Victor Stinner in branch 'default': Issue #20472: asyncio: Adjust the note about Mac OS X on PTY, specify that it http://hg.python.org/cpython/rev/0a71d29b970a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 00:37:54 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 02 Feb 2014 23:37:54 +0000 Subject: [issue20472] test_write_pty() of test_asyncio fails on "x86 Tiger 3.x" buildbot In-Reply-To: <1391224819.03.0.550911452449.issue20472@psf.upfronthosting.co.za> Message-ID: <1391384274.84.0.664841772753.issue20472@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:12:58 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Feb 2014 00:12:58 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391386378.45.0.979168341839.issue20475@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > If pystone uses a different clock in Python 3.4, you may not be able > to compare compare results with older Python versions. This sounds a bit silly. Typical pystone runs last a couple seconds at most, there won't be a significant clock drift in such a short amount of time. Besides, if time.clock() is deprecated, pystone will *have* to be modified one day, anyway. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:14:18 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Feb 2014 00:14:18 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391386458.28.0.29653685218.issue20475@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Paul: > well, pystone has limits to its "scientificity", it's more like quick- > run-anywhere, there's pybench for "real" testing (it's maintained and > supported I hope) pybench is so synthetic it's almost a nano-benchmark. I would suggest using the benchmarks suite, which will give more useful numbers IMHO: http://hg.python.org/benchmarks/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:17:04 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 00:17:04 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391386624.18.0.180054979601.issue20475@psf.upfronthosting.co.za> STINNER Victor added the comment: > Besides, if time.clock() is deprecated, pystone will *have* to be modified one day, anyway. If something is changed, I would prefer to simply drop this old tool. It is not reliable and so may give you wrong results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:19:06 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 00:19:06 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1390214008.55.0.184258286527.issue20311@psf.upfronthosting.co.za> Message-ID: <1391386746.4.0.603707445241.issue20311@psf.upfronthosting.co.za> STINNER Victor added the comment: > So, to sum up: > - you write a fragile and unelegant patch without a good reason > - you commit it without review > - you're asked several times to provide an example of the problems your patch is supposed to solve, but don't give any > - you don't take into account the fact that all proven and successful event loops work just fine without a similar patch > - you insist, and won't neither back your claims by examples, nor revert your patch My goal is to ensure that each call to asyncio.BaseEventLoop._run_once() executes at least an handle. It is now described as a unit test in Lib/test/test_asyncio/test_events.py: test_timeout_rounding(). There is one exception: I don't care if the selector was interrupted by a signal. (As I wrote, it's not interesting to loop on the selector, it's fine to re-execute the whole _run_once() method.) If I understood correctly your opinion, you don't want to reach this exact goal, and you would prefer to keep the code simpler. So you don't care if sometimes _run_once() exit without executing any task. Did I understand correctly your opinion? But I don't understand if you would prefer to revert all my changes, or keep the rounding away from zero in selectors? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:22:24 2014 From: report at bugs.python.org (Suzumizaki) Date: Mon, 03 Feb 2014 00:22:24 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391386944.63.0.512123817808.issue20485@psf.upfronthosting.co.za> Suzumizaki added the comment: Thank you for reply. The hack msg209998 is interesting, but how to name submodule with non latin like languages, especially keeping native reable? X( The reason I don't use like "name.encode('unicode-escape').replace(b'\\', b'_')" is the length limits of the identifiers. In fact, Visual C++ can accept 2047 chars(bytes) and gcc have no logical limits. But the PEP 7 says we should use C89. And even C99 assumes first 63 bytes are significant. I don't know what C89 says, And my C99 reference is below, this means real-C99 is possibly different: http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf If we should keep C99 order above, 63 chars are too short to use 'unicode-escape' like. 'PyInit_' takes 7, remains 56. When each characters encoded as 5 chars like '_3010', only we can use 11 unicode-codepoints. When 6 chars, only 9 chars. a) If we can break C99 or real-C89/C99 don't have 63 chars rule, we can simply use as Amaury Forgeot d'Arc says. b) If we should keep 63 chars rules, the encodings longer than 'szm62' is not acceptable. c) Of course, when there is no reason to make entry point 'PyInit_modulename', Make enable stable constant name 'PyInit' or 'PyInitUnicodeNamedModule' without individual module name is another acceptable idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:30:15 2014 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Feb 2014 00:30:15 +0000 Subject: [issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound In-Reply-To: <1390214008.55.0.184258286527.issue20311@psf.upfronthosting.co.za> Message-ID: <1391387415.16.0.93121904243.issue20311@psf.upfronthosting.co.za> Guido van Rossum added the comment: neologix, you are getting dangerously close to attacking the person instead of the issue. Can you live with the current state of the code? If so, let us know (or be silent if you prefer). If you cannot live with it, please show example code that fails or is inefficient with the current version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:37:51 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 00:37:51 +0000 Subject: [issue20493] asyncio: OverflowError('timeout is too large') Message-ID: <1391387871.01.0.754074352669.issue20493@psf.upfronthosting.co.za> New submission from STINNER Victor: In asyncio, if the next event is in 2^40 seconds, epoll.poll() raises an OverflowError because epoll_wait() maximum value for the timeout is INT_MAX seconds. Test timeout_overflow.py to reproduce the issue. ---------- files: timeout_overflow.py messages: 210061 nosy: haypo priority: normal severity: normal status: open title: asyncio: OverflowError('timeout is too large') versions: Python 3.4 Added file: http://bugs.python.org/file33879/timeout_overflow.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:40:40 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 00:40:40 +0000 Subject: [issue20493] asyncio: OverflowError('timeout is too large') In-Reply-To: <1391387871.01.0.754074352669.issue20493@psf.upfronthosting.co.za> Message-ID: <1391388040.8.0.286247149946.issue20493@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch fixes the issue, but it has no unit test :-( On Windows, it looks like IocpProactor can also raise an error if the timeout is too large: # GetQueuedCompletionStatus() has a resolution of 1 millisecond, # round away from zero to wait *at least* timeout seconds. ms = math.ceil(timeout * 1e3) if ms >= INFINITE: raise ValueError("timeout too big") with INFINITE = 0xffffffff. ---------- keywords: +patch nosy: +gvanrossum, neologix Added file: http://bugs.python.org/file33880/asyncio_timeout_overflow.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:52:51 2014 From: report at bugs.python.org (Benjamin Yolken) Date: Mon, 03 Feb 2014 00:52:51 +0000 Subject: [issue20494] Backport of http://bugs.python.org/issue11849 to Python 2.7 (Make it more likely for the system allocator to release free()d memory arenas on glibc-based systems). Message-ID: <1391388769.61.0.620925038774.issue20494@psf.upfronthosting.co.za> New submission from Benjamin Yolken: We have found that http://bugs.python.org/issue11849 affects a number of our Python 2.7 systems in production. I took the changes in http://hg.python.org/cpython/rev/f8a697bc3ca8 and backported them to the head of the python 2.7 cpython hg branch. I have verified that these changes fix the problem and that all tests pass. Please see the attached patch. ---------- files: memory_fix.patch keywords: patch messages: 210063 nosy: bhyolken priority: normal severity: normal status: open title: Backport of http://bugs.python.org/issue11849 to Python 2.7 (Make it more likely for the system allocator to release free()d memory arenas on glibc-based systems). type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file33881/memory_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 01:59:26 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 00:59:26 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391389166.68.0.258228341713.issue20485@psf.upfronthosting.co.za> STINNER Victor added the comment: The PyInit_NAME symbol is not the only place where NAME is used. The NAME is also present in the PyModuleDef structure. It looks lie Python expects UTF-8 here. You encode it to UTF-8 and use "\xHH\xHH\xHH..." syntax to keep ASCII encoding for the C file? The NAME may also be mentionned in docstrings, C comments, type names, etc. I don't like the idea of a new encoding just for one very specific function in C. There are already too many encodings in the world :-( The C language supports non-ASCII identifiers, but I don't know how they are encoded in the symbol table. I would prefer to rely on the C compiler if you would like to play in the playground of non-ASCII identifiers. In Python/dynload_win.c, _PyImport_GetDynLoadWindows() uses GetProcAddressA(). Is it a theorical feature request, or you really have a Python module with a non-ASCII name? I'm not sure that it's really useful to support non-ASCII module names for C modules, even if I spend many months to support non-ASCII module names for Python modules :-) ---------- type: behavior -> enhancement versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:06:59 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 01:06:59 +0000 Subject: [issue12187] subprocess.wait() with a timeout uses polling on POSIX In-Reply-To: <1306416741.33.0.363365904037.issue12187@psf.upfronthosting.co.za> Message-ID: <1391389619.33.0.977301136353.issue12187@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, the new asyncio.subprocess module has been merged. Use asyncio.create_subprocess_exec/shell to create a subprocess and then use asyncio.wait_for(proc.wait(), timeout) to wait for the exit of the process with a timeout. The wait is asynchronous thanks to asyncio internals. I close the issue. I consider it fixed with the asyncio option. As I wrote, I don't think that it's possible to fix it in subprocess in a portable way without breaking backward compatibility. asyncio is new and so there is no risk of breaking the backward compatibility. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:14:35 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 01:14:35 +0000 Subject: [issue20428] _Py_open does not work with O_CREAT In-Reply-To: <1390952730.76.0.147272441759.issue20428@psf.upfronthosting.co.za> Message-ID: <1391390075.43.0.133910222052.issue20428@psf.upfronthosting.co.za> STINNER Victor added the comment: > In file included from ./Modules/_localemodule.c:404:0, I don't see where _Py_open() is used in _localemodule.c. I didn't find a call to _Py_open() using O_CREAT. In fact, O_CREAT is not used in the C code of Python. (Except dbmopen in the dbm module, but it doesn't call open(), it calls dbm_open()). > I already search the "default mode" but I didn't see it in the manual page. The glibc pass 0 for the mode by default, but for O_CREAT it reads it from the third "mode" parameter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:19:10 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Feb 2014 01:19:10 +0000 Subject: [issue20350] Replace tkapp.split() to tkapp.splitlist() In-Reply-To: <1390411522.89.0.349086871577.issue20350@psf.upfronthosting.co.za> Message-ID: <1391390350.83.0.490992929106.issue20350@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I know split has been troublesome and I am generally in favor of removing semi-duplication. Here are my questions. What system are you developing and testing on? Should I try the patch on Windows? Have you used coveragepy to see if the patched areas are covered by tests? Have you run Idle with the patch in place (though it does not use tix that I know of)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:21:32 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 01:21:32 +0000 Subject: [issue20414] Python 3.4 has two Overlapped types In-Reply-To: <1390873913.58.0.40789965238.issue20414@psf.upfronthosting.co.za> Message-ID: <1391390492.68.0.763019856096.issue20414@psf.upfronthosting.co.za> STINNER Victor added the comment: Sorry Martin, I'm not sure that I understood your proposition. Here is a new patch. ---------- Added file: http://bugs.python.org/file33882/overlapped_dealloc-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:24:22 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 01:24:22 +0000 Subject: [issue20405] Add io.BinaryTransformWrapper and a "transform" parameter to open() In-Reply-To: <1390800279.91.0.834285021962.issue20405@psf.upfronthosting.co.za> Message-ID: <1391390662.9.0.561173282379.issue20405@psf.upfronthosting.co.za> STINNER Victor added the comment: > Ever used "recode" ? No, what is it? I once used iconv for short tests, but I never required iconv to convert a real document. > E.g. the example at the end of codecs.py allows using Latin-1 within > the application, while talking to the console using UTF-8. It doesn't make sense anymore in Python 3, strings are now store as Unicode within the application. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:24:35 2014 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Feb 2014 01:24:35 +0000 Subject: [issue20493] asyncio: OverflowError('timeout is too large') In-Reply-To: <1391387871.01.0.754074352669.issue20493@psf.upfronthosting.co.za> Message-ID: <1391390675.63.0.526015486625.issue20493@psf.upfronthosting.co.za> Guido van Rossum added the comment: Shouldn't this be fixed in the C implementation of the select module or in selectors.py? It seems likely that the exact range might be different for each syscall and possibly per OS or even OS version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:27:33 2014 From: report at bugs.python.org (Benjamin Yolken) Date: Mon, 03 Feb 2014 01:27:33 +0000 Subject: [issue20494] Backport of http://bugs.python.org/issue11849 to Python 2.7 (Make it more likely for the system allocator to release free()d memory arenas on glibc-based systems). In-Reply-To: <1391388769.61.0.620925038774.issue20494@psf.upfronthosting.co.za> Message-ID: <1391390853.59.0.783064966579.issue20494@psf.upfronthosting.co.za> Benjamin Yolken added the comment: Attaching an updated version of the patch generated with autoconf 2.69 instead of 2.68. ---------- Added file: http://bugs.python.org/file33883/memory_fix_updated.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:29:28 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 01:29:28 +0000 Subject: [issue20495] test_read_pty_output() hangs on FreeBSD 7.2 buildbot Message-ID: <1391390968.29.0.23257855186.issue20495@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/4969/steps/test/logs/stdio --- [298/389/1] test_asyncio Timeout (1:00:00)! Current thread 0x28401040 (most recent call first): File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/asyncio/base_events.py", line 208 in time File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/asyncio/base_events.py", line 641 in _run_once File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/asyncio/base_events.py", line 154 in run_forever File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/asyncio/base_events.py", line 173 in run_until_complete File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/asyncio/test_utils.py", line 44 in run_briefly File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/asyncio/test_utils.py", line 59 in run_until File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/test_asyncio/test_events.py", line 979 in test_read_pty_output ... --- FYI The test is now skipped on Mac OS X older than 10.6, the test on the kqueue selector is skipped on Mac OS X older than 10.9: issue #20472. ---------- messages: 210072 nosy: gvanrossum, haypo, skrah priority: normal severity: normal status: open title: test_read_pty_output() hangs on FreeBSD 7.2 buildbot versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:30:04 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 01:30:04 +0000 Subject: [issue19334] test_asyncio hanging for 1 hour (non-AIX version) In-Reply-To: <1382366717.5.0.644107908192.issue19334@psf.upfronthosting.co.za> Message-ID: <1391391004.64.0.0472034169872.issue19334@psf.upfronthosting.co.za> STINNER Victor added the comment: > It was hanging on FreeBSD 7.2 recently: > http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/4917/steps/test/logs/stdio Oh, it still hangs on the latest version of the code. I opened #20495 to track this bug. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:32:35 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 01:32:35 +0000 Subject: [issue20318] subprocess.Popen can hang in threaded applications in Python 2 In-Reply-To: <1390249819.03.0.991344131396.issue20318@psf.upfronthosting.co.za> Message-ID: <1391391155.25.0.239160751715.issue20318@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: subprocess.Popen can hang in threaded applications -> subprocess.Popen can hang in threaded applications in Python 2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 02:36:41 2014 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Feb 2014 01:36:41 +0000 Subject: [issue20495] test_read_pty_output() hangs on FreeBSD 7.2 buildbot In-Reply-To: <1391390968.29.0.23257855186.issue20495@psf.upfronthosting.co.za> Message-ID: <1391391401.3.0.906605531181.issue20495@psf.upfronthosting.co.za> Guido van Rossum added the comment: I guess this is not a total surprise given that OS X derives in some way from BSD... I wonder if we just need to make a matrix of which OS versions and which syscalls can handle PTYs correctly, and either put it in the docs or perhaps even refuse to accept PTYs in add_reader/add_writer... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 03:21:06 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Feb 2014 02:21:06 +0000 Subject: [issue20368] Tkinter: handle the null character In-Reply-To: <1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> Message-ID: <1391394066.96.0.578116780492.issue20368@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The core of the patch is a wrapper that traps UnicodeDecodeErrors, corrects the strings, and re-decodes. A Python version might look like def unicodeFromTclStringAndSize(s, size): try: return except UnicodeDecodeError: if b'\xc0\x80' in s: s.replace(b'\xc0\x80', b'\x00') return else: raise This is used in a couple of additional wrappers and all direct decode calls are replaced with wrappers. New tests are added. Overall, a great idea, and I want to see this patch in 3.4. But, how many of the replacement sites are exercised by the tests? There are a few changes that seem unrelated to nulls, which might have been left for another patch. Example: -#if TCL_UTF_MAX==3 return PyUnicode_FromKindAndData( - PyUnicode_2BYTE_KIND, Tcl_GetUnicode(value), + sizeof(Tcl_UniChar), Tcl_GetUnicode(value), Tcl_GetCharLength(value)); -#else - return PyUnicode_FromKindAndData( - PyUnicode_4BYTE_KIND, Tcl_GetUnicode(value), - Tcl_GetCharLength(value)); -#endif Do you know if this code block is tested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 04:28:30 2014 From: report at bugs.python.org (Suzumizaki) Date: Mon, 03 Feb 2014 03:28:30 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391398110.65.0.663830212411.issue20485@psf.upfronthosting.co.za> Suzumizaki added the comment: Thank you for reply, STINNER. > You encode it to UTF-8 and use "\xHH\xHH\xHH..." syntax to keep ASCII > encoding for the C file? The NAME may also be mentionned in docstrings, > C comments, type names, etc. The main purpose of this issue is "I want use Cython like Python without any trouble." You don't have to worry about mentioned above. I made, and will fix when needed, the patch for Cython to convert them automatically. The sample C codes I posted uses UTF-8 directly only OUTSIDE of the "quotation", but they can be fixed if we really have to fix. > I don't like the idea of a new encoding just for one very specific > function in C. There are already too many encodings in the world :-( Of course I will accept any encoding and/or any solution to resolve this issue. I made new encoding only to keep the condition as possible as I can, and not to limit the naming too short when using non-ASCII characters. The patch don't include encoding-module for any purpose. For this issue, decoding is not required inside the Python. > The C language supports non-ASCII identifiers, but I don't know how they > are encoded in the symbol table. That's why we should resolve this problem, shouldn't we? Also the standards don't define about the symbol table. > I would prefer to rely on the C compiler if you would like to play in the > playground of non-ASCII identifiers. The problem is we CAN'T as you say. Or, at least, if you really think that, any ASCII limiting against dynamic loading should be removed. >In Python/dynload_win.c, _PyImport_GetDynLoadWindows() uses GetProcAddressA(). _PyImport_GetDynLoadWindows() seems to be called only to resolve PyInit_xxx entry from _PyImport_LoadDynamicModule() in Python/importdl.c. I have already resolved with the posted patch before. >Is it a theorical feature request, or you really have a Python module with >a non-ASCII name? As I told, NO to 1st, YES to 2nd. I have many '.py' which I want to convert using Cython to '.pyd' files. > I'm not sure that it's really useful to support non-ASCII module names > for C modules, even if I spend many months to support non-ASCII module > names for Python modules :-) Because you are both English and Python expert. Thanks a lot to daily Python work! Thank you for reading this long description. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 06:09:47 2014 From: report at bugs.python.org (Alan Isaac) Date: Mon, 03 Feb 2014 05:09:47 +0000 Subject: [issue20496] function definition tutorial encourages bad practice Message-ID: <1391404187.28.0.545168168954.issue20496@psf.upfronthosting.co.za> New submission from Alan Isaac: Section 4.6 of the tutorial introduces function definition: http://docs.python.org/3/tutorial/controlflow.html#defining-functions The first example defines a function that *prints* a Fibonacci series. A basic mistake made by students new to programming is to use a function to print values rather than to return them. In this sense, the example encourages bad practice and misses an opportunity to instruct. Since they have already met lists in Section 3, I suggest that returning a list of the values and then printing the list would enhance the tutorial. ---------- assignee: docs at python components: Documentation messages: 210077 nosy: aisaac, docs at python priority: normal severity: normal status: open title: function definition tutorial encourages bad practice type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 07:19:42 2014 From: report at bugs.python.org (INADA Naoki) Date: Mon, 03 Feb 2014 06:19:42 +0000 Subject: [issue20497] Unclear word in socket document. Message-ID: <1391408382.37.0.746852071929.issue20497@psf.upfronthosting.co.za> New submission from INADA Naoki: http://docs.python.org/3.3/library/socket.html#socket.getaddrinfo > Changed in version 3.2: parameters can now be passed as single keyword arguments. What *single* means? I can use multiple keyword arguments: In [3]: socket.getaddrinfo('www.python.org', 80, proto=socket.SOL_TCP, family=socket.AF_INET) Out[3]: [(, , 6, '', ('82.94.164.162', 80))] ---------- assignee: docs at python components: Documentation messages: 210078 nosy: docs at python, naoki priority: normal severity: normal status: open title: Unclear word in socket document. versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 07:39:04 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 06:39:04 +0000 Subject: [issue20435] Discrepancy between io.StringIO and _pyio.StringIO with univeral newlines In-Reply-To: <1390986966.7.0.159416133233.issue20435@psf.upfronthosting.co.za> Message-ID: <1391409544.52.0.846883968704.issue20435@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for fixing this bug. Maybe I reported it too hastily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 07:57:35 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 06:57:35 +0000 Subject: [issue20498] Update StringIO newline tests Message-ID: <1391410655.69.0.384794659533.issue20498@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patches adds several new checks and test cases to StringIO newline tests. It also fixes test_newline_lf which didn't use the newline argument. ---------- components: IO, Tests messages: 210080 nosy: benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach priority: normal severity: normal stage: patch review status: open title: Update StringIO newline tests versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:06:26 2014 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 03 Feb 2014 07:06:26 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1391383352.77.0.215087637968.issue17159@psf.upfronthosting.co.za> Message-ID: <52EF3FF1.2000307@behnel.de> Stefan Behnel added the comment: > Also, PEP 8 forbids using annotations in the CPython library, which > includes all of CPython's builtins. So using annotations in any way > for this was off the table. Interesting, wasn't aware of that. Then let's wait what will happen when users start manually adding signature information to the docstrings of their C code extensions and come asking for annotation support in order to allow for introspection of the expected parameter types. > You imply that __text_signature__ is improper and unsafe. What I'm saying is that the existing function introspection API would have provided a much better way to do these things, and that it's good to finally have the meta data available in the source code so that that API can be made available at some point. Sorry if my wording sounded offensive. > If in the future we need to change how we represent signatures, we can > remove it. It's an undocumented internal implementation detail and we > have free license to do so. I don't think that's possible any more once it's out in the wild. The feature is just way too visible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:09:36 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 07:09:36 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391411376.28.0.0876265758274.issue20485@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The hack msg209998 is interesting, but how to name submodule with non latin like languages, especially keeping native reable? X( It is left to your discretion. You can use idna, punycode, utf-7, szm62 or romaji. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:13:47 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 07:13:47 +0000 Subject: [issue20475] pystone.py in 3.4 still uses time.clock(), even though it's marked as deprecated since 3.3 In-Reply-To: <1391289018.79.0.847652804265.issue20475@psf.upfronthosting.co.za> Message-ID: <1391411627.15.0.139950639362.issue20475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Pystone should has an option to specify a timer (as timeit). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:17:21 2014 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 03 Feb 2014 07:17:21 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1391363600.22.0.898281295063.issue17159@psf.upfronthosting.co.za> Message-ID: <52EF4280.40800@behnel.de> Stefan Behnel added the comment: >> inspect.isbuiltin() returns False > Are you absolutely sure about this? Yes. The "inheritance" of Cython's function type from PyCFunction is a pure implementation detail of the object struct layout that is not otherwise visible in any way. Specifically, there is no base type. The only reason for the identical (start of the) struct layout is to allow reusing some of the normal PyCFunction C-API functions on it instead of having to copy them into Cython. Cython's functions are neither instances of PyFunction nor of PyCFunction. They implement the interface of PyFunction, though. > http://hg.python.org/cpython/rev/48c3c42e3e5c This change is redundant since BuiltinFunctionType (which isbuiltin() tests for) is already in _NonUserDefinedCallables, which is tested for right afterwards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:43:24 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 07:43:24 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391413404.97.0.193461346109.issue17159@psf.upfronthosting.co.za> Yury Selivanov added the comment: > This change is redundant since BuiltinFunctionType (which isbuiltin() tests > for) is already in _NonUserDefinedCallables, which is tested for right > afterwards. The code is more understandable, though. Anyways, I'm glad that the issue is now resolved. Also, please let's stop posting anything unrelated in this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:45:37 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 07:45:37 +0000 Subject: [issue20350] Replace tkapp.split() to tkapp.splitlist() In-Reply-To: <1390411522.89.0.349086871577.issue20350@psf.upfronthosting.co.za> Message-ID: <1391413537.87.0.947077310911.issue20350@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I use Linux. Unfortunately these methods (as most methods in Tkinter) are not tested. IDLE doesn't use any of these methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:48:26 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Feb 2014 07:48:26 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <3fHh3s1vmZz7LkN@mail.python.org> Roundup Robot added the comment: New changeset c19f5e4fdbe0 by Yury Selivanov in branch 'default': inspect.signature: Add (restore) support for builtin classes #20473 http://hg.python.org/cpython/rev/c19f5e4fdbe0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:51:13 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 07:51:13 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391413873.77.0.750064109121.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: Committed. We'll likely need to modify the code again in 3.5, once we settle the exact semantics of __text_signature__. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:54:00 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 07:54:00 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391414040.29.0.670858446653.issue20473@psf.upfronthosting.co.za> Larry Hastings added the comment: What semantics are unsettled? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 08:58:01 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 07:58:01 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391414281.65.0.4600692102.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: For instance if __text_signature__ and __signature__ are present simultaneously which one should be used, or the use of '($' to specify bound-methods first parameters etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:01:27 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 08:01:27 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391414487.47.0.224186262994.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: And also right now, inspect.signature looks for '__text_signature__' when no used-defined __init__ was found. That's also going to be changed, but again, when __text_signature__ becomes a public documented API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:03:14 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 08:03:14 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391414594.6.0.0157530326801.issue20473@psf.upfronthosting.co.za> Larry Hastings added the comment: I don't think __text_signature__ should ever be a documented public API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:04:17 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 08:04:17 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391414657.77.0.0886096049366.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: FWIW, I think the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:09:33 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 08:09:33 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391414973.54.0.614035442476.issue20473@psf.upfronthosting.co.za> Yury Selivanov added the comment: And also, reading Stefan in another issue, I'm a bit worried that it may forcibly become a public API. Users tend to start using APIs before they are public, and that's especially true for python dunder attributes. Maybe we should document '__text_signature__' and 'sig=', and explicitly state that it's a part of CPython private API, that likely to have some semantics/syntax changed in 3.5? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:21:57 2014 From: report at bugs.python.org (Palm Kevin) Date: Mon, 03 Feb 2014 08:21:57 +0000 Subject: [issue17213] ctypes loads wrong version of C runtime, leading to error message box from system In-Reply-To: <1360992800.86.0.617349310494.issue17213@psf.upfronthosting.co.za> Message-ID: <1391415717.68.0.0502131573362.issue17213@psf.upfronthosting.co.za> Palm Kevin added the comment: +1 ---------- nosy: +palm.kevin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:29:59 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 03 Feb 2014 08:29:59 +0000 Subject: [issue17213] ctypes loads wrong version of C runtime, leading to error message box from system In-Reply-To: <1360992800.86.0.617349310494.issue17213@psf.upfronthosting.co.za> Message-ID: <1391416199.78.0.647209092506.issue17213@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:31:43 2014 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 03 Feb 2014 08:31:43 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391411376.28.0.0876265758274.issue20485@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Updating the C extension loading API to take advantage of PEP 451 is on the to do list for 3.5, so I'll see if we can do something about this as well. However, as Victor noted, it will depend on whether or not we can figure out a compiler independent cross platform way to look up a non-ASCII symbol in the extension module's symbol table. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:34:14 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 08:34:14 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391416454.93.0.896922313773.issue20489@psf.upfronthosting.co.za> Yury Selivanov added the comment: The problem is that 'zlib.compressobj().flush.__module__ is None' Can we fix that in zlib? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:35:36 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 08:35:36 +0000 Subject: [issue20308] inspect.Signature doesn't support user classes without __init__ or __new__ In-Reply-To: <1390168359.82.0.306015564457.issue20308@psf.upfronthosting.co.za> Message-ID: <1391416536.19.0.0266425491484.issue20308@psf.upfronthosting.co.za> Larry Hastings added the comment: That buildbot is happy now. Thanks for pointing it out! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:45:57 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 08:45:57 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391417157.42.0.336317136734.issue17159@psf.upfronthosting.co.za> Larry Hastings added the comment: > What I'm saying is that the existing function introspection API > would have provided a much better way to do these things, > and that it's good to finally have the meta data available in the > source code so that that API can be made available at some point. What "existing function introspection API"? I wasn't aware there was an existing mechanism to provide signature metadata for builtin functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 09:48:23 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 03 Feb 2014 08:48:23 +0000 Subject: [issue20493] asyncio: OverflowError('timeout is too large') In-Reply-To: <1391390675.63.0.526015486625.issue20493@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Shouldn't this be fixed in the C implementation of the select module or in selectors.py? It seems likely that the exact range might be different for each syscall and possibly per OS or even OS version. Agreed: if we want to fix this, it should be done in the select module. I'm saying "if", because we could either consider such a large timeout as an error and report it (like it's currently done), or silently cap the timeout. The later approach is used by libevent, and makes sense, to a certain extent (we just need to consider whether this can cause backward compatibility issues). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 10:00:43 2014 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 03 Feb 2014 09:00:43 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1391417157.42.0.336317136734.issue17159@psf.upfronthosting.co.za> Message-ID: <52EF5ABA.2030300@behnel.de> Stefan Behnel added the comment: > What "existing function introspection API"? I wasn't aware there was an > existing mechanism to provide signature metadata for builtin functions. Not for builtin functions, but it's unclear to me why the API of builtin functions should be different from that of Python functions (except, as I said, for the existence of byte code). I agree with Yury, however, that this discussion is unrelated to this ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 10:11:05 2014 From: report at bugs.python.org (Palm Kevin) Date: Mon, 03 Feb 2014 09:11:05 +0000 Subject: [issue17213] ctypes loads wrong version of C runtime, leading to error message box from system In-Reply-To: <1360992800.86.0.617349310494.issue17213@psf.upfronthosting.co.za> Message-ID: <1391418665.02.0.303394863764.issue17213@psf.upfronthosting.co.za> Palm Kevin added the comment: Reproducible for Py 3.2.5 ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 10:49:58 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 09:49:58 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391420998.31.0.445893789144.issue17159@psf.upfronthosting.co.za> Larry Hastings added the comment: > Not for builtin functions, but it's unclear to me why the API of > builtin functions should be different from that of Python functions > (except, as I said, for the existence of byte code). I really don't follow you. You seem to be saying that __text_signature__ is a bad idea, and keep talking about existing APIs that provide for the same functionality, but you decline to name specifics. Be specific. Let's say we remove __text_signature__. How do we now write a C extension in a way that we can have introspection information for its callables? If __text_signature__ is redundant with existing APIs, then we should remove it now before 3.4 ships. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:05:31 2014 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 03 Feb 2014 10:05:31 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391421931.58.0.650187165813.issue17159@psf.upfronthosting.co.za> Stefan Behnel added the comment: Python 3.4.0b3+ (default:19d81cc213d7, Feb 1 2014, 10:38:23) [GCC 4.8.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> def test(a,b,c=None): pass >>> set(dir(test)) - set(dir(len)) {'__get__', '__code__', '__globals__', '__dict__', '__defaults__', '__kwdefaults__', '__annotations__', '__closure__'} >>> test.__kwdefaults__ >>> test.__defaults__ (None,) >>> test.__annotations__ {} >>> test.__code__ ", line 1> >>> dir(test.__code__) ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'co_argcount', 'co_cellvars', 'co_code', 'co_consts', 'co_filename', 'co_firstlineno', 'co_flags', 'co_freevars', 'co_kwonlyargcount', 'co_lnotab', 'co_name', 'co_names', 'co_nlocals', 'co_stacksize', 'co_varnames'] >>> test.__code__.co_varnames () >>> test.__code__.co_varnames () >>> test.__code__.co_varnames ('a', 'b', 'c') >>> test.__code__.co_kwonlyargcount 0 >>> test.__code__.co_name 'test' But again, this is not covered by the subject of this ticket. I also don't think it's a good idea to delay Py3.4 until this discrepancy is fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:07:55 2014 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 03 Feb 2014 10:07:55 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391422075.48.0.00868749757749.issue17159@psf.upfronthosting.co.za> Stefan Behnel added the comment: """ >>> test.__code__.co_varnames () >>> test.__code__.co_varnames () >>> test.__code__.co_varnames ('a', 'b', 'c') """ copy&pasto, please ignore the first two... :o) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:08:28 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 10:08:28 +0000 Subject: [issue20368] Tkinter: handle the null character In-Reply-To: <1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> Message-ID: <1391422108.91.0.470071837677.issue20368@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > But, how many of the replacement sites are exercised by the tests? I added tests for most the replacement sites and updated tests has even more tests. split() and splitlist() -- tested. Unfortunately they are tested only for bytes argument because these methods reject unicode string argument with NUL. Tcl_Obj.string, Tcl_Obj.typename and Tcl_Obj.__str__() -- not tested. There are no explicit tests for these properties and methods. Seems as Tcl_Obj.typename can't be tested for NUL. eval(), evalfile() -- tested. Variable's methods -- tested. exprstring() -- tested. I added tests for exprstring(), exprdouble(), exprlong(), exprboolean() in the patch. record() -- not tested. There are no explicit tests for record() and I have no ideas how it can be used in Python. C functions: FromObj() and Tkapp_CallResult() -- implicitly tested in a lot of tests, in particular in test_passing_values and test_user_command. PythonCmd() -- tested in test_user_command. > There are a few changes that seem unrelated to nulls, which might have been left for another patch. They are just make code more robust. For example Tcl can be compiled with TCL_UTF_MAX=6. In this case Python will work correctly most time but can work incorrectly or crash on specific rare data. With proposed changes it will raise SystemError early. Yes, it is worth separate issue. > Do you know if this code block is tested. It is implicitly tested in many tests which tests non-ASCII strings. ---------- Added file: http://bugs.python.org/file33884/tkinter_null_character_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:09:31 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Mon, 03 Feb 2014 10:09:31 +0000 Subject: [issue20479] Efficiently support weight/frequency mappings in the statistics module In-Reply-To: <1391304071.38.0.177384686096.issue20479@psf.upfronthosting.co.za> Message-ID: <1391422171.7.0.161204942639.issue20479@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Well, I was thinking about frequencies (ints) when suggesting for x,m in data.items(): T = _coerce_types(T, type(x)) n, d = exact_ratio(x) partials[d] = partials_get(d, 0) + n*m in my previous message. To support weights (float or Rational) this would have to be more sophisticated. Wolfgang ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:33:54 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Mon, 03 Feb 2014 10:33:54 +0000 Subject: [issue20479] Efficiently support weight/frequency mappings in the statistics module In-Reply-To: <1391422171.7.0.161204942639.issue20479@psf.upfronthosting.co.za> Message-ID: <20140203103348.GB2213@gmail.com> Oscar Benjamin added the comment: > in my previous message. To support weights (float or Rational) this would have to be more sophisticated. I guess you'd do: for x,w in data.items(): T = _coerce_types(T, type(x)) xn, xd = exact_ratio(x) wn, wd = exact_ratio(w) partials[d] = partials_get(xd * wd, 0) + xn * wn Variance is only slightly trickier. Median would be more complicated. I just think that I prefer to know when I look at code that something is being treated as a mapping or as an iterable. So when I look at d = f(x, y, z) v = variance_map(d) It's immediately obvious what d is and how the function variance_map is using it. As well as the benefit of readability there's also the fact that accepting different kinds of input puts strain on any attempt to modify your code in the future. Auditing the code requires understanding at all times that the name "data" is bound to a quantum superposition of different types of object. Either every function would have to have the same "iterable or mapping" interface or there would have to be some other convention for making it clear which ones do. Perhaps the functions that don't make sense for a mapping could explicitly reject them rather than treating them as an iterable. I just think it's simpler to have a different function name for each type of input. Then it's clear what functions are available for working with mappings. If you were going for something completely different then you could have an object-oriented interface where there are classes for the different types of data and methods that do the right thing in each case. Then you would do v = WeightedData(d).variance() The ordinary variance() function could just become a shortcut for def variance(data): return SequenceData(data).variance() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:44:07 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 10:44:07 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391424247.14.0.921716315844.issue17159@psf.upfronthosting.co.za> Larry Hastings added the comment: Yyou have just answered the question "How do you determine signature information for functions written in Python?". A shorter way to express this answer: functions written in Python are implemented as a "function object" (in C, PyFunctionObject), which internally has a reference to a "code object" (PyCodeObject). These two objects collectively contain all the information you'd need to determine the function's signature in Python. However, builtin functions don't use either of these objects. Builtin functions are implemented with a "builtin code object" (PyCFunctionObject) which doesn't have any of the metadata you cited. So that doesn't answer my question. Nor is it practical to implement a builtin function using a "function object" and a "code object". So I'll ask you again: > Be specific. Let's say we remove __text_signature__. How do we > now write a C extension in a way that we can have introspection > information for its callables? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:47:25 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Feb 2014 10:47:25 +0000 Subject: [issue20498] Update StringIO newline tests In-Reply-To: <1391410655.69.0.384794659533.issue20498@psf.upfronthosting.co.za> Message-ID: <1391424445.47.0.867924237529.issue20498@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You forgot to add the patch :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:52:29 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 10:52:29 +0000 Subject: [issue20498] Update StringIO newline tests In-Reply-To: <1391410655.69.0.384794659533.issue20498@psf.upfronthosting.co.za> Message-ID: <1391424749.31.0.219132309267.issue20498@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed. Here is a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file33885/stringio_newline_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 11:59:01 2014 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 03 Feb 2014 10:59:01 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391425141.92.0.312721806564.issue17159@psf.upfronthosting.co.za> Stefan Behnel added the comment: > [...] a "builtin code object" (PyCFunctionObject) [...] doesn't have any of the metadata you cited. That exactly is the bug. I think we should take the further discussion offline, or move it to a new ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 12:11:46 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Mon, 03 Feb 2014 11:11:46 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391378657.6.0.445623565529.issue20481@psf.upfronthosting.co.za> Message-ID: <20140203111141.GC2213@gmail.com> Oscar Benjamin added the comment: It's not as simple as registering with an ABC. You also need to provide the interface that the ABC represents: >>> import sympy >>> r = sympy.Rational(1, 2) >>> r 1/2 >>> r.numerator Traceback (most recent call last): File "", line 1, in AttributeError: 'Half' object has no attribute 'numerator' AFAIK there are no plans by any third part libraries to increase their inter-operability with the numeric tower. My point is that in choosing what types to accept and how to coerce them you should focus on actual practical benefits rather than theoretical ones. If it can be done in a way that means it works for more numeric types then that's great. But when I say "works" I mean that it should ideally achieve the best possible accuracy for each type. If that's not possible then it might be simplest to just document how it works for combinations of the std lib types (and perhaps subclasses thereof) and then say that it will fall back on coercing to float for anything else. This approach is simpler to document and for end-users to understand. It also has the benefit that it will work for all non std lib types (that I'm aware of) without pretending to achieve more accuracy than it can. >>> import sympy, fractions, gmpy >>> fractions.Fraction(sympy.Rational(1, 2)) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/fractions.py", line 148, in __new__ raise TypeError("argument should be a string " TypeError: argument should be a string or a Rational instance >>> float(sympy.Rational(1, 2)) 0.5 >>> fractions.Fraction(gmpy.mpq(1, 2)) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/fractions.py", line 148, in __new__ raise TypeError("argument should be a string " TypeError: argument should be a string or a Rational instance >>> float(gmpy.mpq(1, 2)) 0.5 Coercion to float via __float__ is well supported in the Python ecosystem. Consistent support for getting exact integer ratios is (unfortunately) not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 12:18:18 2014 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 03 Feb 2014 11:18:18 +0000 Subject: [issue20405] Add io.BinaryTransformWrapper and a "transform" parameter to open() In-Reply-To: <1391390662.9.0.561173282379.issue20405@psf.upfronthosting.co.za> Message-ID: <52EF7AF6.30802@egenix.com> Marc-Andre Lemburg added the comment: On 03.02.2014 02:24, STINNER Victor wrote: > > STINNER Victor added the comment: > >> Ever used "recode" ? > > No, what is it? I once used iconv for short tests, but I never required iconv to convert a real document. It's a command line tool to convert documents in various encodings to other encodings: http://recode.progiciels-bpi.ca/index.html https://github.com/pinard/Recode It's similar to iconv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 12:34:08 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 11:34:08 +0000 Subject: [issue20405] Add io.BinaryTransformWrapper and a "transform" parameter to open() In-Reply-To: <1390800279.91.0.834285021962.issue20405@psf.upfronthosting.co.za> Message-ID: <1391427248.19.0.390465307278.issue20405@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We already have stackable pieces for gzip, bz2 and lzma compressed streams -- GzipFile, BZ2File and LZMAFile. They are more powerful and more efficient than generic codecs.StreamReader/codecs.StreamWriter (and note that most binary codecs are just don't work correctly with codecs streams). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 12:38:41 2014 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 03 Feb 2014 11:38:41 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1391425141.92.0.312721806564.issue17159@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Stefan is suggesting that rather than emulating the Python signature line (which is a concise human readable notation that with the PEP 457 tweaks will handle even the most obscure custom argument parsing, whether that parsing is implemented in C or in Python), it would make more sense to instead emulate the confusing jumble of CPython implementation details exposed by Python level function and code objects. That ducktyping has been the traditional way to support signature introspection for anyone that didn't have the ability to change how the inspect module works. However, I'm not sure *how* generating and storing an assortment of hard to interpret lists and strings and mappings would qualify as being simpler than generating and storing a single string that is only converted into real signature data if requested. Once __text_signature__ becomes a public API in 3.5 (as part of PEP 457), inspect shouldn't need to special case any type ever again: it will be up to the type to set __text_signature__ properly instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 13:09:30 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Feb 2014 12:09:30 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1360336830.78.0.208941087191.issue17159@psf.upfronthosting.co.za> Message-ID: <1391429370.91.0.494058569.issue17159@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I understand Stefan to (reasonably) want 1 api instead of 2. He imagined that the only way to do that would be for everything to at least partially imitate the old methods. Larry and Nick are suggesting instead that everything should adopt the implementation-independent new method. Sounds right to me. So further discussion should be about PEP 457, elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 13:14:21 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 03 Feb 2014 12:14:21 +0000 Subject: [issue20368] Tkinter: handle the null character In-Reply-To: <1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> Message-ID: <1391429661.13.0.150812831136.issue20368@psf.upfronthosting.co.za> Terry J. Reedy added the comment: With the additional tests, it seems reasonable to apply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 13:14:29 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Mon, 03 Feb 2014 12:14:29 +0000 Subject: [issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module In-Reply-To: <1390653440.27.0.247965137131.issue20389@psf.upfronthosting.co.za> Message-ID: <1391429669.55.0.257071125657.issue20389@psf.upfronthosting.co.za> Oscar Benjamin added the comment: I agree that the current wording in the doc-strings is ambiguous. It should be more careful to distinguish between mu : true/population mean xbar : estimated/sample mean I disagree that the keyword arguments should be made the same. There is an important conceptual difference between these two things that the user needs to be aware of and mu, xbar - as symbols rather than ascii characters - are widely used for this. See e.g. this Wikipedia entry (although it uses ybar instead of xbar): http://en.wikipedia.org/wiki/Variance#Population_variance ---------- nosy: +oscarbenjamin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 13:39:26 2014 From: report at bugs.python.org (Suzumizaki) Date: Mon, 03 Feb 2014 12:39:26 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391431166.71.0.540702393679.issue20485@psf.upfronthosting.co.za> Suzumizaki added the comment: Thanks for taking into account this issue for PEP 451. Honestly to say, I can't imagine why or/and how this issue(or my patches) causes any problems especially compatibility issues. If someone can point them, I will try to resolve. Note that I extend only the definition of "PyInit_xxxx". I don't touch the code for loading modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 13:46:19 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Mon, 03 Feb 2014 12:46:19 +0000 Subject: [issue20499] Rounding errors with statistics.variance Message-ID: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> New submission from Oscar Benjamin: The mean/variance functions in the statistics module don't quite round correctly. The reasons for this are that although exact rational arithmetic is used internally in the _sum function it is not used throughout the module. In particular the _sum function should be changed to return an exact result and exact arithmetic should be used right up to the point before returning to the user at which point a rounding/coercion should be used to give the user their answer in the appropriate type correctly rounded once. Using exact arithmetic everywhere makes it possible to replace all of the variance* functions with single-pass algorithms based on the computational formula for variance which should be more efficient as well. For example the following implements pvariance so that it returns a perfectly rounded result for float input and output in a single pass: def pvariance(data): sx = 0 sx2 = 0 for n, x in enumerate(map(Fraction, data), 1): sx += x sx2 += x ** 2 Ex = sx / n Ex2 = sx2 / n var = Ex2 - Ex ** 2 return float(var) Comparing the above with the statistics module: >>> pvariance([0, 0, 1]) 0.2222222222222222 >>> statistics.pvariance([0, 0, 1]) 0.22222222222222224 The true answer is: >>> from fractions import Fraction as F >>> float(statistics.pvariance([F(0), F(0), F(1)])) 0.2222222222222222 The logic in the _sum function for computing exact integer ratios and coercing back to the output type could be moved into utility functions so that it does not need to be duplicated. Some examples of rounding issues: >>> from statistics import variance, mean >>> from decimal import Decimal as D, getcontext >>> from fractions import Fraction as F Variance with ints or floats returns a float but the float is not quite the nearest possible float: >>> variance([0, 0, 2]) 1.3333333333333335 >>> float(variance([F(0), F(0), F(2)])) # true result rounded once 1.3333333333333333 Another example with Decimal: >>> getcontext().prec = 5 >>> getcontext() Context(prec=5, rounding=ROUND_HALF_EVEN, Emin=-999999999, Emax=999999999, capitals=1, clamp=0, flags=[Rounded, Inexact], traps=[DivisionByZero, Overflow, InvalidOperation]) >>> variance([D(0), D(0), D(2)] * 2) # Rounded down instead of up Decimal('1.0666') >>> r = (variance([F(0), F(0), F(2)] * 2)) >>> D(r.numerator) / r.denominator # Correctly rounded Decimal('1.0667') The mean function may also not be correctly rounded: >>> getcontext().prec = 2 >>> r = mean((F('1.2'), F('1.3'), F('1.55'))) >>> r Fraction(27, 20) >>> D(r.numerator) / r.denominator # Correctly rounded Decimal('1.4') >>> mean([D('1.2'), D('1.3'), D('1.55')]) Decimal('1.3') ---------- components: Library (Lib) messages: 210121 nosy: oscarbenjamin, stevenjd priority: normal severity: normal status: open title: Rounding errors with statistics.variance versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 13:53:07 2014 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 03 Feb 2014 12:53:07 +0000 Subject: [issue17159] Remove explicit type check from inspect.Signature.from_function() In-Reply-To: <1391429370.91.0.494058569.issue17159@psf.upfronthosting.co.za> Message-ID: <52EF9132.1080608@behnel.de> Stefan Behnel added the comment: > I understand Stefan to (reasonably) want 1 api instead of 2. Absolutely. However, I guess the underlying reasoning here is that there are other callables, too, so it's not worth making just two kinds of them look the same, even if both are functions and even if both are part of CPython itself. As soon as there is easy-to-use support for annotations in C implemented functions (for use outside of CPython and Cython), I'll agree that the need for changing anything in CPython's builtin functions type isn't really worth bothering about any more in the future, given that the Signature object is the designated unifying API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 14:07:09 2014 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 03 Feb 2014 13:07:09 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit Message-ID: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> New submission from Xavier de Gaye: The following code crashes python with: python: Objects/object.c:512: PyObject_Str: Assertion `!PyErr_Occurred()' failed. on the tip of the default branch, but not on python 3.3.3. import sys error = None try: raise ValueError('some text') except ValueError as err: error = err if error: sys.exit(error) ---------- components: Interpreter Core messages: 210123 nosy: xdegaye priority: normal severity: normal status: open title: assertion failed when passing an exception object to sys.exit type: crash versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 14:14:04 2014 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 03 Feb 2014 13:14:04 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391431166.71.0.540702393679.issue20485@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: As Victor noted, inventing our own encoding scheme just for this use case isn't desirable, although it's certainly a good fallback option that will ensure the feature remains feasible even if trying to handle the Unicode issues at the C compiler level proves too challenging. The other aspect is that changes to the extension module initialisation API always need to go into a PEP regardless, since we need to ensure such changes are usable for both handwritten extensions and extension module generators like Cython, cffi and SWIG. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 14:34:36 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 13:34:36 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391434476.41.0.346514585401.issue20485@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, the topic was already discussed some years ago. Start: https://mail.python.org/pipermail/python-dev/2011-May/111279.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 14:42:32 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 03 Feb 2014 13:42:32 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <1391434952.17.0.157131604675.issue20500@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +haypo, larry priority: normal -> release blocker stage: -> needs patch versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:18:32 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Mon, 03 Feb 2014 14:18:32 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391437112.83.0.120173052499.issue20481@psf.upfronthosting.co.za> Wolfgang Maier added the comment: > there are currently two strict requirements for any numeric type to be usable with statistics._sum: I meant *three* of course (remembered one only during writing). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:22:25 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 14:22:25 +0000 Subject: [issue20473] inspect.Signature no longer handles builtin classes correctly In-Reply-To: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> Message-ID: <1391437345.43.0.897913528131.issue20473@psf.upfronthosting.co.za> Larry Hastings added the comment: > > Also also, I remember specifically that the isinstance(type) code > > would fail builtin classes. > > Could you please find an example of this? This was during the development of the original feature. I changed the if statement for the from_builtin() call so it'd accept type objects too. But it never got a chance to see any, because the check for type objects above it would see that it was a type, see that it was a builtin type, and raise an exception. That's why I moved the if statement with the from_builtin() call to the top of the function, so it would get the first chance to examine the callable. This was just historical context, and I'm sure you already solved the problem in an equivalent way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:14:17 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Mon, 03 Feb 2014 14:14:17 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391436857.76.0.349026313343.issue20481@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Just to make sure that this discussion is not getting on the wrong track, there are currently two strict requirements for any numeric type to be usable with statistics._sum: (1) the type has to provide either - numerator/denominator properties or - an as_integer_ratio method or - an as_tuple method that mimicks the Decimal method of that name this requirement comes from statistics._exact_ratio. This is where, for example, the sympy numeric types fail because they do not provide any of these interfaces. **************** For completeness, this is the code of this function: def _exact_ratio(x): """Convert Real number x exactly to (numerator, denominator) pair. >>> _exact_ratio(0.25) (1, 4) x is expected to be an int, Fraction, Decimal or float. """ try: try: # int, Fraction return (x.numerator, x.denominator) except AttributeError: # float try: return x.as_integer_ratio() except AttributeError: # Decimal try: return _decimal_to_ratio(x) except AttributeError: msg = "can't convert type '{}' to numerator/denominator" raise TypeError(msg.format(type(x).__name__)) from None except (OverflowError, ValueError): # INF or NAN if __debug__: # Decimal signalling NANs cannot be converted to float :-( if isinstance(x, Decimal): assert not x.is_finite() else: assert not math.isfinite(x) return (x, None) ***************** (2) Essentially, the numerator and the denominator returned by _exact_ratio have to be valid arguments for the Fraction constructor. This is a consequence of this block of code in _sum: for d, n in sorted(partials.items()): total += Fraction(n, d) Of note, Fraction(n, d) requires both arguments to be members of numbers.Rational and this is where, for example, the gmpy.mpq type fails. (3) The type's constructor has to work with a Fraction argument. This is because _sum tries to return T(total) # where T is the coerced type and total the calculated sum as a Fraction The gmpy.mpq type, for example, fails at this step again. ACTUALLY: THIS SHOULD BE RAISED AS ITS OWN ISSUE HERE as soon as the coercion part is settled because it means that _sum may succeed with certain mixed input types even though some of the same types may fail, when they are the only type. IMPORTANTLY, neither requirement has anything to do with the module's type coercion, which is the topic of this discussion. IN ADDITION, the proposed patch involving _coerce_types adds the following (soft) requirement: in order to be able to coerce a sequence of numbers of mixed numeric types without loss of precision all involved types need to be integrated into the hierarchy of numeric abstract base classes as defined in the numbers module (otherwise all types are coerced to float). >From this it should be clear that the compatibility bottleneck is not in this patch, but in other parts of the module. What is more, if a custom numeric type implements the numerator/denominator properties, then it is simple enough to register it as a virtual subclass of numbers.Rational or .Integral to enable lossless coercion in the presence of mixed types. Example with gmpy2 numeric type: >>> from gmpy2 import mpq # mpq is gmpy's Fraction equivalent >>> import numbers >>> numbers.Rational.register(type(mpq())) >>> r = mpq(7,5) >>> type(r) >>> issubclass(type(r), numbers.Rational) True => the mpq type could now be coerced correctly even in mixed input types situations, but remains incompatible with _sum for reasons (2) and (3). SUMMARY: Making _sum work with custom types is very complicated, BUT: this is not due to type coercion as it is discussed here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:24:14 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 14:24:14 +0000 Subject: [issue16074] Bad error message in os.rename, os.link, and os.symlink In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1391437454.83.0.962691834348.issue16074@psf.upfronthosting.co.za> Larry Hastings added the comment: As release manager, I would be willing to consider this patch. However, as original author of the code in question, I don't like it. Showing zero filenames, while potentially less confusing, is also far less helpful. A better solution would be to show both filenames. This would require changing the OSError exception, and adding some new PyErr_ API calls. I'm now working on a patch to do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:27:33 2014 From: report at bugs.python.org (Gunnar Aastrand Grimnes) Date: Mon, 03 Feb 2014 14:27:33 +0000 Subject: [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded Message-ID: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> New submission from Gunnar Aastrand Grimnes: When reading large files with fileinput, it will work as expected and only process a line at a time when used normally, but if you add an hook_encoded openhook it will read the whole file into memory before returning the first line. Verify by running this program on a large text file: import fileinput for l in fileinput.input(openhook=fileinput.hook_encoded('iso-8859-1')): raw_input() and check how much memory it uses. Remove the openhook and memory usage goes down to nothing. ---------- components: IO messages: 210130 nosy: gromgull priority: normal severity: normal status: open title: fileinput module will read whole file into memory when using fileinput.hook_encoded type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:28:52 2014 From: report at bugs.python.org (Mauricio de Alencar) Date: Mon, 03 Feb 2014 14:28:52 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark Message-ID: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> New submission from Mauricio de Alencar: The following code demonstrates an inconsistency of this method in dealing with zeros after the decimal mark. from decimal import Context context = Context(prec=2) for x in [100., 10., 1., 0.1]: print(context.create_decimal_from_float(x), context.create_decimal_from_float(4.56*x)) Produces the output: 1.0E+2 4.6E+2 10 46 1 4.6 0.10 0.46 Line 3 is inconsistent. It should be "1.0 4.6". ---------- messages: 210131 nosy: mdealencar priority: normal severity: normal status: open title: Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:46:28 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 14:46:28 +0000 Subject: [issue20384] os.open() exception doesn't contain file name on Windows In-Reply-To: <1390592079.62.0.820816905232.issue20384@psf.upfronthosting.co.za> Message-ID: <1391438788.27.0.651466310472.issue20384@psf.upfronthosting.co.za> Larry Hastings added the comment: If it's fixed in 3.4, then the first step would be to ask Georg if he will accept a fix for 3.3. If he will not, then we don't need to go any further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:55:51 2014 From: report at bugs.python.org (Gunnar Aastrand Grimnes) Date: Mon, 03 Feb 2014 14:55:51 +0000 Subject: [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391439351.31.0.367422318338.issue20501@psf.upfronthosting.co.za> Gunnar Aastrand Grimnes added the comment: The problem lies in codecs.py here: http://hg.python.org/cpython/file/ae7facd874ba/Lib/codecs.py#l581 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:56:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 14:56:23 +0000 Subject: [issue20384] os.open() exception doesn't contain file name on Windows In-Reply-To: <1391438788.27.0.651466310472.issue20384@psf.upfronthosting.co.za> Message-ID: <1391439381.65401.YahooMailNeo@web172405.mail.ir2.yahoo.com> Mark Lawrence added the comment: Good afternoon, Would you please be kind enough to have my name removed from all nosy lists as I've no interest in being constantly reminded that I've been called a liar. Kindest regards. Mark Lawrence. On Monday, 3 February 2014, 14:46, Larry Hastings wrote: >Larry Hastings added the comment: > >If it's fixed in 3.4, then the first step would be to ask Georg if he will accept a fix for 3.3.? If he will not, then we don't need to go any further. > >---------- > >_______________________________________ >Python tracker > >_______________________________________ > > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 15:56:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 14:56:23 +0000 Subject: [issue20384] os.open() exception doesn't contain file name on Windows In-Reply-To: <1391438788.27.0.651466310472.issue20384@psf.upfronthosting.co.za> Message-ID: <1391439381.65401.YahooMailNeo@web172405.mail.ir2.yahoo.com> Mark Lawrence added the comment: Good afternoon, Would you please be kind enough to have my name removed from all nosy lists as I've no interest in being constantly reminded that I've been called a liar. Kindest regards. Mark Lawrence. On Monday, 3 February 2014, 14:46, Larry Hastings wrote: >Larry Hastings added the comment: > >If it's fixed in 3.4, then the first step would be to ask Georg if he will accept a fix for 3.3.? If he will not, then we don't need to go any further. > >---------- > >_______________________________________ >Python tracker > >_______________________________________ > > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:10:12 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 15:10:12 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391440212.83.0.0964971743029.issue20489@psf.upfronthosting.co.za> Larry Hastings added the comment: Nope, we can't fix it in zlib. As far as I can tell, the problem is that method_get() in descrobject.c passes in NULL for the module to PyCFunction_NewEx(). method_get gets the type as part of the descriptor protocol, but type objects in C don't appear to have a module pointer. Module objects in Python do seem to, so maybe we can get it from somewhere? If we can't fix this, we'll have to go back to expressly writing the name of the module in the expression ("zlib.Z_FINISH"). I assume changing the expression to use Z_FINISH (etc) makes it work again? I'm calling in Nick, maybe he'll know what to do. Nick: default values in text signatures allow simple expressions. inspect.Signature looks up the values of constant-ish things like "sys.maxsize". It allows you to name constants from the local module without the module name first; it gets the module using the __module__ attribute on the callable. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:13:49 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Mon, 03 Feb 2014 15:13:49 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391436857.76.0.349026313343.issue20481@psf.upfronthosting.co.za> Message-ID: <20140203151344.GA4194@gmail.com> Oscar Benjamin added the comment: I agree that supporting non-stdlib types is in some ways a separate issue from how to manage coercion with mixed stdlib types. Can you provide a complete patch (e.g. hg diff > coerce_types.patch). http://docs.python.org/devguide/ There should probably also be tests added for situations where the current implementation behaves undesirably. Something like these ones: http://hg.python.org/cpython/file/a97ce3ecc96a/Lib/test/test_statistics.py#l1445 Note that when I said non-stdlib types can be handled by coercing to float I didn't mean that the output should be coerced to float but rather the input should be coerced to float because __float__ is the most consistent interface available on third party numeric types. Once the input numbers are converted to float statistics._sum can handle them perfectly well. In this case I think the output should also be a float so that it's clear that precision may have been lost. If the precision of float is not what the user wants then the documentation can point them toward Fraction/Decimal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:17:56 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 15:17:56 +0000 Subject: [issue20384] os.open() exception doesn't contain file name on Windows In-Reply-To: <1390592079.62.0.820816905232.issue20384@psf.upfronthosting.co.za> Message-ID: <1391440676.87.0.100051115658.issue20384@psf.upfronthosting.co.za> Larry Hastings added the comment: Mark Lawrence: you can remove it yourself, by directly editing the "nosy" list on the page for the bug. If you want to remove yourself from all issues on the tracker, click on the "Followed by you" link on the left side and work your way down the list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:19:58 2014 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 03 Feb 2014 15:19:58 +0000 Subject: [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1391440798.29.0.299964102677.issue14911@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Here's one for 2.7. I'm still looking at 3. The funny thing is that the signature of generator.throw reflects 2.x conventions. I'm figuring out if it can be used with the .with_traceback() idiom ---------- keywords: +patch Added file: http://bugs.python.org/file33886/throw27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:32:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:32:07 +0000 Subject: [issue20384] os.open() exception doesn't contain file name on Windows In-Reply-To: <1390592079.62.0.820816905232.issue20384@psf.upfronthosting.co.za> Message-ID: <1391441527.3.0.0539126833657.issue20384@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Larry - thank you for the heads up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:33:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:33:02 +0000 Subject: [issue20384] os.open() exception doesn't contain file name on Windows In-Reply-To: <1390592079.62.0.820816905232.issue20384@psf.upfronthosting.co.za> Message-ID: <1391441582.06.0.807288141134.issue20384@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:33:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:33:39 +0000 Subject: [issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified In-Reply-To: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> Message-ID: <1391441619.31.0.554057768978.issue7325@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:34:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:34:02 +0000 Subject: [issue1353344] python.desktop Message-ID: <1391441642.72.0.407791715639.issue1353344@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:34:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:34:47 +0000 Subject: [issue7262] codecs.open() + eol (windows) In-Reply-To: <1257344010.52.0.739143662559.issue7262@psf.upfronthosting.co.za> Message-ID: <1391441687.03.0.551520959896.issue7262@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:35:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:35:18 +0000 Subject: [issue7776] http.client.HTTPConnection tunneling is broken In-Reply-To: <1264394042.86.0.571652227077.issue7776@psf.upfronthosting.co.za> Message-ID: <1391441718.85.0.498795514668.issue7776@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:35:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:35:56 +0000 Subject: [issue20399] Comparison of memoryview In-Reply-To: <1390768657.21.0.774991286622.issue20399@psf.upfronthosting.co.za> Message-ID: <1391441756.5.0.172255076746.issue20399@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:36:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:36:15 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1391441775.81.0.531718114795.issue19145@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:36:34 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:36:34 +0000 Subject: [issue20335] bytes constructor accepts more than one argument even if the first one is not a string In-Reply-To: <1390340737.95.0.677221459573.issue20335@psf.upfronthosting.co.za> Message-ID: <1391441794.65.0.927617522373.issue20335@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:36:42 2014 From: report at bugs.python.org (Gerrit Holl) Date: Mon, 03 Feb 2014 15:36:42 +0000 Subject: [issue20503] super behavioru and abstract base classes (either implementation or documentation/error message is wrong) Message-ID: <1391441802.61.0.557224247712.issue20503@psf.upfronthosting.co.za> New submission from Gerrit Holl: When using an abstract base class, super(type, obj) throws a TypeError stating "obj must be an instance (...) of type", even though isinstance(obj, type) returns True. I'm not sure what is supposed to happen here, but either the error message and the documentation for super would need to be reformulated, or there is an issue with the implementation, or I am misunderstanding something. Python 3.3.3 (default, Dec 12 2013, 11:13:02) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numbers >>> super(numbers.Number, 0) Traceback (most recent call last): File "", line 1, in TypeError: super(type, obj): obj must be an instance or subtype of type >>> isinstance(0, numbers.Number) True ---------- components: Interpreter Core messages: 210141 nosy: Gerrit.Holl priority: normal severity: normal status: open title: super behavioru and abstract base classes (either implementation or documentation/error message is wrong) versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:36:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:36:52 +0000 Subject: [issue20266] Bring Doc/faq/windows up to date In-Reply-To: <1389758449.02.0.48240700444.issue20266@psf.upfronthosting.co.za> Message-ID: <1391441812.55.0.842168760451.issue20266@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:37:09 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:37:09 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1391441829.86.0.0956976965324.issue1776674@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:37:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:37:37 +0000 Subject: [issue6128] Consequences of using Py_TPFLAGS_HAVE_GC are incompletely explained In-Reply-To: <1243457336.14.0.579311647458.issue6128@psf.upfronthosting.co.za> Message-ID: <1391441857.95.0.44334004163.issue6128@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:37:55 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:37:55 +0000 Subject: [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1391441875.83.0.249944169436.issue19548@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:38:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:38:19 +0000 Subject: [issue15027] Faster UTF-32 encoding In-Reply-To: <1339077451.46.0.686170991807.issue15027@psf.upfronthosting.co.za> Message-ID: <1391441899.4.0.36552539795.issue15027@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:38:36 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:38:36 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1391441916.57.0.911960655871.issue2943@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:39:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:39:10 +0000 Subject: [issue20047] bytearray partition bug In-Reply-To: <1387655561.39.0.594856092375.issue20047@psf.upfronthosting.co.za> Message-ID: <1391441950.93.0.733604052147.issue20047@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:39:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:39:35 +0000 Subject: [issue20467] Confusing wording about __init__ In-Reply-To: <1391208094.95.0.178232051767.issue20467@psf.upfronthosting.co.za> Message-ID: <1391441975.87.0.580351497297.issue20467@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:39:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:39:58 +0000 Subject: [issue4492] httplib code thinks it closes connection, but does not In-Reply-To: <1228241719.92.0.946688230988.issue4492@psf.upfronthosting.co.za> Message-ID: <1391441998.27.0.361763104278.issue4492@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:40:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:40:15 +0000 Subject: [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <1391442015.17.0.914659371561.issue19980@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:40:34 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 03 Feb 2014 15:40:34 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391442034.36.0.521217307943.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the updated patch addressing Zachary's reviews (Thanks!). However, there are some reviews that I could not implement. 1. "This is a good candidate for a custom return converter." I can not synchronize struct rlimit and NULL return values. 2. "Should be 'class float "PyFloatObject *" "&PyFloat_Type"'. Using PyFloatObject * instead of PyObject * may require some casts to PyObject * in some places, but it's better to use the real name." I tried it but it was like opening pandora box. It's too much effort to surpress compile errors and warnings. And casting PyFloatObject to PyObject in many places, such as functions, macros, makes me nervous. I think this one deserves a dedicated ticket. ---------- Added file: http://bugs.python.org/file33887/issue20185_conglomerate_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:40:36 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:40:36 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1391442036.52.0.677726236652.issue1100942@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:41:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:41:32 +0000 Subject: [issue777588] asyncore is broken for windows if connection is refused Message-ID: <1391442092.77.0.872355248348.issue777588@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:41:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:41:59 +0000 Subject: [issue8075] Windows (Vista/7) install error when choosing to compile .py files In-Reply-To: <1267832622.74.0.429526645693.issue8075@psf.upfronthosting.co.za> Message-ID: <1391442119.13.0.95373263333.issue8075@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:42:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:42:18 +0000 Subject: [issue2175] Expat sax parser silently ignores the InputSource protocol In-Reply-To: <1203861783.69.0.636987169656.issue2175@psf.upfronthosting.co.za> Message-ID: <1391442138.52.0.54313845281.issue2175@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:42:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:42:39 +0000 Subject: [issue19104] pprint produces invalid output for long strings In-Reply-To: <1380289250.98.0.0529515271695.issue19104@psf.upfronthosting.co.za> Message-ID: <1391442159.78.0.551531273161.issue19104@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:42:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:42:56 +0000 Subject: [issue4037] doctest.py should include method descriptors when looking inside a class __dict__ In-Reply-To: <1223079206.04.0.17382541424.issue4037@psf.upfronthosting.co.za> Message-ID: <1391442176.59.0.954359869572.issue4037@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:43:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:43:15 +0000 Subject: [issue504219] locale.resetlocale is broken Message-ID: <1391442195.36.0.357705059635.issue504219@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:43:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:43:31 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1391442211.79.0.43256213183.issue4945@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:43:50 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:43:50 +0000 Subject: [issue6501] Fatal error on startup with invalid PYTHONIOENCODING In-Reply-To: <1247826105.17.0.941734297485.issue6501@psf.upfronthosting.co.za> Message-ID: <1391442230.13.0.554339462195.issue6501@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:44:09 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:44:09 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1391442249.77.0.437661654966.issue7105@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:44:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:44:32 +0000 Subject: [issue4727] copyreg doesn't support keyword only arguments in __new__ In-Reply-To: <1229999703.52.0.11232958698.issue4727@psf.upfronthosting.co.za> Message-ID: <1391442272.61.0.982083817125.issue4727@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:44:48 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:44:48 +0000 Subject: [issue14910] argparse: disable abbreviation In-Reply-To: <1337943742.57.0.897347214609.issue14910@psf.upfronthosting.co.za> Message-ID: <1391442288.48.0.336500103686.issue14910@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:45:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:45:08 +0000 Subject: [issue19655] Replace the ASDL parser carried with CPython In-Reply-To: <1384869696.09.0.547082157855.issue19655@psf.upfronthosting.co.za> Message-ID: <1391442308.84.0.396167448005.issue19655@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:45:30 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:45:30 +0000 Subject: [issue1208730] expat binding for XML_ParserReset Message-ID: <1391442330.47.0.65732805607.issue1208730@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:45:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:45:59 +0000 Subject: [issue3802] smtpd.py __getaddr insufficient handling In-Reply-To: <1220849998.55.0.777734204126.issue3802@psf.upfronthosting.co.za> Message-ID: <1391442359.14.0.176288747218.issue3802@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:46:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:46:18 +0000 Subject: [issue1098749] Single-line option to pygettext.py Message-ID: <1391442378.21.0.71141897449.issue1098749@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:46:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:46:47 +0000 Subject: [issue2213] build_tkinter.py does not handle paths with spaces In-Reply-To: <1204331742.92.0.0412981555519.issue2213@psf.upfronthosting.co.za> Message-ID: <1391442407.27.0.455988369697.issue2213@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:47:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:47:10 +0000 Subject: [issue1763] Get path to shell/known folders on Windows In-Reply-To: <1199812378.67.0.278096816271.issue1763@psf.upfronthosting.co.za> Message-ID: <1391442430.18.0.456666140055.issue1763@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:47:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:47:28 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1391442448.79.0.402023828551.issue2889@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:47:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:47:57 +0000 Subject: [issue7442] _localemodule.c: str2uni() with different LC_NUMERIC and LC_CTYPE In-Reply-To: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za> Message-ID: <1391442477.98.0.0377456173727.issue7442@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:47:59 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Mon, 03 Feb 2014 15:47:59 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391442479.98.0.182052262626.issue20481@psf.upfronthosting.co.za> Wolfgang Maier added the comment: > Once the input numbers are converted to float statistics._sum can handle > them perfectly well. In this case I think the output should also be a float so > that it's clear that precision may have been lost. If the precision of float is not > what the user wants then the documentation can point them toward > Fraction/Decimal. Ah, I'm getting it now. That is actually a very interesting thought. Still I don't think this should be part of this issue discussion, but I'll think about it and file a new enhancement issue if I have an idea. As for providing the complete patch, I can do that I guess, but formulating the tests may take a while. I'll try to do it though, if Steven thinks it's worth it. After all he's the one who'd have to approve it and the patch does alter his design quite a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:48:20 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:48:20 +0000 Subject: [issue6159] Tkinter.PanedWindow: docstring fixes, change in paneconfigure and removed some returns In-Reply-To: <1243812482.01.0.481805459937.issue6159@psf.upfronthosting.co.za> Message-ID: <1391442500.06.0.875514084529.issue6159@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:48:35 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 03 Feb 2014 15:48:35 +0000 Subject: [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391442515.16.0.991243677509.issue20501@psf.upfronthosting.co.za> R. David Murray added the comment: This requires (1) a doc update to indicate the problem and (2) a way to tell fileinput to *not* use readlines to optimize by calling readlines(bufsize), since in the case of using codecs it can be a problem. Presumably buffer=None would be the logical way to spell this. I'm marking this as a doc bug, a separate issue should be opened for adding the fileinput buffer=None enhancement. (The codec module's comments indicate there's no practical way to implement sizehint.) ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, r.david.murray versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:48:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:48:41 +0000 Subject: [issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure In-Reply-To: <1244325396.24.0.788727463424.issue6225@psf.upfronthosting.co.za> Message-ID: <1391442521.91.0.286329768498.issue6225@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:48:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:48:59 +0000 Subject: [issue6181] Tkinter.Listbox several minor issues In-Reply-To: <1243977899.25.0.845872446641.issue6181@psf.upfronthosting.co.za> Message-ID: <1391442539.57.0.0726097236898.issue6181@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:49:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:49:17 +0000 Subject: [issue4350] Remove dead code from Tkinter.py In-Reply-To: <1227053659.32.0.711141995765.issue4350@psf.upfronthosting.co.za> Message-ID: <1391442557.85.0.668149821782.issue4350@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:49:34 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:49:34 +0000 Subject: [issue16037] httplib: header parsing is unlimited In-Reply-To: <1348568722.91.0.654032066819.issue16037@psf.upfronthosting.co.za> Message-ID: <1391442574.24.0.0390270814519.issue16037@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:49:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:49:49 +0000 Subject: [issue1887] distutils doesn't support out-of-source builds In-Reply-To: <1200961919.23.0.699852435444.issue1887@psf.upfronthosting.co.za> Message-ID: <1391442589.48.0.19592646793.issue1887@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:50:03 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:50:03 +0000 Subject: [issue5717] os.defpath includes unix /bin on windows In-Reply-To: <1239116630.78.0.64068842306.issue5717@psf.upfronthosting.co.za> Message-ID: <1391442603.09.0.726112716368.issue5717@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:50:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:50:18 +0000 Subject: [issue6335] Add support for mingw In-Reply-To: <1245849042.65.0.399048729588.issue6335@psf.upfronthosting.co.za> Message-ID: <1391442618.53.0.222458260124.issue6335@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:50:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:50:32 +0000 Subject: [issue7757] sys.path is incorrect when prefix is "" In-Reply-To: <1264178776.01.0.552667161926.issue7757@psf.upfronthosting.co.za> Message-ID: <1391442632.68.0.688699009986.issue7757@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:50:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:50:47 +0000 Subject: [issue877121] configure detects incorrect compiler optimization Message-ID: <1391442647.48.0.494685426024.issue877121@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:51:04 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:51:04 +0000 Subject: [issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors In-Reply-To: <1197576817.5.0.617961278098.issue1615@psf.upfronthosting.co.za> Message-ID: <1391442664.65.0.74247052087.issue1615@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:51:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:51:18 +0000 Subject: [issue4080] unittest: display time used by each test case In-Reply-To: <1223497696.14.0.913391715353.issue4080@psf.upfronthosting.co.za> Message-ID: <1391442678.47.0.247143683831.issue4080@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:53:07 2014 From: report at bugs.python.org (Harlquinth) Date: Mon, 03 Feb 2014 15:53:07 +0000 Subject: [issue14512] Pydocs module docs server not working on Windows. In-Reply-To: <1333645625.74.0.578211515784.issue14512@psf.upfronthosting.co.za> Message-ID: <1391442787.18.0.729931658126.issue14512@psf.upfronthosting.co.za> Harlquinth added the comment: We're also having the same issue here as well - I will delete the shortcut as a temporary fix! Thanks, Hq. ---------- nosy: +Harlquinth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:57:37 2014 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 03 Feb 2014 15:57:37 +0000 Subject: [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1391443057.99.0.701436631032.issue14911@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: And 3.x ---------- Added file: http://bugs.python.org/file33888/3x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 17:02:10 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Feb 2014 16:02:10 +0000 Subject: [issue15027] Faster UTF-32 encoding In-Reply-To: <1339077451.46.0.686170991807.issue15027@psf.upfronthosting.co.za> Message-ID: <1391443330.52.0.208790121047.issue15027@psf.upfronthosting.co.za> Larry Hastings added the comment: BreamoreBoy: why did you remove Arfrever from this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 17:28:02 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 03 Feb 2014 16:28:02 +0000 Subject: [issue15027] Faster UTF-32 encoding In-Reply-To: <1339077451.46.0.686170991807.issue15027@psf.upfronthosting.co.za> Message-ID: <1391444882.89.0.999645883832.issue15027@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > BreamoreBoy: why did you remove Arfrever from this issue? Noisy lists members are sorted by alphabetical order: since Arfrever comes just before BreamoreBoy, I assume his fingers tripped ;-) ---------- nosy: +Arfrever, neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 17:56:16 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 16:56:16 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391446576.58.0.308765656646.issue20489@psf.upfronthosting.co.za> Yury Selivanov added the comment: One way, albeit ugly, would be to further extend __text_signature__ format, to allow something like: sig=(...);module=zlib ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:00:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:00:17 +0000 Subject: [issue15027] Faster UTF-32 encoding In-Reply-To: <1339077451.46.0.686170991807.issue15027@psf.upfronthosting.co.za> Message-ID: <1391446817.92.0.427325763224.issue15027@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:00:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:00:46 +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: <1391446846.5.0.418383926092.issue12558@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:01:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:01:02 +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: <1391446862.16.0.432286760675.issue6699@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:01:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:01:18 +0000 Subject: [issue917120] imaplib: incorrect quoting in commands Message-ID: <1391446878.68.0.680305874449.issue917120@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:01:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:01:35 +0000 Subject: [issue5166] ElementTree and minidom don't prevent creation of not well-formed XML In-Reply-To: <1233918825.25.0.360851750395.issue5166@psf.upfronthosting.co.za> Message-ID: <1391446895.67.0.852351680917.issue5166@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:01:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:01:52 +0000 Subject: [issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2 In-Reply-To: <1245269274.21.0.966496864817.issue6299@psf.upfronthosting.co.za> Message-ID: <1391446912.94.0.371422708838.issue6299@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:02:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:02:15 +0000 Subject: [issue1617161] Instance methods compare equal when their self's are equal Message-ID: <1391446935.58.0.121419652457.issue1617161@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:02:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:02:32 +0000 Subject: [issue1944] Documentation for PyUnicode_AsString (et al.) missing. In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1391446952.31.0.101285140767.issue1944@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:02:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:02:52 +0000 Subject: [issue734176] Make Tkinter.py's nametowidget work with cloned menu widgets Message-ID: <1391446972.98.0.480223180324.issue734176@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:03:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:03:07 +0000 Subject: [issue1257] atexit errors should result in nonzero exit code In-Reply-To: <1192046186.55.0.804669715206.issue1257@psf.upfronthosting.co.za> Message-ID: <1391446987.2.0.16381166541.issue1257@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:03:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:03:22 +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: <1391447002.76.0.962380898087.issue15721@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:03:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:03:39 +0000 Subject: [issue2528] Change os.access to check ACLs under Windows In-Reply-To: <1207059558.9.0.891835325783.issue2528@psf.upfronthosting.co.za> Message-ID: <1391447019.04.0.437220785873.issue2528@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:03:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:03:57 +0000 Subject: [issue17605] mingw-meta: build interpeter core In-Reply-To: <1364762524.12.0.901415822586.issue17605@psf.upfronthosting.co.za> Message-ID: <1391447037.87.0.0527886304137.issue17605@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:04:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:04:13 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1391447053.21.0.928262443324.issue3778@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:04:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:04:27 +0000 Subject: [issue7674] select.select() corner cases: duplicate fds, out-of-range fds In-Reply-To: <1263192751.1.0.719382931138.issue7674@psf.upfronthosting.co.za> Message-ID: <1391447067.43.0.852045125574.issue7674@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:04:41 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:04:41 +0000 Subject: [issue1521051] Allow passing DocTestRunner and DocTestCase in doctest Message-ID: <1391447081.42.0.680703175468.issue1521051@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:04:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:04:58 +0000 Subject: [issue9495] argparse unittest tracebacks are confusing if an error is raised when not expected In-Reply-To: <1280852518.56.0.709280463518.issue9495@psf.upfronthosting.co.za> Message-ID: <1391447098.39.0.501816614095.issue9495@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:05:12 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:05:12 +0000 Subject: [issue10615] Trivial mingw compile fixes In-Reply-To: <1291380362.46.0.195053370852.issue10615@psf.upfronthosting.co.za> Message-ID: <1391447112.93.0.187708505573.issue10615@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:05:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:05:26 +0000 Subject: [issue9849] Argparse needs better error handling for nargs In-Reply-To: <1284420312.86.0.187137843637.issue9849@psf.upfronthosting.co.za> Message-ID: <1391447126.89.0.174927746389.issue9849@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:05:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:05:40 +0000 Subject: [issue5124] IDLE - pasting text doesn't delete selection In-Reply-To: <1233514334.85.0.801099495729.issue5124@psf.upfronthosting.co.za> Message-ID: <1391447140.84.0.309005065874.issue5124@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:05:53 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:05:53 +0000 Subject: [issue896330] pyconfig.h is not placed in --includedir Message-ID: <1391447153.75.0.183435981765.issue896330@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:06:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:06:08 +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: <1391447168.25.0.271390991521.issue6386@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:06:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:06:23 +0000 Subject: [issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth) In-Reply-To: <1204223194.19.0.670418970441.issue2202@psf.upfronthosting.co.za> Message-ID: <1391447183.67.0.258168426968.issue2202@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:06:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:06:38 +0000 Subject: [issue6671] webbrowser doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1391447198.67.0.814341882152.issue6671@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:06:51 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:06:51 +0000 Subject: [issue1298813] sysmodule.c: realpath() is unsafe Message-ID: <1391447211.99.0.863588215032.issue1298813@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:07:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:07:14 +0000 Subject: [issue1703592] have a way to ignore nonexisting locales in locale.setlocale Message-ID: <1391447234.93.0.96859126418.issue1703592@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:07:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:07:29 +0000 Subject: [issue6461] multiprocessing: freezing apps on Windows In-Reply-To: <1247292508.31.0.803162103646.issue6461@psf.upfronthosting.co.za> Message-ID: <1391447249.29.0.868974167671.issue6461@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:07:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:07:43 +0000 Subject: [issue1159] os.getenv() not updated after external module uses C putenv() In-Reply-To: <1189668127.19.0.0258251668017.issue1159@psf.upfronthosting.co.za> Message-ID: <1391447263.91.0.973473484524.issue1159@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:08:03 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:08:03 +0000 Subject: [issue1524639] Fix Tkinter Tcl-commands memory-leaks Message-ID: <1391447283.6.0.229279047792.issue1524639@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:08:20 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:08:20 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1391447300.27.0.928420464632.issue2053@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:08:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:08:44 +0000 Subject: [issue1693050] \w not helpful for non-Roman scripts Message-ID: <1391447324.38.0.989043840448.issue1693050@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:09:04 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:09:04 +0000 Subject: [issue17846] Building Python on Windows - Supplementary info In-Reply-To: <1366919664.94.0.0931557904055.issue17846@psf.upfronthosting.co.za> Message-ID: <1391447344.59.0.942305285173.issue17846@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:09:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:09:19 +0000 Subject: [issue16895] Batch file to mimic 'make' on Windows In-Reply-To: <1357677821.21.0.151237367429.issue16895@psf.upfronthosting.co.za> Message-ID: <1391447359.49.0.262003072922.issue16895@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:09:36 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:09:36 +0000 Subject: [issue8508] 2to3 fixer for gettext's .ugettext In-Reply-To: <1272034086.61.0.0547716106043.issue8508@psf.upfronthosting.co.za> Message-ID: <1391447376.21.0.865610207534.issue8508@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:09:51 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:09:51 +0000 Subject: [issue5664] 2to3 wont convert Cookie.Cookie properly In-Reply-To: <1238642568.2.0.229238012255.issue5664@psf.upfronthosting.co.za> Message-ID: <1391447391.11.0.693051237856.issue5664@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:10:09 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:10:09 +0000 Subject: [issue672115] Assignment to __bases__ of direct object subclasses Message-ID: <1391447409.81.0.100540549503.issue672115@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:10:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:10:26 +0000 Subject: [issue1747670] Limiting data copy in xmlrpclib Message-ID: <1391447426.13.0.350911726637.issue1747670@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:10:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:10:44 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1391447444.16.0.364150127154.issue7940@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:10:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:10:57 +0000 Subject: [issue923697] SAX2 'property_encoding' feature not supported Message-ID: <1391447457.87.0.758924057655.issue923697@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:11:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:11:11 +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: <1391447471.59.0.198238466782.issue7951@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:11:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:11:37 +0000 Subject: [issue8191] Make arg0 required argument in os.execl* functions In-Reply-To: <1269195535.51.0.216283779059.issue8191@psf.upfronthosting.co.za> Message-ID: <1391447497.83.0.38356839442.issue8191@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:11:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:11:52 +0000 Subject: [issue766910] fix one or two bugs in trace.py Message-ID: <1391447512.79.0.189431753024.issue766910@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:12:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:12:08 +0000 Subject: [issue6483] Modules are not deallocated correctly if m_size = -1 In-Reply-To: <1247573035.84.0.508855898217.issue6483@psf.upfronthosting.co.za> Message-ID: <1391447528.88.0.720933883456.issue6483@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:12:24 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:12:24 +0000 Subject: [issue749722] isinstance and weakref proxies. Message-ID: <1391447544.63.0.614961632893.issue749722@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:12:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:12:40 +0000 Subject: [issue8238] Proxy handling In-Reply-To: <1269588795.92.0.67904846936.issue8238@psf.upfronthosting.co.za> Message-ID: <1391447560.83.0.0834939097807.issue8238@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:12:55 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:12:55 +0000 Subject: [issue6871] decimal.py: more format issues In-Reply-To: <1252512442.21.0.45305758987.issue6871@psf.upfronthosting.co.za> Message-ID: <1391447575.95.0.534491719993.issue6871@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:13:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:13:13 +0000 Subject: [issue7803] setup hangs on disk space requirements In-Reply-To: <1264761765.74.0.819824298395.issue7803@psf.upfronthosting.co.za> Message-ID: <1391447593.85.0.0494190849216.issue7803@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:13:36 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:13:36 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1391447616.82.0.340572391201.issue940286@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:13:53 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:13:53 +0000 Subject: [issue814253] Grouprefs in lookbehind assertions Message-ID: <1391447633.94.0.0734455093319.issue814253@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:14:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:14:10 +0000 Subject: [issue639266] Tkinter sliently discards all backgrond Tcl errors Message-ID: <1391447650.8.0.0407661203027.issue639266@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:35:14 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 17:35:14 +0000 Subject: [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1391448914.14.0.459106744383.issue14911@psf.upfronthosting.co.za> Yury Selivanov added the comment: I like the patches, except the example in 3x.diff. Please see the review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:39:48 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 17:39:48 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391449188.04.0.386466942063.issue20489@psf.upfronthosting.co.za> Yury Selivanov added the comment: > One way, albeit ugly, would be to further extend > __text_signature__ format, to allow something like: > > sig=(...);module=zlib OR sig=zlib.Compress.flush(...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:40:21 2014 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Feb 2014 17:40:21 +0000 Subject: [issue20488] importlib title and introduction are out of date In-Reply-To: <1391355718.64.0.231740167188.issue20488@psf.upfronthosting.co.za> Message-ID: <1391449221.79.0.261944046548.issue20488@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:42:03 2014 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 03 Feb 2014 17:42:03 +0000 Subject: [issue16895] Batch file to mimic 'make' on Windows In-Reply-To: <1357677821.21.0.151237367429.issue16895@psf.upfronthosting.co.za> Message-ID: <1391449323.16.0.558797041951.issue16895@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:45:57 2014 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Feb 2014 17:45:57 +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: <1391449557.67.0.41877158532.issue6386@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:48:11 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 17:48:11 +0000 Subject: [issue1298813] sysmodule.c: realpath() is unsafe Message-ID: <1391449691.06.0.816730261059.issue1298813@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:00:58 2014 From: report at bugs.python.org (Tal Einat) Date: Mon, 03 Feb 2014 18:00:58 +0000 Subject: [issue2213] build_tkinter.py does not handle paths with spaces In-Reply-To: <1204331742.92.0.0412981555519.issue2213@psf.upfronthosting.co.za> Message-ID: <1391450458.14.0.206427656605.issue2213@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:06:44 2014 From: report at bugs.python.org (Tal Einat) Date: Mon, 03 Feb 2014 18:06:44 +0000 Subject: [issue1524639] Fix Tkinter Tcl-commands memory-leaks Message-ID: <1391450804.65.0.110514339454.issue1524639@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:17:35 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 18:17:35 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391451455.61.0.176580213717.issue20489@psf.upfronthosting.co.za> Yury Selivanov added the comment: Attached is an experimental patch (issue20489_01.patch) that implements the idea of encoding full function name in its 'sig=' spec. Test file: import zlib import inspect print(zlib.compressobj().flush.__text_signature__) print(inspect.signature(zlib.compressobj().flush)) Output: zlib.Compress.flush($self, mode=Z_FINISH) (mode=4) And 'help(zlib.compressobj())' also works as expected. If you like this approach I can fine-tune the patch. ---------- keywords: +patch Added file: http://bugs.python.org/file33889/issue20489_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:21:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:21:39 +0000 Subject: [issue648658] xmlrpc can't do proxied HTTP Message-ID: <1391451699.4.0.760752847418.issue648658@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:26:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:26:42 +0000 Subject: [issue7760] ctypes: use_errno=True does not work In-Reply-To: <1264205937.75.0.643663912285.issue7760@psf.upfronthosting.co.za> Message-ID: <1391452002.16.0.481741188557.issue7760@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:27:19 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:27:19 +0000 Subject: [issue7727] xmlrpc library returns string which contain null ( \x00 ) In-Reply-To: <1263758368.94.0.169057465263.issue7727@psf.upfronthosting.co.za> Message-ID: <1391452039.52.0.82129258925.issue7727@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:28:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:28:02 +0000 Subject: [issue4304] build mode which fails for build failures in extensions In-Reply-To: <1226482481.6.0.943122034161.issue4304@psf.upfronthosting.co.za> Message-ID: <1391452082.77.0.287216084339.issue4304@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:28:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:28:18 +0000 Subject: [issue2449] Improved serialization error logging in xmlrpclib In-Reply-To: <1206131988.04.0.901893858067.issue2449@psf.upfronthosting.co.za> Message-ID: <1391452098.55.0.806480681775.issue2449@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:28:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:28:39 +0000 Subject: [issue3559] Pasted \n not same as typed \n In-Reply-To: <1218778489.95.0.525643042727.issue3559@psf.upfronthosting.co.za> Message-ID: <1391452119.94.0.484132800733.issue3559@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:28:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:28:56 +0000 Subject: [issue2276] distutils out-of-date for runtime_library_dirs flag on OS X In-Reply-To: <1205290203.53.0.517851484238.issue2276@psf.upfronthosting.co.za> Message-ID: <1391452136.24.0.653984983292.issue2276@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:29:12 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:29:12 +0000 Subject: [issue6237] Build errors when using LDFLAGS="-Wl,--no-undefined" In-Reply-To: <1244428013.0.0.0482442850802.issue6237@psf.upfronthosting.co.za> Message-ID: <1391452152.11.0.406813249214.issue6237@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:29:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:29:40 +0000 Subject: [issue5811] io.BufferedReader.peek(): Documentation differs from Implementation In-Reply-To: <1240380953.7.0.732520909261.issue5811@psf.upfronthosting.co.za> Message-ID: <1391452180.35.0.564728434388.issue5811@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:30:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:30:57 +0000 Subject: [issue10766] optparse uses %s in gettext calls In-Reply-To: <1293148753.14.0.11198082887.issue10766@psf.upfronthosting.co.za> Message-ID: <1391452257.42.0.404452075861.issue10766@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:31:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:31:14 +0000 Subject: [issue8841] getopt errors should be specialized In-Reply-To: <1275007450.32.0.944656023036.issue8841@psf.upfronthosting.co.za> Message-ID: <1391452274.46.0.471370832465.issue8841@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:31:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:31:31 +0000 Subject: [issue892902] problem with pickling newstyle class instances Message-ID: <1391452291.27.0.0956914025246.issue892902@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:31:45 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:31:45 +0000 Subject: [issue968063] Add fileinput.islastline() Message-ID: <1391452305.6.0.434463487276.issue968063@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:32:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:32:01 +0000 Subject: [issue1635741] Interpreter seems to leak references after finalization Message-ID: <1391452321.96.0.0979734416796.issue1635741@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:32:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:32:18 +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: <1391452338.57.0.93513535297.issue5004@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:32:19 2014 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Feb 2014 18:32:19 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1391452339.63.0.69728675487.issue20490@psf.upfronthosting.co.za> Brett Cannon added the comment: It's not as simple as it sounds because failures from "from ... import ..." are triggered in the eval loop and not in import and without thinking it through I don't know if you could use the fine-grained import locks to inspect if something is in the middle of being imported or not that way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:32:34 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:32:34 +0000 Subject: [issue14364] Argparse incorrectly handles '--' In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1391452354.28.0.12898512061.issue14364@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:32:48 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:32:48 +0000 Subject: [issue12762] EnvironmentError_str contributes to unportable code In-Reply-To: <1313514546.35.0.211291095895.issue12762@psf.upfronthosting.co.za> Message-ID: <1391452368.99.0.994629838948.issue12762@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:33:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:33:07 +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: <1391452387.52.0.300971922385.issue12713@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:33:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:33:27 +0000 Subject: [issue5993] python produces zombie in webbrowser.open In-Reply-To: <1242014278.58.0.774883846907.issue5993@psf.upfronthosting.co.za> Message-ID: <1391452407.37.0.0179890475592.issue5993@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:34:04 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:34:04 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1391452444.13.0.597532579355.issue1875@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:34:20 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:34:20 +0000 Subject: [issue1721083] Add File - Reload Message-ID: <1391452460.75.0.30319371048.issue1721083@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:34:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:34:44 +0000 Subject: [issue14143] test_ntpath failure on Windows In-Reply-To: <1330369660.88.0.127957807148.issue14143@psf.upfronthosting.co.za> Message-ID: <1391452484.94.0.305346368612.issue14143@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:35:00 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:35:00 +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: <1391452500.6.0.0123802400036.issue12327@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:35:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:35:17 +0000 Subject: [issue12964] Two improvements for the locale aliasing engine In-Reply-To: <1315831287.41.0.402878841254.issue12964@psf.upfronthosting.co.za> Message-ID: <1391452517.74.0.357823919086.issue12964@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:35:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:35: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: <1391452532.73.0.28565946743.issue5207@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:35:48 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:35:48 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1391452548.32.0.541957382837.issue10379@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:36:04 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:36:04 +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: <1391452564.31.0.355093953622.issue10566@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:36:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:36:26 +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: <1391452586.48.0.477838847721.issue7944@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:36:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:36:56 +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: <1391452616.89.0.458211902415.issue7094@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:37:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:37:11 +0000 Subject: [issue1176504] locale._build_localename treatment for utf8 Message-ID: <1391452631.42.0.525473780997.issue1176504@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:37:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:37:26 +0000 Subject: [issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values In-Reply-To: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> Message-ID: <1391452646.88.0.701580378935.issue5752@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:37:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:37:43 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1391452663.38.0.129533824163.issue9305@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:38:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:38:01 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1391452681.19.0.210071550985.issue1712522@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:38:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:38:17 +0000 Subject: [issue16758] IDLE SubprocessStartupError In-Reply-To: <1356285530.15.0.755787775309.issue16758@psf.upfronthosting.co.za> Message-ID: <1391452697.75.0.569321046917.issue16758@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:38:34 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:38:34 +0000 Subject: [issue13733] Change required to sysconfig.py for Python 2.7.2 on OS/2 In-Reply-To: <1325980402.33.0.867781342076.issue13733@psf.upfronthosting.co.za> Message-ID: <1391452714.89.0.952073748418.issue13733@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:38:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:38:49 +0000 Subject: [issue2052] Allow changing difflib._file_template character encoding. In-Reply-To: <1202505714.47.0.79762903943.issue2052@psf.upfronthosting.co.za> Message-ID: <1391452729.13.0.519623737407.issue2052@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:39:09 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:39:09 +0000 Subject: [issue747320] rfc2822 formatdate functionality duplication Message-ID: <1391452749.32.0.72366532452.issue747320@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:39:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:39:27 +0000 Subject: [issue1186900] nntplib shouldn't raise generic EOFError Message-ID: <1391452767.68.0.81032598018.issue1186900@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:39:35 2014 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Feb 2014 18:39:35 +0000 Subject: [issue20493] asyncio: OverflowError('timeout is too large') In-Reply-To: <1391387871.01.0.754074352669.issue20493@psf.upfronthosting.co.za> Message-ID: <1391452775.89.0.281844164324.issue20493@psf.upfronthosting.co.za> Guido van Rossum added the comment: I guess whenever you have a timeout like that it's the product of a bad calculation in the app (wouldn't be the first time that someone multiplied by 1000 instead of dividing to go from milliseconds to seconds :-). So it would be good to catch this in call_later() / call_at() -- when it's caught in .select() the developer will have a harder time debugging which event had the bad time. Is there a limit we can set on times that is clearly absurd when real times? E.g. past the year 9999? We should have two numbers: one value below which times will definitely be accepted (even if they may sound a bit absurd), another, higher value above which bad times will definitely be rejected. In between it may depend on the epoch of time.monotonic(), so I don't want to be too precise in the promises here. I suppose all the related system calls have *some* limit, it's just that only poll and epoll internally use an integer (I suppose 64-bit?) expressing milliseconds, which is a little too close for comfort? OK, I just played around with the various selector classes on OS X. I only tried values of t that were a power of 2 minus one (starting at 2**65 - 1). For SelectSelector, I get OverflowError for t >= 18446744073709551615, OSError(EINVAL) for t >= 134217727. For PollSelector, I get OverflowError for t >= 4194303, never OSError. For KqueueSelector, I get OverflowError for t >= 18446744073709551615, OSError(EINVAL) for t >= 134217727. Of all these, 4194303 is the smallest, it's only 2**22-1, i.e. 48 days in the future (and all I know is that 2**21-1 worked -- I don't know about values in between). But even 134217727 (2**27 - 1) is not that large, only about 4 years. I can easily see apps (e.g. calendars) manage real events that far in the future, knowing full well that they won't ever wait that long, but trying to treat all events uniformly. I now think that the selector classes probably shouldn't have to deal with this (it can't really know when the syscall will raise OSError, and it shouldn't loop), but asyncio should be better behaved. Perhaps it should reject times that are close to the OverflowError limit in call_soon() / call_at(), but silently wait for a shorter period when the selector's select() raises OSError? (If it weren't for the really low limit with poll(), I'd just substitute None, expecting the process to die long before the event fires, but it's not unreasonable to expect a server process to stay up for months.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:39:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:39:43 +0000 Subject: [issue10590] Parameter type error for xml.sax.parseString(string, ...) In-Reply-To: <1291145861.74.0.873169501029.issue10590@psf.upfronthosting.co.za> Message-ID: <1391452783.27.0.513871213342.issue10590@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:39:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:39:58 +0000 Subject: [issue1613500] Write mode option for fileinput module. Message-ID: <1391452798.43.0.790780977952.issue1613500@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:40:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:40:14 +0000 Subject: [issue1375011] Improper handling of duplicate cookies Message-ID: <1391452814.82.0.354976153259.issue1375011@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:40:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:40:28 +0000 Subject: [issue1778410] removeTest() method patch for unittest.TestSuite Message-ID: <1391452828.89.0.805609418458.issue1778410@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:40:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:40:43 +0000 Subject: [issue6331] Add unicode script info to the unicode database In-Reply-To: <1245790259.44.0.08771310344.issue6331@psf.upfronthosting.co.za> Message-ID: <1391452843.23.0.164724611575.issue6331@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:40:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:40:59 +0000 Subject: [issue6532] thread.get_ident() should return unsigned value In-Reply-To: <1248186325.01.0.817161707988.issue6532@psf.upfronthosting.co.za> Message-ID: <1391452859.37.0.266331298769.issue6532@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:41:16 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:41:16 +0000 Subject: [issue7225] fwrite() compiler warnings In-Reply-To: <1256692580.97.0.277746602553.issue7225@psf.upfronthosting.co.za> Message-ID: <1391452876.36.0.437562613058.issue7225@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:41:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:41:31 +0000 Subject: [issue1483] xml.sax.saxutils.prepare_input_source ignores character stream in InputSource In-Reply-To: <1195653795.8.0.542576278207.issue1483@psf.upfronthosting.co.za> Message-ID: <1391452891.09.0.752661924717.issue1483@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:41:45 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:41:45 +0000 Subject: [issue1479255] Fix building with SWIG's -c++ option set in setup.py Message-ID: <1391452905.35.0.921177693881.issue1479255@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:41:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:41:59 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1391452919.65.0.403754827748.issue3461@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:42:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:42:13 +0000 Subject: [issue1554] socketmodule cleanups: allow the use of keywords in socket functions In-Reply-To: <1196784173.07.0.425557098914.issue1554@psf.upfronthosting.co.za> Message-ID: <1391452933.69.0.627600520305.issue1554@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:42:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:42:27 +0000 Subject: [issue4333] Reworked Dialog.py In-Reply-To: <1226881404.91.0.533308530681.issue4333@psf.upfronthosting.co.za> Message-ID: <1391452947.76.0.279250038165.issue4333@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:04:33 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:04:33 +0000 Subject: [issue1633941] for line in sys.stdin: doesn't notice EOF the first time Message-ID: <1391454273.93.0.786632102713.issue1633941@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:04:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:04:58 +0000 Subject: [issue1927] raw_input behavior incorrect if readline not enabled In-Reply-To: <1201206078.95.0.997961854688.issue1927@psf.upfronthosting.co.za> Message-ID: <1391454298.3.0.236614714561.issue1927@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:05:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:05:18 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1391454318.67.0.280498588653.issue1818@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:05:36 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:05:36 +0000 Subject: [issue1218234] inspect.getsource doesn't update when a module is reloaded Message-ID: <1391454336.38.0.388821810479.issue1218234@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:05:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:05:58 +0000 Subject: [issue1191964] asynchronous Subprocess Message-ID: <1391454358.3.0.114199381231.issue1191964@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:06:13 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:06:13 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1391454373.64.0.0230688166586.issue2454@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:06:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:06:31 +0000 Subject: [issue1690840] xmlrpclib methods submit call on __str__, __repr__ Message-ID: <1391454391.03.0.998787459527.issue1690840@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:06:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:06:47 +0000 Subject: [issue4683] urllib2.HTTPDigestAuthHandler fails on third hostname? In-Reply-To: <1229523259.96.0.571468029932.issue4683@psf.upfronthosting.co.za> Message-ID: <1391454407.41.0.600302118305.issue4683@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:07:00 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:07:00 +0000 Subject: [issue1723038] Curses Menu Message-ID: <1391454420.2.0.152631431902.issue1723038@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:07:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:07:15 +0000 Subject: [issue1043134] Add preferred extensions for MIME types Message-ID: <1391454435.14.0.865075428202.issue1043134@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:07:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:07:28 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1391454448.59.0.257551280751.issue3022@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:07:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:07:49 +0000 Subject: [issue2091] file accepts 'rU+' as a mode In-Reply-To: <1202856909.89.0.801927341292.issue2091@psf.upfronthosting.co.za> Message-ID: <1391454469.61.0.225272155676.issue2091@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:08:04 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:08:04 +0000 Subject: [issue4188] test_threading hang when running as verbose In-Reply-To: <1224793703.28.0.169476277835.issue4188@psf.upfronthosting.co.za> Message-ID: <1391454484.85.0.419624406321.issue4188@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:08:20 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:08:20 +0000 Subject: [issue1005895] curses for win32 Message-ID: <1391454500.35.0.966371775952.issue1005895@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:08:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:08:59 +0000 Subject: [issue1705520] API for excluding methods from unittest stack traces Message-ID: <1391454539.82.0.312899894156.issue1705520@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:09:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:09:14 +0000 Subject: [issue1528167] Tweak to make string.Templates more customizable Message-ID: <1391454554.34.0.946673527287.issue1528167@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:09:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:09:54 +0000 Subject: [issue1859] textwrap doesn't linebreak on "\n" In-Reply-To: <1200573627.07.0.875176355387.issue1859@psf.upfronthosting.co.za> Message-ID: <1391454594.58.0.41301648955.issue1859@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:10:16 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:10:16 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1391454616.67.0.363815092348.issue1812@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:10:30 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:10:30 +0000 Subject: [issue1573931] WSGI, cgi.FieldStorage incompatibility Message-ID: <1391454630.82.0.796690138277.issue1573931@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:10:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:10:49 +0000 Subject: [issue1410680] Add 'surgical editing' to ConfigParser Message-ID: <1391454649.07.0.80865038846.issue1410680@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:11:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:11:05 +0000 Subject: [issue1250] Building external modules using Sun Studio 12 In-Reply-To: <1191964251.86.0.558465608726.issue1250@psf.upfronthosting.co.za> Message-ID: <1391454665.52.0.168301994203.issue1250@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:11:24 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:11:24 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1391454684.23.0.539427657113.issue1054@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:11:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:11:40 +0000 Subject: [issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome In-Reply-To: <1231182515.38.0.572857860756.issue4849@psf.upfronthosting.co.za> Message-ID: <1391454700.51.0.731710177379.issue4849@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:11:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:11:54 +0000 Subject: [issue4851] xml.dom.minidom.Element.cloneNode fails with AttributeError In-Reply-To: <1231192810.66.0.263343969898.issue4851@psf.upfronthosting.co.za> Message-ID: <1391454714.94.0.945451457047.issue4851@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:12:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:12:11 +0000 Subject: [issue2675] Curses terminal resize problems when Python is in interactive mode In-Reply-To: <1208965300.42.0.575050740888.issue2675@psf.upfronthosting.co.za> Message-ID: <1391454731.31.0.244930718484.issue2675@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:12:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:12:27 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1391454747.21.0.789881128653.issue1615158@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:12:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:12:40 +0000 Subject: [issue1439312] Patch for bug 1438185: os.renames deletes junction points Message-ID: <1391454760.98.0.808943099282.issue1439312@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:12:55 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:12:55 +0000 Subject: [issue6759] zipfile.ZipExtFile.read() is missing universal newline support In-Reply-To: <1250922122.86.0.650490470964.issue6759@psf.upfronthosting.co.za> Message-ID: <1391454775.33.0.032853663184.issue6759@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:13:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:13:11 +0000 Subject: [issue5680] Command-line arguments when running in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1391454791.96.0.587690065758.issue5680@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:13:24 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:13:24 +0000 Subject: [issue539907] Tkinter lock conflicts extension widgets Message-ID: <1391454804.52.0.087545147415.issue539907@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:13:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:13:37 +0000 Subject: [issue1429] FD leak in SocketServer In-Reply-To: <1194870454.07.0.621713310435.issue1429@psf.upfronthosting.co.za> Message-ID: <1391454817.04.0.0732812688375.issue1429@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:13:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:13:49 +0000 Subject: [issue1648923] HP-UX: -lcurses missing for readline.so Message-ID: <1391454829.59.0.0917508615726.issue1648923@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:14:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:14:05 +0000 Subject: [issue5438] test_bigmem.test_from_2G_generator uses more memory than expected In-Reply-To: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> Message-ID: <1391454845.14.0.245933781521.issue5438@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:14:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:14:18 +0000 Subject: [issue1528593] Printing: No print dialog or page setup Message-ID: <1391454858.62.0.517167123824.issue1528593@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:14:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:14:31 +0000 Subject: [issue5804] Add an 'offset' argument to zlib.decompress In-Reply-To: <1240307503.01.0.128578916914.issue5804@psf.upfronthosting.co.za> Message-ID: <1391454871.44.0.143802529272.issue5804@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:14:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:14:44 +0000 Subject: [issue2057] difflib: add patch capability In-Reply-To: <1202628772.22.0.236434867196.issue2057@psf.upfronthosting.co.za> Message-ID: <1391454884.68.0.7857154239.issue2057@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:15:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:15:07 +0000 Subject: [issue1677872] Efficient reverse line iterator Message-ID: <1391454907.06.0.570366710676.issue1677872@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:15:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:15:22 +0000 Subject: [issue6103] Static library (libpythonX.Y.a) installed in incorrect location In-Reply-To: <1243229174.04.0.856181043806.issue6103@psf.upfronthosting.co.za> Message-ID: <1391454922.15.0.204054795007.issue6103@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:15:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:15:35 +0000 Subject: [issue2180] tokenize: mishandles line joining In-Reply-To: <1203904758.19.0.84784431119.issue2180@psf.upfronthosting.co.za> Message-ID: <1391454935.45.0.348960139706.issue2180@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:15:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:15:52 +0000 Subject: [issue1616] compiler warnings In-Reply-To: <1197577517.45.0.829785777717.issue1616@psf.upfronthosting.co.za> Message-ID: <1391454952.05.0.119100908564.issue1616@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:16:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:16:08 +0000 Subject: [issue5384] mmap and exception type In-Reply-To: <1235755397.37.0.107266248804.issue5384@psf.upfronthosting.co.za> Message-ID: <1391454968.05.0.599788282169.issue5384@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:16:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:16:22 +0000 Subject: [issue1487481] Could BIND_FIRST be removed on HP-UX? Message-ID: <1391454982.25.0.0996846400098.issue1487481@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:16:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:16:37 +0000 Subject: [issue1425127] os.remove OSError: [Errno 13] Permission denied Message-ID: <1391454997.16.0.934626941387.issue1425127@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:16:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:16:57 +0000 Subject: [issue4657] Doctest gets line numbers wrongs with <> in name In-Reply-To: <1229242886.47.0.883564319605.issue4657@psf.upfronthosting.co.za> Message-ID: <1391455017.01.0.386054864548.issue4657@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:17:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:17:10 +0000 Subject: [issue2200] find_executable fails to find .bat files on win32 In-Reply-To: <1204206733.81.0.37749013909.issue2200@psf.upfronthosting.co.za> Message-ID: <1391455030.08.0.695106416288.issue2200@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:17:25 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:17:25 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1391455045.07.0.723708513922.issue2931@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:17:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:17:42 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1391455062.72.0.215344309101.issue3119@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:17:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:17:58 +0000 Subject: [issue4297] Add error_log attribute to optparse.OptionParser In-Reply-To: <1226413379.99.0.188665223227.issue4297@psf.upfronthosting.co.za> Message-ID: <1391455078.93.0.196558758862.issue4297@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:18:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:18:11 +0000 Subject: [issue6691] Support for nested classes and function for pyclbr In-Reply-To: <1250117262.14.0.353515413158.issue6691@psf.upfronthosting.co.za> Message-ID: <1391455091.98.0.31443170399.issue6691@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:18:25 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:18:25 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1391455105.92.0.135008495338.issue1028088@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:19:18 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:19:18 +0000 Subject: [issue3401] wsgiref can't handle unicode environments In-Reply-To: <1216338814.66.0.0698084133409.issue3401@psf.upfronthosting.co.za> Message-ID: <1391455158.54.0.0840878914381.issue3401@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:19:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:19:32 +0000 Subject: [issue7615] unicode_escape codec does not escape quotes In-Reply-To: <1262316507.32.0.63969926675.issue7615@psf.upfronthosting.co.za> Message-ID: <1391455172.76.0.328031098355.issue7615@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:19:42 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 19:19:42 +0000 Subject: [issue1159] os.getenv() not updated after external module uses C putenv() In-Reply-To: <1189668127.19.0.0258251668017.issue1159@psf.upfronthosting.co.za> Message-ID: <1391455182.2.0.446200527004.issue1159@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:19:48 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:19:48 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1391455188.43.0.79856389817.issue4926@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:20:04 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:20:04 +0000 Subject: [issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir Message-ID: <1391455204.02.0.986871254336.issue1755841@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:20:23 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:20:23 +0000 Subject: [issue1704134] minidom Level 1 DOM compliance Message-ID: <1391455223.88.0.685133500546.issue1704134@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:20:38 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:20:38 +0000 Subject: [issue6952] deprecated conversion from string constant to char * In-Reply-To: <1253446186.78.0.0648542984315.issue6952@psf.upfronthosting.co.za> Message-ID: <1391455238.58.0.631536698645.issue6952@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:20:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:20:58 +0000 Subject: [issue1650090] doctest doesn't find nested functions Message-ID: <1391455258.14.0.16656016314.issue1650090@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:21:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:21:10 +0000 Subject: [issue1648268] Parameter list mismatches (portation problem) Message-ID: <1391455270.97.0.0244031791179.issue1648268@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:21:26 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:21:26 +0000 Subject: [issue1621421] normalize namespace from minidom Message-ID: <1391455286.42.0.583719109256.issue1621421@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:21:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:21:39 +0000 Subject: [issue7752] Add support for Digest authentication session (reuse nonces) In-Reply-To: <1264117674.74.0.518658840947.issue7752@psf.upfronthosting.co.za> Message-ID: <1391455299.65.0.233320690791.issue7752@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:21:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:21:54 +0000 Subject: [issue6529] get{pw,gr}{nam,[ug]id}() calls are not re-entrant In-Reply-To: <1248130486.1.0.677109329447.issue6529@psf.upfronthosting.co.za> Message-ID: <1391455314.3.0.802666690046.issue6529@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:22:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:22:07 +0000 Subject: [issue5286] urrlib2 digest authentication problems In-Reply-To: <1234828359.04.0.561116090692.issue5286@psf.upfronthosting.co.za> Message-ID: <1391455327.61.0.417406816296.issue5286@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:22:24 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:22:24 +0000 Subject: [issue5638] test_httpservers fails CGI tests if --enable-shared In-Reply-To: <1238555479.53.0.0126068485544.issue5638@psf.upfronthosting.co.za> Message-ID: <1391455344.27.0.349882508888.issue5638@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:22:30 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 19:22:30 +0000 Subject: [issue6483] Modules are not deallocated correctly if m_size = -1 In-Reply-To: <1247573035.84.0.508855898217.issue6483@psf.upfronthosting.co.za> Message-ID: <1391455350.51.0.7451388182.issue6483@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:22:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:22:39 +0000 Subject: [issue1465554] Cygwin installer should create a link to libpythonX.Y.dll.a Message-ID: <1391455359.47.0.549836885004.issue1465554@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:22:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:22:54 +0000 Subject: [issue2941] Propagate define to resurce mingw32 compile In-Reply-To: <1211451506.25.0.765395098834.issue2941@psf.upfronthosting.co.za> Message-ID: <1391455374.68.0.338234383508.issue2941@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:23:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:23:08 +0000 Subject: [issue4878] post installer script's message is not shown to user with bdist_wininst In-Reply-To: <1231407894.66.0.157123159421.issue4878@psf.upfronthosting.co.za> Message-ID: <1391455388.3.0.0321948325622.issue4878@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:23:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:23:22 +0000 Subject: [issue4802] detect_tkinter for cygwin In-Reply-To: <1230840510.49.0.878061128691.issue4802@psf.upfronthosting.co.za> Message-ID: <1391455402.42.0.278959413909.issue4802@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:23:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:23:37 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1391455417.93.0.326569628063.issue4928@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:27:27 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 19:27:27 +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: <1391455647.09.0.867023508188.issue6386@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:33:00 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 19:33:00 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1391455980.31.0.162357782433.issue20490@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:35:44 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 19:35:44 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1391456144.22.0.325203887677.issue1875@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:39:30 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Feb 2014 19:39:30 +0000 Subject: [issue20368] Tkinter: handle the null character In-Reply-To: <1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> Message-ID: <3fHzrK519hz7LjN@mail.python.org> Roundup Robot added the comment: New changeset a6ba6db9edb4 by Serhiy Storchaka in branch '2.7': Issue #20368: Add tests for Tkinter methods exprstring(), exprdouble(), http://hg.python.org/cpython/rev/a6ba6db9edb4 New changeset 825c8db8b1e2 by Serhiy Storchaka in branch '3.3': Issue #20368: Add tests for Tkinter methods exprstring(), exprdouble(), http://hg.python.org/cpython/rev/825c8db8b1e2 New changeset 28ec384e7dcc by Serhiy Storchaka in branch 'default': Issue #20368: Add tests for Tkinter methods exprstring(), exprdouble(), http://hg.python.org/cpython/rev/28ec384e7dcc New changeset 65c29c07bb31 by Serhiy Storchaka in branch '2.7': Issue #20368: The null character now correctly passed from Tcl to Python (in http://hg.python.org/cpython/rev/65c29c07bb31 New changeset 08e3343f01a5 by Serhiy Storchaka in branch '3.3': Issue #20368: The null character now correctly passed from Tcl to Python. http://hg.python.org/cpython/rev/08e3343f01a5 New changeset 321b714653e3 by Serhiy Storchaka in branch 'default': Issue #20368: The null character now correctly passed from Tcl to Python. http://hg.python.org/cpython/rev/321b714653e3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:39:32 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Feb 2014 19:39:32 +0000 Subject: [issue19761] test_tk fails on OS X with multiple test case failures with both Tk 8.5 and 8.4 In-Reply-To: <1385337935.63.0.262182292505.issue19761@psf.upfronthosting.co.za> Message-ID: <3fHzrL36xlz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 129eb818d9b2 by Serhiy Storchaka in branch '2.7': Issue #19761: Fixed Tkinter tests on OS X. http://hg.python.org/cpython/rev/129eb818d9b2 New changeset 76cd2e59b13d by Serhiy Storchaka in branch '3.3': Issue #19761: Fixed Tkinter tests on OS X. http://hg.python.org/cpython/rev/76cd2e59b13d New changeset 2efe0778a4cf by Serhiy Storchaka in branch 'default': Issue #19761: Fixed Tkinter tests on OS X. http://hg.python.org/cpython/rev/2efe0778a4cf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:40:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:40:01 +0000 Subject: [issue1751519] curses - new window methods: addchstr and addchnstr Message-ID: <1391456401.24.0.603833173735.issue1751519@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:40:16 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:40:16 +0000 Subject: [issue1512163] mailbox (2.5b1): locking doesn't work (esp. on FreeBSD) Message-ID: <1391456416.54.0.996319111021.issue1512163@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:40:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:40:29 +0000 Subject: [issue4254] _cursesmodule.c callable update_lines_cols() In-Reply-To: <1225724529.97.0.843166149521.issue4254@psf.upfronthosting.co.za> Message-ID: <1391456429.05.0.511748726859.issue4254@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:40:45 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:40:45 +0000 Subject: [issue1437699] allow unicode arguments for robotparser.can_fetch Message-ID: <1391456445.28.0.846495953909.issue1437699@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:40:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:40:59 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1391456459.3.0.259580735916.issue5404@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:41:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:41:11 +0000 Subject: [issue1533105] NetBSD build with --with-pydebug causes SIGSEGV Message-ID: <1391456471.78.0.638155388406.issue1533105@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:41:25 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:41:25 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1391456485.53.0.802135145379.issue5978@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:41:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:41:40 +0000 Subject: [issue7938] makesetup interprets macros -DA=B as a Make variable definition In-Reply-To: <1266281072.48.0.268109023834.issue7938@psf.upfronthosting.co.za> Message-ID: <1391456500.2.0.21816993558.issue7938@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:41:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:41:54 +0000 Subject: [issue1778] SyntaxError.offset sometimes wrong In-Reply-To: <1199920786.95.0.62807405199.issue1778@psf.upfronthosting.co.za> Message-ID: <1391456514.32.0.469961181935.issue1778@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:42:08 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:42:08 +0000 Subject: [issue1800] ctypes callback fails when called in Python with array argument In-Reply-To: <1200093299.88.0.890377527012.issue1800@psf.upfronthosting.co.za> Message-ID: <1391456528.11.0.760531113831.issue1800@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:42:22 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:42:22 +0000 Subject: [issue1744] readline module - set/get quote delimiters In-Reply-To: <1199632447.57.0.76416797802.issue1744@psf.upfronthosting.co.za> Message-ID: <1391456542.48.0.143060714075.issue1744@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:42:36 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:42:36 +0000 Subject: [issue1738] filecmp.dircmp does exact match only In-Reply-To: <1199482445.72.0.241275927673.issue1738@psf.upfronthosting.co.za> Message-ID: <1391456556.29.0.304659833027.issue1738@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:42:48 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:42:48 +0000 Subject: [issue1034] [patch] Add 2to3 support for displaying warnings as Python comments In-Reply-To: <1188181252.17.0.123349198402.issue1034@psf.upfronthosting.co.za> Message-ID: <1391456568.85.0.584509204635.issue1034@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:42:58 2014 From: report at bugs.python.org (karl) Date: Mon, 03 Feb 2014 19:42:58 +0000 Subject: [issue747320] rfc2822 formatdate functionality duplication Message-ID: <1391456578.21.0.198543498414.issue747320@psf.upfronthosting.co.za> karl added the comment: Eric, what do you recommend to move forward with this bug and patches? Need guidance. Do you have an example for "(A minor thing: I would use ?attribute? instead of ?variable? in the docstrings.)" Also which code base I should use? A lot of water has gone under the bridge in one year. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:43:02 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:43:02 +0000 Subject: [issue1736792] dict reentrant/threading request Message-ID: <1391456582.25.0.715483316621.issue1736792@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:43:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:43:17 +0000 Subject: [issue1749512] imaplib cannot handle mailboxes with ACL: lrs Message-ID: <1391456597.66.0.964387245815.issue1749512@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:43:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:43:31 +0000 Subject: [issue1735509] Newer reply format for imap commands in imaplib.py Message-ID: <1391456611.55.0.783347258341.issue1735509@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:43:47 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:43:47 +0000 Subject: [issue1676820] Add a PeriodicTimer to threading Message-ID: <1391456627.36.0.0764352315522.issue1676820@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:44:06 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:44:06 +0000 Subject: [issue3180] Interrupts are lost during readline PyOS_InputHook processing In-Reply-To: <1214238743.53.0.342771827236.issue3180@psf.upfronthosting.co.za> Message-ID: <1391456646.81.0.614146366349.issue3180@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:44:21 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:44:21 +0000 Subject: [issue3020] doctest should have lib2to3 integration In-Reply-To: <1212331047.91.0.677781535819.issue3020@psf.upfronthosting.co.za> Message-ID: <1391456661.98.0.74149333918.issue3020@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:44:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:44:39 +0000 Subject: [issue1653457] Python misbehaves when installed in / (patch attached) Message-ID: <1391456679.43.0.992918386842.issue1653457@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:44:54 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:44:54 +0000 Subject: [issue1648957] HP-UX: _ctypes/libffi/src/ia64/ffi/__attribute__/native cc Message-ID: <1391456694.69.0.484861747581.issue1648957@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:45:17 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:45:17 +0000 Subject: [issue5667] Interpreter fails to initialize on build dir when IO encoding is one of CJK In-Reply-To: <1238664339.95.0.0471411238024.issue5667@psf.upfronthosting.co.za> Message-ID: <1391456717.31.0.863493154421.issue5667@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:45:31 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:45:31 +0000 Subject: [issue1576120] Support spawnvp[e] + use native execvp[e] on win32 Message-ID: <1391456731.38.0.103629070443.issue1576120@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:45:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:45:46 +0000 Subject: [issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error In-Reply-To: <1213472808.51.0.731079646072.issue3111@psf.upfronthosting.co.za> Message-ID: <1391456746.24.0.63074455555.issue3111@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:45:59 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:45:59 +0000 Subject: [issue1080387] Making IDLE Themes and Keys Config more Robust Message-ID: <1391456759.79.0.705701166856.issue1080387@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:46:12 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:46:12 +0000 Subject: [issue1606233] readline on popen3 file returns empty string before end Message-ID: <1391456772.74.0.176807662965.issue1606233@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:46:25 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:46:25 +0000 Subject: [issue1566331] Bad behaviour in .obuf* Message-ID: <1391456785.47.0.0279154584434.issue1566331@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:46:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:46:43 +0000 Subject: [issue1564508] RFC 2965 BaseCookie does not support "$Port" Message-ID: <1391456803.03.0.730200404187.issue1564508@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:46:58 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:46:58 +0000 Subject: [issue1465646] test_grp & test_pwd fail Message-ID: <1391456818.57.0.695752002703.issue1465646@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:47:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:47:14 +0000 Subject: [issue1295179] termios.c in qnx4.25 Message-ID: <1391456834.02.0.360258494423.issue1295179@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:47:30 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:47:30 +0000 Subject: [issue1374063] Broader iterable support for xmlrpclib Message-ID: <1391456850.61.0.666513684187.issue1374063@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:47:44 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:47:44 +0000 Subject: [issue1332869] Fatal Python error: Interpreter not initialized Message-ID: <1391456864.8.0.292837724908.issue1332869@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:47:57 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:47:57 +0000 Subject: [issue1254718] GCC detection for runtime_library_dirs when ccache is used Message-ID: <1391456877.68.0.546790182621.issue1254718@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:48:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:48:14 +0000 Subject: [issue1244861] Enable os.startfile and webbrowser.WindowsDefault on Cygwin Message-ID: <1391456894.67.0.365757314028.issue1244861@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:48:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:48:27 +0000 Subject: [issue1178136] cgitb.py support for frozen images Message-ID: <1391456907.68.0.0336333631486.issue1178136@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:48:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:48:40 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391456920.05.0.695329048057.issue1654367@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:48:53 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:48:53 +0000 Subject: [issue1117601] os.path.exists returns false negatives in MAC environments. Message-ID: <1391456933.28.0.276640618807.issue1117601@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:49:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:49:15 +0000 Subject: [issue1103213] Adding the missing socket.recvall() method Message-ID: <1391456955.16.0.294705297055.issue1103213@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:49:29 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:49:29 +0000 Subject: [issue991266] Cookie.py does not correctly quote Morsels Message-ID: <1391456969.9.0.485444745224.issue991266@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:49:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:49:43 +0000 Subject: [issue7275] CoverageResult fails to merge input file with non-empty callers in trace.py (patch) In-Reply-To: <1257531121.53.0.200338110704.issue7275@psf.upfronthosting.co.za> Message-ID: <1391456983.45.0.579406112687.issue7275@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:49:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:49:56 +0000 Subject: [issue7405] compiling python 3.1.1 using cygwin 1.7.0 and gcc 4.3.4 In-Reply-To: <1259386873.79.0.422049105742.issue7405@psf.upfronthosting.co.za> Message-ID: <1391456996.85.0.172877827835.issue7405@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:50:11 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:50:11 +0000 Subject: [issue3539] Problem with pgen make dependencies in certain circumstances In-Reply-To: <1218416155.29.0.722740811463.issue3539@psf.upfronthosting.co.za> Message-ID: <1391457011.94.0.540337254291.issue3539@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:50:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:50:27 +0000 Subject: [issue1643712] Emphasize buffering issues when sys.stdin is used Message-ID: <1391457027.7.0.68309999219.issue1643712@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:50:40 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:50:40 +0000 Subject: [issue7538] HP-UX 11.11 GCC build fails to build modules In-Reply-To: <1261125259.67.0.0629730876932.issue7538@psf.upfronthosting.co.za> Message-ID: <1391457040.73.0.0544890801359.issue7538@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:51:07 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:51:07 +0000 Subject: [issue6445] Add check parameter to subprocess.Popen.communicate In-Reply-To: <1247131793.49.0.582429022768.issue6445@psf.upfronthosting.co.za> Message-ID: <1391457067.16.0.953068038605.issue6445@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:51:21 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:51:21 +0000 Subject: [issue6338] Error message displayed on stderr when no C compiler is present with ctypes In-Reply-To: <1245877709.89.0.124582375066.issue6338@psf.upfronthosting.co.za> Message-ID: <1391457081.39.0.970843777477.issue6338@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:51:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:51:35 +0000 Subject: [issue6130] There ought to be a way for extension types to associate documentation with their tp_new or tp_init methods In-Reply-To: <1243458159.9.0.459971457445.issue6130@psf.upfronthosting.co.za> Message-ID: <1391457095.91.0.756419254974.issue6130@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:51:49 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:51:49 +0000 Subject: [issue7718] Build shared libpythonX.Y.so on IRIX In-Reply-To: <1263668830.38.0.370210056705.issue7718@psf.upfronthosting.co.za> Message-ID: <1391457109.46.0.900754635634.issue7718@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:52:01 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:52:01 +0000 Subject: [issue7717] Compilation fixes for IRIX In-Reply-To: <1263668634.91.0.221076005955.issue7717@psf.upfronthosting.co.za> Message-ID: <1391457121.7.0.428241259619.issue7717@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:52:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:52:14 +0000 Subject: [issue4744] asynchat documentation needs to be more precise In-Reply-To: <1230168171.56.0.381937953807.issue4744@psf.upfronthosting.co.za> Message-ID: <1391457134.24.0.0265250190402.issue4744@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:52:46 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:52:46 +0000 Subject: [issue1570255] redirected cookies Message-ID: <1391457166.48.0.6697411104.issue1570255@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:53:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:53:14 +0000 Subject: [issue1671676] test_mailbox is hanging while doing gmake test on HP-UX v3 Message-ID: <1391457194.7.0.120795232644.issue1671676@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:53:28 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:53:28 +0000 Subject: [issue1038591] Python 2.3+ socket._fileobject handles EAGAIN with data loss Message-ID: <1391457208.15.0.740607815227.issue1038591@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:53:42 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:53:42 +0000 Subject: [issue1423] wave sunau aifc 16bit errors In-Reply-To: <1194812128.3.0.121145701122.issue1423@psf.upfronthosting.co.za> Message-ID: <1391457222.85.0.744815320731.issue1423@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:53:56 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:53:56 +0000 Subject: [issue1739648] zipfile.testzip() using progressive file reads Message-ID: <1391457236.46.0.523094871203.issue1739648@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:54:10 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:54:10 +0000 Subject: [issue1724822] provide a shlex.split alternative for Windows shell syntax Message-ID: <1391457250.18.0.427673577709.issue1724822@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:54:14 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 19:54:14 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1391457254.83.0.82178465383.issue1615158@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:54:25 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:54:25 +0000 Subject: [issue460474] codecs.StreamWriter: reset() on close() Message-ID: <1391457265.84.0.819039584985.issue460474@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:54:39 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:54:39 +0000 Subject: [issue1367631] maximum length not enforced in cgi.parse() Message-ID: <1391457279.49.0.288852906988.issue1367631@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:54:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:54:52 +0000 Subject: [issue877904] freeze: problems excluding site Message-ID: <1391457292.32.0.327805172033.issue877904@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:55:05 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:55:05 +0000 Subject: [issue894936] Have a split corresponding with os.path.join Message-ID: <1391457305.42.0.769333722254.issue894936@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:58:30 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 19:58:30 +0000 Subject: [issue20384] os.open() exception doesn't contain file name on Windows In-Reply-To: <1390592079.62.0.820816905232.issue20384@psf.upfronthosting.co.za> Message-ID: <1391457510.91.0.826680554146.issue20384@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 21:01:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Feb 2014 20:01:52 +0000 Subject: [issue20426] Compiling a regex with re.DEBUG should force a recompile In-Reply-To: <1390946978.37.0.473480948512.issue20426@psf.upfronthosting.co.za> Message-ID: <3fJ0L75Srpz7Lmb@mail.python.org> Roundup Robot added the comment: New changeset a7b180d5df5f by Antoine Pitrou in branch '3.3': Issue #20426: When passing the re.DEBUG flag, re.compile() displays the debug output every time it is called, regardless of the compilation cache. http://hg.python.org/cpython/rev/a7b180d5df5f New changeset a8bcfa290e68 by Antoine Pitrou in branch 'default': Issue #20426: When passing the re.DEBUG flag, re.compile() displays the debug output every time it is called, regardless of the compilation cache. http://hg.python.org/cpython/rev/a8bcfa290e68 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 21:11:36 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 20:11:36 +0000 Subject: [issue7538] HP-UX 11.11 GCC build fails to build modules In-Reply-To: <1261125259.67.0.0629730876932.issue7538@psf.upfronthosting.co.za> Message-ID: <1391458296.81.0.283004981438.issue7538@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: It is most likely a duplicate of bug #4366. ---------- nosy: +Arfrever resolution: -> duplicate status: open -> closed superseder: -> cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 21:12:53 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Feb 2014 20:12:53 +0000 Subject: [issue20426] Compiling a regex with re.DEBUG should force a recompile In-Reply-To: <1390946978.37.0.473480948512.issue20426@psf.upfronthosting.co.za> Message-ID: <3fJ0Zs0mYyz7LjN@mail.python.org> Roundup Robot added the comment: New changeset e47f6883dedf by Antoine Pitrou in branch '2.7': Issue #20426: When passing the re.DEBUG flag, re.compile() displays the debug output every time it is called, regardless of the compilation cache. http://hg.python.org/cpython/rev/e47f6883dedf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 21:13:29 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Feb 2014 20:13:29 +0000 Subject: [issue20426] Compiling a regex with re.DEBUG should force a recompile In-Reply-To: <1390946978.37.0.473480948512.issue20426@psf.upfronthosting.co.za> Message-ID: <1391458409.52.0.503573575449.issue20426@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I've fixed the bug in all branches. Thanks for reporting! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 21:13:35 2014 From: report at bugs.python.org (Tim Mooney) Date: Mon, 03 Feb 2014 20:13:35 +0000 Subject: [issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2 In-Reply-To: <1245269274.21.0.966496864817.issue6299@psf.upfronthosting.co.za> Message-ID: <1391458415.93.0.774495416644.issue6299@psf.upfronthosting.co.za> Tim Mooney added the comment: I just tried Python 2.7.6 on x86_64-pc-openindiana151a9. The core issue is still present. It's not currently causing a build failure, but only because OpenIndiana 151a9 and Python are using the exact same version of Expat, so the headers that python's build process is mistakenly including from the operating system match the code that it's compiling internally. My comment in msg97311 on 2010-01-06 is still valid. If Python's build process is going to use internal expat, then it better ensure that the compilation flags it needs for that (including the -I) comes before the standard CFLAGS & CPPFLAGS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 21:16:35 2014 From: report at bugs.python.org (Stefan Krah) Date: Mon, 03 Feb 2014 20:16:35 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1391458595.06.0.705116961851.issue5404@psf.upfronthosting.co.za> Stefan Krah added the comment: Cross compiling for arm works here on Ubuntu: $ cat config.site ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no $ export CONFIG_SITE=$PWD/config.site $ ./configure --host=arm-linux-gnueabi --build=x86_64 --disable-ipv6 $ make I cannot test though, since I don't have an arm platform. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 21:33:48 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 20:33:48 +0000 Subject: [issue19761] test_tk fails on OS X with multiple test case failures with both Tk 8.5 and 8.4 In-Reply-To: <1385337935.63.0.262182292505.issue19761@psf.upfronthosting.co.za> Message-ID: <1391459628.73.0.31790169803.issue19761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ned. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 21:36:44 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 20:36:44 +0000 Subject: [issue19320] Tkinter tests ran with wantobjects is false In-Reply-To: <1382302056.06.0.500513298536.issue19320@psf.upfronthosting.co.za> Message-ID: <1391459804.09.0.0457944006907.issue19320@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 Feb 3 21:38:27 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 20:38:27 +0000 Subject: [issue16074] Bad error message in os.rename, os.link, and os.symlink In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1391459907.74.0.220682929202.issue16074@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: However it is still a bug in 3.3. ---------- assignee: serhiy.storchaka -> larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 22:26:47 2014 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Feb 2014 21:26:47 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1391462807.89.0.980019338672.issue5404@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 22:32:46 2014 From: report at bugs.python.org (Kaarle Ritvanen) Date: Mon, 03 Feb 2014 21:32:46 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1391463166.05.0.453614135233.issue20491@psf.upfronthosting.co.za> Changes by Kaarle Ritvanen : Added file: http://bugs.python.org/file33890/textwrap-honor-non-breaking-spaces.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 22:33:19 2014 From: report at bugs.python.org (Sebastian Rittau) Date: Mon, 03 Feb 2014 21:33:19 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length Message-ID: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> New submission from Sebastian Rittau: Consider the attached test case. This test will run fine with Python 2.7, but will fail with Python 3.3. If cgi.FieldStorage() tries to parse a multipart request without a Content-Length header in the main section, segments will have a length of 0. During the parse process, two instances of FieldStorage are involved. The outer one reads the whole request and creates and delegates reading of the fragment to inner instances. The main problem is that FieldStorage.read_lines_to_outerboundary() of the inner FieldStorage will read nothing, since self.limit is lower than zero. def read_lines_to_outerboundary(self): ... while 1: if _read >= self.limit: break ... This happens, since limit is passed when creating the inner instance in FieldStorage.read_multi(): def read_multi(self, environ, keep_blank_values, strict_parsing): ... part = klass(self.fp, headers, ib, environ, keep_blank_values, strict_parsing,self.limit-self.bytes_read, self.encoding, self.errors) ... Now, if the total request did not have a Content-Length header, self.limit will be -1. The naive fix works for the test case, at least, but I don't know if there are other repercussions: --- /usr/lib/python3.3/cgi.py 2014-02-03 22:31:16.649431125 +0100 +++ cgi.py 2014-02-03 22:32:14.849704379 +0100 @@ -788,7 +788,7 @@ last_line_lfend = True _read = 0 while 1: - if _read >= self.limit: + if self.limit >= 0 and _read >= self.limit: break line = self.fp.readline(1<<16) # bytes self.bytes_read += len(line) ---------- components: Library (Lib) files: cgi-bug.py messages: 210166 nosy: srittau priority: normal severity: normal status: open title: cgi.FieldStorage, multipart, missing Content-Length versions: Python 3.3 Added file: http://bugs.python.org/file33891/cgi-bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 22:49:03 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Feb 2014 21:49:03 +0000 Subject: [issue20368] Tkinter: handle the null character In-Reply-To: <1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> Message-ID: <1391464143.82.0.0206486888131.issue20368@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 Feb 3 23:02:55 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Feb 2014 22:02:55 +0000 Subject: [issue20474] test_socket failures on OS X due to fixed "expected failures" In-Reply-To: <1391249509.61.0.504777849278.issue20474@psf.upfronthosting.co.za> Message-ID: <3fJ31p3m9Tz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 63efacd80f8e by Ned Deily in branch '3.3': Issue #20474: Fix "unexpected success" test_socket failures on OS X 10.7+. http://hg.python.org/cpython/rev/63efacd80f8e New changeset 036671354dc0 by Ned Deily in branch 'default': Issue #20474: Fix "unexpected success" test_socket failures on OS X 10.7+. http://hg.python.org/cpython/rev/036671354dc0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 23:04:13 2014 From: report at bugs.python.org (Ned Deily) Date: Mon, 03 Feb 2014 22:04:13 +0000 Subject: [issue20474] test_socket failures on OS X due to fixed "expected failures" In-Reply-To: <1391249509.61.0.504777849278.issue20474@psf.upfronthosting.co.za> Message-ID: <1391465053.15.0.875049894044.issue20474@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> ned.deily resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 23:26:35 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 03 Feb 2014 22:26:35 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391466395.35.0.827926988796.issue20185@psf.upfronthosting.co.za> Zachary Ware added the comment: Vajrasky Kok wrote: > However, there are some reviews that I could not implement. > > 1. "This is a good candidate for a custom return converter." > > I can not synchronize struct rlimit and NULL return values. Looking again, that one is non-trivial, but still doable. You just need a "this means an error happened" value to initialize rl to, and return that value instead of NULL. > 2. "Should be 'class float "PyFloatObject *" "&PyFloat_Type"'. Using > PyFloatObject * instead of PyObject * may require some casts to > PyObject * in some places, but it's better to use the real name." > > I tried it but it was like opening pandora box. It's too much effort > to surpress compile errors and warnings. And casting PyFloatObject > to PyObject in many places, such as functions, macros, makes me > nervous. I think this one deserves a dedicated ticket. It didn't look too bad to me. There are already several places where a value is cast back and forth between PyObject and PyFloatObject. Giving 'self' the right type allows a couple of casts to be removed, and the ones that have to be added are almost exclusively in calls to PyFloat_AsDouble or the CONVERT_TO_DOUBLE macro (which looks like it can just do the casts itself without much issue). I would vote for making PyFloat_AsDouble expect PyFloatObject instead of PyObject, but since (I think?) it looks like it's part of the stable ABI, I'm not sure if that would fly. See http://hg.python.org/sandbox/zware/rev/51473d8c23f8 for a patch on your patch that uses PyFloatObject, compiles cleanly (on win32, at least), and passes relevant tests (though I haven't run the full test suite on this yet; it takes forever on this PC). I have a few more review comments that I hope to get posted later this evening. The patch is looking pretty good overall, though! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 00:32:04 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 03 Feb 2014 23:32:04 +0000 Subject: [issue20494] Backport of http://bugs.python.org/issue11849 to Python 2.7 (Make it more likely for the system allocator to release free()d memory arenas on glibc-based systems). In-Reply-To: <1391388769.61.0.620925038774.issue20494@psf.upfronthosting.co.za> Message-ID: <1391470324.63.0.138051582428.issue20494@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It seems you actually want the second patch on that issue not the first. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 00:34:17 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Feb 2014 23:34:17 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio Message-ID: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> New submission from STINNER Victor: To solve a performance issue in asyncio, I added a new resolution attribute to selectors.BaseSelector and a new _granularity attribute to asyncio.BaseEventLoop. If I understood correctly, Charles-Fran?ois (author and so maintainer of the new selectors module) doesn't like the new resolution attribute because it is a lie (if I understood correctly Charles-Fran?ois complain). He's right: the kernel can use a clock with a worse resolution. For example, on Linux kernel older than 2.6.28, all selectors (select, poll, epoll) had a resolution of 1/HZ where HZ is usually 100, 250 or 1000. So the best resolution was 1 ms (10^-3), whereas the timeval structure used in select() has a resolution of 1 us (10^-6). On Windows, there is a different issue: the clock used by time.monotonic() has a resolution of 15.6 ms, whereas the type to describe the timeouf of the proactor selector (GetQueuedCompletionStatus function) has a resolution of 1 ms. So the resolution of the clock, time.get_clock_info('monotonic').resolution, should also be used. Attached patch removes the two new attributes to make the code simpler. I created this issue to reopen the discussion, but I would prefer to keep the attributes. I wrote the patch to be able to compare the different options. It's just to ensure that everyone agree on the solution. The patch is a comprise, it solves partially the asyncio performance issue. With the patch, BaseEventLoop._run_once() may not executed a task even if there was a scheduled task, just because of timing rounding issues. So I modified the existing patch to tolerate "useless calls" to _run_once(). It was hard for me to analyze and choose the best solution for these issues because on my Fedora 20 (Linux kernel 3.12), the timings look "perfect". I'm unable to reproduce the sporadic timing issues (selector sleeping 8 ms or 9 ms whereas we asked to sleep 10 ms), whereas the test failed on many different buildbots. I suppose that depending on the hardware and the Linux kernel version, the exact resolution selectors is very different. I didn't test the patch on Windows yet. See issues #20311 and #20452 for the background and raw numbers. Note: the test_timeout_rounding() test of test_asyncio now pass on all buildbots: various platforms, selectors and hardwares. Note 2: If we decide to keep the BaseSelector.resolution attribute, I hesitate to replace it with a method because we might improve the read resolution later, which may require to execute code. For example, on Linux older than 2.6.28, the resolution can be computed by retrieving the HZ constant. It requires to check the OS and kernel version. ---------- files: remove_granularity.patch keywords: patch messages: 210170 nosy: gvanrossum, haypo, neologix priority: normal severity: normal status: open title: Remove resolution from selectors and granularity from asyncio versions: Python 3.4 Added file: http://bugs.python.org/file33892/remove_granularity.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 01:13:13 2014 From: report at bugs.python.org (Benjamin Yolken) Date: Tue, 04 Feb 2014 00:13:13 +0000 Subject: [issue20494] Backport of http://bugs.python.org/issue11849 to Python 2.7 (Make it more likely for the system allocator to release free()d memory arenas on glibc-based systems). In-Reply-To: <1391388769.61.0.620925038774.issue20494@psf.upfronthosting.co.za> Message-ID: <1391472793.34.0.211723586776.issue20494@psf.upfronthosting.co.za> Changes by Benjamin Yolken : Removed file: http://bugs.python.org/file33881/memory_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 02:23:14 2014 From: report at bugs.python.org (Arup Chakravarty) Date: Tue, 04 Feb 2014 01:23:14 +0000 Subject: [issue20506] Command to display all available Import Library Message-ID: <1391476994.58.0.915135187283.issue20506@psf.upfronthosting.co.za> New submission from Arup Chakravarty: Have a built-in mechanism to display all available import libraries within the interpreter. Like what is available through the built-in dir function. ---------- components: Library (Lib) messages: 210171 nosy: arupchakrav priority: normal severity: normal status: open title: Command to display all available Import Library type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 02:28:04 2014 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=) Date: Tue, 04 Feb 2014 01:28:04 +0000 Subject: [issue17393] stdlib import mistaken for local by import_fixer In-Reply-To: <1362946974.63.0.419293411414.issue17393@psf.upfronthosting.co.za> Message-ID: <1391477284.21.0.327583533871.issue17393@psf.upfronthosting.co.za> Changes by C?dric Krier : ---------- nosy: +ced _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 02:33:20 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 04 Feb 2014 01:33:20 +0000 Subject: [issue20506] Command to display all available Import Library In-Reply-To: <1391476994.58.0.915135187283.issue20506@psf.upfronthosting.co.za> Message-ID: <1391477600.91.0.693250431752.issue20506@psf.upfronthosting.co.za> Benjamin Peterson added the comment: >>> import sys >>> sys.modules.keys() ['google', 'copy_reg', 'sre_compile', '_sre', 'encodings', 'site', '__builtin__', 'sysconfig', '__main__', 'encodings.encodings', 'abc', 'posixpath', '_weakrefset', 'errno', 'encodings.codecs', 'sre_constants', 're', '_abcoll', 'types', '_codecs', 'encodings.__builtin__', '_warnings', 'genericpath', 'stat', 'zipimport', '_sysconfigdata', 'warnings', 'UserDict', 'encodings.utf_8', 'sys', 'codecs', 'readline', 'os.path', 'signal', 'traceback', 'linecache', 'posix', 'encodings.aliases', 'exceptions', 'sre_parse', 'os', '_weakref'] ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 04:04:56 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Feb 2014 03:04:56 +0000 Subject: [issue20506] Command to display all available Import Library In-Reply-To: <1391476994.58.0.915135187283.issue20506@psf.upfronthosting.co.za> Message-ID: <1391483096.55.0.564044077677.issue20506@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is not what the OP asked, AFAICT. sys.modules is just the set of currently imported modules, not all potentially importable modules. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 04:26:46 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 04 Feb 2014 03:26:46 +0000 Subject: [issue20506] Command to display all available Import Library In-Reply-To: <1391476994.58.0.915135187283.issue20506@psf.upfronthosting.co.za> Message-ID: <1391484406.05.0.352906948466.issue20506@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I guess I have no idea what the OP is asking for then. dir() certainly only gives immediately available builtins. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 05:04:23 2014 From: report at bugs.python.org (Nikolaus Rath) Date: Tue, 04 Feb 2014 04:04:23 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1391486663.13.0.667133203933.issue15216@psf.upfronthosting.co.za> Nikolaus Rath added the comment: I think that any API that gives you a TextIOWrapper object with undesired properties is broken and needs to be fixed, rather than a workaround added to TextIOWrapper. That said, I defer to the wisdow of the core developers, and I'll be happy to implement whatever is deemed to be the right thing(tm). However, my opinion on this feature probably makes me unsuitable to drive a PEP for it :-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 05:23:57 2014 From: report at bugs.python.org (Nikolaus Rath) Date: Tue, 04 Feb 2014 04:23:57 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1391487837.06.0.434996177202.issue15216@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Newest version of the patch attached, the reference leak problem has been fixed. ---------- Added file: http://bugs.python.org/file33893/set_encoding-6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 05:24:11 2014 From: report at bugs.python.org (Suzumizaki) Date: Tue, 04 Feb 2014 04:24:11 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391487851.21.0.0224758180979.issue20485@psf.upfronthosting.co.za> Suzumizaki added the comment: Thank you Nick, I understand the behavior of this issue should be written on PEP. By the way, Can I continue the discussion here? or is there elsewhere suitable place for the PEP? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 07:06:36 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 04 Feb 2014 06:06:36 +0000 Subject: [issue20506] Command to display all available Import Library In-Reply-To: <1391476994.58.0.915135187283.issue20506@psf.upfronthosting.co.za> Message-ID: <1391493996.55.0.215370346266.issue20506@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 for the OP's original idea (something like a dir_modules() function that lists out all possible imports). I think something like this must already be present in some of the Python front-ends such as ipython and bpython. That is how they support tab-completion for imports: In [1]: import co code codeop colorsys compileall contextlib copy codecs collections commands compiler cookielib copy_reg In [1]: import re re readline repr requests resource reverend rexec ---------- nosy: +brett.cannon, rhettinger priority: normal -> low resolution: rejected -> status: closed -> open versions: +Python 3.5 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 07:44:19 2014 From: report at bugs.python.org (Benjamin Yolken) Date: Tue, 04 Feb 2014 06:44:19 +0000 Subject: [issue20494] Backport of http://bugs.python.org/issue11849 to Python 2.7 (Make it more likely for the system allocator to release free()d memory arenas on glibc-based systems). In-Reply-To: <1391388769.61.0.620925038774.issue20494@psf.upfronthosting.co.za> Message-ID: <1391496259.46.0.981571041175.issue20494@psf.upfronthosting.co.za> Benjamin Yolken added the comment: Ahh, didn't see the "better resolution" patch later in the issue. I've updated the Python 2.7 patch here accordingly. ---------- Added file: http://bugs.python.org/file33894/memory_fix_updated2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 07:44:44 2014 From: report at bugs.python.org (Benjamin Yolken) Date: Tue, 04 Feb 2014 06:44:44 +0000 Subject: [issue20494] Backport of http://bugs.python.org/issue11849 to Python 2.7 (Make it more likely for the system allocator to release free()d memory arenas on glibc-based systems). In-Reply-To: <1391388769.61.0.620925038774.issue20494@psf.upfronthosting.co.za> Message-ID: <1391496284.83.0.909703914903.issue20494@psf.upfronthosting.co.za> Changes by Benjamin Yolken : Removed file: http://bugs.python.org/file33883/memory_fix_updated.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 08:15:19 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Feb 2014 07:15:19 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391498119.33.0.197754865551.issue20502@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +mark.dickinson, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 08:43:09 2014 From: report at bugs.python.org (Florian Bruhin) Date: Tue, 04 Feb 2014 07:43:09 +0000 Subject: [issue20451] os.exec* mangles argv on windows (splits on spaces, etc) In-Reply-To: <1391152839.26.0.437112268275.issue20451@psf.upfronthosting.co.za> Message-ID: <1391499789.5.0.407866614606.issue20451@psf.upfronthosting.co.za> Florian Bruhin added the comment: I can't test this right now, but I'd guess you also have to escape a " inside an argument (with \" presumably), and a \ with \\. Maybe more, no idea. Actually the documentation doesn't say anything about me _having_ to escape anything, so I'd assume I don't have to. I'm calling a python function after all, and not using a shell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 08:51:55 2014 From: report at bugs.python.org (Ralf Gommers) Date: Tue, 04 Feb 2014 07:51:55 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1391500315.49.0.388573638477.issue16296@psf.upfronthosting.co.za> Changes by Ralf Gommers : ---------- nosy: +ralf.gommers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 09:07:50 2014 From: report at bugs.python.org (Paul Moore) Date: Tue, 04 Feb 2014 08:07:50 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1391501270.67.0.110745659037.issue16296@psf.upfronthosting.co.za> Paul Moore added the comment: Is there any chance this can be included in Python 3.4? It would apparently allow numpy to be built with stock tools on Windows Python. ---------- nosy: +pmoore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 09:33:22 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 08:33:22 +0000 Subject: [issue17162] Py_LIMITED_API needs a PyType_GenericDealloc In-Reply-To: <1360348035.19.0.130949262051.issue17162@psf.upfronthosting.co.za> Message-ID: <3fJK1F4pYNz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset 655d7a55c165 by Martin v. L?wis in branch 'default': Issue #17162: Add PyType_GetSlot. http://hg.python.org/cpython/rev/655d7a55c165 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 09:33:50 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 04 Feb 2014 08:33:50 +0000 Subject: [issue17162] Py_LIMITED_API needs a PyType_GenericDealloc In-Reply-To: <1360348035.19.0.130949262051.issue17162@psf.upfronthosting.co.za> Message-ID: <1391502830.81.0.530501891654.issue17162@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the reviews; this is now committed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 09:49:29 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 08:49:29 +0000 Subject: [issue17162] Py_LIMITED_API needs a PyType_GenericDealloc In-Reply-To: <1360348035.19.0.130949262051.issue17162@psf.upfronthosting.co.za> Message-ID: <3fJKMr44QmzSr5@mail.python.org> Roundup Robot added the comment: New changeset eaae4008327d by Victor Stinner in branch 'default': Issue #17162: Fix compilation, replace non-breaking space with an ASCII space http://hg.python.org/cpython/rev/eaae4008327d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 10:12:40 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Tue, 04 Feb 2014 09:12:40 +0000 Subject: [issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files In-Reply-To: <1389138393.36.0.783793973134.issue20173@psf.upfronthosting.co.za> Message-ID: <1391505160.1.0.0953367274082.issue20173@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the updated patch after Larry's commit to clinic. Everything is included except codecsmodule. ---------- Added file: http://bugs.python.org/file33895/issue20173_conglomerate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 10:20:43 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Feb 2014 09:20:43 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391505643.05.0.800326615345.issue20505@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a script to measure the accuracy of asyncio: min/max difference between the scheduled time and the real elapsed time. It's not directly related to the attached patch, but it can help if you want to implement a different option like Results on my Fedora 20 (Linux kernel 3.12) with Python compiled in debug mode. Results with the original code: --- [ asyncio accuracy ] call_later(0.0001 us): difference in [59.4839 us; 101.6307 us], [+59483938.5%, +101630708.8%] call_later(0.0005 us): difference in [59.1285 us; 129.9486 us], [+11825694.4%, +25989713.7%] call_later(0.0010 us): difference in [58.9950 us; 102.4589 us], [+5899502.5%, +10245891.9%] call_later(0.0015 us): difference in [59.0737 us; 100.6987 us], [+3938245.9%, +6713245.6%] call_later(0.0020 us): difference in [58.6790 us; 112.8620 us], [+2933950.3%, +5643097.8%] call_later(0.0030 us): difference in [58.9260 us; 118.2042 us], [+1964199.0%, +3940139.5%] call_later(0.0040 us): difference in [59.3839 us; 117.6248 us], [+1484597.0%, +2940620.9%] call_later(0.0050 us): difference in [58.9361 us; 115.3991 us], [+1178721.5%, +2307982.8%] call_later(0.1 us): difference in [61.1 us; 133.5 us], [+61131.0%, +133512.9%] call_later(0.5 us): difference in [59.0 us; 124.8 us], [+11793.8%, +24953.6%] call_later(1.0 us): difference in [57.7 us; 113.7 us], [+5770.7%, +11372.1%] call_later(1.5 us): difference in [57.2 us; 113.5 us], [+3816.0%, +7563.7%] call_later(2.0 us): difference in [56.4 us; 130.1 us], [+2822.0%, +6506.8%] call_later(3.0 us): difference in [55.1 us; 99.7 us], [+1836.5%, +3324.5%] call_later(4.0 us): difference in [53.8 us; 98.5 us], [+1345.3%, +2462.4%] call_later(5.0 us): difference in [54.6 us; 97.0 us], [+1091.2%, +1939.9%] call_later(10.0 us): difference in [76.8 us; 114.3 us], [+767.6%, +1142.5%] call_later(50.0 us): difference in [44.5 us; 1154.6 us], [+88.9%, +2309.3%] call_later(0.1 ms): difference in [1.1 ms; 1.2 ms], [+1061.3%, +1153.8%] call_later(100.0 us): difference in [1066.1 us; 1134.3 us], [+1066.1%, +1134.3%] call_later(150.0 us): difference in [1005.0 us; 1104.6 us], [+670.0%, +736.4%] call_later(200.0 us): difference in [940.3 us; 1024.9 us], [+470.2%, +512.4%] call_later(300.0 us): difference in [854.2 us; 942.4 us], [+284.7%, +314.1%] call_later(400.0 us): difference in [756.3 us; 841.4 us], [+189.1%, +210.3%] call_later(0.5 ms): difference in [0.6 ms; 0.8 ms], [+129.2%, +151.6%] call_later(500.0 us): difference in [648.7 us; 734.8 us], [+129.7%, +147.0%] call_later(1.0 ms): difference in [0.1 ms; 0.3 ms], [+14.7%, +26.0%] call_later(1.5 ms): difference in [0.7 ms; 0.8 ms], [+43.5%, +51.3%] call_later(2.0 ms): difference in [0.2 ms; 0.2 ms], [+7.7%, +10.6%] call_later(3.0 ms): difference in [0.2 ms; 0.2 ms], [+6.2%, +8.1%] call_later(4.0 ms): difference in [0.2 ms; 0.2 ms], [+4.1%, +6.0%] call_later(5.0 ms): difference in [0.2 ms; 0.3 ms], [+3.0%, +5.6%] call_later(10.0 ms): difference in [0.1 ms; 0.3 ms], [+1.3%, +2.6%] call_later(10.0 ms): difference in [0.2 ms; 0.3 ms], [+2.0%, +2.8%] call_later(15.0 ms): difference in [0.2 ms; 0.3 ms], [+1.2%, +1.7%] call_later(20.0 ms): difference in [0.2 ms; 1.9 ms], [+1.1%, +9.3%] call_later(30.0 ms): difference in [0.2 ms; 0.3 ms], [+0.7%, +1.0%] call_later(40.0 ms): difference in [0.2 ms; 0.3 ms], [+0.5%, +0.8%] call_later(50.0 ms): difference in [0.2 ms; 0.3 ms], [+0.4%, +0.5%] call_later(100.0 ms): difference in [0.3 ms; 0.4 ms], [+0.3%, +0.4%] call_later(100.000 ms): difference in [0.254 ms; 0.384 ms], [+0.3%, +0.4%] call_later(150.0 ms): difference in [0.3 ms; 0.4 ms], [+0.2%, +0.3%] call_later(200.0 ms): difference in [0.2 ms; 0.4 ms], [+0.1%, +0.2%] call_later(300.0 ms): difference in [0.5 ms; 0.5 ms], [+0.2%, +0.2%] call_later(400.0 ms): difference in [0.5 ms; 0.7 ms], [+0.1%, +0.2%] call_later(500.0 ms): difference in [0.7 ms; 0.8 ms], [+0.1%, +0.2%] call_later(500.000 ms): difference in [0.297 ms; 0.786 ms], [+0.1%, +0.2%] call_later(1000.000 ms): difference in [0.439 ms; 1.285 ms], [+0.0%, +0.1%] call_later(1500.000 ms): difference in [0.916 ms; 1.759 ms], [+0.1%, +0.1%] call_later(2000.000 ms): difference in [0.678 ms; 2.297 ms], [+0.0%, +0.1%] call_later(3000.000 ms): difference in [0.444 ms; 3.275 ms], [+0.0%, +0.1%] call_later(4000.000 ms): difference in [0.516 ms; 4.255 ms], [+0.0%, +0.1%] call_later(5000.000 ms): difference in [1.051 ms; 5.242 ms], [+0.0%, +0.1%] Global accuracy in [44.5 us; 5.2 ms] Loop granularity: 1.0 ms Selector resolution: 1.0 ms Event loop: _UnixSelectorEventLoop Selector: EpollSelector --- IMO a maximum difference of 5.2 ms with a granularity of 1 ms is very good. For a call scheduled in 1 ms, the difference is in range [0.1 ms; 0.3 ms] which is also very good. Results with remove_granularity.patch: --- [ asyncio accuracy ] call_later(0.0001 us): difference in [65.1941 us; 95.9378 us], [+65194110.0%, +95937766.7%] call_later(0.0005 us): difference in [64.9974 us; 109.2616 us], [+12999486.8%, +21852313.2%] call_later(0.0010 us): difference in [61.7960 us; 106.4841 us], [+6179597.8%, +10648409.5%] call_later(0.0015 us): difference in [61.6555 us; 106.4587 us], [+4110369.8%, +7097245.5%] call_later(0.0020 us): difference in [61.0229 us; 105.4591 us], [+3051145.6%, +5272955.3%] call_later(0.0030 us): difference in [61.7439 us; 115.1779 us], [+2058130.7%, +3839261.8%] call_later(0.0040 us): difference in [60.6982 us; 106.1491 us], [+1517455.2%, +2653727.0%] call_later(0.0050 us): difference in [61.3559 us; 105.6279 us], [+1227117.7%, +2112558.7%] call_later(0.1 us): difference in [68.4 us; 114.5 us], [+68436.0%, +114519.0%] call_later(0.5 us): difference in [63.2 us; 99.4 us], [+12644.4%, +19883.2%] call_later(1.0 us): difference in [61.6 us; 99.5 us], [+6164.7%, +9948.8%] call_later(1.5 us): difference in [60.8 us; 96.3 us], [+4055.1%, +6417.1%] call_later(2.0 us): difference in [59.9 us; 100.7 us], [+2995.2%, +5034.9%] call_later(3.0 us): difference in [58.6 us; 94.5 us], [+1952.4%, +3150.7%] call_later(4.0 us): difference in [57.3 us; 106.6 us], [+1432.8%, +2664.1%] call_later(5.0 us): difference in [61.1 us; 97.1 us], [+1221.9%, +1942.7%] call_later(10.0 us): difference in [86.5 us; 143.5 us], [+865.3%, +1434.7%] call_later(50.0 us): difference in [33.3 us; 1164.4 us], [+66.6%, +2328.8%] call_later(0.1 ms): difference in [1.1 ms; 1.2 ms], [+1055.1%, +1178.2%] call_later(100.0 us): difference in [1071.8 us; 1147.2 us], [+1071.8%, +1147.2%] call_later(150.0 us): difference in [997.9 us; 1097.1 us], [+665.3%, +731.4%] call_later(200.0 us): difference in [974.7 us; 1040.0 us], [+487.3%, +520.0%] call_later(300.0 us): difference in [868.3 us; 932.4 us], [+289.4%, +310.8%] call_later(400.0 us): difference in [770.8 us; 830.7 us], [+192.7%, +207.7%] call_later(0.5 ms): difference in [0.6 ms; 0.8 ms], [+129.2%, +151.6%] call_later(500.0 us): difference in [675.5 us; 723.7 us], [+135.1%, +144.7%] call_later(1.0 ms): difference in [0.1 ms; 0.3 ms], [+14.6%, +30.2%] call_later(1.5 ms): difference in [0.7 ms; 0.8 ms], [+43.8%, +52.0%] call_later(2.0 ms): difference in [0.1 ms; 0.2 ms], [+7.3%, +12.2%] call_later(3.0 ms): difference in [0.2 ms; 0.3 ms], [+5.8%, +9.0%] call_later(4.0 ms): difference in [0.2 ms; 0.2 ms], [+3.9%, +6.1%] call_later(5.0 ms): difference in [0.2 ms; 0.3 ms], [+3.7%, +5.6%] call_later(10.0 ms): difference in [0.2 ms; 0.3 ms], [+1.8%, +2.6%] call_later(10.0 ms): difference in [0.2 ms; 0.3 ms], [+2.1%, +2.8%] call_later(15.0 ms): difference in [0.2 ms; 0.3 ms], [+1.4%, +1.8%] call_later(20.0 ms): difference in [0.2 ms; 0.3 ms], [+1.1%, +1.5%] call_later(30.0 ms): difference in [0.2 ms; 0.3 ms], [+0.7%, +1.0%] call_later(40.0 ms): difference in [0.2 ms; 0.3 ms], [+0.6%, +0.7%] call_later(50.0 ms): difference in [0.2 ms; 0.3 ms], [+0.4%, +0.6%] call_later(100.0 ms): difference in [0.3 ms; 0.3 ms], [+0.3%, +0.3%] call_later(100.000 ms): difference in [0.269 ms; 0.325 ms], [+0.3%, +0.3%] call_later(150.0 ms): difference in [0.3 ms; 0.4 ms], [+0.2%, +0.3%] call_later(200.0 ms): difference in [0.4 ms; 0.5 ms], [+0.2%, +0.2%] call_later(300.0 ms): difference in [0.3 ms; 0.6 ms], [+0.1%, +0.2%] call_later(400.0 ms): difference in [0.5 ms; 0.7 ms], [+0.1%, +0.2%] call_later(500.0 ms): difference in [0.7 ms; 0.8 ms], [+0.1%, +0.2%] call_later(500.000 ms): difference in [0.698 ms; 0.748 ms], [+0.1%, +0.1%] call_later(1000.000 ms): difference in [1.026 ms; 1.286 ms], [+0.1%, +0.1%] call_later(1500.000 ms): difference in [0.645 ms; 1.744 ms], [+0.0%, +0.1%] call_later(2000.000 ms): difference in [1.007 ms; 2.304 ms], [+0.1%, +0.1%] call_later(3000.000 ms): difference in [1.165 ms; 3.256 ms], [+0.0%, +0.1%] call_later(4000.000 ms): difference in [0.742 ms; 4.235 ms], [+0.0%, +0.1%] call_later(5000.000 ms): difference in [1.064 ms; 5.267 ms], [+0.0%, +0.1%] Global accuracy in [33.3 us; 5.3 ms] Event loop: _UnixSelectorEventLoop Selector: EpollSelector --- No surprise, the accuracy is the same. Another approach: always adds granularity to the timeout in asyncio (and selector rounds toward zero, as in Python 3.3). It looks like the test_timeout_rounding() test still pass with this option. Results with add_granularity.patch: --- [ asyncio accuracy ] call_later(0.0001 us): difference in [1136.6910 us; 1234.2710 us], [+1136690976.7%, +1234270997.9%] call_later(0.0005 us): difference in [1134.2053 us; 1230.9015 us], [+226841068.5%, +246180307.7%] call_later(0.0010 us): difference in [1149.2229 us; 1219.4788 us], [+114922288.5%, +121947883.3%] call_later(0.0015 us): difference in [1162.8546 us; 1222.8143 us], [+77523641.3%, +81520955.4%] call_later(0.0020 us): difference in [1163.5149 us; 1217.9579 us], [+58175744.6%, +60897895.7%] call_later(0.0030 us): difference in [1179.6120 us; 1227.1221 us], [+39320401.2%, +40904068.7%] call_later(0.0040 us): difference in [1165.2680 us; 1209.9680 us], [+29131699.2%, +30249199.0%] call_later(0.0050 us): difference in [1170.0682 us; 1226.5110 us], [+23401363.4%, +24530219.5%] call_later(0.1 us): difference in [1162.8 us; 1248.8 us], [+1162765.9%, +1248821.0%] call_later(0.5 us): difference in [1154.8 us; 1247.5 us], [+230968.4%, +249492.4%] call_later(1.0 us): difference in [1146.2 us; 1231.9 us], [+114622.4%, +123185.5%] call_later(1.5 us): difference in [1125.9 us; 1220.8 us], [+75061.3%, +81385.5%] call_later(2.0 us): difference in [1121.4 us; 1211.2 us], [+56071.7%, +60558.3%] call_later(3.0 us): difference in [1138.9 us; 1228.9 us], [+37962.0%, +40962.5%] call_later(4.0 us): difference in [1146.9 us; 1227.2 us], [+28673.0%, +30680.0%] call_later(5.0 us): difference in [1149.5 us; 1247.1 us], [+22990.4%, +24942.4%] call_later(10.0 us): difference in [1174.3 us; 1231.1 us], [+11743.4%, +12311.1%] call_later(50.0 us): difference in [1112.6 us; 1187.8 us], [+2225.1%, +2375.6%] call_later(0.1 ms): difference in [1.1 ms; 1.2 ms], [+1059.0%, +1154.9%] call_later(100.0 us): difference in [1061.7 us; 1133.5 us], [+1061.7%, +1133.5%] call_later(150.0 us): difference in [1016.0 us; 1080.4 us], [+677.4%, +720.2%] call_later(200.0 us): difference in [938.1 us; 1194.4 us], [+469.0%, +597.2%] call_later(300.0 us): difference in [834.9 us; 930.1 us], [+278.3%, +310.0%] call_later(400.0 us): difference in [754.3 us; 852.6 us], [+188.6%, +213.1%] call_later(0.5 ms): difference in [0.6 ms; 0.7 ms], [+124.3%, +149.0%] call_later(500.0 us): difference in [646.8 us; 738.0 us], [+129.4%, +147.6%] call_later(1.0 ms): difference in [0.1 ms; 0.3 ms], [+11.8%, +26.1%] call_later(1.5 ms): difference in [0.6 ms; 0.8 ms], [+41.1%, +50.3%] call_later(2.0 ms): difference in [0.1 ms; 0.2 ms], [+6.2%, +10.8%] call_later(3.0 ms): difference in [0.1 ms; 0.2 ms], [+4.3%, +7.9%] call_later(4.0 ms): difference in [0.1 ms; 0.2 ms], [+3.4%, +5.7%] call_later(5.0 ms): difference in [0.2 ms; 0.4 ms], [+3.2%, +7.1%] call_later(10.0 ms): difference in [0.1 ms; 0.2 ms], [+1.4%, +2.4%] call_later(10.0 ms): difference in [0.2 ms; 0.3 ms], [+1.6%, +2.6%] call_later(15.0 ms): difference in [0.2 ms; 0.3 ms], [+1.3%, +1.7%] call_later(20.0 ms): difference in [0.2 ms; 0.3 ms], [+1.0%, +1.5%] call_later(30.0 ms): difference in [0.2 ms; 0.3 ms], [+0.8%, +0.9%] call_later(40.0 ms): difference in [0.2 ms; 0.3 ms], [+0.5%, +0.7%] call_later(50.0 ms): difference in [0.2 ms; 0.3 ms], [+0.4%, +0.5%] call_later(100.0 ms): difference in [0.2 ms; 0.3 ms], [+0.2%, +0.3%] call_later(100.000 ms): difference in [0.247 ms; 0.345 ms], [+0.2%, +0.3%] call_later(150.0 ms): difference in [0.3 ms; 0.4 ms], [+0.2%, +0.3%] call_later(200.0 ms): difference in [0.3 ms; 0.4 ms], [+0.2%, +0.2%] call_later(300.0 ms): difference in [0.2 ms; 0.5 ms], [+0.1%, +0.2%] call_later(400.0 ms): difference in [0.6 ms; 0.6 ms], [+0.1%, +0.2%] call_later(500.0 ms): difference in [0.4 ms; 0.7 ms], [+0.1%, +0.1%] call_later(500.000 ms): difference in [0.365 ms; 0.781 ms], [+0.1%, +0.2%] call_later(1000.000 ms): difference in [1.176 ms; 1.239 ms], [+0.1%, +0.1%] call_later(1500.000 ms): difference in [1.650 ms; 1.727 ms], [+0.1%, +0.1%] call_later(2000.000 ms): difference in [0.318 ms; 2.241 ms], [+0.0%, +0.1%] call_later(3000.000 ms): difference in [1.169 ms; 3.254 ms], [+0.0%, +0.1%] call_later(4000.000 ms): difference in [1.297 ms; 4.238 ms], [+0.0%, +0.1%] call_later(5000.000 ms): difference in [0.975 ms; 5.272 ms], [+0.0%, +0.1%] Global accuracy in [117.8 us; 5.3 ms] Loop granularity: 1.0 ms Selector resolution: 1.0 ms Event loop: _UnixSelectorEventLoop Selector: EpollSelector --- The accuracy is almost the same, except that the minimum accuracy (117.8 us) is bigger than the current implementation (44.5 us). But I don't know if my micro-benchmark is reliable. Note: I also tested to always add 2 * granularity to asyncio timeout, but the minimum difference increases to 1 ms (as expected) which is much worse. ---------- Added file: http://bugs.python.org/file33896/asyncio_accuracy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 10:21:55 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Feb 2014 09:21:55 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391505715.99.0.252676906484.issue20505@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file33897/add_granularity.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 10:41:03 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Feb 2014 09:41:03 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1391506863.35.0.938407137572.issue20491@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It looks to me that code can be a little more clear if use C-style formatting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 10:45:12 2014 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 04 Feb 2014 09:45:12 +0000 Subject: [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1391507112.42.0.966870633001.issue14911@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Note that the docstring does not match the doc: PyDoc_STRVAR(throw_doc, "throw(typ[,val[,tb]]) -> raise exception in generator,\n\ return next yielded value or raise StopIteration."); Should I change the docstring too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 10:58:53 2014 From: report at bugs.python.org (koobs) Date: Tue, 04 Feb 2014 09:58:53 +0000 Subject: [issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2 In-Reply-To: <1245269274.21.0.966496864817.issue6299@psf.upfronthosting.co.za> Message-ID: <1391507933.42.0.933795567593.issue6299@psf.upfronthosting.co.za> koobs added the comment: The issue applies and is reproducible for all versions 2.6 through 3.5. This is the changeset we applied to all FreeBSD Ports to fix the issue: https://svnweb.freebsd.org/ports?view=revision&revision=326729 One specific example (Python 3.3): 1) Use CPPFLAGS over CFLAGS (See before *and* after comments): https://svnweb.freebsd.org/ports/head/lang/python33/Makefile?r1=326729&r2=326728&pathrev=326729 2) Revert the absolutely crazy complexity in Makefile.pre.in by stripping out CONFIGURE_*, allowing once again ./configure to substitute the right variables based on what has been passed to it: https://svnweb.freebsd.org/ports/head/lang/python33/files/patch-Makefile.pre.in?r1=326729&r2=326728&pathrev=326729 This results in: Makefile.pre.in: CPPFLAGS= @CPPFLAGS@ <-- YAY! PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CPPFLAGS) <-- YAY Makefile: CPPFLAGS= -I/usr/local/include - YAY! PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CPPFLAGS) <-- YAY! The root cause *requiring* the use of CPPFLAGS, is PY_CFLAGS before PY_CPPFLAGS here: PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE As per https://www.gnu.org/prep/standards/html_node/Command-Variables.html "Put CFLAGS last in the compilation command, after other variables containing compiler options, so the user can use CFLAGS to override the others." We must use CPPFLAGS, because CFLAGS has been broken in one way or another for a long time. The target state is *both* must just work. This can only happen if the standard user-serviceable autoconf and Makefile variables are left alone, not extended or overridden, and behave in exactly the same way whether provided in the environment for *either* ./configure, make, or *both*. For the most recent chapter in the C[PP|LD]FLAGS/Makefile book, see: 92a9dc668c95 from #9189 which was sound in intent, but in execution left us deeper down the rabbit-hole. Moving forward and as a first step, what does everyone think of switching the order of $(PY_CFLAGS) $(PY_CPPFLAGS) in PY_CORE_CFLAGS= ? I hope (but I'm not holding my breath) that nothing relies on the current ordering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 10:59:03 2014 From: report at bugs.python.org (Tim Golden) Date: Tue, 04 Feb 2014 09:59:03 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1391501270.67.0.110745659037.issue16296@psf.upfronthosting.co.za> Message-ID: <52F0B9E4.6040402@timgolden.me.uk> Tim Golden added the comment: Larry Hastings would have to rule on whether it could get into 3.4 at this stage. Paul: are you in a position to apply / test the patch? I've done no more than glance at it but it looks, from the comments, as though it doesn't apply cleanly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 11:05:38 2014 From: report at bugs.python.org (Paul Moore) Date: Tue, 04 Feb 2014 10:05:38 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1391508338.4.0.804050013264.issue16296@psf.upfronthosting.co.za> Paul Moore added the comment: Unfortunately not really - it's the numpy guys that need this, so hopefully the original poster can comment. I'll see if I can hand-patch the relevant files and do a pip install numpy to see if it fixes that specific scenario. I'll report back. I've added Larry Hastings to the nosy list for his comments. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 11:11:42 2014 From: report at bugs.python.org (Paul Moore) Date: Tue, 04 Feb 2014 10:11:42 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1391508702.25.0.942624437595.issue16296@psf.upfronthosting.co.za> Paul Moore added the comment: Sigh. Looks like it doesn't fix the issue of building numpy - plus it doesn't apply cleanly. My apologies for the noise, I'll report the issues with the patch back on the numpy issue where I was told about this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 11:19:50 2014 From: report at bugs.python.org (Larry Hastings) Date: Tue, 04 Feb 2014 10:19:50 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1391509190.83.0.694223723285.issue16296@psf.upfronthosting.co.za> Larry Hastings added the comment: I'm not sure I need to be on this issue. As a rule, Windows build concerns for 3.4 are delegated to Martin von Lowis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 11:22:25 2014 From: report at bugs.python.org (Ram Rachum) Date: Tue, 04 Feb 2014 10:22:25 +0000 Subject: [issue20218] Add `pathlib.Path.write` and `pathlib.Path.read` In-Reply-To: <1389380693.53.0.752641621162.issue20218@psf.upfronthosting.co.za> Message-ID: <1391509345.83.0.423479309851.issue20218@psf.upfronthosting.co.za> Ram Rachum added the comment: Hi everyone, I'm waiting for someone to review my patch. I believe it includes everything that's needed to merge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 11:29:17 2014 From: report at bugs.python.org (Tim Golden) Date: Tue, 04 Feb 2014 10:29:17 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1391509190.83.0.694223723285.issue16296@psf.upfronthosting.co.za> Message-ID: <52F0C0F3.1070301@timgolden.me.uk> Tim Golden added the comment: Thanks, Larry. Martin's already nosy this issue, but really we need to see if we have a viable patch before making decisions about 3.4. I'll take you off the nosy list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 11:32:12 2014 From: report at bugs.python.org (Tim Golden) Date: Tue, 04 Feb 2014 10:32:12 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1391509932.86.0.592546640681.issue16296@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 11:48:29 2014 From: report at bugs.python.org (Pierrick Koch) Date: Tue, 04 Feb 2014 10:48:29 +0000 Subject: [issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe In-Reply-To: <1367934356.3.0.498041746077.issue17925@psf.upfronthosting.co.za> Message-ID: <1391510909.95.0.683168758204.issue17925@psf.upfronthosting.co.za> Pierrick Koch added the comment: Fix patch from Xavier's comment, sorry for the delay. Lib/test/test_asynchat.py passes (Ran 27 tests in 1.431s) ---------- Added file: http://bugs.python.org/file33898/cpython.asyncore_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 11:53:39 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 10:53:39 +0000 Subject: [issue20404] Delayed exception using non-text encodings with TextIOWrapper In-Reply-To: <1390798876.83.0.936873438895.issue20404@psf.upfronthosting.co.za> Message-ID: <1391511219.39.0.129581367419.issue20404@psf.upfronthosting.co.za> Nick Coghlan added the comment: v3: - prefix for internal helper APIs is now _PyCodecInfo_ to better distinguish them from the ones that take an encoding name - error check is now just for "is not a text encoding" - tweaked the name and comment in the error test to be clear that it is codecs that are not marked as text encodings that are rejected, not just binary transforms - fixed indentation of multi-line expression in _pyio.py ---------- Added file: http://bugs.python.org/file33899/issue20404_check_valid_textio_codec_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:00:20 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Feb 2014 11:00:20 +0000 Subject: [issue20404] Delayed exception using non-text encodings with TextIOWrapper In-Reply-To: <1390798876.83.0.936873438895.issue20404@psf.upfronthosting.co.za> Message-ID: <1391511620.96.0.216839496731.issue20404@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- stage: test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:02:10 2014 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Feb 2014 11:02:10 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391511730.34.0.912043095563.issue20502@psf.upfronthosting.co.za> Mark Dickinson added the comment: The output is correct, though the tiny precision makes it look strange. The decimal module is following the usual rules for 'ideal' exponents: - For *exactly representable* results, the ideal exponent is 0, and the output will be chosen to have exponent as close to that as possible (while not altering the value of the result). - Where the result isn't exactly representable, full precision is used. Those two rules together explain all of the output you showed: 100.0, 10.0 and 1.0 are exactly representable, so we aim for an exponent of 0. But 100.0 can't be expressed in only 2 digits with an exponent of 0, so it ends up with an exponent of 1, hence the `1.0E+2` output. 460.0 and 46.0 are similarly exactly representable. 4.6 and 0.46 are not exactly representable, so the output is given to full precision. ---------- resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:09:02 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 11:09:02 +0000 Subject: [issue20507] TypeError from str.join has no message Message-ID: <1391512142.14.0.683696819623.issue20507@psf.upfronthosting.co.za> New submission from Gareth Rees: If you pass an object of the wrong type to str.join, Python raises a TypeError with no error message: Python 3.4.0b3 (default, Jan 27 2014, 02:26:41) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ''.join(1) Traceback (most recent call last): File "", line 1, in TypeError It is unnecessarily hard to understand from this error what the problem actually was. Which object had the wrong type? What type should it have been? Normally a TypeError is associated with a message explaining which type was wrong, and what it should have been. For example: >>> b''.join(1) Traceback (most recent call last): File "", line 1, in TypeError: can only join an iterable It would be nice if the TypeError from ''.join(1) included a message like this. The reason for the lack of message is that PyUnicode_Join starts out by calling PySequence_Fast(seq, "") which suppresses the error message from PyObject_GetIter. This commit by Tim Peters is responsible: . The commit message doesn't mention the suppression of the message so I can assume that it was an oversight. I suggest replacing the line: fseq = PySequence_Fast(seq, ""); in PyUnicode_Join in unicodeobject.c with: fseq = PySequence_Fast(seq, "can only join an iterable"); for consistency with bytes_join in stringlib/join.h. Patch attached. ---------- components: Interpreter Core files: join.patch keywords: patch messages: 210200 nosy: Gareth.Rees priority: normal severity: normal status: open title: TypeError from str.join has no message type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33900/join.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:09:13 2014 From: report at bugs.python.org (koobs) Date: Tue, 04 Feb 2014 11:09:13 +0000 Subject: [issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2 In-Reply-To: <1245269274.21.0.966496864817.issue6299@psf.upfronthosting.co.za> Message-ID: <1391512153.78.0.223213480797.issue6299@psf.upfronthosting.co.za> koobs added the comment: Setting versions to correctly reflect those affected. ---------- versions: +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 Tue Feb 4 12:15:36 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 11:15:36 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391512536.52.0.204327973152.issue20481@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think it's also acceptable at this point for the module docs to just say that handling of mixed type input is undefined and implementation dependent, and recommend doing "map(int, input_data)", "map(float, input_data)", "map(Decimal, input_data)" or "map(Fraction, input_data)" to ensure getting a consistent answer for mixed type input. I believe it would also be acceptable for the module to just fail immediately as soon as it detects an input type that differs from the type of the first value rather than attempting to guess the most appropriate behaviour. This close to 3.4rc1 (Sunday 9th February), I don't think we want to be committing to *any* particular implementation of type coercion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:20:41 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 11:20:41 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391512841.34.0.905830217319.issue20489@psf.upfronthosting.co.za> Nick Coghlan added the comment: For 3.4, I'd prefer to just not convert these functions. The right fix is to figure out how to get __name__ set appropriately, and that's something the C extension module improvements in 3.5 should be able to help with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:24:37 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 11:24:37 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391513077.84.0.688807282021.issue20489@psf.upfronthosting.co.za> Nick Coghlan added the comment: For example, see the builtins patch on issue 20184 where I initially converted sorted() to AC, but then found that making it *work* as an AC function was actually quite difficult due to the PyList implementation expecting to be given a arg tuple and kwds dict. Something like that seems appropriate here as well - break the magic formatting of the clinic input, add a reference to this bug and then tweak the signature line manually to not be a valid AC signature line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:28:15 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 11:28:15 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1340880558.16.0.0136840668667.issue15216@psf.upfronthosting.co.za> Message-ID: <1391513295.28.0.832802307878.issue15216@psf.upfronthosting.co.za> Nick Coghlan added the comment: If operating systems always exposed accurate metadata and configuration settings, I'd agree with you. They don't though, so sometimes developers need to be able to override whatever the interpreter figured out automatically. In addition, needing to cope with badly designed APIs is an unfortunate fact of life - that's why monkeypatching is only *discouraged*, rather than disallowed :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:42:03 2014 From: report at bugs.python.org (Mauricio de Alencar) Date: Tue, 04 Feb 2014 11:42:03 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391514123.03.0.704098165487.issue20502@psf.upfronthosting.co.za> Mauricio de Alencar added the comment: According to the docs (http://docs.python.org/3/library/decimal.html): "The decimal module incorporates a notion of significant places so that 1.30 + 1.20 is 2.50. The trailing zero is kept to indicate significance. This is the customary presentation for monetary applications. For multiplication, the ?schoolbook? approach uses all the figures in the multiplicands. For instance, 1.3 * 1.2 gives 1.56 while 1.30 * 1.20 gives 1.5600." Therefore, if I request 2 digits of precision, I expect 2 digits in the output. In addition, the docs assert that "Decimal numbers can be represented exactly", which leaves me lost about you argument on whether some number is *exactly representable* or not. ---------- resolution: invalid -> status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:46:20 2014 From: report at bugs.python.org (Srinivas Reddy T) Date: Tue, 04 Feb 2014 11:46:20 +0000 Subject: [issue20507] TypeError from str.join has no message In-Reply-To: <1391512142.14.0.683696819623.issue20507@psf.upfronthosting.co.za> Message-ID: <1391514380.59.0.0995765103084.issue20507@psf.upfronthosting.co.za> Srinivas Reddy T added the comment: The exact behavior is present in 2.7 version too. So tagging 2.7 to 3.4 ---------- nosy: +thatiparthy versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:50:41 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Feb 2014 11:50:41 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391514641.42.0.706295056941.issue20489@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Expressly writing the name of the module in the expression solves this issue. ---------- stage: -> patch review Added file: http://bugs.python.org/file33901/zlib_parameters_defaults.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:50:49 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 11:50:49 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391514649.53.0.964110210008.issue20485@psf.upfronthosting.co.za> Nick Coghlan added the comment: import-sig at python.org would be the appropriate list for this one. However, we can't do anything about it until Python 3.5 next year at the earliest, and I'm already planning to write a follow-up to http://www.python.org/dev/peps/pep-0451/ that adapts the extension module import mechanism to support those APIs (addressing a number of longstanding feature requests from the Cython developers). That said, this is an independent proposal, so if you were willing to write it up as a separate PEP, that would be probably be a good idea. Our two choices to consider would be: 1. Using a custom 7-bit ASCII compatible encoding to support this on arbitrary C compilers (at the cost of making the identifiers unintuitive). (i.e. the approach in your patch) 2. Using the "Universal Character Name" support originally specified in C99, but retained in C11 (these are the \Uxxxxxxxx and \uxxxx escapes familiar from Python text literals). Note that *CPython* still won't need to be compiled with a compiler that supports UCN for this to work - we'll just need the dynamic linking API to support us looking for a symbol containing such a name. Option 2 is what I think we *should* do, but there will be some research involved in figuring out how good the current support for UCN C identifiers is in at least gcc, clang and Visual Studio 2013, as well as what the dynamic linker APIs support in terms of passing identifiers containing Unicode escapes to be looked up in the exported symbols. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:54:32 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Feb 2014 11:54:32 +0000 Subject: [issue20507] TypeError from str.join has no message In-Reply-To: <1391512142.14.0.683696819623.issue20507@psf.upfronthosting.co.za> Message-ID: <1391514872.82.0.365003094416.issue20507@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou stage: -> patch review versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:56:50 2014 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Feb 2014 11:56:50 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391515010.75.0.497874253148.issue20502@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Therefore, if I request 2 digits of precision, I expect 2 digits in the output. The `prec` attribute in the context refers to the total number of *significant digits* that are storable, and not to the number of digits after the decimal point. `Decimal` is at heart a floating-point type, not a fixed-point one (though the handling of significant zeros that you note means that it's useful in fixed-point contexts too). For typical uses you'll want `prec` to be much bigger than 2. So the number of trailing zeros is typically determined not by `prec` but by the exponents of the operands to any given operation. In the example you cite, the output is `2.50` because the inputs both had two digits after the point. > the docs assert that "Decimal numbers can be represented exactly" Sure, but for example the 0.1 in your code is not a Decimal: it's a Python float, represented under the hood in binary. Its exact value is 0.1000000000000000055511151231257827021181583404541015625, and that can't be stored exactly in a Decimal object with only two digits of precision. So the behaviour you identify isn't a bug: the module is following a deliberate design choice here. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:57:10 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Feb 2014 11:57:10 +0000 Subject: [issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2 In-Reply-To: <1245269274.21.0.966496864817.issue6299@psf.upfronthosting.co.za> Message-ID: <1391515030.86.0.533807253573.issue6299@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:59:33 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 11:59:33 +0000 Subject: [issue1721083] Add File - Reload Message-ID: <1391515173.29.0.555326762338.issue1721083@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:59:40 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Feb 2014 11:59:40 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391514649.53.0.964110210008.issue20485@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > we *should* do, but there will be some research involved in figuring out how good the current support for UCN C identifiers is in at least gcc, clang and Visual Studio 2013 Python 3.4 uses Visual Studio 2010. I'm not sure that you can build an extension with VS 2013 if Python was build with VS 2010. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 12:59:42 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 11:59:42 +0000 Subject: [issue5680] Command-line arguments when running in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1391515182.93.0.12873639138.issue5680@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:00:26 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:00:26 +0000 Subject: [issue1528593] Printing: No print dialog or page setup Message-ID: <1391515226.87.0.0912538503293.issue1528593@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:01:43 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:01:43 +0000 Subject: [issue1253] IDLE - Percolator overhaul In-Reply-To: <1191982624.13.0.198270020748.issue1253@psf.upfronthosting.co.za> Message-ID: <1391515303.74.0.822326150244.issue1253@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:02:37 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:02:37 +0000 Subject: [issue1253] IDLE - Percolator overhaul In-Reply-To: <1191982624.13.0.198270020748.issue1253@psf.upfronthosting.co.za> Message-ID: <1391515357.55.0.187645996727.issue1253@psf.upfronthosting.co.za> Tal Einat added the comment: This should be closed as "wont fix". ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:02:47 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:02:47 +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: <1391515367.72.0.216616620067.issue6143@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:02:59 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:02:59 +0000 Subject: [issue4832] IDLE does not supply a default ext of .py on Windows or OS X for new file saves In-Reply-To: <1231082162.31.0.973834672616.issue4832@psf.upfronthosting.co.za> Message-ID: <1391515379.47.0.461740501752.issue4832@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:03:07 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:03:07 +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: <1391515387.92.0.37657445682.issue2704@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:05:26 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:05:26 +0000 Subject: [issue1442493] IDLE shell window gets very slow when displaying long lines Message-ID: <1391515526.24.0.295438973392.issue1442493@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:05:36 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:05:36 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1391515536.04.0.56191525026.issue9262@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:05:39 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 12:05:39 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391515539.39.0.114768581515.issue20489@psf.upfronthosting.co.za> Nick Coghlan added the comment: If qualifying the expression explicitly does the trick, that sounds good, too :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:05:41 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:05:41 +0000 Subject: [issue7676] IDLE shell shouldn't use TABs In-Reply-To: <1263213381.47.0.181451927584.issue7676@psf.upfronthosting.co.za> Message-ID: <1391515541.56.0.0828555857184.issue7676@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:05:48 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:05:48 +0000 Subject: [issue1612262] Class Browser doesn't show internal classes Message-ID: <1391515548.34.0.596814183965.issue1612262@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:07:46 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:07:46 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391515666.01.0.622015229691.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: Is there any chance this patch could get some love? I've stopped using IDLE a long time ago, but this patch is a great improvement! ---------- versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:10:06 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:10:06 +0000 Subject: [issue1178] IDLE - add "paste code" functionality In-Reply-To: <1190153010.77.0.038299898053.issue1178@psf.upfronthosting.co.za> Message-ID: <1391515806.5.0.0337589895071.issue1178@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:11:49 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:11:49 +0000 Subject: [issue17296] Cannot unpickle classes derived from 'Exception' In-Reply-To: <1361811616.55.0.878692548703.issue17296@psf.upfronthosting.co.za> Message-ID: <1391515909.54.0.136273623477.issue17296@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:11:49 2014 From: report at bugs.python.org (koobs) Date: Tue, 04 Feb 2014 12:11:49 +0000 Subject: [issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2 In-Reply-To: <1245269274.21.0.966496864817.issue6299@psf.upfronthosting.co.za> Message-ID: <1391515909.51.0.334004804226.issue6299@psf.upfronthosting.co.za> koobs added the comment: Adding a patch for reference only ---------- keywords: +patch Added file: http://bugs.python.org/file33902/python-issue6299.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:12:01 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:12:01 +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: <1391515921.71.0.653534382688.issue10079@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:14:10 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 12:14:10 +0000 Subject: [issue19619] Blacklist base64, hex, ... codecs from bytes.decode() and str.encode() In-Reply-To: <1384562829.72.0.617857672471.issue19619@psf.upfronthosting.co.za> Message-ID: <3fJPw14ZZLz7LkX@mail.python.org> Roundup Robot added the comment: New changeset f3ec00d2b75e by Nick Coghlan in branch 'default': Close #20404: blacklist non-text encodings in io.TextIOWrapper http://hg.python.org/cpython/rev/f3ec00d2b75e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:14:10 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 12:14:10 +0000 Subject: [issue20404] Delayed exception using non-text encodings with TextIOWrapper In-Reply-To: <1390798876.83.0.936873438895.issue20404@psf.upfronthosting.co.za> Message-ID: <3fJPw22cB4z7LkX@mail.python.org> Roundup Robot added the comment: New changeset f3ec00d2b75e by Nick Coghlan in branch 'default': Close #20404: blacklist non-text encodings in io.TextIOWrapper http://hg.python.org/cpython/rev/f3ec00d2b75e ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:15:19 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:15:19 +0000 Subject: [issue12411] cgi.parse_multipart is broken on 3.x In-Reply-To: <1309014548.2.0.906650270303.issue12411@psf.upfronthosting.co.za> Message-ID: <1391516119.45.0.491461163195.issue12411@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:22:28 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 12:22:28 +0000 Subject: [issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140504.71.0.617730511292.issue20184@psf.upfronthosting.co.za> Message-ID: <1391516548.34.0.270161190989.issue20184@psf.upfronthosting.co.za> Nick Coghlan added the comment: Larry, I'd like to include the most-builtin-functions signature support for 3.4, but since the AC Derby is over, it's your call as release manager. If it looks good to you, go ahead and commit it (I won't have time until later in the week), otherwise just drop the priority and punt it to 3.5. ---------- assignee: ncoghlan -> larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:27:51 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 12:27:51 +0000 Subject: [issue6858] This is a python file, apply syntax highlighting In-Reply-To: <1252364873.43.0.809885579905.issue6858@psf.upfronthosting.co.za> Message-ID: <1391516871.19.0.367715031802.issue6858@psf.upfronthosting.co.za> Tal Einat added the comment: Roger's patch LGTM, and should be considered a bug-fix. I will note, however, that this doesn't address the original issue: It still does not supply an easily discoverable method of toggling highlighting. Having a keyboard shortcut documented in the help file is necessary, but few novice users will ever notice it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:30:20 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 12:30:20 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391517020.05.0.618113817329.issue20485@psf.upfronthosting.co.za> Nick Coghlan added the comment: Oh, you're right - I temporarily forgot that the C runtime compatibility was compiler version specific on Windows. So such an approach *would* require updating the CPython compiler on Windows to at least VS2013 for 3.5. Still, we're likely to want to do that anyway - VS2010 will be as old in 2015 as VS2008 is now, and the latter is already causing hassles for building 2.7 extension modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:34:08 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 12:34:08 +0000 Subject: [issue19744] test_venv fails if SSL/TLS is not available In-Reply-To: <1385257125.97.0.543842843872.issue19744@psf.upfronthosting.co.za> Message-ID: <1391517248.72.0.853258020418.issue19744@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:50:06 2014 From: report at bugs.python.org (Suzumizaki) Date: Tue, 04 Feb 2014 12:50:06 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391518206.0.0.222647130579.issue20485@psf.upfronthosting.co.za> Suzumizaki added the comment: Both Visual Studio 2012 and 2013 CANNOT install on Windows Vista. That's OK for you even Vista alive until April 2017? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 13:59:25 2014 From: report at bugs.python.org (Thomas Heller) Date: Tue, 04 Feb 2014 12:59:25 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1391518765.95.0.0165738276248.issue16296@psf.upfronthosting.co.za> Thomas Heller added the comment: Hm, what's the problem? For me, the patch applies cleanly (in Python 3.4.0b3, 32-bit and 64-bit on Windows), and py -3.4(-32) -m pip install numpy works correctly. At least py -3.4(-32) -c "import numpy; print(numpy.__version__)" prints "1.8.0". This is with the newest pip (1.5.2). I have the full version of visual studio 2010 installed. ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:03:03 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 13:03:03 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <3fJR0M3L7Jz7LjV@mail.python.org> Roundup Robot added the comment: New changeset 1b8ba1346e67 by Nick Coghlan in branch 'default': Close #20053: ignore default pip config settings http://hg.python.org/cpython/rev/1b8ba1346e67 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:09:31 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 13:09:31 +0000 Subject: [issue20508] IndexError from ipaddress._BaseNetwork.__getitem__ has no message Message-ID: <1391519371.56.0.280883005316.issue20508@psf.upfronthosting.co.za> New submission from Gareth Rees: If you try to look up an out-of-range address from an object returned by ipaddress.ip_network, then ipaddress._BaseNetwork.__getitem__ raises an IndexError with no message: Python 3.4.0b3 (default, Jan 27 2014, 02:26:41) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ipaddress >>> ipaddress.ip_network('2001:db8::8/125')[100] Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ipaddress.py", line 601, in __getitem__ raise IndexError IndexError Normally an IndexError is associated with a message explaining the cause of the error. For example: >>> [].pop() Traceback (most recent call last): File "", line 1, in IndexError: pop from empty list It would be nice if the IndexError from ipaddress._BaseNetwork.__getitem__ included a message like this. With the attached patch, the error message looks like this in the positive case: >>> ipaddress.ip_network('2001:db8::8/125')[100] Traceback (most recent call last): File "", line 1, in File "/Users/gdr/hg.python.org/cpython/Lib/ipaddress.py", line 602, in __getitem__ % (self, self.num_addresses)) IndexError: 100 out of range 0..7 for 2001:db8::8/125 and like this in the negative case: >>> ipaddress.ip_network('2001:db8::8/125')[-100] Traceback (most recent call last): File "", line 1, in File "/Users/gdr/hg.python.org/cpython/Lib/ipaddress.py", line 608, in __getitem__ % (n - 1, self.num_addresses, self)) IndexError: -100 out of range -8..-1 for 2001:db8::8/125 (If you have a better suggestion for how the error message should read, I could submit a revised patch. I suppose it could just say "address index out of range" for consistency with list.__getitem__ and str.__getitem__. But I think the extra information is likely to be helpful for the programmer who is trying to track down the cause of an error.) ---------- components: Library (Lib) files: ipaddress.patch keywords: patch messages: 210224 nosy: Gareth.Rees priority: normal severity: normal status: open title: IndexError from ipaddress._BaseNetwork.__getitem__ has no message type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33903/ipaddress.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:10:36 2014 From: report at bugs.python.org (Mauricio de Alencar) Date: Tue, 04 Feb 2014 13:10:36 +0000 Subject: [issue20502] Context setting to print Decimal with as many digits as the "prec" setting In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391519436.36.0.122035793541.issue20502@psf.upfronthosting.co.za> Mauricio de Alencar added the comment: I propose then to create a context setting that switches between the current textual representation of a Decimal and one that is "right zeros padded" up to context precision. Such that the line: print(Context(prec=4, precise_repr=True).create_decimal_from_float(1.)) would output "1.000" I post bellow a workaround for getting the result I expect just in case there is anybody else with similar expectations. from decimal import Context def dec(num, prec): return Context(prec=prec).create_decimal('{{:.{:d}e}}'.format(prec - 1).format(num)) Thanks for you attention. ---------- resolution: invalid -> status: closed -> open title: Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark -> Context setting to print Decimal with as many digits as the "prec" setting type: behavior -> enhancement versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:14:23 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Feb 2014 13:14:23 +0000 Subject: [issue6299] pyexpat build failure on Solaris 10 for 2.6.1/2.6.2 In-Reply-To: <1245269274.21.0.966496864817.issue6299@psf.upfronthosting.co.za> Message-ID: <1391519663.86.0.424489388888.issue6299@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:19:22 2014 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Feb 2014 13:19:22 +0000 Subject: [issue20502] Context setting to print Decimal with as many digits as the "prec" setting In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391519962.13.0.336187407141.issue20502@psf.upfronthosting.co.za> Mark Dickinson added the comment: If you're after a particular string representation, you'll probably find that string formatting meets your needs. Python 3.3.3 (default, Nov 24 2013, 14:34:37) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from decimal import Decimal >>> x = Decimal('3.3') >>> x Decimal('3.3') >>> "{:.4f}".format(x) # string representation with 4 digits after the point. '3.3000' Reclosing this issue. If you want to pursue your proposal, please open a separate issue for that rather than reopening this one. Thanks! ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:19:38 2014 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Feb 2014 13:19:38 +0000 Subject: [issue20502] Context setting to print Decimal with as many digits as the "prec" setting In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391519978.08.0.49584421332.issue20502@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- type: enhancement -> behavior versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:19:44 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 13:19:44 +0000 Subject: [issue20508] IndexError from ipaddress._BaseNetwork.__getitem__ has no message In-Reply-To: <1391519371.56.0.280883005316.issue20508@psf.upfronthosting.co.za> Message-ID: <1391519984.96.0.0370581207188.issue20508@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:25:47 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 13:25:47 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1391520347.3.0.173658531079.issue19362@psf.upfronthosting.co.za> Gareth Rees added the comment: Here's a revised patch using Ezio's suggestion ("Return the number of items of a sequence or container"). ---------- Added file: http://bugs.python.org/file33904/len-set.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:26:26 2014 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Feb 2014 13:26:26 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391520386.14.0.00711658673739.issue20502@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- title: Context setting to print Decimal with as many digits as the "prec" setting -> Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:31:46 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 13:31:46 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1391520706.82.0.162962361701.issue19362@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- title: Documentation for len() fails to mention that it works on sets -> Documentation for len() fails to mention that it works on sets versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:39:02 2014 From: report at bugs.python.org (Mauricio de Alencar) Date: Tue, 04 Feb 2014 13:39:02 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391521142.94.0.82497038565.issue20502@psf.upfronthosting.co.za> Mauricio de Alencar added the comment: String formatting is completely unaware of the concept of *significant digits*. The only format that can get it right for every case is the 'e'. But then you always get the exponent, which is undesirable. I was hopeful that the decimal module would handle significant digits as I need. I will settle with the workaround I posted earlier. Thanks anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:58:42 2014 From: report at bugs.python.org (Stefan Krah) Date: Tue, 04 Feb 2014 13:58:42 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391521142.94.0.82497038565.issue20502@psf.upfronthosting.co.za> Message-ID: <20140204135841.GA18665@sleipnir.bytereef.org> Stefan Krah added the comment: Mauricio de Alencar wrote: > String formatting is completely unaware of the concept of *significant digits*. >>> format(Decimal(1), ".2f") '1.00' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 15:01:49 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Feb 2014 14:01:49 +0000 Subject: [issue20451] os.exec* mangles argv on windows (splits on spaces, etc) In-Reply-To: <1391152839.26.0.437112268275.issue20451@psf.upfronthosting.co.za> Message-ID: <1391522509.4.0.762839744497.issue20451@psf.upfronthosting.co.za> R. David Murray added the comment: I believe the problem lies with the way that Windows implements the 'exec' functions. Windows isn't posix, and sometimes its attempts to fake it go rather badly. So, I'm not sure what the actual rules are, but whatever they are there should at least be a mention/pointer in the documentation about it. Really, if you want to be cross platform you should use subprocess. exec doesn't really even exec (replace the current process) on windows, if I understand correctly. By the way, -c accepts strings with embedded newlines, something I didn't know for a long time :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 15:01:55 2014 From: report at bugs.python.org (Paul Moore) Date: Tue, 04 Feb 2014 14:01:55 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1391522515.41.0.824590067587.issue16296@psf.upfronthosting.co.za> Paul Moore added the comment: Maybe it's not applicable to 3.3 somehow, which is what I tried. I applied the patch to the distutils in the system installed Python, then ran pip install numpy from a virtualenv. It's quite possible that a million things could have gone wrong in that process - but that's all I had time to check (I'm only really interested in this as a courtesy to the numpy people, who asked me to raise the bug on numpy, then directed me to this patch as a fix). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 15:19:44 2014 From: report at bugs.python.org (Mauricio de Alencar) Date: Tue, 04 Feb 2014 14:19:44 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391437732.8.0.604418392969.issue20502@psf.upfronthosting.co.za> Message-ID: <1391523584.21.0.835511786649.issue20502@psf.upfronthosting.co.za> Mauricio de Alencar added the comment: "Digits after the decimal mark" is not the same as "significant digits". See https://en.wikipedia.org/wiki/Significant_figures If I have a list of numbers [256.2, 1.3, 0.5] that have 3 significant digits each, I would like to have them displayed as: ['256', '1.30', '0.500'] ['{:.2e}'.format(_) for _ in [256.2, 1.3, 0.5]] would print: ['2.56e+02', '1.30e+00', '5.00e-01'] Which gets the digits right, but is not as desired. But if I use from decimal import Context def dec(num, prec): return Context(prec=prec).create_decimal('{{:.{:d}e}}'.format(prec - 1).format(num)) [str(dec(_, 3)) for _ in [256.2, 1.3, 0.5]] The the output is: ['256', '1.30', '0.500'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 15:22:09 2014 From: report at bugs.python.org (Fabio Zadrozny) Date: Tue, 04 Feb 2014 14:22:09 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391523729.5.0.519557272684.issue1654367@psf.upfronthosting.co.za> Fabio Zadrozny added the comment: Just a note for anyone interested: ctypes can be used to access that function: http://pydev.blogspot.com.br/2014/02/changing-locals-of-frame-frameflocals.html So, I think that the changes I proposed shouldn't be applied (it'd only be worth if someone provided an implementation that did frame.f_locals writable...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 15:40:55 2014 From: report at bugs.python.org (Lukas Vacek) Date: Tue, 04 Feb 2014 14:40:55 +0000 Subject: [issue19186] expat symbols should be namespaced in pyexpat again In-Reply-To: <1381151097.4.0.844657685559.issue19186@psf.upfronthosting.co.za> Message-ID: <1391524855.34.0.760521743993.issue19186@psf.upfronthosting.co.za> Lukas Vacek added the comment: attaching patch ---------- keywords: +patch nosy: +Lukas.Vacek Added file: http://bugs.python.org/file33905/fix_expat_names.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 15:45:59 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Feb 2014 14:45:59 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391525159.98.0.989324209967.issue20185@psf.upfronthosting.co.za> Zachary Ware added the comment: Ok, so my changes to CONVERT_TO_DOUBLE don't fly with gcc, so that's out. In the two cases where convert_to_double wants a PyObject *, we could declare "PyObject *objself = (PyObject *)self;", but that's not particularly appealing. I'll leave the whole PyObject vs. PyFloatObject issue to someone with more C experience. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 15:46:13 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Tue, 04 Feb 2014 14:46:13 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391512536.52.0.204327973152.issue20481@psf.upfronthosting.co.za> Message-ID: <20140204144607.GA2333@gmail.com> Oscar Benjamin added the comment: I was working on the basis that we were talking about Python 3.5. But now I see that it's a 3.4 release blocker. Is it really that urgent? I think the current behaviour is very good at handling a wide range of types. It would be nice to consistently report errors for incompatible types but it can also just be documented as a thing that users shouldn't do. If there were a situation where it silently returned a highly inaccurate value I would consider that urgent but I don't think there is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 15:46:50 2014 From: report at bugs.python.org (Stefan Krah) Date: Tue, 04 Feb 2014 14:46:50 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <1391523584.21.0.835511786649.issue20502@psf.upfronthosting.co.za> Message-ID: <20140204144649.GA18990@sleipnir.bytereef.org> Stefan Krah added the comment: Mauricio de Alencar wrote: > > Mauricio de Alencar added the comment: > > "Digits after the decimal mark" is not the same as "significant digits". > See https://en.wikipedia.org/wiki/Significant_figures > > If I have a list of numbers [256.2, 1.3, 0.5] that have 3 significant digits each, I would like to have them displayed as: > ['256', '1.30', '0.500'] You need to stop lecturing. The above sentence you wrote directly contradicts the Wikipedia link you have thrown at us. And yes, thank you, we do know what significant figures are. FYI, the Python implementation of decimal, the C implementation of decimal and decNumber are completely separate implementations of http://speleotrove.com/decimal/decarith.html by different authors and produce exactly the results that you criticize. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:00:54 2014 From: report at bugs.python.org (Brett Cannon) Date: Tue, 04 Feb 2014 15:00:54 +0000 Subject: [issue20506] Command to display all available Import Library In-Reply-To: <1391476994.58.0.915135187283.issue20506@psf.upfronthosting.co.za> Message-ID: <1391526054.49.0.440472585412.issue20506@psf.upfronthosting.co.za> Brett Cannon added the comment: The trick would be how to query finders to say "what could you find?" There is no API for that so either something pragmatic that won't work in the face of e.g. zipfiles would need to be used or a new optional API on finders to list what the tail name of modules it can find are (but without the package name as most finders just use fullname.rpartition('.')[-1] to figure out what they are looking for). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:11:06 2014 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Feb 2014 15:11:06 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <20140204144607.GA2333@gmail.com> Message-ID: Nick Coghlan added the comment: Changing the behaviour is not urgent - documenting that it may change in the future is essential. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:12:26 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 15:12:26 +0000 Subject: [issue19186] expat symbols should be namespaced in pyexpat again In-Reply-To: <1381151097.4.0.844657685559.issue19186@psf.upfronthosting.co.za> Message-ID: <3fJTsj2rlzz7LkX@mail.python.org> Roundup Robot added the comment: New changeset c242a8f30806 by Benjamin Peterson in branch '3.3': restore namespacing of pyexpat symbols (closes #19186) http://hg.python.org/cpython/rev/c242a8f30806 New changeset a2d877fb53f6 by Benjamin Peterson in branch 'default': merge 3.3 (#19186) http://hg.python.org/cpython/rev/a2d877fb53f6 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:20:36 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 15:20:36 +0000 Subject: [issue20494] Backport of http://bugs.python.org/issue11849 to Python 2.7 (Make it more likely for the system allocator to release free()d memory arenas on glibc-based systems). In-Reply-To: <1391388769.61.0.620925038774.issue20494@psf.upfronthosting.co.za> Message-ID: <3fJV3769G6z7LrH@mail.python.org> Roundup Robot added the comment: New changeset 4e43e5b3f7fc by Benjamin Peterson in branch '2.7': mmap obmalloc arenas so that they may be immediately returned to the system when unused (closes #20494) http://hg.python.org/cpython/rev/4e43e5b3f7fc ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:39:26 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 15:39:26 +0000 Subject: [issue14376] sys.exit documents argument as "integer" but actually requires "subtype of int" In-Reply-To: <1332288480.19.0.200013792885.issue14376@psf.upfronthosting.co.za> Message-ID: <1391528366.99.0.726129969911.issue14376@psf.upfronthosting.co.za> Gareth Rees added the comment: Patch attached. I added a test case to Lib/test/test_sys.py. ---------- Added file: http://bugs.python.org/file33906/exit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:43:14 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Tue, 04 Feb 2014 15:43:14 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391528594.41.0.756444288846.issue20481@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Hi Nick and Oscar, my patch including tests is ready. What else should I say than that I think it is ok, but of course with only days remaining and still no feedback from Steven, I'm not sure there is any chance for it going into 3.4 still. Anyway, before uploading I wanted to ask you what the best procedure is: upload the module and its tests as one diff or separately so that it is easier to see where the current module version fails? Best, Wolfgang ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:46:45 2014 From: report at bugs.python.org (Mauricio de Alencar) Date: Tue, 04 Feb 2014 15:46:45 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <20140204144649.GA18990@sleipnir.bytereef.org> Message-ID: Mauricio de Alencar added the comment: > You need to stop lecturing. I'm sorry, I didn't mean to offend anyone. I just felt I was failing to communicate the issue when I got the suggestion to use format(Decimal(1), ".2f"). > The above sentence you wrote directly contradicts the Wikipedia link you have thrown at us. The floats I posted are examples of computation results. The meaningful figures are related to the precision of the measurements fed to the computation. > by different authors and produce exactly the results that you criticize. I understand the design choice for decimal. I just miss a pythonic way of dealing with significant figures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:53:33 2014 From: report at bugs.python.org (Marius Gedminas) Date: Tue, 04 Feb 2014 15:53:33 +0000 Subject: [issue20509] logging.config.fileConfig() docs could link to the config file format Message-ID: <1391529213.62.0.538303765352.issue20509@psf.upfronthosting.co.za> New submission from Marius Gedminas: When one is reading the description of logging.config.fileConfig() at http://docs.python.org/3.3/library/logging.config.html#logging.config.fileConfig not immediately apparent what the "configparser-format file" should contain (i.e. the naming convention for sections, and what keys mean what.) This is all nicely described at http://docs.python.org/3.3/library/logging.config.html#configuration-file-format but personal experience shows that users like me hit Page Down a few times and give up before they reach that part (and also they do not think to read the outline in the sidebar). It would be nice if there was a direct link, like in the attached patch. ---------- assignee: docs at python components: Documentation files: improve-fileconfig-docs.patch keywords: patch messages: 210245 nosy: docs at python, mgedmin priority: normal severity: normal status: open title: logging.config.fileConfig() docs could link to the config file format type: enhancement versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file33907/improve-fileconfig-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 17:09:06 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 16:09:06 +0000 Subject: [issue20510] Test cases in test_sys don't match the comments Message-ID: <1391530146.21.0.549410928914.issue20510@psf.upfronthosting.co.za> New submission from Gareth Rees: Lib/test/test_sys.py contains test cases with incorrect comments -- or comments with incorrect test cases, if you prefer: # call without argument try: sys.exit(0) except SystemExit as exc: self.assertEqual(exc.code, 0) ... # call with tuple argument with one entry # entry will be unpacked try: sys.exit(42) except SystemExit as exc: self.assertEqual(exc.code, 42) ... # call with integer argument try: sys.exit((42,)) except SystemExit as exc: self.assertEqual(exc.code, 42) ... (In the quote above I've edited out some inessential detail; see the file if you really want to know.) You can see that in the first test case sys.exit is called with an argument (although the comment claims otherwise); in the second it is called with an integer (not a tuple), and in the third it is called with a tuple (not an integer). These comments have been unchanged since the original commit by Walter D?rwald . I've attached a patch that corrects the first test case and swaps the comments for the second and third test cases: # call without argument rc = subprocess.call([sys.executable, "-c", "import sys; sys.exit()"]) self.assertEqual(rc, 0) # call with integer argument try: sys.exit(42) except SystemExit as exc: self.assertEqual(exc.code, 42) ... # call with tuple argument with one entry # entry will be unpacked try: sys.exit((42,)) except SystemExit as exc: self.assertEqual(exc.code, 42) ... Note that in the first test case (without an argument) sys.exit() with no argument actually raises SystemExit(None), so it's not sufficient to catch the SystemExit and check exc.code; I need to check that it actually gets translated to 0 on exit. ---------- components: Tests files: exittest.patch keywords: patch messages: 210246 nosy: Gareth.Rees priority: normal severity: normal status: open title: Test cases in test_sys don't match the comments type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file33908/exittest.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 17:12:03 2014 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 04 Feb 2014 16:12:03 +0000 Subject: [issue20509] logging.config.fileConfig() docs could link to the config file format In-Reply-To: <1391529213.62.0.538303765352.issue20509@psf.upfronthosting.co.za> Message-ID: <1391530323.4.0.557786546881.issue20509@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: docs at python -> vinay.sajip nosy: +vinay.sajip versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 17:32:06 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 04 Feb 2014 16:32:06 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391528594.41.0.756444288846.issue20481@psf.upfronthosting.co.za> Message-ID: <20140204163200.GV3799@ando> Steven D'Aprano added the comment: Wolfgang, Thanks for the patch, I have some concerns about it, but the basic idea does look reasonable. However, I've been convinced that supporting mixed types at all needs more careful thought. Under the circumstances, I'm more concerned about making sure we don't lock in any behaviour we'll regret, so for 3.4 I'm going to follow Nick's advice and reject mixed-type calculations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 17:40:21 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 16:40:21 +0000 Subject: [issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map In-Reply-To: <1382534189.14.0.63787411181.issue19363@psf.upfronthosting.co.za> Message-ID: <1391532021.54.0.564303108625.issue19363@psf.upfronthosting.co.za> Gareth Rees added the comment: What about a documentation change instead? The future_builtins chapter in the standard library documentation could note the incompatibility. I've attached a patch which adds the following note to the documentation for future_builtins.map: Note: In Python 3, map() does not accept None for the function argument. (zip() can be used instead.) ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 17:42:30 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 16:42:30 +0000 Subject: [issue20509] logging.config.fileConfig() docs could link to the config file format In-Reply-To: <1391529213.62.0.538303765352.issue20509@psf.upfronthosting.co.za> Message-ID: <3fJWsf05jxz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset 45aa817ec853 by Vinay Sajip in branch '2.7': Issue #20509: Added cross-reference in documentation. http://hg.python.org/cpython/rev/45aa817ec853 New changeset f8318b069146 by Vinay Sajip in branch '3.3': Issue #20509: Added cross-reference in documentation. http://hg.python.org/cpython/rev/f8318b069146 New changeset 7d0a4f89c6ce by Vinay Sajip in branch 'default': Closes #20509: Merged documentation update from 3.3. http://hg.python.org/cpython/rev/7d0a4f89c6ce ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 17:45:06 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Tue, 04 Feb 2014 16:45:06 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391532306.48.0.860079283582.issue20481@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Hi Steven, sounds reasonable, still here's the patch in diff version. Its rules for type coercion are detailed in _coerce_types's docstring. Questions and comments are welcome. Best, Wolfgang ---------- keywords: +patch Added file: http://bugs.python.org/file33910/statistics.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 18:05:10 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Feb 2014 17:05:10 +0000 Subject: [issue20510] Test cases in test_sys don't match the comments In-Reply-To: <1391530146.21.0.549410928914.issue20510@psf.upfronthosting.co.za> Message-ID: <1391533510.36.0.358417636927.issue20510@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 18:08:35 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 04 Feb 2014 17:08:35 +0000 Subject: [issue20510] Test cases in test_sys don't match the comments In-Reply-To: <1391530146.21.0.549410928914.issue20510@psf.upfronthosting.co.za> Message-ID: <1391533715.29.0.245880495619.issue20510@psf.upfronthosting.co.za> Zachary Ware added the comment: Good catch! See my review comments. Also, if you haven't already, could you please sign a contributor's agreement? See http://www.python.org/psf/contrib/. ---------- stage: -> patch review versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 18:39:39 2014 From: report at bugs.python.org (Kaarle Ritvanen) Date: Tue, 04 Feb 2014 17:39:39 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1391535579.42.0.505139177414.issue20491@psf.upfronthosting.co.za> Changes by Kaarle Ritvanen : Added file: http://bugs.python.org/file33911/honor-non-breaking-spaces.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 18:40:31 2014 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 04 Feb 2014 17:40:31 +0000 Subject: [issue20511] asyncio: StreamReader should use bytearray for its internal buffer Message-ID: <1391535631.01.0.473053250343.issue20511@psf.upfronthosting.co.za> New submission from Yury Selivanov: This issue on google code: https://code.google.com/p/tulip/issues/detail?id=124 ---------- files: sr_ba_01.patch keywords: needs review, patch messages: 210253 nosy: gvanrossum, haypo, pitrou, yselivanov priority: normal severity: normal status: open title: asyncio: StreamReader should use bytearray for its internal buffer Added file: http://bugs.python.org/file33912/sr_ba_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 18:54:34 2014 From: report at bugs.python.org (Stefan Krah) Date: Tue, 04 Feb 2014 17:54:34 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: Message-ID: <20140204175433.GA20486@sleipnir.bytereef.org> Stefan Krah added the comment: Mauricio de Alencar wrote: > The floats I posted are examples of computation results. The meaningful > figures are related to the precision of the measurements fed to the > computation. Thank you, that makes it clear. Constructing Decimal('256.2') preserves the exact value, regardless of the context precision. All arithmetic functions accept arbitrary precision input and use all digits regardless of the context precision. To put it differently, decimal refuses to guess and treats any input as having the correct number of significant digits. If you want to attribute a significance to a series of input numbers, I guess you have to do it manually, using something like: def mk_full_coeff(x): prec = getcontext().prec adj = x.adjusted() if adj >= prec: return +x else: return x.quantize(Decimal(1).scaleb(adj-prec+1)) >>> c = getcontext() >>> c.prec = 3 >>> [mk_full_coeff(x) for x in [Decimal('256.2'), Decimal('1.3'), Decimal('0.5')]] [Decimal('256'), Decimal('1.30'), Decimal('0.500')] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 19:01:07 2014 From: report at bugs.python.org (Antony Lee) Date: Tue, 04 Feb 2014 18:01:07 +0000 Subject: [issue19573] Fix the docstring of inspect.Parameter and the implementation of _ParameterKind In-Reply-To: <1384371223.06.0.467962768293.issue19573@psf.upfronthosting.co.za> Message-ID: <1391536867.65.0.512103673141.issue19573@psf.upfronthosting.co.za> Antony Lee added the comment: Submitted new patch as suggested. ---------- Added file: http://bugs.python.org/file33913/inspect.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 19:03:36 2014 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 04 Feb 2014 18:03:36 +0000 Subject: [issue19573] Fix the docstring of inspect.Parameter and the implementation of _ParameterKind In-Reply-To: <1384371223.06.0.467962768293.issue19573@psf.upfronthosting.co.za> Message-ID: <1391537016.73.0.0687141206801.issue19573@psf.upfronthosting.co.za> Yury Selivanov added the comment: The patch looks good to me. I'll merge it in 3.5 later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 19:29:18 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 18:29:18 +0000 Subject: [issue20510] Test cases in test_sys don't match the comments In-Reply-To: <1391530146.21.0.549410928914.issue20510@psf.upfronthosting.co.za> Message-ID: <1391538558.08.0.667277851686.issue20510@psf.upfronthosting.co.za> Gareth Rees added the comment: I normally try not to make changes "while we're in here" for fear of introducing errors! But I guess the test cases are less critical, so I've taken your review comments as a license to submit a revised patch that: * incorporates your suggestion to use assert_python_ok from test.script_helper, instead of subprocess.call; * replaces the other uses of subprocess.call with assert_python_failure and adds a check on stdout; * cleans up the assertion-testing code using the context manager form of unittest.TestCase.assertRaises. I've signed and submitted a contributor agreement as requested. ---------- Added file: http://bugs.python.org/file33914/exittest-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 19:48:23 2014 From: report at bugs.python.org (Alexis Daboville) Date: Tue, 04 Feb 2014 18:48:23 +0000 Subject: [issue20512] Python3.3 segfaults when using big5hkscs encoding Message-ID: <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za> New submission from Alexis Daboville: When using the 'big5hkscs' encoding it's possible to make Python3.3 segfault, here is how to repro: ? 13:41 adaboville @ adoboville-mbp in ~ $ py3 Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 'nb'.encode('big5hkscs') b'nb' >>> 'nb'.encode('big5hkscs') Segmentation fault: 11 Note that it doesn't crash on the first first line, but on the second (even though both lines are the same). FWIW pypy3.3 doesn't crash: ? 13:43 adaboville @ adoboville-mbp in .../pypy3-2.1-beta1-osx64 $ bin/pypy Python 3.2.3 (d63636b30cc0, Jul 30 2013, 07:02:48) [PyPy 2.1.0-beta1 with GCC 4.2.1 Compatible Clang Compiler] on darwin Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``why did you guys have to make the builtin fortune more interesting than actual work? i just catched myself restarting pypy 20 times'' >>>> 'nb'.encode('big5hkscs') b'nb' >>>> 'nb'.encode('big5hkscs') b'nb' >>>> ---------- messages: 210258 nosy: alexis.d priority: normal severity: normal status: open title: Python3.3 segfaults when using big5hkscs encoding type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:03:28 2014 From: report at bugs.python.org (Victor Scherba) Date: Tue, 04 Feb 2014 19:03:28 +0000 Subject: [issue20513] Script interruption on logoff from 0 session under Win2003 and earlier Message-ID: <1391540608.89.0.389395011233.issue20513@psf.upfronthosting.co.za> New submission from Victor Scherba: To get the bug: 1. Windows Server 2003 (same bug should be under earlier versions: XP, 2000, ...). 2. Any Windows service should spawn process with Python script. 3. Py script should stay into time.sleep. 4. Any Windows user should login in console session 0. 5. Bug: when this user logoff, script interrupts. To repeat the bug simply you could use srvany which spawn: python.exe -c "import time; time.sleep(10000)". There is problem in cpython/Modules/timemodule.c in PyCtrlHandler. Before logoff Windows broadcasts to all services and its children CTRL_LOGOFF_EVENT signal. But PyCtrlHandler doesn't filter it out by dwCtrlType and always sets hInterruptEvent. This forces script interruption. CTRL_SHUTDOWN_EVENT also should be filtered out. CTRL_SHUTDOWN_EVENT broacasted to all services before Windows shutdown. But after it has been handled, other process can block or pause shutdowning. Default Windows console control handler does not call ExitProcess when processing the CTRL_LOGOFF_EVENT and CTRL_SHUTDOWN_EVENT signals. See more at http://msdn.microsoft.com/en-us/library/windows/desktop/ms683242(v=vs.85).aspx On Win Vista and higher bug not presents. Impossible to login to session 0 because of session 0 isolation. Patch attached. There is same fix in cpython/Modules/_multiprocessing/multiprocessing.c ---------- components: Extension Modules, Windows messages: 210259 nosy: vScherba priority: normal severity: normal status: open title: Script interruption on logoff from 0 session under Win2003 and earlier type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:05:16 2014 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 04 Feb 2014 19:05:16 +0000 Subject: [issue20512] Python3.3 segfaults when using big5hkscs encoding In-Reply-To: <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za> Message-ID: <1391540716.76.0.27846370902.issue20512@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +haypo, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:06:52 2014 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 04 Feb 2014 19:06:52 +0000 Subject: [issue20512] Python3.3 segfaults when using big5hkscs encoding In-Reply-To: <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za> Message-ID: <1391540812.16.0.434292160362.issue20512@psf.upfronthosting.co.za> Yury Selivanov added the comment: Can't reproduce this on 3.3.3 Python 3.3.3 (default, Dec 2 2013, 01:40:21) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:19:03 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Feb 2014 19:19:03 +0000 Subject: [issue20512] Python3.3 segfaults when using big5hkscs encoding In-Reply-To: <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za> Message-ID: <1391541543.42.0.350261896491.issue20512@psf.upfronthosting.co.za> R. David Murray added the comment: Alexis: are you on 10.9, by any chance? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:21:08 2014 From: report at bugs.python.org (Victor Scherba) Date: Tue, 04 Feb 2014 19:21:08 +0000 Subject: [issue20513] Script interruption on logoff from 0 session under Win2003 and earlier In-Reply-To: <1391540608.89.0.389395011233.issue20513@psf.upfronthosting.co.za> Message-ID: <1391541668.54.0.739966713722.issue20513@psf.upfronthosting.co.za> Changes by Victor Scherba : ---------- keywords: +patch Added file: http://bugs.python.org/file33915/ConsoleCtrlHandler.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:22:31 2014 From: report at bugs.python.org (Victor Scherba) Date: Tue, 04 Feb 2014 19:22:31 +0000 Subject: [issue20513] Script interruption on logoff from 0 session under Win2003 and earlier In-Reply-To: <1391540608.89.0.389395011233.issue20513@psf.upfronthosting.co.za> Message-ID: <1391541751.91.0.496064743237.issue20513@psf.upfronthosting.co.za> Changes by Victor Scherba : Removed file: http://bugs.python.org/file33915/ConsoleCtrlHandler.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:22:51 2014 From: report at bugs.python.org (Victor Scherba) Date: Tue, 04 Feb 2014 19:22:51 +0000 Subject: [issue20513] Script interruption on logoff from 0 session under Win2003 and earlier In-Reply-To: <1391540608.89.0.389395011233.issue20513@psf.upfronthosting.co.za> Message-ID: <1391541771.91.0.897138121741.issue20513@psf.upfronthosting.co.za> Changes by Victor Scherba : Added file: http://bugs.python.org/file33915/ConsoleCtrlHandler.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:28:19 2014 From: report at bugs.python.org (Victor Scherba) Date: Tue, 04 Feb 2014 19:28:19 +0000 Subject: [issue20513] Python 2.7. Script interruption on logoff from 0 session under Win2003 and earlier In-Reply-To: <1391540608.89.0.389395011233.issue20513@psf.upfronthosting.co.za> Message-ID: <1391542099.01.0.607002383158.issue20513@psf.upfronthosting.co.za> Changes by Victor Scherba : ---------- title: Script interruption on logoff from 0 session under Win2003 and earlier -> Python 2.7. Script interruption on logoff from 0 session under Win2003 and earlier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 20:42:12 2014 From: report at bugs.python.org (Alexis Daboville) Date: Tue, 04 Feb 2014 19:42:12 +0000 Subject: [issue20512] Python3.3 segfaults when using big5hkscs encoding In-Reply-To: <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za> Message-ID: <1391542932.59.0.683110484264.issue20512@psf.upfronthosting.co.za> Alexis Daboville added the comment: @David: yes, 10.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 21:46:28 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Feb 2014 20:46:28 +0000 Subject: [issue20512] Python3.3 segfaults when using big5hkscs encoding In-Reply-To: <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za> Message-ID: <1391546788.86.0.298752118889.issue20512@psf.upfronthosting.co.za> R. David Murray added the comment: Most likely, then, this is a duplicate of issue 18458. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 21:46:44 2014 From: report at bugs.python.org (Mauricio de Alencar) Date: Tue, 04 Feb 2014 20:46:44 +0000 Subject: [issue20502] Context.create_decimal_from_float() inconsistent precision for zeros after decimal mark In-Reply-To: <20140204175433.GA20486@sleipnir.bytereef.org> Message-ID: Mauricio de Alencar added the comment: Thank you. This function accomplishes what I need, avoiding the float->string->Decimal conversion path. I will use a slight variation of it accepting floats and a precision value: from decimal import Decimal, Contextdef sigdec(f, prec): x = Context(prec=prec).create_decimal_from_float(f) adj = x.adjusted() if adj >= prec - 1: return x else: return x.quantize(Decimal(1).scaleb(adj-prec+1)) Since create_decimal_from_float() applies the precision upon conversion, the +x trick is not needed. I also noticed that (adj >= prec - 1) does the job, avoiding the else block in a few more cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:01:12 2014 From: report at bugs.python.org (Armin Rigo) Date: Tue, 04 Feb 2014 21:01:12 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391547672.69.0.664426330931.issue1654367@psf.upfronthosting.co.za> Armin Rigo added the comment: Hi Fabio! This is admittedly a corner-case use case, but if you think it would be worth it, we can very easily add this as a feature to PyPy (by making frame.f_locals writeable). Then we can add the write inside pdb, and you could do the same for PyDev when running on PyPy. It's certainly something that goes beyond the standard of CPython 2.7 but we'd consider it because it's obviously debug-only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:12:14 2014 From: report at bugs.python.org (Armin Rigo) Date: Tue, 04 Feb 2014 21:12:14 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391548334.03.0.476699419235.issue1654367@psf.upfronthosting.co.za> Armin Rigo added the comment: Also, can you provide a concrete case? Trying around in CPython 2.7, it seems that locals of the current frame can always be modified from a pdb.set_trace(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:26:05 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Feb 2014 21:26:05 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1391549165.03.0.908869038001.issue19362@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My objection to 'container' is that it is inaccurate and leads to inaccurate mental models. A set is like a non-exclusive club or association, defined either by rule or roster, not like a box or room, which contain exclusively. I am 'in' the set Python Developers, but am not contained by it. Some decades ago I was hindered by the notion that a set is like a box (container). A web search indicates that the top hits all have variations on 'well-defined, unordered *collection* of objects, considered as an object in itself' -- wikipedia, mathisfun, wikia, brittanica, math.ku.edu. We do a disservice to call a set a container. It is true that many Python collections are implemented by containing references to objects (a roster) but ranges are not (a parameterized rule). The *collections* module is properly named. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:39:38 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 21:39:38 +0000 Subject: [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1391549978.96.0.766269136668.issue19362@psf.upfronthosting.co.za> Gareth Rees added the comment: Here's a revised patch for Terry ("Return the number of items of a sequence or collection.") ---------- Added file: http://bugs.python.org/file33916/len-set.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:41:37 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Feb 2014 21:41:37 +0000 Subject: [issue20508] IndexError from ipaddress._BaseNetwork.__getitem__ has no message In-Reply-To: <1391519371.56.0.280883005316.issue20508@psf.upfronthosting.co.za> Message-ID: <1391550097.11.0.830460496894.issue20508@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ncoghlan, pmoody _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:49:26 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Feb 2014 21:49:26 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391550566.36.0.0893265726006.issue3068@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I expect I will look at this eventually. However, my priorities are bugs, tests, and enhancements that benefit me. From the description, this moves one configuration option that I do not use to a new dialog. So I do not see any immediate improvement for me. Is the idea to have a framework in place for new extensions that have configuration options? I am not really clear on why some features, like reformat, are considered 'extensions' rather than just normal features, and why its configuration should be segregated. The comment "A pure Tkinter scrollable frame that actually works!" suggests that there is somewhere a scrollable frame that does not work. The docs? The tkinter package? In any case, this seems like something that perhaps should go in the tkinter package. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:50:46 2014 From: report at bugs.python.org (Nikolaus Rath) Date: Tue, 04 Feb 2014 21:50:46 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <1391513295.28.0.832802307878.issue15216@psf.upfronthosting.co.za> Message-ID: <52F160B3.600@rath.org> Nikolaus Rath added the comment: On 02/04/2014 03:28 AM, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > If operating systems always exposed accurate metadata and configuration settings, I'd agree with you. They don't though, so sometimes developers need to be able to override whatever the interpreter figured out automatically. Where does the operating system come into play? What I'm trying to say is that any code of the form fh = some_python_function() fh.set_encoding(foo) should really be written as fh = some_python_function(encoding=foo) or fh = TextIOWrapper(some_python_function(raw=True), encoding=foo) The only exception to this is sys.std{in,out,err}. But this special case should, in my opinion, be solved with a corresponding special function in sys.*, rather than a general purpose method in TextIOWrapper. > In addition, needing to cope with badly designed APIs is an unfortunate fact of life - that's why monkeypatching is only *discouraged*, rather than disallowed :) Well, yes, but introducing a set_encoding() or reconfigure() function is actively *encouraging* bad API design. "I'll just return my favorite encoding from this function, after all, the caller can use set_encoding afterwards". Best, Nikolaus -- Encrypted emails preferred. PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C ?Time flies like an arrow, fruit flies like a Banana.? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:51:03 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Feb 2014 21:51:03 +0000 Subject: [issue20512] Python3.3 segfaults when using big5hkscs encoding In-Reply-To: <1391539703.53.0.816371062299.issue20512@psf.upfronthosting.co.za> Message-ID: <1391550663.61.0.206732112369.issue20512@psf.upfronthosting.co.za> Ned Deily added the comment: This is definitely a duplicate of Issue18458 since the build signature indicates you are using 3.3.2 from the python.org OS X binary installer. The problem is fixed in the current Python 3.3.3 installer. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 23:27:12 2014 From: report at bugs.python.org (Robert Copperwhite) Date: Tue, 04 Feb 2014 22:27:12 +0000 Subject: [issue20514] Errno 10013 - ipython notebook Message-ID: <1391552832.57.0.277394042566.issue20514@psf.upfronthosting.co.za> New submission from Robert Copperwhite: Hello, I've recently installed ipython (Anaconda) and haven't managed to get up and running. When I execute "ipython notebook" from the command prompt I get the attached error message, basically: "Errno 10013: An attempt was made to access a socket in a way forbidden by its access permissions". I have disabled all firewalls, and even uninstalled McAfee but no resolution. Would be grateful for some recommendations on what to try next. Thanks ---------- components: Installation messages: 210272 nosy: robertc priority: normal severity: normal status: open title: Errno 10013 - ipython notebook type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 23:33:30 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Feb 2014 22:33:30 +0000 Subject: [issue20507] TypeError from str.join has no message In-Reply-To: <1391512142.14.0.683696819623.issue20507@psf.upfronthosting.co.za> Message-ID: <1391553210.72.0.829280208674.issue20507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 23:39:16 2014 From: report at bugs.python.org (Tal Einat) Date: Tue, 04 Feb 2014 22:39:16 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391553556.45.0.230163255995.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: As the title suggests, this patch adds a second configuration dialog, used to configure extensions. This is useful because many extensions have parameters, but setting them can only be done by editing a file. Also, the documentation for such parameters is hard to find (when it exists). Finally, it allows us (the IDLE devs) to add more default extensions, allowing users to easily configure them or disable them, all without cluttering the regular config dialog. Regarding the patch, please note that it is from 5.5 years ago. Back then there was no scrollable frame that worked properly, so I implemented one which worked well enough for the config dialogs. I didn't test it thoroughly enough in other scenarios to suggest adding it to Tkinter. I think that since then a proper scrollable frame was added to Tk, so that part of the patch is probably no longer necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 23:41:30 2014 From: report at bugs.python.org (Fabio Zadrozny) Date: Tue, 04 Feb 2014 22:41:30 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391553690.58.0.572159419132.issue1654367@psf.upfronthosting.co.za> Fabio Zadrozny added the comment: Hi Armin, Sure, just attached the test case with tests failing (on the top, comment the save_locals(frame) which has a 'pass' to see it working). Mostly, it happens when editing something not in the top-frame (but sometimes I think it could fail there too, depending whether it's a cellvar or freevar). ---------- Added file: http://bugs.python.org/file33917/test_save_locals.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 00:09:12 2014 From: report at bugs.python.org (Christian Heimes) Date: Tue, 04 Feb 2014 23:09:12 +0000 Subject: [issue20515] Null pointer dereference in tkinter module Message-ID: <1391555352.52.0.553421944384.issue20515@psf.upfronthosting.co.za> New submission from Christian Heimes: varname_converter() doesn't check the return value of PyUnicode_AsUTF8AndSize() for NULL. The bug was introduced by http://hg.python.org/cpython/rev/321b714653e3 / issue #20368 3. returned_null: Function "PyUnicode_AsUTF8AndSize(PyObject *, Py_ssize_t *)" returns null (checked 28 out of 30 times).[show details] 4. var_assigned: Assigning: "s" = null return value from "PyUnicode_AsUTF8AndSize(PyObject *, Py_ssize_t *)". 1399 s = PyUnicode_AsUTF8AndSize(in, &size); 5. Condition "size > 2147483647", taking false branch 1400 if (size > INT_MAX) { 1401 PyErr_SetString(PyExc_OverflowError, "string is too long"); 1402 return 0; 1403 } CID 1167595 (#1 of 1): Dereference null return value (NULL_RETURNS)6. dereference: Dereferencing a pointer that might be null "s" when calling "strlen(char const *)" 1404 if (strlen(s) != size) { ---------- components: Tkinter files: cid1167595.patch keywords: patch messages: 210276 nosy: christian.heimes, larry, serhiy.storchaka priority: release blocker severity: normal stage: patch review status: open title: Null pointer dereference in tkinter module type: crash versions: Python 3.4 Added file: http://bugs.python.org/file33918/cid1167595.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 00:14:25 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 04 Feb 2014 23:14:25 +0000 Subject: [issue20514] Errno 10013 - ipython notebook In-Reply-To: <1391552832.57.0.277394042566.issue20514@psf.upfronthosting.co.za> Message-ID: <1391555665.73.0.253908786413.issue20514@psf.upfronthosting.co.za> Ned Deily added the comment: ipython is not part of the standard Python library. Suggest you ask on the ipython mailing list or help chat room (http://ipython.org) or perhaps on an Anaconda list. ---------- nosy: +ned.deily resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 00:31:42 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 23:31:42 +0000 Subject: [issue20368] Tkinter: handle the null character In-Reply-To: <1390490102.86.0.0317755498486.issue20368@psf.upfronthosting.co.za> Message-ID: <3fJhxn6w7Yz7Llh@mail.python.org> Roundup Robot added the comment: New changeset d83ce3a2d954 by Christian Heimes in branch '3.3': Issue #20515: Fix NULL pointer dereference introduced by issue #20368 http://hg.python.org/cpython/rev/d83ce3a2d954 New changeset 145032f626d3 by Christian Heimes in branch 'default': Issue #20515: Fix NULL pointer dereference introduced by issue #20368 http://hg.python.org/cpython/rev/145032f626d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 00:31:43 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 23:31:43 +0000 Subject: [issue20515] Null pointer dereference in tkinter module In-Reply-To: <1391555352.52.0.553421944384.issue20515@psf.upfronthosting.co.za> Message-ID: <3fJhxp5THwz7LlR@mail.python.org> Roundup Robot added the comment: New changeset d83ce3a2d954 by Christian Heimes in branch '3.3': Issue #20515: Fix NULL pointer dereference introduced by issue #20368 http://hg.python.org/cpython/rev/d83ce3a2d954 New changeset 145032f626d3 by Christian Heimes in branch 'default': Issue #20515: Fix NULL pointer dereference introduced by issue #20368 http://hg.python.org/cpython/rev/145032f626d3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 01:25:42 2014 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Feb 2014 00:25:42 +0000 Subject: [issue15216] Support setting the encoding on a text stream after creation In-Reply-To: <52F160B3.600@rath.org> Message-ID: Nick Coghlan added the comment: Metaclasses and monkeypatching encourage bad API design, too, but we still provide them because they're essential tools for some use cases. In Python, the system integrator is always right, and we provide them with power tools to deal with the cases where reality doesn't want to cooperate with the nice neat model of the world that we provide by default. For the standard streams, the problem is that the stream is created automatically by the interpreter, and sometimes we will get the encoding choice wrong (because the info we retrieve from the OS doesn't match what the user actually wants), but rebinding the names to a new IO stream causes other problems. Now, we have two choices at this point: 1. Assume there is *no other API involving implicit text stream creation in any third party Python 3 library anywhere* that will ever have this problem and create a solution that only works with the standard streams 2. Acknowledge that while the implicit way we create the standard streams is unusual, it is unlikely to be *unique*, so it actually does make sense to provide the ability to change the encoding of an existing stream as a general purpose feature fenced about with as many "you probably don't want to use this unless you really know what you are doing, otherwise it may eat your data" warnings as seems appropriate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 02:00:26 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Feb 2014 01:00:26 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391562026.58.0.130634689942.issue3068@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (Because of PEP 434, this could be added to all current versions if and when it is added. Marking for 3.5 is enough for now.) I am not yet very familiar with either extensions or configuration. > many extensions have parameters, but setting them can only be done by editing a file If this is true of existing extensions (and I don't even know which features are 'extensions), then this patch would be useful now. Otherwise, it could wait until new extensions are included. As I understand the patch so far, it creates a generic tab from a section of a configuration file. Would 3rd party extensions add such a section? Or do we really need a mechanism for extension files to define a tab for the extension. (This would also enable custom placements of fields.) I personally have no need to disable extensions, but if there were another 10 or 20, I can imagine a class instructor would like a way to easily simplify the interface, or to make a custom extension easier to work with. > the documentation for such parameters is hard to find (when it exists) I recently disabled the useless help button on the configuration dialog. I think what is needed is a tab-specific help text. That would work especially well for extension-specific tabs, but we would need a mechanism to get help text from an extension file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 02:05:14 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Feb 2014 01:05:14 +0000 Subject: [issue20515] Null pointer dereference in tkinter module In-Reply-To: <1391555352.52.0.553421944384.issue20515@psf.upfronthosting.co.za> Message-ID: <1391562314.85.0.188324115707.issue20515@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is the fix needed for 2.7? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 02:52:52 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 05 Feb 2014 01:52:52 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391565172.86.0.464570242122.issue12691@psf.upfronthosting.co.za> Gareth Rees added the comment: Yury, let me see if I can move this issue forward. I clearly haven't done a good job of explaining these problems, how they are related, and why it makes sense to solve them together, so let me have a go now. 1. tokenize.untokenize() raises AssertionError if you pass it a sequence of tokens output from tokenize.tokenize(). This was my original problem report, and it's still not fixed in Python 3.4: Python 3.4.0b3 (default, Jan 27 2014, 02:26:41) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import tokenize, io >>> t = list(tokenize.tokenize(io.BytesIO('1+1'.encode('utf8')).readline)) >>> tokenize.untokenize(t) Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py", line 317, in untokenize out = ut.untokenize(iterable) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py", line 246, in untokenize self.add_whitespace(start) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py", line 232, in add_whitespace assert row <= self.prev_row AssertionError This defeats any attempt to use the sequence: input code -> tokenize -> transform -> untokenize -> output code to transform Python code. But this ought to be the main use case for the untokenize function! That's how I came across the problem in the first place, when I was starting to write Minipy . 2. Fixing problem #1 is easy (just swap <= for >=), but it raises the question: why wasn't this mistake caught by test_tokenize? There's a test function roundtrip() whose docstring says: Test roundtrip for `untokenize`. `f` is an open file or a string. The source code in f is tokenized, converted back to source code via tokenize.untokenize(), and tokenized again from the latter. The test fails if the second tokenization doesn't match the first. If I don't fix the problem with roundtrip(), then how can I be sure I have fixed the problem? Clearly it's necessary to fix the test case and establish that it provokes the assertion. So why doesn't roundtrip() detect the error? Well, it turns out that tokenize.untokenize() has two modes of operation and roundtrip() only tests one of them. The documentation for tokenize.untokenize() is rather cryptic, and all it says is: Each element returned by the [input] iterable must be a token sequence with at least two elements, a token number and token value. If only two tokens are passed, the resulting output is poor. By reverse-engineering the implementation, it seems that it has two modes of operation. In the first mode (which I have called "compatibility" mode after the method Untokenizer.compat() that implements it) you pass it tokens in the form of 2-element tuples (type, text). These must have exactly 2 elements. In the second mode (which I have called "full" mode based on the description "full input" in the docstring) you pass it tokens in the form of tuples with 5 elements (type, text, start, end, line). These are compatible with the namedtuples returned from tokenize.tokenize(). The "full" mode has the buggy assertion, but test_tokenize.roundtrip() only tests the "compatibility" mode. So I must (i) fix roundtrip() so that it tests both modes; (ii) improve the documentation for tokenize.untokenize() so that programmers have some chance of figuring this out in future! 3. As soon as I make roundtrip() test both modes it provokes the assertion failure. Good, so I can fix the assertion. Problem #1 solved. But now there are test failures in "full" mode: $ ./python.exe -m test test_tokenize [1/1] test_tokenize ********************************************************************** File "/Users/gdr/hg.python.org/cpython/Lib/test/test_tokenize.py", line ?, in test.test_tokenize.__test__.doctests Failed example: for testfile in testfiles: if not roundtrip(open(testfile, 'rb')): print("Roundtrip failed for file %s" % testfile) break else: True Expected: True Got: Roundtrip failed for file /Users/gdr/hg.python.org/cpython/Lib/test/test_platform.py ********************************************************************** 1 items had failures: 1 of 73 in test.test_tokenize.__test__.doctests ***Test Failed*** 1 failures. test test_tokenize failed -- 1 of 78 doctests failed 1 test failed: test_tokenize Examination of the failed tokenization shows that if the source contains a backslashed-newline, then in "full" mode Untokenize.add_whitespace() fails to leave any space between the token before the blackslash-newline and the token afterwards. The trouble is that backslash-newlines don't result in a token from tokenize(). But in update Untokenize.add_whitespace() I can deduce that there must have been a backslash-newline whenever I see the first token on a new line (other than a DEDENT or ENDMARKER) and the previous token was not a NEWLINE or NL. 4. OK, with problems 1-3 fixed, shouldn't I now actually test the documented round-trip property fully? The property that roundtrip() currently tests is: tokenize(untokenize(tokenize(code))) == tokenize(code) which is all that is guaranteed in "compatibility" mode. But the docstring for tokenize.untokenize() says: Round-trip invariant for full input: Untokenized source will match input source exactly So in "full" mode it seems that the following is guaranteed: untokenize(tokenize(code)) == code But if I add a test for this stronger round-trip property, it immediately fails. The docstring is not telling the truth! 5. Why doesn't the "full" round-trip property hold? It seems that there are (at least) two separate problems: i. tokenize() doesn't output a token for a backslash-newline so although untokenize() can deduce that there must have been one, it can't know what whitespace there was before it. ii. In compatibility mode, the first token is always discarded. If the tokens came from tokenize.tokenize(), then this is the ENCODING token, so the encoding is never applied. (Benjamin Peterson had previously discovered this problem but just suppressed the failing test case instead of reporting it: ) Looking through this sequence of woes again, it's clear that I can save problems 4 and 5 for another issue. But I am confident that problems 1-3 must be fixed together. So although Meador Inge said above that "the current patch fixes way too many issues", I hope that if he reads the argument above he will see why I did what I did: this is the minimum sensible change I know how to make. I have prepared a revised patch that applies to the current head. Please review it: I'll do my best to fix all the problems you find. ---------- Added file: http://bugs.python.org/file33919/Issue12691.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 02:54:40 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 05 Feb 2014 01:54:40 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391565280.06.0.345423004421.issue12691@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 03:45:08 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Feb 2014 02:45:08 +0000 Subject: [issue20465] Upgrade SQLite to 3.8.3 with 3.4.0 Windows and OS X installers In-Reply-To: <1391201845.39.0.337535666199.issue20465@psf.upfronthosting.co.za> Message-ID: <3fJnDy6Ysyz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 32af4954e46a by Ned Deily in branch 'default': Issue #20465: Update SQLite shipped with OS X installer to 3.8.3. http://hg.python.org/cpython/rev/32af4954e46a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 03:47:34 2014 From: report at bugs.python.org (Ned Deily) Date: Wed, 05 Feb 2014 02:47:34 +0000 Subject: [issue20465] Upgrade SQLite to 3.8.3 with 3.4.0 Windows and OS X installers In-Reply-To: <1391201845.39.0.337535666199.issue20465@psf.upfronthosting.co.za> Message-ID: <1391568454.07.0.767119632461.issue20465@psf.upfronthosting.co.za> Ned Deily added the comment: With the consent of the release manager, the SQLite library to be shipped with the OS X installers for 3.4.0 has been updated to 3.8.3. Assigning to MvL for the Windows installers. ---------- assignee: -> loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 03:56:55 2014 From: report at bugs.python.org (Glenn Langford) Date: Wed, 05 Feb 2014 02:56:55 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) Message-ID: <1391569015.82.0.789033083368.issue20516@psf.upfronthosting.co.za> New submission from Glenn Langford: The current approach taken in as_completed() and wait() is to immediately lock the entire set of given Futures simultaneously. This limits concurrency, particularly when the number of futures is large, and also requires the complete set of Futures to be known up front. A different approach is to lock Futures one at a time, as they are given. In the case of as_completed(), completed futures can be yielded immediately. For completed futures, a waiter also does not have to be installed (whereas the current implementation installs waiters for all given Futures, regardless of state). A demonstration patch is attached which - locks Futures one at a time for as_completed() and all variations of wait() - reduces the overhead in tracking the state of each Future - makes it easier to add other user APIs if desired later - consolidates the machinery into a new internal class, reducing the amount of code ---------- components: Library (Lib) files: futures-base.patch keywords: patch messages: 210286 nosy: bquinlan, glangford, haypo, pitrou priority: normal severity: normal status: open title: Concurrent.futures base concurrency improvement (with patch) type: enhancement versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file33920/futures-base.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 04:06:27 2014 From: report at bugs.python.org (Larry Hastings) Date: Wed, 05 Feb 2014 03:06:27 +0000 Subject: [issue20465] Upgrade SQLite to 3.8.3 with 3.4.0 Windows and OS X installers In-Reply-To: <1391201845.39.0.337535666199.issue20465@psf.upfronthosting.co.za> Message-ID: <1391569587.1.0.903301458343.issue20465@psf.upfronthosting.co.za> Larry Hastings added the comment: I assumed that you guys took responsibility for the binary installers, and the decision was up to you. But I'm happy to take ultimate responsibility for the decision to ship SQLite 3.8.3 with 3.4 if that's what policy demands, and yes I give it my blessing. According to the release notes: http://www.sqlite.org/draft/changes.html there are two new constants: SQLITE_DETERMINISTIC and SQLITE_READONLY_DBMOVED. It looks like there's no point in adding these int constants to the module, as the latter is an error (and those never escape the module) and the former is a flag to creating a "function" (and there's no exposed means to pass in flags here). Do we need to do anything to support additional features in 3.8.3, like this SQLITE_DETERMINISTIC flag? Roping in "ghaering", the sqlite expert from the list. ---------- nosy: +ghaering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 04:12:04 2014 From: report at bugs.python.org (Ned Deily) Date: Wed, 05 Feb 2014 03:12:04 +0000 Subject: [issue20465] Upgrade SQLite to 3.8.3 with 3.4.0 Windows and OS X installers In-Reply-To: <1391201845.39.0.337535666199.issue20465@psf.upfronthosting.co.za> Message-ID: <1391569924.86.0.95420338001.issue20465@psf.upfronthosting.co.za> Ned Deily added the comment: Larry, I thought we had agreed on everything in email so I wasn't expecting any further pronouncements from you, just documenting that post feature cutoff decision. I think we're good to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 04:23:20 2014 From: report at bugs.python.org (Larry Hastings) Date: Wed, 05 Feb 2014 03:23:20 +0000 Subject: [issue20465] Upgrade SQLite to 3.8.3 with 3.4.0 Windows and OS X installers In-Reply-To: <1391201845.39.0.337535666199.issue20465@psf.upfronthosting.co.za> Message-ID: <1391570600.44.0.797335971658.issue20465@psf.upfronthosting.co.za> Larry Hastings added the comment: Ned, yeah I recall the discussion, and I didn't think you needed a further pronouncement from me. I was just saying, I'm not sure you *ever* needed a pronouncement from me. ;-) Everything's perfectly alright now. We're fine... we're all fine here now. Thank you. How are you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 04:43:10 2014 From: report at bugs.python.org (Larry Hastings) Date: Wed, 05 Feb 2014 03:43:10 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions Message-ID: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> New submission from Larry Hastings: There are a bunch of functions provided by Python, e.g. PyErr_SetFromErrnoWithFilenameObject(), that allow specifying a filename associated with the error. But there are some errors that really need two filenames, like copy(), symlink(), and rename(). The error could be on only one file, but some errors could apply to either or both, and errno's error doesn't always provide enough context to tell which it would be. I propose that we add new APIs that allow specifying a second filename. We take all the *WithFilename* APIs and add the *WithFilenames* equivalent (e.g. PyErr_SetFromErrnoWithFilenameObjects()). Internally, oserror_parse_args() would now parse an extra "filename2" entry in the tuple, just after the "filename" entry (but before the possible "winerror" entry). Currently when formatting an error with a filename, the format string looks like [Errno {errno}] {errstring}: {filename} I propose that for two filenames it look like [Errno {errno}] {errstring}: \"{filename}\" -> \"{filename2}\" ---------- messages: 210290 nosy: georg.brandl, larry, richard, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Support errors with two filenames for errno exceptions type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 09:30:36 2014 From: report at bugs.python.org (Martin Teichmann) Date: Wed, 05 Feb 2014 08:30:36 +0000 Subject: [issue20518] Weird behavior with multiple inheritance when C classes involved Message-ID: <1391589036.91.0.744972661823.issue20518@psf.upfronthosting.co.za> New submission from Martin Teichmann: Python behaves odd with regards to multiple inheritance and classes written in C. I stumbled over this problem while working with PyQt4, but soon realized that part of the problem is not actually in that library, but is deep down in the CPython core. For better understanding of this post, I still use PyQt4 as an example. For those who don't know PyQt4, it's an excellent Python binding for some C++ library, for this post you only need to know that QTimer is a class that inherits from QObject. The PyQt4 documentation repeatedly insists that it is not possible to inherit more than one of its classes. This is not astonishing, since this is actually a limitation of CPython. What should still be possible is to inherit from two classes if one is the parent of the other. Let me give an example: ======================================== from PyQt4.QtCore import QObject, QTimer # QObject is the parent of QTimer class A(QObject): pass class B(A, QTimer): pass class C(QTimer, A): pass print(B.__base__, B.__mro__) print(C.__base__, C.__mro__) ======================================== Both classes B and C technically inherit from both QObject and QTimer, but given that QTimer inherits from QObject, there is no actual multiple inheritance here, from the perspective of a class written in C. But now the problems start. The metaclass of PyQt4 uses the __base__ class attribute to find out which of its classes the new class actually decends from (this is called the "best_base" in typeobject.c). This is the correct behavior, this is exactly what __base__ is for. Lets see what it contains. For the class B, the second-to-last line prints: (, , , , , , ) So, __base__ is set to class A. This is incorrect, as PyQt4 now thinks it should create a QObject. The reason is the weird algorithm that typeobject.c uses: it tries to find the most special class that does not change the size of the its instances (called the solid_base). This sounds reasonable at first, because only classes written in C can change the size of their instances. Unfortunately, this does not hold the other way around: in PyQt4, the instances only contain a pointer to the actual data structures, so all instances of all PyQt4 classes have the same size, and __base__ will simply default to __bases__[0]. Now I tried to outsmart this algorithm, why not put the PyQt4 class as the first parent class? This is what the class C is for in my example. And indeed, the last line of my example prints: (, , , , , , ) So hooray, __base__ is set to QTimer, the metaclass will inherit from the correct class! But well, there is a strong drawback: now the MRO, which I print in the same example, has a mixture of Python and PyQt4 classes in it. Unfortunately, the methods of the PyQt4 classes do not call super, so they are uncooperative when it comes to multiple inheritance. This is expected, as they are written in C++, a language that has a weird concept of cooperative multiple inheritance, if it has one at all. So, to conclude: it is sometimes not possible to use python cooperative multiple inheritance if C base classes are involved. This is a bummer. Can we change this behavior? Yes, certainly. The clean way would be to re-write typeobject.c to actually find the best_base in a sane way. This would be easiest if we could just find out somehow whether a class is written in Python or in C, e.g. by adding a tp_flag to PyTypeObject. best_base would then point to the most specialized parent written in C. A simpler solution would be to default to __bases__[-1] for __base__, then we can tell users to simply put their uncooperative base classes last in the list of bases. ---------- components: Interpreter Core messages: 210291 nosy: Martin.Teichmann priority: normal severity: normal status: open title: Weird behavior with multiple inheritance when C classes involved type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 09:52:28 2014 From: report at bugs.python.org (Suzumizaki) Date: Wed, 05 Feb 2014 08:52:28 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391590348.73.0.252941573893.issue20485@psf.upfronthosting.co.za> Suzumizaki added the comment: Thank you Victor about msg210125, I read the discussion on ML, May 2011. Inside the articles, the previous discussion on tracker is found: "On Windows, don't encode filenames in the import machinery" http://bugs.python.org/issue11619 Here is my memo, might be helpful to review the discussions. -- About Window CE -- * Windows CE series have GetProcAddress() at First. * with Windows CE 3.0, GetProcAddressA() is added. * but Python community chose 'A' version to support Windows CE. * Windows CE continues as Windows Embedded Compact today. * but Python3 for Windows CE seems not to be distributed. -- About Windows Desktop and Servers -- * Windows Desktops and Servers have GetProcAddress() only, neither A nor W postfix appended. * GetProcAddress() on Windows Desktop and Servers takes LPCSTR as the 2nd parameter. * but the parameter, in this case, is null-terminated binary block. neither MBCS nor UTF-8. * Visual C++ 2010 encodes non-ASCII export symbols as UTF-8. * Because the 2 reasons described above the 2 lines, We can give UTF-8 encoded string to GetProcAddress(). I checked the last fact with my Window Japanese Editions: * XP Home Edition (32bit) * Vista Home Premium (64bit) * Windows 8.1 Pro (64bit) GetProcAddress (Windows CE) The type of the 2nd parameter is LPC"W"STR, and the document says LPCSTR version added on CE 3.0. http://msdn.microsoft.com/en-us/library/ms885634.aspx GetProcAddress (Windows Desktop/Server) The type of the 2nd parameter is LPCSTR, nor LPC"T"STR neither LPC"W"STR. Note that the example seems to be wrong about using TEXT macro. http://msdn.microsoft.com/en-us/library/windows/desktop/ms683212(v=vs.85).aspx PythonCE (seems stopped at Python 2.5 compatible) http://pythonce.sourceforge.net/ Symbols seem to be encoded utf-8 inside Windows Executable https://mail.python.org/pipermail/python-dev/2011-May/111325.html -- About C/C++ Standards -- * C99 says the significant length of identifiers are 63. * C99 allows to use Unicode to name identifiers. * but not define how to translate \uNNNN or \uNNNNNNNN forms used in "quotations". * C++11 defines u8"" literals. we can make utf-8 char* string inside u8"quotes" with \u formats. * but the encoding of source file is platform dependent. * also, how to export symbols is platform dependent. -- About C/C++ tool kits -- * Window Executable can contain 2048 chars per each exported symbol. * Visual C++ 2010 seems to encode exporting symbols with UTF-8. * gcc don't have logical limit of the length of identifiers. * Currently, Visual C++ 2010 and LLVM/Clang supports using UTF-8 in whole source code. * gcc only support \uNNNN or \uNNNNNNNN form. * About GetProcAddress() functions, see previous memo about Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 10:11:36 2014 From: report at bugs.python.org (Suzumizaki) Date: Wed, 05 Feb 2014 09:11:36 +0000 Subject: [issue20485] Enable 'import .pyd' In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391591496.44.0.864595147561.issue20485@psf.upfronthosting.co.za> Suzumizaki added the comment: Thank you Nick about msg210209. I would like to try making PEP, but the work looks somewhat difficult. It may take the time. BTW, C/C++ Standards only allow the encoding of source code as platform dependent. They don't define "the standard encoding of source codes"... This means we have to choose to resolve this issue, one is giving up readability, the other is allowing platform-dependent feature, using UTF-8 to write the C code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 10:19:09 2014 From: report at bugs.python.org (Hendrik) Date: Wed, 05 Feb 2014 09:19:09 +0000 Subject: [issue2008] cookielib lacks FileCookieJar class for Safari In-Reply-To: <1202153846.32.0.869416159529.issue2008@psf.upfronthosting.co.za> Message-ID: <1391591949.13.0.914593159598.issue2008@psf.upfronthosting.co.za> Changes by Hendrik : ---------- keywords: +patch Added file: http://bugs.python.org/file33921/cookie.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 10:42:48 2014 From: report at bugs.python.org (Hendrik) Date: Wed, 05 Feb 2014 09:42:48 +0000 Subject: [issue2008] cookielib lacks FileCookieJar class for Safari In-Reply-To: <1202153846.32.0.869416159529.issue2008@psf.upfronthosting.co.za> Message-ID: <1391593368.81.0.300717613658.issue2008@psf.upfronthosting.co.za> Changes by Hendrik : Added file: http://bugs.python.org/file33922/cookiejar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 10:48:11 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 05 Feb 2014 09:48:11 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391593691.28.0.731726492435.issue20517@psf.upfronthosting.co.za> Vajrasky Kok added the comment: "But there are some errors that really need two filenames, like copy(), symlink(), and rename()." I think *need* is too strong word in this case. I agree that two filenames is better than none. But I don't see anything wrong from omitting filenames in error messages for copy(), etc. If PHP and Perl are taking "omitting filenames" way, surely there is some merit in that way. I am in if we are taking "two filenames" way just like Ruby does. It's just isn't it too rush for Python 3.4? ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 10:55:02 2014 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Feb 2014 09:55:02 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391594102.12.0.422425141647.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: (This is a bit long; there's a TL;DR at the end.) You'd be surprised how many of IDLE's features are implemented as extensions. These are simply included in idlelib, enabled by default and configured with reasonable values. Take a look at Lib/idlelib/config-extensions.def, and you'll see all of the bundled extensions' configuration values. (Every extension must have a section in config-extensions.def or a user's config-extensions.cfg to be enabled.) So, for example, auto-completion is an extension. Besides disabling it completely, a user can also change the delay before the completion list appears automatically by setting 'popupwait', and customize the key bindings for the 'autocomplete' and 'force-open-completions' events. The 'ParenMatch' and 'CodeContext' extensions also each have several configurable settings. And most extensions have at least one event to which keyboard shortcuts can be bound. If after all of the above you look again at the 'FormatParagraph' extension, you'll see that it's breaking the convention. The maximum line width is configurable, but isn't found in config-extensions.def! Instead of using the normal extension configuration mechanism, FormatParagraph reads the 'maxformatwidth' config value from IDLE's main configuration on every call to format_paragraph_event(). Why was this done? To allow users to configure this setting using the GUI instead of editing a config file! If a config dialog for extensions had existed, this hack wouldn't have been necessary. So what does my patch achieve? * It makes many more of IDLE's settings easy to discover, set and fiddle with. Some of these are actually useful, e.g. AutoComplete's 'popupwait' setting. * Makes it reasonable to tell a user "just disable auto-completions from the extension config dialog". (Without this patch: "find your .idlerc folder; open the config-extensions.cfg file or create one if it doesn't exist; find the [AutoComplete] section; make sure enable=0 is written directly under it".) * Removes the inconsistent hack in FormatParagraph.format_paragraph_event(). * Makes it more reasonable to bundle more extensions with IDLE (such as my Squeezer extension; see issue1529353). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 11:01:40 2014 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Feb 2014 10:01:40 +0000 Subject: [issue1529353] Squeezer - squeeze large output in the interpreter Message-ID: <1391594500.08.0.226962213163.issue1529353@psf.upfronthosting.co.za> Tal Einat added the comment: Ping? Can this please go in? It's such a great improvement to user experience! I've seen too many novice users print a ton of output by accident and have IDLE hang as a result, losing their interactive session. This simple extension avoid those issues completely, while still allowing access to the output if needed. I'd even be willing to do any extra work required, such as testing on Windows, Linux and OSX. Just tell me what's holding this up! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 11:24:41 2014 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Feb 2014 10:24:41 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391595881.47.0.850046453714.issue20167@psf.upfronthosting.co.za> Tal Einat added the comment: Confirmed on OSX 10.8 with Python 3.4 (built from default branch, changeset 88969:32af4954e46a). Note that this doesn't happen when opening just a shell window, e.g. by running ./python -m idlelib.idle. Furthermore, even when running IDLE as described in the OP, if I open a shell window and then close, I don't get an exception. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 11:33:23 2014 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Feb 2014 10:33:23 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391596403.34.0.274055617224.issue20167@psf.upfronthosting.co.za> Tal Einat added the comment: This is caused by MultiCall's _ComplexBinder.__del__() being called during app shutdown. _ComplexBinder.__del__() unbinds a bunch of event handlers from the widget to which it is attached. It seems that there's some edge case here where the underlying Tk widget has already been destroyed. Instead of trying to debug all of the Tk events and app shutdown order, I propose just surrounding this __del__() code with a try/except block, catching _tkinter.TclError and ignoring it. From my (somehwat limited) understanding of MultiCall, this shouldn't do any harm. See attached patch. ---------- keywords: +patch Added file: http://bugs.python.org/file33923/taleinat_idle_closing_exception.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 11:56:49 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Feb 2014 10:56:49 +0000 Subject: [issue2008] cookielib lacks FileCookieJar class for Safari In-Reply-To: <1202153846.32.0.869416159529.issue2008@psf.upfronthosting.co.za> Message-ID: <1391597809.39.0.496365865759.issue2008@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 11:59:04 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 05 Feb 2014 10:59:04 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391597944.21.0.140849623525.issue12691@psf.upfronthosting.co.za> Gareth Rees added the comment: This morning I noticed that I had forgotten to update the library reference, and I also noticed two more problems to add to the list above: 6. Although Lib/test/test_tokenize.py looks like it contains tests for backslash-newline handling, these tests are ineffective. Here they are: >>> roundtrip("x=1+\\\\n" ... "1\\n" ... "# This is a comment\\\\n" ... "# This also\\n") True >>> roundtrip("# Comment \\\\nx = 0") True There are two problems here: (i) because of the double string escaping, these are not backslash-newline, they are backslash-n. (ii) the roundtrip() test is too weak to detect this problem: tokenize() outputs an ERRORTOKEN for the backslash and untokenize() restores it. So the round-trip property is satisfied. 7. Problem 6 shows the difficulty of using doctests for this kind of test. It would be easier to ensure the correctness of these tests if the docstring was read from a separate file, so that at least the tests only need one level of string escaping. I fixed problem 6 by updating these tests to use dump_tokens() instead of roundtrip(). I have not fixed problem 7 (like 4 and 5, I can leave it for another issue). Revised patch attached. ---------- Added file: http://bugs.python.org/file33924/Issue12691.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:18:44 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 11:18:44 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391599124.42.0.310750596173.issue20167@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 1. try/except should be inside a loop, not outside. 2. It would be better not to hide the problem under the rug, but find why the order of destruction is different when open shell window. Of course, if better solution will not be found, we will have to apply this patch before 3.4 releasing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:26:05 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 11:26:05 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391599565.66.0.535618193855.issue20517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As release manager Larry has the right to add a new feature after feature freeze. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:40:18 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 05 Feb 2014 11:40:18 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391600418.02.0.532881851663.issue12691@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- assignee: -> docs at python components: +Documentation, Tests nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:43:04 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Feb 2014 11:43:04 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <3fK19h08Zkz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 31ddd45a05ba by Serhiy Storchaka in branch 'default': Issue #20489: Explicitly qualified expressions for default values in methods. http://hg.python.org/cpython/rev/31ddd45a05ba ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:43:06 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Feb 2014 11:43:06 +0000 Subject: [issue20498] Update StringIO newline tests In-Reply-To: <1391410655.69.0.384794659533.issue20498@psf.upfronthosting.co.za> Message-ID: <3fK19h5Jl1z7LjS@mail.python.org> Roundup Robot added the comment: New changeset 07e7bb29a2c5 by Serhiy Storchaka in branch '2.7': Issue #20498: Fixed io.StringIO tests for newline='\n'. Added new tests. http://hg.python.org/cpython/rev/07e7bb29a2c5 New changeset e23c928b9e39 by Serhiy Storchaka in branch '3.3': Issue #20498: Fixed io.StringIO tests for newline='\n'. Added new tests. http://hg.python.org/cpython/rev/e23c928b9e39 New changeset 7ed8a9f9831d by Serhiy Storchaka in branch 'default': Issue #20498: Fixed io.StringIO tests for newline='\n'. Added new tests. http://hg.python.org/cpython/rev/7ed8a9f9831d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:43:38 2014 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Feb 2014 11:43:38 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391600618.2.0.0110312936043.issue20167@psf.upfronthosting.co.za> Tal Einat added the comment: I put the try/except outside of the loop on purpose. If calling the widget's unbind() method fails once, it will fail forever afterwards. If you prefer a different spelling, move the try/except into the loop, and break out of the loop in case of an exception: for seq, id in self.handlerids: try: self.widget.unbind(self.widgetinst, seq, id) except _tkinter.TclError: break As for avoiding the exception in the first place, I'm sure figuring out how IDLE shuts down would be a lot of work, and I honestly don't think it's necessary. Note that this problem is triggered in a __del__() method; making sure these are called at a proper time is problematic because the timing depends on the GC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:43:41 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Feb 2014 11:43:41 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391600621.17.0.614483924894.issue3068@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you! This is a bit of the 'Idle Developer's Guide' that I wish existed. It turns out that the exceptional FormatParagraph.py is the one extension file I am really familiar with, because I worked with a GSOC student to write tests and fix/improve it. I agree that this would be useful now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:52:23 2014 From: report at bugs.python.org (Gustavo J. A. M. Carneiro) Date: Wed, 05 Feb 2014 11:52:23 +0000 Subject: [issue20519] uuid.uuid4().hex generates garbage when ctypes available Message-ID: <1391601143.27.0.910101155735.issue20519@psf.upfronthosting.co.za> New submission from Gustavo J. A. M. Carneiro: If you try the attached program, you will find that for every iteration the uuid.uuid4() call generates objects that contain reference cycles and need the help of the garbage collector. This is not nice. If I make the ctypes module not able to import, then no garbage is generated. This problem appears in 2.7, 3.3, and 3.4, at least. ---------- components: Library (Lib) files: gc.py messages: 210306 nosy: gustavo priority: normal severity: normal status: open title: uuid.uuid4().hex generates garbage when ctypes available type: resource usage versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33925/gc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 13:44:14 2014 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Feb 2014 12:44:14 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391604254.45.0.727358233904.issue20167@psf.upfronthosting.co.za> Tal Einat added the comment: Attaching second patch, to replace the first. As suggested by Serhiy, I moved the try/except block into the loop. I also added a comment explaining the try/except block and referencing this issue. ---------- Added file: http://bugs.python.org/file33926/taleinat_idle_closing_exception_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 13:50:46 2014 From: report at bugs.python.org (Tal Einat) Date: Wed, 05 Feb 2014 12:50:46 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391604646.54.0.260356122426.issue20167@psf.upfronthosting.co.za> Tal Einat added the comment: Both previous patches caused an import error. Here's a new patch with that fixed, and actually tested to fix the bug. ---------- Added file: http://bugs.python.org/file33927/taleinat_idle_closing_exception_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 14:09:34 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 13:09:34 +0000 Subject: [issue20520] Readline test in test_codecs is broken Message-ID: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The ReadTest.test_readline test in Lib/test/test_codecs.py has two loops on "\n \r\n \r \u2028".split(). But as far as "\n \r\n \r \u2028".split() is empty list (because newline characters are whitespace characters), the bodies of these loops are never executed. After fixing this bug, a number of other tests were exposed. I tried to fix them. The purpose of these tests is not entirely clear, so I'm not sure that it is properly grasped the idea of the author. Test was added in issue1076985 and modified in issue1175396. ---------- components: Tests files: test_codecs_readline.patch keywords: patch messages: 210309 nosy: doerwalter, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Readline test in test_codecs is broken type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33928/test_codecs_readline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 14:10:15 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 13:10:15 +0000 Subject: [issue20498] Update StringIO newline tests In-Reply-To: <1391410655.69.0.384794659533.issue20498@psf.upfronthosting.co.za> Message-ID: <1391605815.58.0.452367650278.issue20498@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 Wed Feb 5 14:11:04 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 13:11:04 +0000 Subject: [issue20489] help() fails for zlib Compress and Decompress objects In-Reply-To: <1391361122.5.0.357428984902.issue20489@psf.upfronthosting.co.za> Message-ID: <1391605864.76.0.21396045407.issue20489@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 Wed Feb 5 14:23:13 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 13:23:13 +0000 Subject: [issue1529353] Squeezer - squeeze large output in the interpreter Message-ID: <1391606593.77.0.213445073406.issue1529353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please provide a patch which applies to default branch? There is other proposed solution for the problem of large output: issue1442493. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 14:29:07 2014 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Feb 2014 13:29:07 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391606947.98.0.78281275182.issue20053@psf.upfronthosting.co.za> Nick Coghlan added the comment: *sigh*, Windows is not cooperating, suggesting it is still reading the default config file: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4000/steps/test/logs/stdio ====================================================================== FAIL: test_with_pip (test.test_venv.EnsurePipTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_venv.py", line 342, in test_with_pip self.assertEqual(err, "") AssertionError: 'C:\\Users\\Buildbot\\AppData\\Local\\Temp[57 chars]\r\n' != '' - C:\Users\Buildbot\AppData\Local\Temp\tmpfiz5hrop\Scripts\python_d.exe: No module named pip ---------- components: +Library (Lib) keywords: +buildbot resolution: fixed -> stage: committed/rejected -> commit review status: closed -> open type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 14:38:51 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Feb 2014 13:38:51 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391607531.08.0.304441431091.issue20167@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I tried all three versions both installed and recent repository builds and verified that the overt issue is limited to 3.4. I agree that the exception message suggests stopping with the first exception. Since there is a small cost to try: and break, I am inclined to move the try back out of the loop. The only thing it could mask is a problem with self.handlerids, and I would expect that if that is corrupted or missing, there would be problems before shutdown. I know that in 3.4, shutdown order has been modified and the wording of the warning was discussed on pydev. I do not know (and do not care at the moment) if either ignoring __del__ exceptions or warning about them is new in 3.4. What I do remember from the discussion is agreement that 1. __del__ exceptions should be caught so shutdown can continue; 2. a warning should be given in case the exception indicates a bug in __del__; and 3. __del__ writers are responsible to catch exceptions that do not indicate a bug, so as to avoid the warning. So I am inclined to backport to all versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 14:55:12 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Feb 2014 13:55:12 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <3fK46737nwz7Llc@mail.python.org> Roundup Robot added the comment: New changeset ddc82c4d1a44 by Nick Coghlan in branch 'default': Issue #20053: new test to check an assumption http://hg.python.org/cpython/rev/ddc82c4d1a44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 14:56:12 2014 From: report at bugs.python.org (Sven Berkvens-Matthijsse) Date: Wed, 05 Feb 2014 13:56:12 +0000 Subject: [issue20521] [PATCH] Cleanup for "dis" module documentation Message-ID: <1391608572.54.0.381225308012.issue20521@psf.upfronthosting.co.za> New submission from Sven Berkvens-Matthijsse: The documentation for the "dis" module has a wrong opcode name in it (POP_STACK instead of POP_TOP). Furthermore, the patch fixes inconsistent use of markers for code and opcodes. ---------- assignee: docs at python components: Documentation files: dis-doc.patch keywords: patch messages: 210314 nosy: docs at python, svenberkvens priority: normal severity: normal status: open title: [PATCH] Cleanup for "dis" module documentation type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33929/dis-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:07:39 2014 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Wed, 05 Feb 2014 14:07:39 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391609259.27.0.567914711923.issue20520@psf.upfronthosting.co.za> Walter D?rwald added the comment: "\n \r\n \r \u2028".split() should have been "\n \r\n \r \u2028".split(" "), i.e. a list of different line ends. > The purpose of these tests is not entirely clear, so I'm not sure that it is properly grasped the idea of the author. I wrote the tests nearly 10 years ago, so it's no longer entirely clear to me either! ;) Anyway, here's a patch that fixes the resulting test failures. ---------- Added file: http://bugs.python.org/file33930/fix_linetests.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:10:44 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Feb 2014 14:10:44 +0000 Subject: [issue20519] uuid.uuid4().hex generates garbage when ctypes available In-Reply-To: <1391601143.27.0.910101155735.issue20519@psf.upfronthosting.co.za> Message-ID: <1391609444.91.0.565534485148.issue20519@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure that this is a real problem, but have you identified what the cycle is? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:12:48 2014 From: report at bugs.python.org (Gunnar Aastrand Grimnes) Date: Wed, 05 Feb 2014 14:12:48 +0000 Subject: [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391609568.12.0.0738509435343.issue20501@psf.upfronthosting.co.za> Gunnar Aastrand Grimnes added the comment: Agreed that a doc-fix is the first step. Shall I make another issue for the fix in fileinput? I also wonder if the comment in codecs is not too negative - it is not easy to get it 100% right, but the method just above readlines is readline, which does somehow manage to read a single line. To me it seems like it would be better to makes readlines repeatedly call readline. It would also be inefficient, but still better than reading the whole (possibly infinite) stream in ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:16:42 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Feb 2014 14:16:42 +0000 Subject: [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391609802.91.0.615994329476.issue20501@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, please make another issue for the enhancement request. That issue can start out agnostic as to whether it is codecs or fileinput that could use improvement, if you prefer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:19:53 2014 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Feb 2014 14:19:53 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391609993.02.0.511915307061.issue20053@psf.upfronthosting.co.za> Nick Coghlan added the comment: D'oh, still failing even though that new assumption check passes on Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4002/steps/test/logs/stdio Paul, any ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:28:22 2014 From: report at bugs.python.org (Gustavo J. A. M. Carneiro) Date: Wed, 05 Feb 2014 14:28:22 +0000 Subject: [issue20519] uuid.uuid4().hex generates garbage when ctypes available In-Reply-To: <1391601143.27.0.910101155735.issue20519@psf.upfronthosting.co.za> Message-ID: <1391610502.19.0.554335360608.issue20519@psf.upfronthosting.co.za> Gustavo J. A. M. Carneiro added the comment: Well, this isn't a big problem, but I have an application that needs to run with the GC disabled, since it causes pauses of a couple of seconds each time a full collection runs (we have a few million objects allocated). I will run the GC only once every 3 hours. So it would be nice if this uuid call didn't generate cycles. No, I didn't identify the cycle. All I know is that the garbage below is produced. If the ctypes module is unavailable, uuid still works but doesn't generate the garbage. >>> gc.garbage [(,), {'raw': , '__module__': 'ctypes', '__dict__': , '__weakref__': , '_length_': 16, '_type_': , '__doc__': None, 'value': }, , , , (, , , ), , , (,), {'raw': , '__module__': 'ctypes', '__dict__': , '__weakref__': , '_length_': 16, '_type_': , '__doc__': None, 'value': }, , , , (, , , ), , , (,), {'raw': , '__module__': 'ctypes', '__dict__': , '__weakref__': , '_length_': 16, '_type_': , '__doc__': None, 'value': }, , , , (, , , ), , , (,), {'raw': , '__module__': 'ctypes', '__dict__': , '__weakref__': , '_length_': 16, '_type_': , '__doc__': None, 'value': }, , , , (, , , ), , ] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:52:05 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Feb 2014 14:52:05 +0000 Subject: [issue4188] test_threading hang when running as verbose In-Reply-To: <1224793703.28.0.169476277835.issue4188@psf.upfronthosting.co.za> Message-ID: <1391611925.85.0.141038669236.issue4188@psf.upfronthosting.co.za> Berker Peksag added the comment: The threading._VERBOSE attribute was removed in issue 13550 (see also changeset http://hg.python.org/cpython/rev/8ec51b2e57c2). ---------- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:58:29 2014 From: report at bugs.python.org (Gustavo J. A. M. Carneiro) Date: Wed, 05 Feb 2014 14:58:29 +0000 Subject: [issue20519] uuid.uuid4().hex generates garbage when ctypes available In-Reply-To: <1391601143.27.0.910101155735.issue20519@psf.upfronthosting.co.za> Message-ID: <1391612309.91.0.888291074124.issue20519@psf.upfronthosting.co.za> Gustavo J. A. M. Carneiro added the comment: I have narrowed it down to one line of code: ctypes.create_string_buffer(16) That is enough to create 7 objects that have reference cycles. [, {'__module__': 'ctypes', '__doc__': None, '__weakref__': , 'raw': , '_length_': 16, '_type_': , 'value': , '__dict__': }, (, , , ), , , , ] So maybe the bug is in ctypes itself, not the uuid module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:59:12 2014 From: report at bugs.python.org (Simone Serrajotto) Date: Wed, 05 Feb 2014 14:59:12 +0000 Subject: [issue20522] pandas version 0.13.0 does not give warning when summing float with object Message-ID: New submission from Simone Serrajotto: Good afternoon, I have just installed pandas 0.13.0 and was observing some strange results produced by old codes. One major issue is that I found that when summing two columns of a dataframe, one of which is a float64 and the other an object, the result includes just the float64 columns. This would be not an issue per se, but no warning message is displayed. I think a warning in this case is of paramount importance. Regards, Simone -- Simone Serrajotto Quaestio Capital Management SGR SpA Unipersonale Corso Como 15 (8? piano) 20154 Milano C.F. e P.I. 06803880969 Iscritta all'Albo delle SGR al n. 299 Mobile: +39 393 919 0217 Tel: +39 02 3676 5241 E-Mail: s.serrajotto at quaestiocapital.com -- Le informazioni contenute nella comunicazione che precede sono riservate e destinate esclusivamente alla persona o all'ente sopraindicati. La diffusione, distribuzione e/o copiatura del presente email o di qualsiasi documento allegato da parte di qualsiasi soggetto diverso dal destinatario e' proibita. La sicurezza e la correttezza dei messaggi di posta elettronica non possono essere garantite. Se avete ricevuto questo messaggio per errore, Vi preghiamo di contattarci immediatamente. Grazie The content of this email is confidential and it is intended for the sole use of the addressees. The transmission, distribution and/or copy of this email or any document attached hereto by any person other than the addressees is prohibited. The transmission of this email cannot be guaranteed to be secure or error-free. If you have received this communication unintentionally, please inform us immediately. Thank you. ---------- messages: 210323 nosy: serrajo priority: normal severity: normal status: open title: pandas version 0.13.0 does not give warning when summing float with object _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 16:00:48 2014 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 05 Feb 2014 15:00:48 +0000 Subject: [issue20522] pandas version 0.13.0 does not give warning when summing float with object In-Reply-To: Message-ID: <1391612448.71.0.308971906248.issue20522@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hi Simone, I'm afraid you've got the wrong bugtracker. This is the bugtracker for the Python core language (which doesn't include Pandas). Pandas is a 3rd party project. You can report Pandas issues here: https://github.com/pydata/pandas/issues ---------- nosy: +mark.dickinson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 16:17:20 2014 From: report at bugs.python.org (Paul Moore) Date: Wed, 05 Feb 2014 15:17:20 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391613440.31.0.936425051728.issue20053@psf.upfronthosting.co.za> Paul Moore added the comment: Nothing obvious or Windows-specific from what I can see. It does seem to me that EnvironmentVarGuard doesn't monkeypatch os.environ even though it looks like it intends to (__exit__ sets it back, but __enter__ doesn't monkeypatch it). So maybe that's doing something weird? I'll try to have a better look later (not much spare time right now). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 16:26:04 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 05 Feb 2014 15:26:04 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391613964.61.0.966188580178.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the patch addressing Zachary's review (Thanks!). There are some Zachary's suggestions that I could not implement: 1. float_conjugate_impl, /* nb_float */ I think this should still be the real function (the parser), not the impl. The impl function is really just an implementation detail. It has to be that way. If I change it to float_conjugate, the compiler will complain. But on other places, we can use the real function. 2. v = list_sort_impl((PyListObject *)v, Py_None, 0); Considering what I said about not using impl functions at the end of floatobject.c, it would be nice to avoid it here, but I think that would be a lot more trouble than it would be worth. I can not use the real function here, otherwise the compiler will throw error. ---------- Added file: http://bugs.python.org/file33931/issue20185_conglomerate_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 16:31:55 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Wed, 05 Feb 2014 15:31:55 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391614315.75.0.239103242795.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Zachary, "Looking again, that one is non-trivial, but still doable. You just need a "this means an error happened" value to initialize rl to, and return that value instead of NULL." How do you give "this means an error happened" value to struct rlimit? struct rlimit { rlim_t rlim_cur; /* Soft limit */ rlim_t rlim_max; /* Hard limit (ceiling for rlim_cur) */ }; This is what prevents me to use custom converter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 16:44:17 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Feb 2014 15:44:17 +0000 Subject: [issue20519] ctypes.create_string_buffer creates reference cycles In-Reply-To: <1391601143.27.0.910101155735.issue20519@psf.upfronthosting.co.za> Message-ID: <1391615057.18.0.159408243101.issue20519@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, I was pretty sure it was in cytpes, from looking at the UUID code. ---------- components: +ctypes -Library (Lib) nosy: +amaury.forgeotdarc, belopolsky, meador.inge title: uuid.uuid4().hex generates garbage when ctypes available -> ctypes.create_string_buffer creates reference cycles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 16:54:46 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 15:54:46 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391609259.27.0.567914711923.issue20520@psf.upfronthosting.co.za> Message-ID: <5849664.Bl9ufTtHCr@raxxla> Serhiy Storchaka added the comment: > "\n \r\n \r \u2028".split() should have been "\n \r\n \r \u2028".split(" "), > i.e. a list of different line ends. Yes, this is obvious fix, but explicit tuple of line ends looks more clear and error-proof to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:07:38 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Feb 2014 16:07:38 +0000 Subject: [issue1410680] Add 'surgical editing' to ConfigParser Message-ID: <1391616458.55.0.278962611455.issue1410680@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:16:49 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 16:16:49 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391617009.33.0.00509712078075.issue20185@psf.upfronthosting.co.za> Zachary Ware added the comment: Vajrasky: Note that you can reply to individual review comments within Rietveld; this way context is kept and replies are easier :). The same people get the message either way. Anyhow, for float point 1: you can use I believe you can use (unaryfunc) for nb_int and nb_float, just like nb_positive above. list point 2: I agree, it's not worth it to try to not use the impl function. rlimit: I'm not sure what value to give, and I'm not where I can play with it until my PC catches fire, either. Is there some value that makes no sense as a legitimate value? Is it legal for rlim_cur to be greater than rlim_max? Or is there a value that is just exceedingly uncommon? Or you could simply pick some random value; your converter should be written to render with self.err_occurred_if("_return_value == RLIMIT_ERROR_VALUE"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:16:56 2014 From: report at bugs.python.org (Gustavo J. A. M. Carneiro) Date: Wed, 05 Feb 2014 16:16:56 +0000 Subject: [issue20519] ctypes.create_string_buffer creates reference cycles In-Reply-To: <1391601143.27.0.910101155735.issue20519@psf.upfronthosting.co.za> Message-ID: <1391617016.6.0.0753042114551.issue20519@psf.upfronthosting.co.za> Gustavo J. A. M. Carneiro added the comment: Regardless, if you don't mind, take this patch for Python 3.5 to avoid ctypes, at least in the Linux case (I don't have Windows to test). Creating a proper extension module is safer and really not that hard... ---------- keywords: +patch Added file: http://bugs.python.org/file33932/uuid-no-ctypes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:24:34 2014 From: report at bugs.python.org (Brett Cannon) Date: Wed, 05 Feb 2014 16:24:34 +0000 Subject: [issue20485] Enable non-ASCII extension module names In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391617474.26.0.943496568662.issue20485@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: -> test needed title: Enable 'import .pyd' -> Enable non-ASCII extension module names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:30:07 2014 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Wed, 05 Feb 2014 16:30:07 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391617807.12.0.409738878701.issue20520@psf.upfronthosting.co.za> Walter D?rwald added the comment: True, here's an updated patch. ---------- Added file: http://bugs.python.org/file33933/fix_linetests2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:40:38 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 05 Feb 2014 16:40:38 +0000 Subject: [issue20485] Enable non-ASCII extension module names In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391618438.77.0.791296332016.issue20485@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:47:06 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Feb 2014 16:47:06 +0000 Subject: [issue7717] Compilation fixes for IRIX In-Reply-To: <1263668634.91.0.221076005955.issue7717@psf.upfronthosting.co.za> Message-ID: <1391618826.43.0.880090800701.issue7717@psf.upfronthosting.co.za> Berker Peksag added the comment: According to the python-dev discussion, Irix is not supported anymore: https://mail.python.org/pipermail/python-dev/2009-February/086111.html ---------- keywords: -needs review nosy: +berker.peksag resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:48:47 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Feb 2014 16:48:47 +0000 Subject: [issue7718] Build shared libpythonX.Y.so on IRIX In-Reply-To: <1263668830.38.0.370210056705.issue7718@psf.upfronthosting.co.za> Message-ID: <1391618927.34.0.58632973009.issue7718@psf.upfronthosting.co.za> Berker Peksag added the comment: According to the python-dev discussion, Irix is not supported anymore: https://mail.python.org/pipermail/python-dev/2009-February/086111.html ---------- nosy: +berker.peksag resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 17:57:23 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Feb 2014 16:57:23 +0000 Subject: [issue20519] Replace uuid ctypes usage with an extension module. In-Reply-To: <1391601143.27.0.910101155735.issue20519@psf.upfronthosting.co.za> Message-ID: <1391619443.84.0.746030892987.issue20519@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. This looks like a good idea, but I'll leave it to someone with more experience with this module to review it. Let's change this issue to an enhancement request for uuid instead. If someone wants to work on the cycle-in-ctypes problem they can open a new issue. ---------- nosy: +ned.deily, serhiy.storchaka stage: -> patch review title: ctypes.create_string_buffer creates reference cycles -> Replace uuid ctypes usage with an extension module. type: resource usage -> enhancement versions: +Python 3.5 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 18:00:41 2014 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 05 Feb 2014 17:00:41 +0000 Subject: [issue20485] Enable non-ASCII extension module names In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391619641.53.0.359791093677.issue20485@psf.upfronthosting.co.za> Changes by Stefan Behnel : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 18:01:56 2014 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 05 Feb 2014 17:01:56 +0000 Subject: [issue20485] Enable non-ASCII extension module names In-Reply-To: <1391350828.19.0.622173065149.issue20485@psf.upfronthosting.co.za> Message-ID: <1391619716.86.0.596241245525.issue20485@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 18:38:51 2014 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 05 Feb 2014 17:38:51 +0000 Subject: [issue20345] Better logging defaults In-Reply-To: <1390400720.32.0.906733284392.issue20345@psf.upfronthosting.co.za> Message-ID: <1391621931.64.0.540787820648.issue20345@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 19:37:57 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Feb 2014 18:37:57 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1391625477.22.0.762998352611.issue1028088@psf.upfronthosting.co.za> Berker Peksag added the comment: This was fixed in issue 16611 (for 3.3 and 3.4) and there is a open issue for 2.7: issue 19870. I'm closing this one as a duplicate of issue 19870, because it has a patch. >>> from http import cookies >>> C = cookies.SimpleCookie() >>> C.load("chips=ahoy; vienna=finger; secure") >>> print(C) Set-Cookie: chips=ahoy Set-Cookie: vienna=finger; secure >>> C['vienna']['secure'] True ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Backport Cookie fix to 2.7 (httponly / secure flag) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 19:38:02 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 05 Feb 2014 18:38:02 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391625482.04.0.604656688288.issue12691@psf.upfronthosting.co.za> Changes by Gareth Rees : Removed file: http://bugs.python.org/file33919/Issue12691.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 19:55:28 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Feb 2014 18:55:28 +0000 Subject: [issue19920] TarFile.list() fails on some files In-Reply-To: <1386437860.38.0.0478693655005.issue19920@psf.upfronthosting.co.za> Message-ID: <3fKBmb4Rhjz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset a5895fca91f3 by Serhiy Storchaka in branch '3.3': Issue #19920: TarFile.list() no longer fails when outputs a listing http://hg.python.org/cpython/rev/a5895fca91f3 New changeset 077aa6d4f3b7 by Serhiy Storchaka in branch 'default': Issue #19920: TarFile.list() no longer fails when outputs a listing http://hg.python.org/cpython/rev/077aa6d4f3b7 New changeset 48c5c18110ae by Serhiy Storchaka in branch '2.7': Issue #19920: Added tests for TarFile.list(). Based on patch by Vajrasky Kok. http://hg.python.org/cpython/rev/48c5c18110ae ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 19:59:53 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 18:59:53 +0000 Subject: [issue19920] TarFile.list() fails on some files In-Reply-To: <1386437860.38.0.0478693655005.issue19920@psf.upfronthosting.co.za> Message-ID: <1391626793.79.0.883371317937.issue19920@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your patch Vajrasky. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:06:26 2014 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Feb 2014 19:06:26 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391627186.05.0.236085294049.issue12691@psf.upfronthosting.co.za> Yury Selivanov added the comment: Gareth, Thanks a lot for such a comprehensive writeup and the patch. Please give me a day or two to do the review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:28 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:28 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628088.14.0.448423694786.issue20185@psf.upfronthosting.co.za> Zachary Ware added the comment: Clearing nosy for file cleaning, will restore: larry,nadeem.vawda,serhiy.storchaka,vajrasky,zach.ware ---------- nosy: -larry, nadeem.vawda, serhiy.storchaka, vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:34 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:34 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628094.2.0.0496504059967.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33887/issue20185_conglomerate_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:36 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:36 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628096.62.0.0994417832849.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33778/issue20185_conglomerate.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:39 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:39 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628099.15.0.991946818161.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33773/clinic_floatobject_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:41 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:41 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628101.36.0.336161333191.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33769/clinic_marshal_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:44 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:44 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628104.2.0.914777299929.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33767/clinic_listobject_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:46 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:46 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628106.05.0.804698166162.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33746/clinic_typeobject_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:48 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:48 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628108.31.0.0615109676174.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33744/clinic_resource_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:50 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:50 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628110.37.0.768791807143.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33678/clinic_marshal_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:52 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:52 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628112.32.0.567081372372.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33644/clinic_marshal_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:53 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:53 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628113.87.0.455454416507.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33643/clinic_floatobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:55 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:55 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628115.48.0.495301439085.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33641/clinic_listobject_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:21:57 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:21:57 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628117.07.0.390413001962.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33612/clinic_listobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:22:00 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:22:00 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628120.74.0.852610369793.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33479/clinic_marshal.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:22:02 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:22:02 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628122.37.0.251003901764.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33475/clinic_resource.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:22:38 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:22:38 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628158.96.0.313172655734.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +larry, nadeem.vawda, serhiy.storchaka, vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:26:58 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:26:58 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628418.32.0.576686232568.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file33562/clinic_typeobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:27:08 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 19:27:08 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391628428.42.0.203247134804.issue20185@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- Removed message: http://bugs.python.org/msg210340 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:29:08 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Feb 2014 19:29:08 +0000 Subject: [issue20521] [PATCH] Cleanup for "dis" module documentation In-Reply-To: <1391608572.54.0.381225308012.issue20521@psf.upfronthosting.co.za> Message-ID: <1391628548.81.0.197371866941.issue20521@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +ncoghlan stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:39:25 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 05 Feb 2014 19:39:25 +0000 Subject: [issue20218] Add `pathlib.Path.write` and `pathlib.Path.read` In-Reply-To: <1389380693.53.0.752641621162.issue20218@psf.upfronthosting.co.za> Message-ID: <1391629165.62.0.912359704582.issue20218@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hi Ram, sorry, I'll take a look at your patch soon. (as you know, we're in feature freeze right now so your patch must wait for 3.4 to be released, anyway) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:42:46 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 19:42:46 +0000 Subject: [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391629366.45.0.572021544885.issue20501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As far as the issue is in the codecs module, this is 2.7 only issue, because codecs.open is used only in 2.7. And I suppose that replacing codecs.open by io.open should fix this issue. ---------- keywords: +patch nosy: +benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach stage: -> patch review versions: -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33934/fileinput_hook_encoded.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:56:18 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 05 Feb 2014 19:56:18 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > To solve a performance issue in asyncio, I added a new resolution attribute to selectors.BaseSelector and a new _granularity attribute to asyncio.BaseEventLoop. If I understood correctly, Charles-Fran?ois (author and so maintainer of the new selectors module) doesn't like the new resolution attribute because it is a lie (if I understood correctly Charles-Fran?ois complain). Here are the reasons I don't like this attribute: - it's a low-level implementation detail, which shouldn't be part of the API - it's actually impossible to provide a sensible value for the granularity, because it depends not only on the operating system, but also on the actual version on the OS, and the hardware, as Victor's extensive tests showed - what's the definition of this "granularity" anyway? - but most importantly, it's useless: the performance problem initially identified was due to the rounding of select/epoll/etc of timeouts towards zero, which means that it they got passed a timeout smaller than the syscall resolution, the syscall would end up being called in a tight loop. Now that the timeouts are rounded away from 0, that's not an issue anymore Let me state this last point once again: no busy loop can occur now that timeouts are rounded up. Sure, some syscalls, on some OS, can sometimes return a little bit earlier than expected, e.g. epoll can return after 0.98ms instead of 1ms. But that's not an issue, if that's the case you'll just loop an extra time, *all* event loops just work this way. Furthermore, note than due to rounding, the actual probability of having the syscall return earlier than expected is really low: for example, if the loop wants to wake up in 5.3ms, it will be rounded to 6ms, and even a slight early wakeup won't be enough to wake up before 5.3ms (typically it'll return after 5.98ms or so). > The patch is a comprise, it solves partially the asyncio performance issue. With the patch, BaseEventLoop._run_once() may not executed a task even if there was a scheduled task, just because of timing rounding issues. So I modified the existing patch to tolerate "useless calls" to _run_once(). If you want to keep the current approach, nothing prevents from using a fixed "slack" value, independant of the selector (e.g. 1ms seems reasonable). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:56:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Feb 2014 19:56:52 +0000 Subject: [issue14515] tempfile.TemporaryDirectory documented as returning object but returns name In-Reply-To: <1333678068.19.0.790451967958.issue14515@psf.upfronthosting.co.za> Message-ID: <3fKD7R2Q0gz7LjW@mail.python.org> Roundup Robot added the comment: New changeset b5fe07d39e16 by R David Murray in branch '3.3': #14515: clarify that TemporaryDirectory's __enter__ returns the name. http://hg.python.org/cpython/rev/b5fe07d39e16 New changeset 7b7e17723787 by R David Murray in branch 'default': #14515: clarify that TemporaryDirectory's __enter__ returns the name. http://hg.python.org/cpython/rev/7b7e17723787 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:58:09 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Feb 2014 19:58:09 +0000 Subject: [issue14515] tempfile.TemporaryDirectory documented as returning object but returns name In-Reply-To: <1333678068.19.0.790451967958.issue14515@psf.upfronthosting.co.za> Message-ID: <1391630289.14.0.262441610309.issue14515@psf.upfronthosting.co.za> R. David Murray added the comment: Just ran into this again :). Committed a patch with wording clarified based on Serhiy's feedback (I say 'target of the as clause of the with statement'.) ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 21:08:35 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 20:08:35 +0000 Subject: [issue20519] Replace uuid ctypes usage with an extension module. In-Reply-To: <1391601143.27.0.910101155735.issue20519@psf.upfronthosting.co.za> Message-ID: <1391630915.6.0.74384991589.issue20519@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue5885. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 22:27:39 2014 From: report at bugs.python.org (A. Libotean) Date: Wed, 05 Feb 2014 21:27:39 +0000 Subject: [issue20136] Logging: StreamHandler does not use OS line separator. In-Reply-To: <1388998969.13.0.29066681056.issue20136@psf.upfronthosting.co.za> Message-ID: <1391635659.33.0.897445493725.issue20136@psf.upfronthosting.co.za> A. Libotean added the comment: You can go ahead and close this. I ran some tests and concluded that indeed the IO system will take care of the line separators. Sorry to have wasted your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 22:29:19 2014 From: report at bugs.python.org (A. Libotean) Date: Wed, 05 Feb 2014 21:29:19 +0000 Subject: [issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length. In-Reply-To: <1388999971.66.0.938288838593.issue20137@psf.upfronthosting.co.za> Message-ID: <1391635759.18.0.261760561941.issue20137@psf.upfronthosting.co.za> A. Libotean added the comment: > Which encoding are you using, such that the difference in length between encoded and decoded messages is significant? I agree right off the bat that the error in size is not significant. Only the length of the last appended line is computed erroneously. I'm uploading the patch in case you decide to apply it. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 22:57:33 2014 From: report at bugs.python.org (mbyt) Date: Wed, 05 Feb 2014 21:57:33 +0000 Subject: [issue20523] global .pdbrc on windows 7 not reachable out of the box Message-ID: <1391637453.5.0.977818995818.issue20523@psf.upfronthosting.co.za> New submission from mbyt: The global .pdbrc file is determined by the %HOME% environment variable. However, this is not available out of the box on e.g. windows 7 systems. Here only %HOMEDRIVE% and %HOMEPATH% are defined. Thus the usual approach to have a global .pdbrc file on windows is to define a %HOME% environment variable by hand. This could be avoided if the global .pdbrc would be determined by os.path.expanduser("~/.pdbrc"), which works on current windows and does the magic behind. There are two possible approaches to improve this situation: * explicitly mention in the docs that on windows a %HOME% varialbe need to be created manually * patch pdb.py to use os.path.expanduser instead (see attached diff) For reference, see also old discussion https://mail.python.org/pipermail/python-list/2005-October/349550.html. ---------- files: pdb.diff keywords: patch messages: 210349 nosy: mbyt priority: normal severity: normal status: open title: global .pdbrc on windows 7 not reachable out of the box type: enhancement Added file: http://bugs.python.org/file33935/pdb.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 23:01:26 2014 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 05 Feb 2014 22:01:26 +0000 Subject: [issue20136] Logging: StreamHandler does not use OS line separator. In-Reply-To: <1388998969.13.0.29066681056.issue20136@psf.upfronthosting.co.za> Message-ID: <1391637686.3.0.360784973639.issue20136@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 23:01:55 2014 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 05 Feb 2014 22:01:55 +0000 Subject: [issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length. In-Reply-To: <1388999971.66.0.938288838593.issue20137@psf.upfronthosting.co.za> Message-ID: <1391637715.71.0.940203028645.issue20137@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 23:26:46 2014 From: report at bugs.python.org (Ned Deily) Date: Wed, 05 Feb 2014 22:26:46 +0000 Subject: [issue20523] global .pdbrc on windows 7 not reachable out of the box In-Reply-To: <1391637453.5.0.977818995818.issue20523@psf.upfronthosting.co.za> Message-ID: <1391639206.44.0.663631270161.issue20523@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 23:27:07 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 05 Feb 2014 22:27:07 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391639227.55.0.46726874754.issue20185@psf.upfronthosting.co.za> Zachary Ware added the comment: Ok, current status of this issue as I see it: Objects/typeobject.c: part of conglomerate patch, LGTM Objects/longobject.c: awaiting revision based on review Objects/listobject.c: part of conglomerate patch, LGTM Objects/floatobject.c: part of conglomerate patch, two minor issues, otherwise LGTM Modules/resource.c: part of conglomerate patch, LGTM (could use return converter, not essential) Modules/_threadmodule.c: untouched, held til 3.5 Modules/_bz2module.c: untouched, held til 3.5 Modules/_bisectmodule.c: untouched, held til 3.5 Python/marshal.c: part of conglomerate patch, LGTM Objects/exceptions.c: untouched, held til 3.5 Modules/nismodule.c: untouched, held til 3.5 Modules/gcmodule.c: awaiting revision based on review Python/_warnings.c: untouched, held til 3.5 Modules/_cryptmodule.c: done in another issue I'd like someone with more C experience to have a look at typeobject, floatobject, listobject, resource, and marshal to make sure I haven't missed anything (or led Vajrasky astray). If someone else can ok them, I can get them committed. Vajrasky: What's the status on gcmodule and longobject? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 00:23:15 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Feb 2014 23:23:15 +0000 Subject: [issue20524] format error messages should provide context information Message-ID: <1391642595.93.0.722493013717.issue20524@psf.upfronthosting.co.za> New submission from R. David Murray: Consider the following: '{run_time:%H:%M:%S}, ,COM,DA{id},"{title:.43}",{id},{length:%M:%S}'.format(**mydict) The error message I got was: Invalid format specifier The problem turned out to be that the value of the 'length' key was an integer instead of a datetime.time(), but it sure wasn't easy to figure out which bit of the format string or which variable was the problem. It would be nice for the format error message to include the pattern that it is parsing when it hits the error. The type of the value being substituted would also be nice. Perhaps something like: The format specifier in {length:%HH:%MM} is not valid for type int() ---------- components: Library (Lib) messages: 210351 nosy: eric.smith, r.david.murray priority: normal severity: normal status: open title: format error messages should provide context information _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 00:26:48 2014 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Feb 2014 23:26:48 +0000 Subject: [issue20367] concurrent.futures.as_completed() fails when given duplicate Futures In-Reply-To: <1390489248.24.0.751917808957.issue20367@psf.upfronthosting.co.za> Message-ID: <1391642808.76.0.147887161217.issue20367@psf.upfronthosting.co.za> Yury Selivanov added the comment: This one is still not merged in Tulip, right? ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 00:36:05 2014 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 05 Feb 2014 23:36:05 +0000 Subject: [issue20524] format error messages should provide context information In-Reply-To: <1391642595.93.0.722493013717.issue20524@psf.upfronthosting.co.za> Message-ID: <1391643365.58.0.421187104673.issue20524@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 01:07:36 2014 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Feb 2014 00:07:36 +0000 Subject: [issue20367] concurrent.futures.as_completed() fails when given duplicate Futures In-Reply-To: <1390489248.24.0.751917808957.issue20367@psf.upfronthosting.co.za> Message-ID: <1391645256.77.0.717596214224.issue20367@psf.upfronthosting.co.za> Guido van Rossum added the comment: Correct, if you want to work on it, see http://code.google.com/p/tulip/issues/detail?id=114 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 01:32:46 2014 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 06 Feb 2014 00:32:46 +0000 Subject: [issue20524] format error messages should provide context information In-Reply-To: <1391642595.93.0.722493013717.issue20524@psf.upfronthosting.co.za> Message-ID: <1391646766.84.0.115109498489.issue20524@psf.upfronthosting.co.za> Eric V. Smith added the comment: That would be a great improvement. It's in Python/formatter_unicode.c, line 245, in parse_internal_render_format_spec(). That code knows about the format spec, but not the type being formatted. That would be easy enough to pass in. This fix would only work for the built-in types: int, float, and str, I think. Maybe complex. But that's probably good enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 01:42:10 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Feb 2014 00:42:10 +0000 Subject: [issue20374] Failure to compile with readline-6.3-rc1 In-Reply-To: <1390537610.1.0.747015129006.issue20374@psf.upfronthosting.co.za> Message-ID: <1391647329.99.0.092758067476.issue20374@psf.upfronthosting.co.za> Ned Deily added the comment: Using Serhiy's suggestion, here are patches for 2.7/3.3 and default that condition the hook function signatures. With these patches, all three branches compile without warnings and pass test_readline using OS X libedit, readline 6.3-rc2, and an older readline. ---------- resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open Added file: http://bugs.python.org/file33936/issue20374_no_cast_33.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 01:42:26 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Feb 2014 00:42:26 +0000 Subject: [issue20374] Failure to compile with readline-6.3-rc1 In-Reply-To: <1390537610.1.0.747015129006.issue20374@psf.upfronthosting.co.za> Message-ID: <1391647346.68.0.727446226919.issue20374@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file33937/issue20374_no_cast_3x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 01:44:31 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 06 Feb 2014 00:44:31 +0000 Subject: [issue20374] Failure to compile with readline-6.3-rc1 In-Reply-To: <1390537610.1.0.747015129006.issue20374@psf.upfronthosting.co.za> Message-ID: <1391647471.65.0.471014791943.issue20374@psf.upfronthosting.co.za> Benjamin Peterson added the comment: That is sure ugly, but okay. :) ---------- assignee: benjamin.peterson -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 01:55:51 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 00:55:51 +0000 Subject: [issue20374] Failure to compile with readline-6.3-rc1 In-Reply-To: <1390537610.1.0.747015129006.issue20374@psf.upfronthosting.co.za> Message-ID: <3fKLmQ41Kbz7LkZ@mail.python.org> Roundup Robot added the comment: New changeset 0b5b0bfcc7b1 by Ned Deily in branch '2.7': Issue #20374: Avoid compiler warnings when compiling readline with libedit. http://hg.python.org/cpython/rev/0b5b0bfcc7b1 New changeset 9131a9edcac4 by Ned Deily in branch '3.3': Issue #20374: Avoid compiler warnings when compiling readline with libedit. http://hg.python.org/cpython/rev/9131a9edcac4 New changeset 0abf103f5559 by Ned Deily in branch 'default': Issue #20374: merge http://hg.python.org/cpython/rev/0abf103f5559 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 02:04:28 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 01:04:28 +0000 Subject: [issue20374] Failure to compile with readline-6.3-rc1 In-Reply-To: <1390537610.1.0.747015129006.issue20374@psf.upfronthosting.co.za> Message-ID: <3fKLyM5Th1z7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 74c7a6fd8b45 by Ned Deily in branch '2.7': Issue #20374: delete spurious empty line http://hg.python.org/cpython/rev/74c7a6fd8b45 New changeset 6616c94d6149 by Ned Deily in branch '3.3': Issue #20374: delete spurious empty line http://hg.python.org/cpython/rev/6616c94d6149 New changeset 0b91e764b889 by Ned Deily in branch 'default': Issue #20374: merge http://hg.python.org/cpython/rev/0b91e764b889 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 02:05:52 2014 From: report at bugs.python.org (Ned Deily) Date: Thu, 06 Feb 2014 01:05:52 +0000 Subject: [issue20374] Failure to compile with readline-6.3-rc1 In-Reply-To: <1390537610.1.0.747015129006.issue20374@psf.upfronthosting.co.za> Message-ID: <1391648752.2.0.0839753456013.issue20374@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 02:08:15 2014 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 06 Feb 2014 01:08:15 +0000 Subject: [issue20524] format error messages should provide context information In-Reply-To: <1391642595.93.0.722493013717.issue20524@psf.upfronthosting.co.za> Message-ID: <1391648895.25.0.489864889072.issue20524@psf.upfronthosting.co.za> Eric V. Smith added the comment: int, float, str, and complex are the types formatted by that code. Notice that Decimal already has a better message: >>> format(Decimal(42), 'tx') Traceback (most recent call last): ... ValueError: Invalid format specifier: tx >>> format(42, 'tx') Traceback (most recent call last): ... ValueError: Invalid conversion specification But, look at this: >>> format(3, '--') Traceback (most recent call last): File "", line 1, in ValueError: Unknown format code '-' for object of type 'int' This is generated in unknown_presentation_type, also in formatter_unicode.c. It almost does what you want, but just handles the presentation type, not the whole format specifier. Error handling could be cleaned up in that module. I'd say that the string should be: " with format specifier for object of type ''" might be "Unknown presentation type '-'", or "Cannot specify ','". I think that would require some major surgery to the code, but would be worth it. Note that in your original example, you want the error to contain "{length:%HH:%MM}". By the time the error is detected, the only thing the code knows is the format specifier "%HH:%MM". It doesn't know the "length" part. The error is basically in int.__format__. By the time that gets called, the format specifier has already been extracted and the argument selection (by indexing, by name, including attribute access) has already taken place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 02:26:53 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Feb 2014 01:26:53 +0000 Subject: [issue20521] [PATCH] Cleanup for "dis" module documentation In-Reply-To: <1391608572.54.0.381225308012.issue20521@psf.upfronthosting.co.za> Message-ID: <1391650013.45.0.367132101242.issue20521@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 05:47:45 2014 From: report at bugs.python.org (Eric Snow) Date: Thu, 06 Feb 2014 04:47:45 +0000 Subject: [issue20518] multiple inheritance + C extension = possibly unexpected __base__ In-Reply-To: <1391589036.91.0.744972661823.issue20518@psf.upfronthosting.co.za> Message-ID: <1391662065.39.0.239489855447.issue20518@psf.upfronthosting.co.za> Eric Snow added the comment: So to restate, where some class Spam inherits from multiple classes and at least one was written in C, Spam.__base__ may have an unexpected value. > So, to conclude: it is sometimes not possible to use python > cooperative multiple inheritance if C base classes are involved. This > is a bummer. Be careful not to muddy the waters here by obscuring the problem you are describing (regarding __base__) with the challenges of making multiple inheritance work. Multiple inheritance with classes that don't cooperate in your hierarchy is tricky, but solveable and is simply the nature of the beast. To move this issue forward I recommend simply focusing on how __base__ (and its use) could be improved. I think part of the problem is that the metaclass of PyQt4 uses the __base__ class attribute instead of the MRO... ---------- components: +Extension Modules -Interpreter Core nosy: +eric.snow title: Weird behavior with multiple inheritance when C classes involved -> multiple inheritance + C extension = possibly unexpected __base__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 05:55:22 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Feb 2014 04:55:22 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391662522.81.0.686459987804.issue20167@psf.upfronthosting.co.za> Terry J. Reedy added the comment: More thoughts: The reason for explicit __del__ is to release memory resources connected to other objects or structures at the behest of the Python instance being deleted. If __del__ were only called at shutdown, it would not be needed, as all memory is released anyway and we could delete __del__. If __del__ is called before shutdown (as would happen if the class were unittested) then exceptions would indicate a bug and should not be ignored. From this viewpoint, not only should the try: except: be within the loop, but the break should be conditioned on the exception message. if exc.args[0] == 'can't invoke "bind" command: application has been destroyed': break The modern solution to this dilemma is to use .close instead of .__del__ and either explicitly call .close or have it called in the .__exit__ method of a context manager. For Idle classes, this would not be a problem for future test code, but it would be much trickier finding all places in current code where instances of a class with a .__del__ method get deleted. So a compromise patch with conditioned break seems most practical. I tried a few more experiments: run the .py file (F5, to create a Shell window) and then close both windows. Whether the closing was shell first or editor first, the messages do not appear. Three runs with -n gave the same results. So it seems that the problem only appears when there has never been a shell window. I agree with Serhiy (his point 2) that this is disconcerting and could indicate a 3.4-specific problem with Tk, tkinter, or Idle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 08:28:01 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 07:28:01 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <3fKWSw6DjTz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 305b6a5da852 by Serhiy Storchaka in branch '2.7': Issue #20520: Fixed readline test in test_codecs. http://hg.python.org/cpython/rev/305b6a5da852 New changeset 82d374a9bbc7 by Serhiy Storchaka in branch '3.3': Issue #20520: Fixed readline test in test_codecs. http://hg.python.org/cpython/rev/82d374a9bbc7 New changeset 1457fa0da200 by Serhiy Storchaka in branch 'default': Issue #20520: Fixed readline test in test_codecs. http://hg.python.org/cpython/rev/1457fa0da200 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 08:54:02 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Feb 2014 07:54:02 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391673242.38.0.725400946267.issue20520@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 Thu Feb 6 08:54:43 2014 From: report at bugs.python.org (Larry Hastings) Date: Thu, 06 Feb 2014 07:54:43 +0000 Subject: [issue16074] Bad error message in os.rename, os.link, and os.symlink In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1391673283.19.0.0675019625111.issue16074@psf.upfronthosting.co.za> Larry Hastings added the comment: I probably should have continued with this issue instead of creating a new issue for it, sorry. But there's a new issue tracking this change, where I propose to add new error-reporting functions that support two filenames. That's happening in #20517. ---------- superseder: -> Support errors with two filenames for errno exceptions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 08:58:12 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 06 Feb 2014 07:58:12 +0000 Subject: [issue20525] Got compiler warning when compiling readline module Message-ID: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> New submission from Vajrasky Kok: On Fedora 20, I got this compiler warning: /home/sky/Code/python/cpython3.4/Modules/readline.c: In function ?flex_complete?: /home/sky/Code/python/cpython3.4/Modules/readline.c:962:5: warning: passing argument 1 of ?completion_matches? discards ?const? qualifier from pointer target type [enabled by default] result = completion_matches(text, *on_completion); ^ /home/sky/Code/python/cpython3.4/Modules/readline.c:40:15: note: expected ?char *? but argument is of type ?const char *? extern char **completion_matches(char *, rl_compentry_func_t *); ^ Here is the patch using Christian Heimes' strategy in silencing compiler warning in dbm module. http://hg.python.org/cpython/rev/3068ff3d9d1e ---------- components: Extension Modules files: fix_compile_warning_readline.patch keywords: patch messages: 210364 nosy: vajrasky priority: normal severity: normal status: open title: Got compiler warning when compiling readline module type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33938/fix_compile_warning_readline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 09:00:29 2014 From: report at bugs.python.org (Larry Hastings) Date: Thu, 06 Feb 2014 08:00:29 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391673629.84.0.490928556656.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: Serhiy: I'm not sure if it's the language barrier, but that came across kind of mean. It's not that I can do whatever I want as release manager, but that I have the say in whether something is a "bug fix" or a "new feature", which is how we decide whether or not something is allowed into Python after feature freeze. This issue has been on my radar for a while (originally #16074). But I wasn't paying strong attention to it. Nobody in that issue came up with a solution I liked. Finally when you posted your patch I said "ugh, can't we do better" and had to think about it before I realized we should just display both filenames. If somebody had posted a patch with that two months ago I would have happily accepted it and we wouldn't be having this conversation now. Vajrasky: My goal is that Python is nicer to use than PHP or Perl. And it's more than a month before 3.4 final is scheduled to be released. This patch is a pretty mechanical change--create new function, accept extra parameter, make the tuple one entry longer. I don't expect it to be destabilizing. However, I *was* hoping that one of the original authors of the code in question would come forth and say a) whether or not they think it's a good idea in general, and b) if they think the specific approach is fine. The patch is a bit stalled because of higher-priority Argument Clinic changes. I could post a partial patch if someone wanted to pick it up and finish it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 09:04:47 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 06 Feb 2014 08:04:47 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391673887.16.0.974017136161.issue20517@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 09:19:49 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 06 Feb 2014 08:19:49 +0000 Subject: [issue20525] Got compiler warning when compiling readline module In-Reply-To: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> Message-ID: <1391674789.51.0.946401670496.issue20525@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 09:19:56 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 06 Feb 2014 08:19:56 +0000 Subject: [issue20525] Got compiler warning when compiling readline module In-Reply-To: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> Message-ID: <1391674796.71.0.215733098151.issue20525@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 09:32:13 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Feb 2014 08:32:13 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391673629.84.0.490928556656.issue20517@psf.upfronthosting.co.za> Message-ID: <2785835.NrSBrs9ESk@raxxla> Serhiy Storchaka added the comment: > This issue has been on my radar for a while (originally #16074). But I > wasn't paying strong attention to it. Nobody in that issue came up with a > solution I liked. Finally when you posted your patch I said "ugh, can't we > do better" and had to think about it before I realized we should just > display both filenames. If somebody had posted a patch with that two > months ago I would have happily accepted it and we wouldn't be having this > conversation now. Actually that was Vajrasky's patch, and that was extended version of your patch. I asked you not because you are release manager, but because you are the author of the code and original patch. I agree that support errors with two filenames is better solution than remove ambiguous filename attribute, but there is no much time left and we still don't have a patch. Vajrasky's patch is alternate variant for 3.4 in case when better patch will not be ready and is only solution for 3.3 (if we decide to fix this in 3.3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 09:47:08 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Feb 2014 08:47:08 +0000 Subject: [issue20525] Got compiler warning when compiling readline module In-Reply-To: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> Message-ID: <1391676428.88.0.0986944313272.issue20525@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What will happen if change the signature of completion_matches to "const char*"? ---------- nosy: +benjamin.peterson, ned.deily, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 10:14:03 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Feb 2014 09:14:03 +0000 Subject: [issue20526] python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed. Message-ID: <1391678042.33.0.420181737425.issue20526@psf.upfronthosting.co.za> New submission from STINNER Victor: While trying to reproduce a race condition in asyncio, I got an assertion error from the Python garbage collector at exit. It's not easy to reproduce the issue: run attached script on Python 3.4 compiled in debug mode (to get assertions) and press CTRL+c twice. It looks like the bug occurs more often after at least 400 runs. The Future class of the asyncio may store an exception in its private Future._exception attribute. An exception stores a traceback. I don't know if it's related. Output: --- ... run #347 ^CTraceback (most recent call last): File "x.py", line 73, in main() File "x.py", line 70, in main el.join() File "/home/haypo/prog/python/default/Lib/threading.py", line 1061, in join self._wait_for_tstate_lock() File "/home/haypo/prog/python/default/Lib/threading.py", line 1077, in _wait_for_tstate_lock elif lock.acquire(block, timeout): run #348 KeyboardInterrupt ... run #364 run #365 run #366 run #367 -cancelled- run #368 ^CException ignored in: Traceback (most recent call last): File "/home/haypo/prog/python/default/Lib/threading.py", line 1295, in _shutdown t.join() File "/home/haypo/prog/python/default/Lib/threading.py", line 1061, in join self._wait_for_tstate_lock() File "/home/haypo/prog/python/default/Lib/threading.py", line 1077, in _wait_for_tstate_lock elif lock.acquire(block, timeout): KeyboardInterrupt -cancelled- python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed. Abandon (core dumped) $ ls *core python-6564.core $ gdb ./python -c python-6564.core Core was generated by `./python x.py'. Program terminated with signal SIGABRT, Aborted. (gdb) where #0 0x0000003f3a835c59 in raise () from /lib64/libc.so.6 #1 0x0000003f3a837368 in abort () from /lib64/libc.so.6 #2 0x0000003f3a82ebb6 in __assert_fail_base () from /lib64/libc.so.6 #3 0x0000003f3a82ec62 in __assert_fail () from /lib64/libc.so.6 #4 0x000000000043ac66 in visit_decref ( op=Frame 0x7f013c001398, for file x.py, line 43, in task (self=, _selector=) at remote 0x7f014c3bff60>, _epoll=, _fd_to_key={5: }) at remote 0x7f014c3bfae8>, _granularity=, _ssock=, _internal_fds=1, _csock=, _signal_handlers={}) at remote 0x7f014c437400>, _is_stopped=False, _target=None, _daemonic=False, executor=, acquire=, _lock=<_thread.lock at remote 0x7f014c3bb1a0>, _waiters=, arg=0x0) at Python/traceback.c:64 #6 0x000000000043acdc in subtract_refs (containers=0x8f1a20 ) at Modules/gcmodule.c:398 #7 0x000000000043bdee in collect (generation=2, n_collected=0x7fff499317c0, n_uncollectable=0x7fff499317b8, nofail=0) at Modules/gcmodule.c:957 #8 0x000000000043c455 in collect_with_callback (generation=2) at Modules/gcmodule.c:1128 #9 0x000000000043d1d5 in PyGC_Collect () at Modules/gcmodule.c:1604 #10 0x000000000041e959 in Py_Finalize () at Python/pythonrun.c:605 #11 0x000000000043a890 in Py_Main (argc=2, argv=0x22bb020) at Modules/main.c:771 #12 0x000000000041aba9 in main (argc=2, argv=0x7fff49931ab8) at ./Modules/python.c:69 (gdb) frame 4 #4 0x000000000043ac66 in visit_decref ( (gdb) print op $3 = Frame 0x7f013c001398, for file x.py, line 43, in task (self=, _selector=) at remote 0x7f014c3bff60>, _epoll=, _fd_to_key={5: }) at remote 0x7f014c3bfae8>, _granularity=, _ssock=, _internal_fds=1, _csock=, _signal_handlers={}) at remote 0x7f014c437400>, _is_stopped=False, _target=None, _daemonic=False, executor=, acquire=, _lock=<_thread.lock at remote 0x7f014c3bb1a0>, _waiters=gc.gc_refs >> (1)) != 0' failed. type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 10:14:14 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Feb 2014 09:14:14 +0000 Subject: [issue20526] python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)->gc.gc_refs >> (1)) != 0' failed. In-Reply-To: <1391678042.33.0.420181737425.issue20526@psf.upfronthosting.co.za> Message-ID: <1391678054.06.0.284411272575.issue20526@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file33939/asyncio_gc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 10:19:32 2014 From: report at bugs.python.org (OscaTutenchamon) Date: Thu, 06 Feb 2014 09:19:32 +0000 Subject: =?utf-8?q?=5Bissue20527=5D_multiprocessing=2EQueue_deadlocks_after_?= =?utf-8?b?4oCccmVhZGVy4oCdIHByb2Nlc3MgZGVhdGg=?= Message-ID: <1391678372.4.0.26319787903.issue20527@psf.upfronthosting.co.za> New submission from OscaTutenchamon: I've experienced that queue can be deadlocked for reading when: 1. The "reader" process is using `get` with timeout > 0: self.queue.get(timeout=3) 2. "reader" dies while `get` is blocking due to timeout. After that queue's `_rlock` is never being released so reading becomes impossible. Application demonstrating the problem. I create two child processes "Worker" (putting into queue) and "Receiver" (getting from queue). Also parent process periodically checks if his children are alive and starts new child if needed. #!/usr/bin/env python # -*- coding: utf-8 -*- import multiprocessing import procname import time class Receiver(multiprocessing.Process): ''' Reads from queue with 3 secs timeout ''' def __init__(self, queue): multiprocessing.Process.__init__(self) self.queue = queue def run(self): procname.setprocname('Receiver') while True: try: msg = self.queue.get(timeout=3) print '<<< `{}`, queue rlock: {}'.format( msg, self.queue._rlock) except multiprocessing.queues.Empty: print '<<< EMPTY, Queue rlock: {}'.format( self.queue._rlock) pass class Worker(multiprocessing.Process): ''' Puts into queue with 1 sec sleep ''' def __init__(self, queue): multiprocessing.Process.__init__(self) self.queue = queue def run(self): procname.setprocname('Worker') while True: time.sleep(1) print 'Worker: putting msg, Queue size: ~{}'.format( self.queue.qsize()) self.queue.put('msg from Worker') if __name__ == '__main__': queue = multiprocessing.Queue() worker = Worker(queue) worker.start() receiver = Receiver(queue) receiver.start() while True: time.sleep(1) if not worker.is_alive(): print 'Restarting worker' worker = Worker(queue) worker.start() if not receiver.is_alive(): print 'Restarting receiver' receiver = Receiver(queue) receiver.start() Colored version here: http://pastebin.com/YifY63vE Console output. $ python queuetest.py Worker: putting msg, Queue size: ~0 <<< `msg from Worker`, queue rlock: Worker: putting msg, Queue size: ~0 <<< `msg from Worker`, queue rlock: Restarting receiver <-- killed Receiver with SIGTERM Worker: putting msg, Queue size: ~0 Worker: putting msg, Queue size: ~1 Worker: putting msg, Queue size: ~2 <<< EMPTY, Queue rlock: Worker: putting msg, Queue size: ~3 Worker: putting msg, Queue size: ~4 Worker: putting msg, Queue size: ~5 <<< EMPTY, Queue rlock: Worker: putting msg, Queue size: ~6 Worker: putting msg, Queue size: ~7 System information. $ uname -sr Linux 3.11.8-200.fc19.x86_64 $ python -V Python 2.7.5 In [3]: multiprocessing.__version__ Out[3]: '0.70a1' ---------- components: Library (Lib) messages: 210369 nosy: OscaTutenchamon priority: normal severity: normal status: open title: multiprocessing.Queue deadlocks after ?reader? process death type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 11:06:27 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 06 Feb 2014 10:06:27 +0000 Subject: [issue20525] Got compiler warning when compiling readline module In-Reply-To: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> Message-ID: <1391681187.57.0.0951594735134.issue20525@psf.upfronthosting.co.za> Vajrasky Kok added the comment: It works. I chose Christian Heimes' strategy because of: char ** completion_matches (char *text, CPFunction *entry_func) in http://web.mit.edu/gnu/doc/html/rlman_2.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 11:08:45 2014 From: report at bugs.python.org (Gunnar Aastrand Grimnes) Date: Thu, 06 Feb 2014 10:08:45 +0000 Subject: [issue20528] fileinput module will read whole file into memory when using fileinput.hook_encoded due to codecs.StreamReader.readlines Message-ID: <1391681325.2.0.183803213887.issue20528@psf.upfronthosting.co.za> New submission from Gunnar Aastrand Grimnes: When reading large files with fileinput, it will work as expected and only process a line at a time when used normally, but if you add an hook_encoded openhook it will read the whole file into memory before returning the first line. Verify by running this program on a large text file: import fileinput for l in fileinput.input(openhook=fileinput.hook_encoded('iso-8859-1')): raw_input() and check how much memory it uses. Remove the openhook and memory usage goes down to nothing. The problem is that fileinput calls readlines with a size-hint and in codecs.StreamReader, readlines explicitly ignores this hint and reads all lines into memory. http://bugs.python.org/issue20501 is open for fixing up the documentation for fileinput, but a fix would also be nice. I see two options: 1. As suggested by r.david.murray: Give us a way of signaling to fileinput that it should not use readlines, for instance by setting buffer=None 2. Fix the codecs module to allow StreamReader to respect the hint if given. Although the comment there says it's no efficient way to do this, at least an inefficient way would be better than reading a possibly infinite stream in. A simple solution would be to repeatedly call readline. A more complicated solution would be to read chunks from the stream, and then encode them, just like the readline method does. BTW - this issue is py2.7 only, I tested a file object from io.open with encoding in 3.3 and it supports readlines just fine. ---------- components: IO messages: 210371 nosy: gromgull priority: normal severity: normal status: open title: fileinput module will read whole file into memory when using fileinput.hook_encoded due to codecs.StreamReader.readlines versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 11:19:36 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 10:19:36 +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: <3fKbGv5psWz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 0121c2b7dcce by Ronald Oussoren in branch 'default': Issue #14455: fix handling of unsigned long long values for binary plist files http://hg.python.org/cpython/rev/0121c2b7dcce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 11:22:45 2014 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 06 Feb 2014 10:22:45 +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: <1391682165.96.0.706663904916.issue14455@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Serhiy: the issue should now be fixed. I finally understand why I was so sure that Apple's code serialised large positive numbers as negative numbers: due to a bug in PyObjC large positive numbers end up as NSNumber values that are interpreted as negative values. The patch tweaks the test generator to do the right thing by explicitly creating the NSNumber value instead of relying on PyObjC's automatic conversion. Now I just have to hunt down this bug in PyObjC :-) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 12:09:44 2014 From: report at bugs.python.org (Armin Rigo) Date: Thu, 06 Feb 2014 11:09:44 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391684984.79.0.759575906121.issue1654367@psf.upfronthosting.co.za> Armin Rigo added the comment: Sorry to hijack CPython's bug tracker for that, but can you check if this makes sense to you? I added a function 'locals_to_fast()' to the __pypy__ built-in module which just calls the PyPy equivalent to PyFrame_LocalsToFast(). Your tests are passing, so I guess there should be no problem. The diff is here: http://bpaste.net/show/176119/ (are you ok with having your name put into the test file?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 12:17:12 2014 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 06 Feb 2014 11:17:12 +0000 Subject: [issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files In-Reply-To: <1389140504.71.0.617730511292.issue20184@psf.upfronthosting.co.za> Message-ID: <1391685432.72.0.56248410122.issue20184@psf.upfronthosting.co.za> Nick Coghlan added the comment: Interpreting the lack of response as "this can wait until 3.5". ---------- assignee: larry -> priority: release blocker -> normal versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 12:35:07 2014 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 06 Feb 2014 11:35:07 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391686507.83.0.465548781798.issue20053@psf.upfronthosting.co.za> Nick Coghlan added the comment: EnvironmentVarGuard doesn't work through monkeypatching - you make your changes *through* the guard, and it undoes them in __exit__, as well as restoring the original binding (in case *other* code monkeypatched it). This allows it to still be used when testing code that is *supposed* to make real environment changes (e.g. so they're visible in a subprocess). Buildbot is currently down, so I can't check the logs again :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 13:13:43 2014 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Thu, 06 Feb 2014 12:13:43 +0000 Subject: [issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not Message-ID: <1391688822.97.0.233110009283.issue20529@psf.upfronthosting.co.za> New submission from Bernt R?skar Brenna: Given the following file test_reswarn.py: ==== import unittest class TestResourceWarning(unittest.TestCase): def test_it(self): self.assertIn("TestResourceWarning", open(__file__).read()) ==== Running the test: ==== $ python -m unittest test_reswarn.py ./test_reswarn.py:6: ResourceWarning: unclosed file <_io.TextIOWrapper name='./test_reswarn.py' mode='r' encoding='UTF-8'> self.assertIn("TestResourceWarning", open(__file__).read()) . ---------------------------------------------------------------------- Ran 1 test in 0.000s OK ==== When running the unit test using unittest, ResourceWarning warnings are displayed. In my experience using open("filename") without explicitly closing the file is pretty common and would usually not be an error, since the file will be closed when the reference goes out of scope (or am I wrong?). Therefore I believe that unittest should not emit ResourceWarning warnings. ---------- components: Library (Lib) messages: 210377 nosy: Bernt.R?skar.Brenna priority: normal severity: normal status: open title: Unittest displays ResourceWarning warnings when running tests, it probably should not type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 13:24:32 2014 From: report at bugs.python.org (Leon Weber) Date: Thu, 06 Feb 2014 12:24:32 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391689472.85.0.164098042923.issue20480@psf.upfronthosting.co.za> Leon Weber added the comment: I noticed an inconsistency between IPv4 and IPv6 in my temporary variable names when looking at the patch again after a few days. Here?s an updated patch. Not that it?s important, but I sleep better that way :) As consensus seems to have settled on leaving out the trailing dot, I only updated the version without the dot. ---------- Added file: http://bugs.python.org/file33940/ipaddress_reverse_names_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 13:29:18 2014 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 06 Feb 2014 12:29:18 +0000 Subject: [issue20480] Add ipaddress property to get name of reverse DNS PTR record In-Reply-To: <1391304148.19.0.350065852039.issue20480@psf.upfronthosting.co.za> Message-ID: <1391689758.64.0.690152876815.issue20480@psf.upfronthosting.co.za> Eric V. Smith added the comment: Looks good to me. Once 3.5 is open for new features, I'll commit this. (But feel free to ping me if you think it's lingering!) Thanks! ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 14:32:56 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Feb 2014 13:32:56 +0000 Subject: =?utf-8?q?=5Bissue20527=5D_multiprocessing=2EQueue_deadlocks_after_?= =?utf-8?b?4oCccmVhZGVy4oCdIHByb2Nlc3MgZGVhdGg=?= In-Reply-To: <1391678372.4.0.26319787903.issue20527@psf.upfronthosting.co.za> Message-ID: <1391693576.65.0.780770883122.issue20527@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +jnoller, sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:09:12 2014 From: report at bugs.python.org (Larry Hastings) Date: Thu, 06 Feb 2014 14:09:12 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust Message-ID: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> New submission from Larry Hastings: Following a new discussion of the format of the text signature, I decided to go with this: (...)\n--\n\n See here for the discussion: https://mail.python.org/pipermail/python-dev/2014-February/132271.html Patch attached implementing this approach. Can I get a review? I want this in before tagging for rc1 on Saturday. Other changes: * clinic.py now generates the "/" marker in sigantures to denote positional-only parameters. * clinic.py --make is a lot faster; it prescans the file for any clinic block signatures, and if it doesn't see any it skips the file. * When generating the docstring for a function with optional groups, the signature generated is not intended to be machine-readable. So it omits the "$", the "/", and the "--" markers. (See Modules/_cursesmodule.c for the one and only example.) ---------- assignee: larry files: larry.even.newerer.signature.syntax.1.diff keywords: patch messages: 210380 nosy: georg.brandl, larry, ncoghlan, serhiy.storchaka, yselivanov, zach.ware priority: release blocker severity: normal stage: patch review status: open title: Change the text signature format (again) to be more robust type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file33941/larry.even.newerer.signature.syntax.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:10:06 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Feb 2014 14:10:06 +0000 Subject: [issue20528] fileinput module will read whole file into memory when using fileinput.hook_encoded due to codecs.StreamReader.readlines In-Reply-To: <1391681325.2.0.183803213887.issue20528@psf.upfronthosting.co.za> Message-ID: <1391695806.59.0.95726727793.issue20528@psf.upfronthosting.co.za> R. David Murray added the comment: Unfortunately, since 2.7 is in feature freeze, we can't add any new API there to allow a circumvention. On the other hand, it sounds like Serhiy has come up with an actual fix in the other issue, based on the reason that it is not in fact a problem in 3.x (the io module is smarter than the codecs module in this context). So, I'm going to close this issue...sorry you went to the extra effort of creating it to no purpose. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> fileinput module will read whole file into memory when using fileinput.hook_encoded type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:14:40 2014 From: report at bugs.python.org (Larry Hastings) Date: Thu, 06 Feb 2014 14:14:40 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391696080.13.0.616071170172.issue20530@psf.upfronthosting.co.za> Changes by Larry Hastings : Removed file: http://bugs.python.org/file33941/larry.even.newerer.signature.syntax.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:15:21 2014 From: report at bugs.python.org (Larry Hastings) Date: Thu, 06 Feb 2014 14:15:21 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391696121.03.0.028116711137.issue20530@psf.upfronthosting.co.za> Larry Hastings added the comment: Whoops, forgot to fix all the breakage in clinic_test.py. It's good now. ---------- Added file: http://bugs.python.org/file33942/larry.even.newerer.signature.syntax.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:20:32 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Feb 2014 14:20:32 +0000 Subject: [issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not In-Reply-To: <1391688822.97.0.233110009283.issue20529@psf.upfronthosting.co.za> Message-ID: <1391696432.05.0.924920277439.issue20529@psf.upfronthosting.co.za> R. David Murray added the comment: This is intentional behavior. In the general case, resource warnings *are* bugs, since not all Python implementations do automatic cleanup. This behavior should be controllable (I'm not even sure they *can* be turned on if python is not compiled in debug mode). I don't see resource warnings mentioned in the TextTestRunner docs that mention the other warning controls. It also seems like perhaps there should be a way to control warnings from the unittest command line. So I'd say there are some improvements that can be made here, but the basic behavior is working as intended. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:21:08 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Feb 2014 14:21:08 +0000 Subject: [issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not In-Reply-To: <1391688822.97.0.233110009283.issue20529@psf.upfronthosting.co.za> Message-ID: <1391696468.15.0.278060127099.issue20529@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:23:03 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 14:23:03 +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: <3fKhgp0crdz7Lll@mail.python.org> Roundup Robot added the comment: New changeset 47c31e7d3779 by Brett Cannon in branch 'default': Issue #6386: When executing a script that's a symlink, the directory http://hg.python.org/cpython/rev/47c31e7d3779 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:24:12 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Feb 2014 14:24:12 +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: <1391696652.44.0.165581564858.issue6386@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the path, Senko! Tweaked the wording a bit as the "current directory" part was accurate for when you're in the REPL. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:30:31 2014 From: report at bugs.python.org (=?utf-8?q?Bernt_R=C3=B8skar_Brenna?=) Date: Thu, 06 Feb 2014 14:30:31 +0000 Subject: [issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not In-Reply-To: <1391688822.97.0.233110009283.issue20529@psf.upfronthosting.co.za> Message-ID: <1391697031.47.0.593414060748.issue20529@psf.upfronthosting.co.za> Bernt R?skar Brenna added the comment: OK I see. I'll just use: python -W ignore:ResourceWarning -m unittest ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:35:08 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Feb 2014 14:35:08 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391697308.65.0.765895519771.issue20530@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Whoops, forgot to fix all the breakage in clinic_test.py. It's good now. Ah, you re-uploaded the patch and reset my code review comments. I'll repeat them here, just in case. Reviewed the patch. - In one of the C files I saw this signature: "(/)" -- probably should be just "()" - signature for 'type' builtin was '(object_or_name, bases, dict)', which is a correct signature (minus the groups/optional parameters). In this patch it's a ValueError. Can we restore the prior behaviour? If not, then test_signature_on_class_without_init is incorrect now, as it should throw a ValueError for metaclasses. - and some other minor stuff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:37:32 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 06 Feb 2014 14:37:32 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391697452.29.0.323041691733.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the updated patch. I missed the 'unaryfunc' part. :) Yeah, it's weird. I run clinic again and the dump buffer was getting smaller again. ---------- Added file: http://bugs.python.org/file33943/issue20185_conglomerate_v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:43:42 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 06 Feb 2014 14:43:42 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391697822.0.0.752482162527.issue20185@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33931/issue20185_conglomerate_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:43:43 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 06 Feb 2014 14:43:43 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391697823.64.0.270787536929.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the updated patch for gc module. Some functions that can not be converted: - set_threshold(threshold0, [threshold1, threshold2]) Don't know what default value to give to threshold1, threshold2. static struct gc_generation generations[NUM_GENERATIONS] = { /* PyGC_Head, threshold, count */ {{{GEN_HEAD(0), GEN_HEAD(0), 0}}, 700, 0}, {{{GEN_HEAD(1), GEN_HEAD(1), 0}}, 10, 0}, {{{GEN_HEAD(2), GEN_HEAD(2), 0}}, 10, 0}, }; - collect([generation]) Don't know what default value to give to generation. int genarg = NUM_GENERATIONS - 1; I don't think we can use expression in signature. - get_referrers and get_referents Don't know what signature to use for functions that can accept any number of arguments. ---------- Added file: http://bugs.python.org/file33944/clinic_gc_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:43:56 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 06 Feb 2014 14:43:56 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391697836.31.0.318127970992.issue20185@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33477/clinic_gc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:44:54 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 06 Feb 2014 14:44:54 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present Message-ID: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> New submission from Jason R. Coombs: As reported in https://bitbucket.org/dholth/wheel/issue/104, the email.parser no longer accepts Unicode content as it did in 3.3. I searched the What's New and module documentation, but found no indication that this behavior is no longer supported, so it appears to be a regression. If it's an intentional change, the behavior should be documented in one of the aforementioned documents. Consider this simple test case: # -*- coding: utf-8 -*- import email.parser meta = """ Header: ? """ email.parser.Parser().parsestr(meta) Run that on Python 3.3.3 or Python 2 and it executes silently. Run it on Python 3.4.0b3 and it produces this traceback: Traceback (most recent call last): File "C:\Users\jaraco\projects\public\wheel\test.py", line 6, in email.parser.Parser().parsestr(meta) File "C:\Program Files\Python34\lib\email\parser.py", line 70, in parsestr return self.parse(StringIO(text), headersonly=headersonly) File "C:\Program Files\Python34\lib\email\parser.py", line 60, in parse return feedparser.close() File "C:\Program Files\Python34\lib\email\feedparser.py", line 170, in close self._call_parse() File "C:\Program Files\Python34\lib\email\feedparser.py", line 163, in _call_parse self._parse() File "C:\Program Files\Python34\lib\email\feedparser.py", line 449, in _parsegen self._cur.set_payload(EMPTYSTRING.join(lines)) File "C:\Program Files\Python34\lib\email\message.py", line 311, in set_payload " payload") from None TypeError: charset argument must be specified when non-ASCII characters are used in the payload ---------- components: email keywords: 3.4regression messages: 210390 nosy: barry, jason.coombs, r.david.murray priority: normal severity: normal status: open title: TypeError in e-mail.parser when non-ASCII is present versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:50:06 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 14:50:06 +0000 Subject: [issue20488] importlib title and introduction are out of date In-Reply-To: <1391355718.64.0.231740167188.issue20488@psf.upfronthosting.co.za> Message-ID: <3fKjH14qFQz7Lkf@mail.python.org> Roundup Robot added the comment: New changeset cc08bf665dea by Brett Cannon in branch '3.3': Issue #20488: Update docs to say importlib is *the* implementaiton of http://hg.python.org/cpython/rev/cc08bf665dea New changeset 5641c0b50072 by Brett Cannon in branch 'default': Merge for issue #20488 http://hg.python.org/cpython/rev/5641c0b50072 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:50:09 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Feb 2014 14:50:09 +0000 Subject: [issue20029] asyncio.SubprocessProtocol is missing In-Reply-To: <1387521454.41.0.193901809521.issue20029@psf.upfronthosting.co.za> Message-ID: <1391698209.43.0.233056359415.issue20029@psf.upfronthosting.co.za> STINNER Victor added the comment: > There's one issue left: the docs need to document BaseProtocol. The BaseProtocol is documented here: http://docs.python.org/dev/library/asyncio-protocol.html#protocols Can we close the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:50:19 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 06 Feb 2014 14:50:19 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391698219.88.0.515982952967.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: About rlimit, I think we can use negative number for any member of the struct. But the thing is I am not really sure whether it's okay or not. So it's better on the safe side. I'll finish longobject in one or two days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:50:50 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Feb 2014 14:50:50 +0000 Subject: [issue20488] importlib title and introduction are out of date In-Reply-To: <1391355718.64.0.231740167188.issue20488@psf.upfronthosting.co.za> Message-ID: <1391698250.24.0.179371457504.issue20488@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:51:21 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Feb 2014 14:51:21 +0000 Subject: [issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot "AMD64 Snow Leop 3.x" In-Reply-To: <1384860025.78.0.97947017549.issue19652@psf.upfronthosting.co.za> Message-ID: <1391698281.2.0.478838289449.issue19652@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this bug recently, so I close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:51:49 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Feb 2014 14:51:49 +0000 Subject: [issue20154] Deadlock in asyncio.StreamReader.readexactly() In-Reply-To: <1389053268.48.0.216080788193.issue20154@psf.upfronthosting.co.za> Message-ID: <1391698309.33.0.108025628391.issue20154@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'd appreciate help writing a test. (Debugging this already set me back enough hours.) Guido: do you still plan to write such unit test or can we close the issue? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:56:53 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Feb 2014 14:56:53 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <1391698613.23.0.183457720605.issue20531@psf.upfronthosting.co.za> R. David Murray added the comment: This was an intentional change, but I'm having second thoughts about it. I think I need to make it a deprecation warning in 3.4. Note that it doesn't actually do anything useful in 3.3: Python 3.3.2 (default, Dec 9 2013, 11:44:21) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import email.parser >>> meta = """ ... Header: ? ... """ >>> m = email.parser.Parser().parsestr(meta) >>> str(m) '\nHeader: ?\n' >>> import email.generator >>> import io >>> s = io.BytesIO() >>> g = email.generator.BytesGenerator(s) >>> g.flatten(m) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.3/email/generator.py", line 112, in flatten self._write(msg) File "/usr/lib/python3.3/email/generator.py", line 177, in _write self._dispatch(msg) File "/usr/lib/python3.3/email/generator.py", line 203, in _dispatch meth(msg) File "/usr/lib/python3.3/email/generator.py", line 421, in _handle_text super(BytesGenerator,self)._handle_text(msg) File "/usr/lib/python3.3/email/generator.py", line 233, in _handle_text self._write_lines(payload) File "/usr/lib/python3.3/email/generator.py", line 158, in _write_lines self.write(laststripped) File "/usr/lib/python3.3/email/generator.py", line 395, in write self._fp.write(s.encode('ascii', 'surrogateescape')) UnicodeEncodeError: 'ascii' codec can't encode character '\u2603' in position 8: ordinal not in range(128) That is, if you pretend the message is a string, it will happily output it as a string, including perhaps your writing the output to a file as utf-8...but it will *NOT* be a valid email message, since it will have non-ascii data in it with no specified CTE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:59:37 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Feb 2014 14:59:37 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <1391698777.86.0.343171323039.issue20531@psf.upfronthosting.co.za> R. David Murray added the comment: Ideally what should really happen here, I think, is for email to treat this as analogous to an SMTPUTF8 message. But I certainly don't have time to do that for the alpha :( So, yeah, I need to revert that check for 3.4. ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 16:04:02 2014 From: report at bugs.python.org (Daniel Holth) Date: Thu, 06 Feb 2014 15:04:02 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <1391699042.33.0.97819230389.issue20531@psf.upfronthosting.co.za> Daniel Holth added the comment: In bdist_wheel I've gone to some lengths to re-use the email module to parse and generate "RFC822 inspired" documents. The output is not a valid e-mail but it is useful. It is awkward to use the email module this way. We will sidestep the issue hopefully this year by switching to json. ---------- nosy: +dholth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 16:09:45 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Feb 2014 15:09:45 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <1391699385.19.0.313013314226.issue20531@psf.upfronthosting.co.za> R. David Murray added the comment: The long term goal is to make it not-awkward to do the kind of thing you are doing, Daniel. The change I made was premature in hindsight, I need to comprehensively address "parsing unicode" instead...it sort-of-works now, but only by accident. That said, it is the policy stuff that will really give you the flexibility to manipulate "rfc822-inspired" data, and that doesn't really help you since you need to remain backward compatible with older pythons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 16:15:16 2014 From: report at bugs.python.org (Fabio Zadrozny) Date: Thu, 06 Feb 2014 15:15:16 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391699716.09.0.827561036151.issue1654367@psf.upfronthosting.co.za> Fabio Zadrozny added the comment: Hi Armin, That does make sense to me, but maybe it could be nice providing a standard API across Python implementations to make that call (even if the CPython version uses ctypes underneath and the PyPy version uses RPython), but I'll leave that up to CPython and PyPy devs to discuss -- so, for me, if that call is in the __pypy__ namespace, I'll do the proper check and use it in the PyDev debugger :) p.s.: no problem on putting my name on the test case (and distributing in whatever license PyPy or CPython is under). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 16:17:48 2014 From: report at bugs.python.org (Daniel Holth) Date: Thu, 06 Feb 2014 15:17:48 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <1391699868.71.0.89514056548.issue20531@psf.upfronthosting.co.za> Daniel Holth added the comment: We do this. https://bitbucket.org/dholth/wheel/src/tip/wheel/pkginfo.py?at=default I appreciate the long-term goal. The policy system is really neat. We are going to json largely because the next version of the metadata is more nested. The decision had nothing to do with the email module itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 16:45:02 2014 From: report at bugs.python.org (Armin Rigo) Date: Thu, 06 Feb 2014 15:45:02 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391701502.07.0.743650727877.issue1654367@psf.upfronthosting.co.za> Armin Rigo added the comment: CPython 2.7 is in feature-freeze, so we need to add it to __pypy__. If people here decide to add it more officially to CPython 3.x, then we'll also add it into pypy3, obviously. I'm sure a debugger can cope with a few extra ifs to check on which platform it is really running :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 16:47:40 2014 From: report at bugs.python.org (Fabio Zadrozny) Date: Thu, 06 Feb 2014 15:47:40 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1391701660.3.0.336984471397.issue1654367@psf.upfronthosting.co.za> Fabio Zadrozny added the comment: Sure, no problems on my side :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 16:50:03 2014 From: report at bugs.python.org (Gareth Rees) Date: Thu, 06 Feb 2014 15:50:03 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391701803.43.0.924025145822.issue12691@psf.upfronthosting.co.za> Gareth Rees added the comment: I did some research on the cause of this issue. The assertion was added in this change by Jeremy Hylton in August 2006: (The corresponding Mercurial commit is here: ). At that point I believe the assertion was reasonable. I think it would have been triggered by backslash-continued lines, but otherwise it worked. But in this change in March 2008 Trent Nelson applied this patch by Michael Foord to implement PEP 263 and fix issue719888. The patch added ENCODING tokens to the output of tokenize.tokenize(). The ENCODING token is always generated with row number 0, while the first actual token is generated with row number 1. So now every token stream from tokenize.tokenize() sets off the assertion. The lack of a test case for tokenize.untokenize() in "full" mode meant that it was (and is) all too easy for someone to accidentally break it like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 17:13:12 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 16:13:12 +0000 Subject: [issue20412] Enum and IntEnum classes are not defined in the documentation In-Reply-To: <1390855066.21.0.631218831969.issue20412@psf.upfronthosting.co.za> Message-ID: <3fKl6v62J6z7LjW@mail.python.org> Roundup Robot added the comment: New changeset eeb582c0c014 by Ethan Furman in branch 'default': Close issue20412: Updated Enum docs to have referencable Enum and IntEnum classes http://hg.python.org/cpython/rev/eeb582c0c014 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 17:25:31 2014 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Feb 2014 16:25:31 +0000 Subject: [issue20029] asyncio.SubprocessProtocol is missing In-Reply-To: <1391698209.43.0.233056359415.issue20029@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Go ahead and close it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 17:25:41 2014 From: report at bugs.python.org (Ethan Furman) Date: Thu, 06 Feb 2014 16:25:41 +0000 Subject: [issue20386] socket.SocketType enum overwrites import of _socket.SocketType In-Reply-To: <1390603701.84.0.039670998795.issue20386@psf.upfronthosting.co.za> Message-ID: <1391703941.24.0.798604609962.issue20386@psf.upfronthosting.co.za> Ethan Furman added the comment: Thanks for the hints, Georg! ---------- Added file: http://bugs.python.org/file33945/issue20386.stoneleaf.04.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 17:26:07 2014 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Feb 2014 16:26:07 +0000 Subject: [issue20154] Deadlock in asyncio.StreamReader.readexactly() In-Reply-To: <1391698309.33.0.108025628391.issue20154@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I'd still like there to be a test. On Feb 6, 2014 6:52 AM, "STINNER Victor" wrote: > > STINNER Victor added the comment: > > > I'd appreciate help writing a test. (Debugging this already set me back > enough hours.) > > Guido: do you still plan to write such unit test or can we close the issue? > > ---------- > nosy: +haypo > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 18:59:46 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Feb 2014 17:59:46 +0000 Subject: [issue20532] Mark all tests which use _testcapi as CPython only Message-ID: <1391709584.86.0.554035328709.issue20532@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch marks all tests which use _testcapi as CPython only. Usually such tests don't make sense in alternative implementations. In particular tests which test integer overflow rely on implementation details. This should help to use common tests for different implementations. ---------- components: Tests files: testcapi_cpython_only.patch keywords: patch messages: 210409 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mark all tests which use _testcapi as CPython only type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33946/testcapi_cpython_only.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 19:29:39 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 06 Feb 2014 18:29:39 +0000 Subject: [issue20532] Mark all tests which use _testcapi as CPython only In-Reply-To: <1391709584.86.0.554035328709.issue20532@psf.upfronthosting.co.za> Message-ID: <1391711379.72.0.284313233046.issue20532@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 19:57:47 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Feb 2014 18:57:47 +0000 Subject: [issue19721] Move all test_importlib utility code into test_importlib.util In-Reply-To: <1385147457.8.0.6225076975.issue19721@psf.upfronthosting.co.za> Message-ID: <1391713067.11.0.643395570039.issue19721@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 20:02:27 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Feb 2014 19:02:27 +0000 Subject: [issue17621] Create a lazy import loader mixin In-Reply-To: <1364925647.64.0.233663837419.issue17621@psf.upfronthosting.co.za> Message-ID: <1391713347.86.0.644179623545.issue17621@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is a patch which implements a lazy loader for loaders that define exec_module(). ---------- keywords: +patch Added file: http://bugs.python.org/file33947/lazy_loader.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 20:02:42 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Feb 2014 19:02:42 +0000 Subject: [issue17621] Create a lazy import loader mixin In-Reply-To: <1364925647.64.0.233663837419.issue17621@psf.upfronthosting.co.za> Message-ID: <1391713362.02.0.296131805703.issue17621@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 20:02:54 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Feb 2014 19:02:54 +0000 Subject: [issue17621] Create a lazy import loader mixin In-Reply-To: <1364925647.64.0.233663837419.issue17621@psf.upfronthosting.co.za> Message-ID: <1391713374.06.0.815329783.issue17621@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -Make isinstance() work with super type instances _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 21:06:25 2014 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 06 Feb 2014 20:06:25 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: Message-ID: Guido van Rossum added the comment: > > Let me state this last point once again: no busy loop can occur now that > timeouts are rounded up. > How sure are you? Suppose I use poll() with a 0.5 msec timeout. This presumably gets rounded up to 1 msec. But if the system clock has e.g. a 10 msec resolution, won't this still wait 0 msec? Or will it wait until the next "tick" occurs, which could be anywhere between 0 and 10 msec in the future? But if so, why wouldn't a poll() with a 0 msec timeout also wait between 0 and 10 msec? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 21:07:50 2014 From: report at bugs.python.org (Rihards) Date: Thu, 06 Feb 2014 20:07:50 +0000 Subject: [issue20533] bug? Message-ID: <1391717270.59.0.361887326054.issue20533@psf.upfronthosting.co.za> New submission from Rihards: Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> 11.29-6.29 4.999999999999999 >>> 11.30-6.30 5.000000000000001 >>> ---------- messages: 210412 nosy: Rihards priority: normal severity: normal status: open title: bug? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 21:21:09 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 06 Feb 2014 20:21:09 +0000 Subject: [issue20533] bug in float arithmetic? In-Reply-To: <1391717270.59.0.361887326054.issue20533@psf.upfronthosting.co.za> Message-ID: <1391718069.1.0.946645776623.issue20533@psf.upfronthosting.co.za> Zachary Ware added the comment: Hi Rihards, This is not a bug, this is an example of the limitations of binary floating point arithmetic. See http://docs.python.org/3/tutorial/floatingpoint.html for more information. For explanation by demonstration, have a look at this: Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from decimal import Decimal as D >>> D(11.29) Decimal('11.28999999999999914734871708787977695465087890625') >>> D(6.29) Decimal('6.29000000000000003552713678800500929355621337890625') >>> D(11.30) Decimal('11.300000000000000710542735760100185871124267578125') >>> D(6.30) Decimal('6.29999999999999982236431605997495353221893310546875') >>> D(11.291) Decimal('11.291000000000000369482222595252096652984619140625') >>> D(6.291) Decimal('6.291000000000000369482222595252096652984619140625') >>> 11.29 - 6.29 4.999999999999999 >>> 11.30 - 6.30 5.000000000000001 >>> 11.291 - 6.291 5.0 >>> D(11.29) - D(6.29) Decimal('4.999999999999999111821580300') >>> D(11.30) - D(6.30) Decimal('5.000000000000000888178419700') >>> D(11.291) - D(6.291) Decimal('5.000000000000000000000000000') >>> For future reference, "bug?" isn't very useful as an issue title :). The title should be as brief a summary of the possible bug as you can come up with, or at least mention which part(s) of Python are affected. ---------- nosy: +zach.ware resolution: -> invalid stage: -> committed/rejected status: open -> closed title: bug? -> bug in float arithmetic? type: -> behavior versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 21:24:34 2014 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 06 Feb 2014 20:24:34 +0000 Subject: =?utf-8?q?=5Bissue20527=5D_multiprocessing=2EQueue_deadlocks_after_?= =?utf-8?b?4oCccmVhZGVy4oCdIHByb2Nlc3MgZGVhdGg=?= In-Reply-To: <1391678372.4.0.26319787903.issue20527@psf.upfronthosting.co.za> Message-ID: <1391718274.3.0.0626827285552.issue20527@psf.upfronthosting.co.za> Richard Oudkerk added the comment: This is expected. Killing processes which use shared locks is never going to end well. Even without the lock deadlock, the data in the pipe would be liable to be corrupted if a processes is killed while putting or getting from a queue. If you want to be able to reliably recover when a related process dies then you would be better off using one-to-one pipes for comunication -- although that would probably mean substantial redesign. ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 21:41:11 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Feb 2014 20:41:11 +0000 Subject: [issue20363] BytesWarnings triggerred by test suite In-Reply-To: <1390470451.71.0.00122717133798.issue20363@psf.upfronthosting.co.za> Message-ID: <1391719271.69.0.602832454524.issue20363@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- assignee: lukasz.langa -> serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 21:57:14 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 20:57:14 +0000 Subject: [issue20363] BytesWarnings triggerred by test suite In-Reply-To: <1390470451.71.0.00122717133798.issue20363@psf.upfronthosting.co.za> Message-ID: <3fKsQd0Ynxz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 791674a74e47 by Serhiy Storchaka in branch '3.3': Issue #20363. Fixed BytesWarning triggerred by test suite. http://hg.python.org/cpython/rev/791674a74e47 New changeset a4431dce107a by Serhiy Storchaka in branch 'default': Issue #20363. Fixed BytesWarning triggerred by test suite. http://hg.python.org/cpython/rev/a4431dce107a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 21:57:14 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 20:57:14 +0000 Subject: [issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception In-Reply-To: <1387189744.09.0.921617360417.issue19995@psf.upfronthosting.co.za> Message-ID: <3fKsQd6LcNz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 775fb736b4b8 by Serhiy Storchaka in branch 'default': Catch deprecation warnings emitted when non-integers are formatted with %c, %o http://hg.python.org/cpython/rev/775fb736b4b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 21:58:29 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Feb 2014 20:58:29 +0000 Subject: [issue20363] BytesWarnings triggerred by test suite In-Reply-To: <1390470451.71.0.00122717133798.issue20363@psf.upfronthosting.co.za> Message-ID: <1391720309.86.0.861866183218.issue20363@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Arfrever for your report. Thank you Berker for your patch. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:14:26 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 06 Feb 2014 21:14:26 +0000 Subject: [issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options In-Reply-To: <1390468789.64.0.236388970509.issue20361@psf.upfronthosting.co.za> Message-ID: <1391721266.17.0.842207873019.issue20361@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:25:50 2014 From: report at bugs.python.org (Ethan Furman) Date: Thu, 06 Feb 2014 21:25:50 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 Message-ID: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> New submission from Ethan Furman: enum34, the Enum backport, specifically uses `protocol=HIGHEST_PROTOCOL`, while the current enum tests just use the default. Running the enum34 test expose an issue with pickle protocol 4: ====================================================================== ERROR: test_subclasses_with_getnewargs (__main__.TestEnum) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_enum.py", line 1022, in test_subclasses_with_getnewargs self.assertEqual(loads(dumps(NI5, protocol=HIGHEST_PROTOCOL)), 5) _pickle.PicklingError: Can't pickle .NamedInt'>: attribute lookup TestEnum.test_subclasses_with_getnewargs..NamedInt on __main__ failed ====================================================================== ERROR: test_tuple_subclass (__main__.TestEnum) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_enum.py", line 1100, in test_tuple_subclass self.assertTrue(loads(dumps(SomeTuple.first, protocol=HIGHEST_PROTOCOL)) is SomeTuple.first) _pickle.PicklingError: Can't pickle : attribute lookup TestEnum.test_tuple_subclass..SomeTuple on __main__ failed ---------- messages: 210419 nosy: alexandre.vassalotti, ethan.furman, pitrou priority: high severity: normal stage: test needed status: open title: Enum tests fail with pickle protocol 4 type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:31:54 2014 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 06 Feb 2014 21:31:54 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391722314.22.0.118102308816.issue20534@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:33:16 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Feb 2014 21:33:16 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391722396.52.0.913023055725.issue20534@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:36:20 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Thu, 06 Feb 2014 21:36:20 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391722580.91.0.333797922898.issue20499@psf.upfronthosting.co.za> Changes by Oscar Benjamin : ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:37:23 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Feb 2014 21:37:23 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391722643.71.0.922557714973.issue20534@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Pickle tests should test all protocols in range(pickle.HIGHEST_PROTOCOL + 1). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:44:45 2014 From: report at bugs.python.org (Ethan Furman) Date: Thu, 06 Feb 2014 21:44:45 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391723085.85.0.128250992237.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: Working on fixing tests now. Not sure I can fix pickle (at least not in time for RC1). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:47:08 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 21:47:08 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <3fKtXC4z5yzMrl@mail.python.org> Roundup Robot added the comment: New changeset c964b6b83720 by Zachary Ware in branch 'default': Issue #3158: Provide a couple of fallbacks for in case a method_descriptor http://hg.python.org/cpython/rev/c964b6b83720 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:55:17 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 06 Feb 2014 21:55:17 +0000 Subject: [issue20535] run_tests.py: Work around issues 20355 and 20361 Message-ID: <1391723717.25.0.167441884978.issue20535@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: Tools/scripts/run_tests.py contains: def main(regrtest_args): args = [sys.executable, '-W', 'default', # Warnings set to 'default' '-bb', # Warnings about bytes/bytearray '-E', # Ignore environment variables ] As described in issues #20355 and #20361, -bb fails to enable BytesWarning errors. I suggest to include a small workaround, which will be deleted in Python 3.5. I attach patch. ---------- components: Tests files: run_tests.py.patch keywords: patch messages: 210423 nosy: Arfrever, serhiy.storchaka priority: normal severity: normal status: open title: run_tests.py: Work around issues 20355 and 20361 versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33948/run_tests.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:57:14 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Feb 2014 21:57:14 +0000 Subject: [issue20029] asyncio.SubprocessProtocol is missing In-Reply-To: <1387521454.41.0.193901809521.issue20029@psf.upfronthosting.co.za> Message-ID: <1391723834.38.0.0790059659871.issue20029@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 22:57:41 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 06 Feb 2014 21:57:41 +0000 Subject: [issue3158] Doctest fails to find doctests in extension modules In-Reply-To: <1214015505.39.0.384160170018.issue3158@psf.upfronthosting.co.za> Message-ID: <1391723861.82.0.750019843296.issue3158@psf.upfronthosting.co.za> Zachary Ware added the comment: Done. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 23:02:20 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 06 Feb 2014 22:02:20 +0000 Subject: [issue20451] os.exec* mangles argv on windows (splits on spaces, etc) In-Reply-To: <1391152839.26.0.437112268275.issue20451@psf.upfronthosting.co.za> Message-ID: <1391724140.97.0.0348777496732.issue20451@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 23:02:51 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 06 Feb 2014 22:02:51 +0000 Subject: [issue20429] 3.3.4rc1 install deleted Windows taskbar icons In-Reply-To: <1390954741.59.0.823038471265.issue20429@psf.upfronthosting.co.za> Message-ID: <1391724171.87.0.324119777967.issue20429@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 23:09:29 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Feb 2014 22:09:29 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391724569.67.0.0770831142273.issue20534@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Those tracebacks don't correspond to line numbers in the stdlib enum.py. Regardless, the two tests fail understandably: they define a class in the local namespace and then monkeypatch globals() with it, but don't adjust the __qualname__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 00:24:27 2014 From: report at bugs.python.org (Ethan Furman) Date: Thu, 06 Feb 2014 23:24:27 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391729067.28.0.220214811596.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: Thanks, Antoine, that was what I needed. ---------- assignee: -> ethan.furman keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file33949/issue20534.stoneleaf.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 00:42:19 2014 From: report at bugs.python.org (Stefan Krah) Date: Thu, 06 Feb 2014 23:42:19 +0000 Subject: [issue20536] statistics._decimal_to_ratio() produces non-integer ratio Message-ID: <1391730139.77.0.406178455931.issue20536@psf.upfronthosting.co.za> New submission from Stefan Krah: As I understand, _decimal_to_ratio() should always produce an integer ratio. But it does not for positive exponents: >>> import statistics >>> statistics.mean([Decimal("100"), Decimal("200")]) Decimal('150') >>> statistics.mean([Decimal("1e2"), Decimal("2e2")]) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.4/statistics.py", line 308, in mean return _sum(data)/n File "/usr/local/lib/python3.4/statistics.py", line 166, in _sum total += Fraction(n, d) File "/usr/local/lib/python3.4/fractions.py", line 163, in __new__ raise TypeError("both arguments should be " TypeError: both arguments should be Rational instances >>> >>> statistics._decimal_to_ratio(Decimal("1e2")) (1, 0.01) >>> 1e2.as_integer_ratio() (100, 1) ---------- components: Library (Lib) messages: 210427 nosy: skrah, stevenjd priority: high severity: normal stage: needs patch status: open title: statistics._decimal_to_ratio() produces non-integer ratio type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 00:53:08 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 06 Feb 2014 23:53:08 +0000 Subject: [issue20537] logging exc_info parameter should accept exception instances Message-ID: <1391730788.17.0.188838717397.issue20537@psf.upfronthosting.co.za> New submission from Yury Selivanov: A bunch of logging methods accept optional parameter exc_info, that is supposed to be either 'True' or a tuple of three elements (type, exc, tb). If, however, someone passes an actual exception instance, Logger._log function will interpret it as True and get the current exception from sys.exc_info, ignoring the passed exception completely. Attached is a patch that fixes this: if exc_info is an instance of BaseException, Logger._log creates the tuple out of it automatically. ---------- files: logging_01.patch keywords: patch messages: 210428 nosy: vinay.sajip, yselivanov priority: normal severity: normal status: open title: logging exc_info parameter should accept exception instances type: enhancement versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file33950/logging_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 00:58:01 2014 From: report at bugs.python.org (Kevin M. Turner) Date: Thu, 06 Feb 2014 23:58:01 +0000 Subject: [issue19352] unittest loader barfs on symlinks In-Reply-To: <1382452375.52.0.637202424401.issue19352@psf.upfronthosting.co.za> Message-ID: <1391731081.21.0.671288725688.issue19352@psf.upfronthosting.co.za> Changes by Kevin M. Turner : ---------- nosy: +acapnotic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 02:24:45 2014 From: report at bugs.python.org (Ethan Furman) Date: Fri, 07 Feb 2014 01:24:45 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391736285.3.0.917881622299.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: Serhiy, the minimum supported pickle protocol is 2. Now testing all protocols from 2 to HIGHEST_PROTOCOL, inclusive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 02:28:48 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 01:28:48 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <3fKzRx45zKz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 35f57ab9389b by Ethan Furman in branch 'default': Close issue20534: test_enum now tests all supported pickle protocols (2 - HIGHEST_PROTOCOL, inclusive). http://hg.python.org/cpython/rev/35f57ab9389b ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 02:58:05 2014 From: report at bugs.python.org (Duke Dougal) Date: Fri, 07 Feb 2014 01:58:05 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1391738285.78.0.106966161694.issue19662@psf.upfronthosting.co.za> Duke Dougal added the comment: Is there a workaround for this as I'd like to just be receiving binary data from SMTPD. I'm new to this system - is this scheduled for fixing in Python 3.4? ---------- nosy: +Duke.Dougal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 03:16:03 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Feb 2014 02:16:03 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391739363.2.0.0654787627175.issue20520@psf.upfronthosting.co.za> Ned Deily added the comment: The change has broken the builds, for example, http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/1197. [ 29/389] test_codecs Assertion failed: (maxchar >= 0x100), function _PyUnicode_CheckConsistency, file Objects/unicodeobject.c, line 410. Fatal Python error: Aborted Current thread 0x00007fff71296cc0 (most recent call first): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/codecs.py", line 494 in read File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/codecs.py", line 548 in readline File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_codecs.py", line 169 in test_readline File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/case.py", line 574 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/case.py", line 622 in __call__ File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 125 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 87 in __call__ File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 125 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 87 in __call__ File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 125 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py", line 87 in __call__ File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/runner.py", line 168 in run File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/support/__init__.py", line 1685 in _run_suite File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/support/__init__.py", line 1719 in run_unittest File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1277 in File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1278 in runtest_inner File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 967 in runtest File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 532 in main File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1565 in main_in_temp_cwd File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1590 in File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py", line 86 in _run_code File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py", line 171 in _run_module_as_main Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py", line 171, in _run_module_as_main "__main__", mod_spec) File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py", line 86, in _run_code exec(code, run_globals) File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/__main__.py", line 3, in regrtest.main_in_temp_cwd() File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 1565, in main_in_temp_cwd main() File "/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py", line 738, in main raise Exception("Child error on {}: {}".format(test, result[1])) Exception: Child error on test_codecs: Exit code -6 make: *** [buildbottest] Error 1 ---------- assignee: -> serhiy.storchaka nosy: +benjamin.peterson, georg.brandl, larry, ned.deily priority: normal -> release blocker resolution: fixed -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 03:38:31 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 02:38:31 +0000 Subject: [issue19662] smtpd.py should not decode utf-8 In-Reply-To: <1384944703.82.0.967643613195.issue19662@psf.upfronthosting.co.za> Message-ID: <1391740711.69.0.135610656075.issue19662@psf.upfronthosting.co.za> R. David Murray added the comment: Unfortunately I did not get to this before the 3.4 beta release, so no, it won't be fixed in 3.4. You can work around it by overriding collect_incoming_data in your subclass and doing data.decode('ascii', 'surrogateescape') instead of str(data, 'utf-8'), and then doing mydata.encode('ascii', 'surrogateescape') at the point where you want to turn the data back into binary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 04:42:46 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 07 Feb 2014 03:42:46 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391744566.84.0.516571033373.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the updated patch for gc module based on Zachary's review. ---------- Added file: http://bugs.python.org/file33951/clinic_gc_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 04:47:51 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 07 Feb 2014 03:47:51 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391744871.69.0.712022197225.issue20185@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33944/clinic_gc_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 07:31:32 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 06:31:32 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391754692.79.0.897348450414.issue20534@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But why the minimum supported pickle protocol is 2? Here is a patch which makes enums pickleable with all protocols. ---------- Added file: http://bugs.python.org/file33952/enum_pickle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 07:36:44 2014 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 07 Feb 2014 06:36:44 +0000 Subject: [issue20537] logging exc_info parameter should accept exception instances In-Reply-To: <1391730788.17.0.188838717397.issue20537@psf.upfronthosting.co.za> Message-ID: <1391755004.05.0.0626235787475.issue20537@psf.upfronthosting.co.za> Vinay Sajip added the comment: I believe it's too late for feature changes in 3.4, so removing it from versions. ---------- assignee: -> vinay.sajip versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 07:38:54 2014 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 07 Feb 2014 06:38:54 +0000 Subject: [issue20537] logging exc_info parameter should accept exception instances In-Reply-To: <1391730788.17.0.188838717397.issue20537@psf.upfronthosting.co.za> Message-ID: <1391755134.96.0.0897164933291.issue20537@psf.upfronthosting.co.za> Vinay Sajip added the comment: It would be good if the patch addressed documentation changes, too :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 07:44:58 2014 From: report at bugs.python.org (Larry Hastings) Date: Fri, 07 Feb 2014 06:44:58 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391755498.83.0.0178215568774.issue20530@psf.upfronthosting.co.za> Larry Hastings added the comment: Thanks for noticing the "(/)", that's fixed. Yes, the signature for type() was wrong. type() can accept either one parameter or three parameters--in other words, it uses optional groups. And we can't represent optional groups in an inspect.Signature signature in 3.4. And I assert that it's better to not have a signature than to have a wrong signature. So I've removed it. I'm interested in your "other minor stuff". I'll try and leave the patch alone this time :) If you apply diff #2, you'll have a failure in test_inspect. This is because there's a bug in inspect.Signature that it would take too long to fix, and I have to leave right now-ish. I changed the tests so they expect the correct results, but they get the wrong results at the moment. Hopefully we can fix this really quickly. -- Yuri: This change uncovered a lurking bug in inspect.Signature that I'm hoping you can fix. I could probably figure it out given enough time but I won't have time to look at it for about 24 hours. Now that type() doesn't have a signature, I have discovered that some of the logic in Signature is wrong. class C(type): pass print(str(inspect.signature(C))) The signature of that *should* be the same as type(). But inspect.signature() reports the signature as '()'. The reason this happens: inspect.Signature gets to the "for base in mro" case for handling classes. The first base it tries is type(), but type() doesn't have a public signature so it keeps going. The next class in the MRO is object(), which has a signature of "()", so it uses that. It shouldn't keep going! I'm 99% certain that the first entry in the MRO will always be callable. (Is it possible to have a type in Python that isn't callable?) I *think* what it should do is: simply try the first entry in the MRO. If that has a signature, return it. If it doesn't have a signature, inspect.Signature should raise ValueError. I also *think* that all the code after this comment: # No '__text_signature__' was found for the 'obj' class. should be removed. If C doesn't define its own __new__ or __init__, and its base class doesn't have __call__, then the signature of C *is* the signature of its base class. If inspect.Signature can't read that signature, then it can't return a signature for C. ---------- Added file: http://bugs.python.org/file33953/larry.even.newerer.signature.syntax.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 09:11:05 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 08:11:05 +0000 Subject: [issue20532] Mark all tests which use _testcapi as CPython only In-Reply-To: <1391709584.86.0.554035328709.issue20532@psf.upfronthosting.co.za> Message-ID: <3fL8N85g1xz7LjP@mail.python.org> Roundup Robot added the comment: New changeset 75c75d90f3a4 by Serhiy Storchaka in branch '2.7': Issue #20532: Tests which use _testcapi now are marked as CPython only. http://hg.python.org/cpython/rev/75c75d90f3a4 New changeset e5a78f7c2dcb by Serhiy Storchaka in branch '3.3': Issue #20532: Tests which use _testcapi now are marked as CPython only. http://hg.python.org/cpython/rev/e5a78f7c2dcb New changeset b4e99bec0c8a by Serhiy Storchaka in branch 'default': Issue #20532: Tests which use _testcapi now are marked as CPython only. http://hg.python.org/cpython/rev/b4e99bec0c8a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 09:12:39 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 08:12:39 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391760759.02.0.223134181144.issue20520@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Aha! It looks as a bug in UTF-7 codec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 09:26:58 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 07 Feb 2014 08:26:58 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391761618.38.0.959693851451.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the updated patch for long object. A couple of functions that can not be converted: - long_new It has custom processing before parsing arguments part. - long_round Not supported by clinic. _ __trunc__, __floor__, __ceil__ all are mapped to long_long. Not sure how to handle this case. ---------- Added file: http://bugs.python.org/file33954/clinic_longobject_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 09:27:12 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 07 Feb 2014 08:27:12 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391761632.35.0.203527880088.issue20185@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33587/clinic_longobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 10:13:31 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 07 Feb 2014 09:13:31 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: > How sure are you? Suppose I use poll() with a 0.5 msec timeout. This > presumably gets rounded up to 1 msec. But if the system clock has e.g. a 10 > msec resolution, won't this still wait 0 msec? Or will it wait until the > next "tick" occurs, which could be anywhere between 0 and 10 msec in the > future? It depends :-) With high-resolution timers, you'll get 1ms. Without, you'll likely get 10ms (time quantum). An implementation returning without delay would be seriously broken. > But if so, why wouldn't a poll() with a 0 msec timeout also wait > between 0 and 10 msec? Because the kernel doesn't suspend the current task/thread, it just checks the list of currently FDs, and returns immediately. See e.g. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/select.c?id=797a796a13df6b84a4791e57306737059b5b2384#n772 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 10:14:59 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 07 Feb 2014 09:14:59 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391764499.69.0.482845168927.issue20520@psf.upfronthosting.co.za> Vajrasky Kok added the comment: The culprit: diff -r b4e99bec0c8a Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Fri Feb 07 10:10:55 2014 +0200 +++ b/Lib/test/test_codecs.py Fri Feb 07 17:14:12 2014 +0800 @@ -164,6 +164,8 @@ s = 10*(size*"a" + lineend + "xxx\n") reader = getreader(s) for i in range(10): + if size==64 and self.encoding == 'utf-7' and lineend=='\u2028' and i == 3: + import pdb; pdb.set_trace() self.assertEqual( reader.readline(keepends=True), size*"a" + lineend, ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 10:32:08 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 09:32:08 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder Message-ID: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: UTF-7 incremental decoder can crash in debug build when decodes unfinished base-64 section. In non-debug build it just produces inconsistent unicode string. Minimal examples: $ ./python -c "import codecs; codecs.utf_7_decode(b'a+AIA', 'strict')" python: Objects/unicodeobject.c:403: _PyUnicode_CheckConsistency: Assertion `maxchar >= 128' failed. Aborted (core dumped) $ ./python -c "import codecs; codecs.utf_7_decode(b'+AIA-+AQA', 'strict')" python: Objects/unicodeobject.c:410: _PyUnicode_CheckConsistency: Assertion `maxchar >= 0x100' failed. Aborted (core dumped) $ ./python -c "import codecs; codecs.utf_7_decode(b'+AQA-+2ADcAA', 'strict')" python: Objects/unicodeobject.c:414: _PyUnicode_CheckConsistency: Assertion `maxchar >= 0x10000' failed. Aborted (core dumped) This happens because _PyUnicodeWriter reverts position back before unfinished base-64 section, but its buffer was already widened for characters in unfinished base-64 section. if (inShift) { writer.pos = shiftOutStart; /* back off output */ *consumed = startinpos; } And now _PyUnicodeWriter generates a string with a kind larger then needed for decoded characters. This bug causes a lot of crashes on buildbots. E.g: http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/1197 http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.3/builds/1446 ---------- components: Interpreter Core, Unicode messages: 210444 nosy: ezio.melotti, haypo, serhiy.storchaka priority: high severity: normal stage: needs patch status: open title: Segfault in UTF-7 incremental decoder type: crash versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 10:34:17 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 09:34:17 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391765657.05.0.545468759077.issue20520@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Opened separate issue20538 for this bug. ---------- dependencies: +Segfault in UTF-7 incremental decoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 10:35:29 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 09:35:29 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391765729.48.0.795897194704.issue20520@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Vajrasky. I got the same result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 11:50:56 2014 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 07 Feb 2014 10:50:56 +0000 Subject: [issue20440] Use Py_REPLACE/Py_XREPLACE macros In-Reply-To: <1391019258.76.0.341506038923.issue20440@psf.upfronthosting.co.za> Message-ID: <1391770256.95.0.791952840917.issue20440@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: These macros work as assignment with builtin decref, i.e. a smart replacement for = We could resolve this by calling them Py_ASSIGN Py_XASSIGN and having complementary macros Py_STORE/Py_XSTORE that will incref the new value. However, with an added incref, does the X apply to the source or the target? I wonder if we need the X variants in these macros. Once you are doing things like this, why not just use X implicitly? An extra pointer test or two is unlikely to be a performance problem in the places you might use them. Anyway, I'll be adding this to the internal api of stackless because it is tremendously useful. ---------- nosy: +kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 11:54:29 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 10:54:29 +0000 Subject: [issue20539] math.factorial may throw OverflowError Message-ID: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> New submission from Nick Coghlan: I believe this is mostly a curiousity (since actually calculating a factorial this big would take an interminable amount of time), but math.factorial can be provoked into throwing OverflowError by a large enough input: >>> math.factorial(10**19) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long >>> math.factorial(1e19) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long ---------- messages: 210448 nosy: ncoghlan priority: normal severity: normal status: open title: math.factorial may throw OverflowError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 11:56:03 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 10:56:03 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391770563.01.0.273306161616.issue20539@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 12:00:11 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 11:00:11 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391770811.12.0.389554558046.issue20539@psf.upfronthosting.co.za> Mark Dickinson added the comment: What behaviour would you suggest instead? Apart from the time, the result would have over 10**20 digits, so would need exabytes of memory to represent. >>> from math import lgamma, log >>> lgamma(1e19) / log(10) 1.8565705518096748e+20 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 12:03:44 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 11:03:44 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391771024.96.0.337996617562.issue20539@psf.upfronthosting.co.za> STINNER Victor added the comment: > What behaviour would you suggest instead? Some others Python functions like str * int raises a MemoryError on overflow. But I don't know if OverflowError or MemoryError is better. ---------- nosy: +haypo priority: low -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 12:13:46 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 11:13:46 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391771626.38.0.753256596691.issue20539@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Some others Python functions like str * int raises a MemoryError on overflow. I have to say that that's always seemed wrong to me: IMO MemoryError should only be raised when we've really run out of memory, or perhaps where the amount of memory we're about to need exceeds all possible limits (e.g., more than 2**63 bytes on a 64-bit system). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 12:32:26 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 07 Feb 2014 11:32:26 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391772746.32.0.061536606048.issue20499@psf.upfronthosting.co.za> Wolfgang Maier added the comment: I have written a patch for this issue (I'm uploading the complete new code for everyone to try it - importing it into Python3.3 works fine; a diff with additional tests against Oscar's example will follow soon). Just as Oscar suggested, this new version performs all calculations using exact rational arithmetics and rounds/coerces only before returning the final result to the user. Its precision is, thus, only limited by that of the input data sequence. It passes Oscar's examples 1-3 as you can easily test yourself. It also gives the correct answer in the fourth example - mean([D('1.2'), D('1.3'), D('1.55')]) -, although on my system the original statistics module gets this one right already. The implementation I chose for this is a bit different from Oscar's suggestion. Essentially, it introduces a dedicated module-private class _ExactRatio to represent numbers as exact ratios and that gets passed between different functions in the module. This class borrows many of its algorithms from fractions.Fraction, but has some specialized methods for central tasks in the statistics module making it much more efficient in this context than fractions.Fraction. This class is currently really minimal, but can easily be extended if necessary. In my implementation this new class is used throughout the module whenever calculations with or conversions to exact ratios have to be performed, which allowed me to preserve almost all of the original code and to factor out the changes to the class. As for performance, the gain imagined by Oscar is not always realized even though the variance functions are now using single passes over the data. Specifically, in the case of floats the overhead of having to convert everything to exact ratios first eats up all the savings. In the case of fractional input, there is a dramatic performance boost though. I compiled a small table comparing (kind of) average performance of the two versions with various input data types. Take this with a grain of salt because the differences can vary quite a bit depending on the exact data: data type performance gain(+)/loss(-) over original module / % --------- ---------------------------------------------------- float - 10 % short Decimal + 10 % long Decimal - 25 % Fraction + 80 % (!!) MyFloat + 25 With Decimal input the costs of conversion to exact ratios depends on the digits in the Decimals, so with short Decimals the savings from the single-pass algorithm are larger than the conversion costs, but this reverses for very long Decimals. MyFloat is a minimal class inheriting from float and overriding just its arithmetic methods to return MyFloat instances again. The performance gain with Fraction input comes from two changes, the single-pass algorithm and an optimization in _sum (with Fraction, more than with any other type, the dictionary built by _sum can grow quite large and the optimization is in the conversion of the dictionary elements to exact ratios). This is why the extent of this gain can sometimes be significantly higher than the 80% listed in the table. Try this, for example: from statistics import variance as v from statistics_with_exact_ratios import variance as v2 from fractions import Fraction data = [Fraction(1,x) for x in range(1,2000)] print('calculating variance using original statistics module ...') print(float(v(data))) print('now using exact ratio calculations ...') print(float(v2(data))) I invite everybody to test my implementation, which is very unlikely to be free of bugs at this stage. ---------- type: -> enhancement Added file: http://bugs.python.org/file33955/statistics_with_exact_ratios.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 12:40:26 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Feb 2014 11:40:26 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391773226.79.0.690256390245.issue20539@psf.upfronthosting.co.za> Stefan Krah added the comment: OverflowError seems like a good choice if only values in the range of a C long are accepted. ValueError would perhaps be more intuitive, since the user normally only cares about the accepted range of input values rather than the internal details. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 12:52:01 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 11:52:01 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391773921.82.0.0982203595143.issue20539@psf.upfronthosting.co.za> Nick Coghlan added the comment: I figured it was some internal storage overflowing, and I don't have an issue with the error type. The bit that is confusing is the error *message* - what int doesn't fit into a C long? (especially in the second case of float input where no user level int is involved at all). It's mostly a theoretical problem though - as far as I am aware, the user that hit it was deliberately testing how far the limits of the "infinite precision" integers promised in the documentation actually extend. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 12:52:43 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 11:52:43 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391773963.92.0.367777379032.issue20539@psf.upfronthosting.co.za> Mark Dickinson added the comment: > The bit that is confusing is the error *message* - what int doesn't fit into a C long? Agreed: it would be nice to intercept this and give a better message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 13:04:48 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Feb 2014 12:04:48 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391774688.74.0.496101236342.issue20499@psf.upfronthosting.co.za> Stefan Krah added the comment: We can add a fast Decimal.as_integer_ratio() in C. That said, why is the sum of Decimals not done in decimal arithmetic with a very high context precision? It would be exact and with usual exponents in the range [-384, 383] it should be very fast. >>> c.prec = 50 >>> sum([D("1e50"), D(1), D("-1e50")] * 1000) Decimal('0E+1') >>> >>> c.prec = 51 >>> sum([D("1e50"), D(1), D("-1e50")] * 1000) Decimal('1000') ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 13:06:28 2014 From: report at bugs.python.org (Irvin Probst) Date: Fri, 07 Feb 2014 12:06:28 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? Message-ID: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> New submission from Irvin Probst: After checking with the kind people of help at python.org I think I found a bug in the way connections are handled in the multiprocessing module. Using python 3.3 I've noticed a performance drop of about 70 times when running some code performing basic requests on a SyncManager. As this code was burried deep into a big project I made a test case attached to this report to reproduce this behavior. Here is what this code does: - define a class SharedData with several instance variables (a,b and c here) - this class has two methods exposed through a proxy (good() ans bad()) both see a huge performance drop using 3.3 and can be used to reproduce this behavior. The only difference is that good() uses a mutex whereas bad() does not, I wished to check that mutexes were not to blame for this problem. - create a Syncmanager giving access to a SharedData instance - launch a multiprocessing.Process() running the do_stuff() function, this function calls 10 times the good() (or bad()) method of SharedData through the Syncmanager, passes some values to it and gets back the result. - after each call to the proxy the time elapsed, roughly measured with time.time(), is printed System specs: Linux turing 3.12-1-686-pae #1 SMP Debian 3.12.6-2 (2013-12-29) i686 GNU/Linux Python version: latests 2.6,2.7,3.2 and 3.3 from standard debian repos 3.3.0 and 3.4.0 beta3 compiled from source time elapsed in each call to the proxy using Python 2.6, 2.7 and 3.2: first call to proxy ~ 0.04 seconds, next calls ~0.001 sec time elapsed in each call to the proxy using Python 3.3.0, 3.3.2, 3.3.3 , 3.4.0b3: first call to proxy ~0.27 seconds, next calls: 0.07 sec I reproduced this behavior using python 2.7 and 3.3.3 on an ubuntu computer running the latest amd64 release. Of course I tried without a print() after each call but it does not change anything, python 3.3 is *much* slower here. Using cProfile I tracked this down to the builtin read() method and indeed timing the read() syscall in posix_read() using gettimeofday() confirms it takes ages, posix_write() is fine though. I think the problem comes from the underlying socket the interpreter is reading from. connections.py from multiprocessing has been rewrittend between 3.2 and 3.3 but I can't see what's wrong in the way it has been done, basic socket options seem to be exactly the same. One interesting point is that it seems to only affect the last bytes sent through the socket, e.g if you send a numpy.array big enough to fill the socket's read() buffer the first calls to read() are done at a normal speed, only the last one takes time. If you confirm my test code is not to blame it makes IMHO the SyncManager in 3.3 and 3.4 completely unusable for frequent data exchanges between processes. Thanks for your time. ---------- components: Library (Lib) files: test_manager.py messages: 210457 nosy: Irvin.Probst priority: normal severity: normal status: open title: Python 3.3/3.4 regression in multiprocessing manager ? type: performance versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33956/test_manager.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 13:28:34 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 12:28:34 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <3fLG5F4BVwzQPM@mail.python.org> Roundup Robot added the comment: New changeset 17bea44a9fa7 by Nick Coghlan in branch 'default': Issue #20053: Actually test relevant assumption http://hg.python.org/cpython/rev/17bea44a9fa7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 13:44:58 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 07 Feb 2014 12:44:58 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391777098.7.0.586912801704.issue20499@psf.upfronthosting.co.za> Wolfgang Maier added the comment: > We can add a fast Decimal.as_integer_ratio() in C. That would be a terrific thing to have !! Currently, Decimals perform really poorly with the statistics functions and this is entirely due to this bottleneck. With regard to calculating the sum of Decimals in decimal arithmetic, the problem is how you'd detect that the input is all Decimals (or contains enough Decimals to justify a switch in the algorithm). The current statistics module, accepts input data consisting of mixed types, e.g., you could have Decimal mixed with ints or floats. Much of the complexity of the module stems from this fact. You can also read about some of the complications under this issue: http://bugs.python.org/issue20481 . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 13:47:34 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 12:47:34 +0000 Subject: [issue20541] os.path.exists() gives wrong answer for Windows special files Message-ID: <1391777254.4.0.885932258701.issue20541@psf.upfronthosting.co.za> New submission from Nick Coghlan: In trying to figure out why my fix for issue 20053 wasn't working on Windows, I eventually traced it back to the fact that "os.path.exists(os.devnull)" returns False on Windows, so pip isn't picking up my config file override in ensurepip, and reads the global default config file anyway. However, if you do "if exist NUL (echo exists) ELSE (echo missing)" in cmd, it will print "exists", so this looks like a bug in our os.path.exists implementation. That is currently implemented in genericpath and assumes that a file exists if-and-only-if os.stat(name) doesn't throw an exception. It turns out this assumption isn't really correct on Windows - 'NUL' and 'CON' (and presumably other special files) can be opened, but trying to do os.stat() on them throws an exception. ---------- components: Library (Lib), Windows messages: 210460 nosy: ncoghlan priority: normal severity: normal stage: test needed status: open title: os.path.exists() gives wrong answer for Windows special files type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:01:39 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Fri, 07 Feb 2014 13:01:39 +0000 Subject: [issue20541] os.path.exists() gives wrong answer for Windows special files In-Reply-To: <1391777254.4.0.885932258701.issue20541@psf.upfronthosting.co.za> Message-ID: <1391778099.11.0.965640358132.issue20541@psf.upfronthosting.co.za> Vajrasky Kok added the comment: See also: http://bugs.python.org/issue1311 ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:05:01 2014 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Feb 2014 13:05:01 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391778301.71.0.28504294727.issue20053@psf.upfronthosting.co.za> Paul Moore added the comment: Sigh. Yes, I looked at that and wondered if os.devnul would show as existing, but I similarly misread the test and assumed it was testing what it was meant to test :-( os.path.exists(os.devnull) is false on Windows (just checked) so this assumption *is* what's failing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:06:56 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 13:06:56 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391778416.53.0.8006377683.issue20053@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Paul noted, I discovered there was a bug in my assumption testing test - when I tried it directly on Windows, I discovered the culprit here is issue 20541. So adding that as a dependency, and I'll disable that part of the test on Windows (and mark the assumption as an expected failure). ---------- dependencies: +os.path.exists() gives wrong answer for Windows special files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:11:24 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 07 Feb 2014 13:11:24 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391778684.53.0.745091124803.issue20540@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Thanks for the detailed report. > connections.py from multiprocessing has been rewrittend between 3.2 > and 3.3 but I can't see what's wrong in the way it has been done, > basic socket options seem to be exactly the same. Indeed, multiprocessing.connection has been rewritten in Python (by Antoine :-). > One interesting point is that it seems to only affect the last bytes > sent through the socket, e.g if you send a numpy.array big enough to > fill the socket's read() buffer the first calls to read() are done at > a normal speed, only the last one takes time. And that's the catch. Before, connection.send looked like this (for sockets): """ static Py_ssize_t conn_send_string(ConnectionObject *conn, char *string, size_t length) { Py_ssize_t res; /* The "header" of the message is a 32 bit unsigned number (in network order) which specifies the length of the "body". If the message is shorter than about 16kb then it is quicker to combine the "header" and the "body" of the message and send them at once. */ if (length < (16*1024)) { char *message; message = PyMem_Malloc(length+4); if (message == NULL) return MP_MEMORY_ERROR; *(UINT32*)message = htonl((UINT32)length); memcpy(message+4, string, length); Py_BEGIN_ALLOW_THREADS res = _conn_sendall(conn->handle, message, length+4); Py_END_ALLOW_THREADS PyMem_Free(message); } else { UINT32 lenbuff; if (length > MAX_MESSAGE_LENGTH) return MP_BAD_MESSAGE_LENGTH; lenbuff = htonl((UINT32)length); Py_BEGIN_ALLOW_THREADS res = _conn_sendall(conn->handle, (char*)&lenbuff, 4) || _conn_sendall(conn->handle, string, length); Py_END_ALLOW_THREADS } return res; } """ So, for short messages, the header was combined with the payload, and written at once to the socket, but for large messages, it was written in two steps. Now the code looks like this: """ def _send_bytes(self, buf): # For wire compatibility with 3.2 and lower n = len(buf) self._send(struct.pack("!i", n)) # The condition is necessary to avoid "broken pipe" errors # when sending a 0-length buffer if the other end closed the pipe. if n > 0: self._send(buf) """ First the header is sent, then the payload. The problem is that this kind of pattern causes problem because of a nasty interaction between Nagle's algorithm and delayed ack: in short, if the payload isn't large enough, the TCP stack won't send it before a short delay, see http://en.wikipedia.org/wiki/Nagle's_algorithm for more details. So, one possible fix is to always combine the payload and header. With the patch attached, we go from: """ $ ./python /tmp/test_manager.py 0.28662800788879395 0.08182215690612793 0.08193612098693848 0.08193612098693848 0.08194088935852051 0.08194208145141602 0.0819399356842041 0.08194184303283691 0.08194303512573242 0.0819389820098877 10 """ to """ $ ./python /tmp/test_manager.py 0.04239797592163086 0.00041413307189941406 0.0004057884216308594 0.0004088878631591797 0.0004029273986816406 0.00040793418884277344 0.0004069805145263672 0.0004069805145263672 0.0004050731658935547 0.0004069805145263672 10 """ Another possibility is to disable Nagle with TCP_NODELAY if available, or use some heuristic similar to the one in 3.2. ---------- keywords: +patch nosy: +neologix, pitrou, sbt Added file: http://bugs.python.org/file33957/multi_nagle.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:25:35 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 13:25:35 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391779535.92.0.580738981824.issue20540@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:27:35 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Feb 2014 13:27:35 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391779655.42.0.0885317239528.issue20540@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I would favour reusing the 3.2 heuristic. Joining the header and the payload may be expensive if the payload is very large. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:29:53 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 13:29:53 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391779793.81.0.11321872604.issue20540@psf.upfronthosting.co.za> STINNER Victor added the comment: Modern operation systems have new functions like writev() to send to consecutive buffers. Can't we use them, and emulate them if they are missing (use 3.2 algorithm: join if small, or send separatly)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:33:33 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 13:33:33 +0000 Subject: [issue20542] Assertion failure in test_readline Message-ID: <1391780013.0.0.395448319598.issue20542@psf.upfronthosting.co.za> New submission from Nick Coghlan: test_readline is consistently failing with an assertion failure in debug builds. I'm going to add a skip for the time being, because I don't know the UnicodeWriter or UTF7 code well enough to guess where the inconsistency may be being introduced. Relevant extract from faulthandler stack dump: Current thread 0x00007f83a3e14740 (most recent call first): File "/home/ncoghlan/devel/py3k/Lib/codecs.py", line 494 in read File "/home/ncoghlan/devel/py3k/Lib/codecs.py", line 548 in readline File "/home/ncoghlan/devel/py3k/Lib/test/test_codecs.py", line 168 in test_readline Relevant extract from gdb trace: #4 0x00000000004f092f in _PyUnicode_CheckConsistency ( op='xxx\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', check_content=1) at Objects/unicodeobject.c:410 #5 0x0000000000544b75 in _PyUnicodeWriter_Finish (writer=0x7ffffffd7d40) at Objects/unicodeobject.c:13503 #6 0x0000000000510f5b in PyUnicode_DecodeUTF7Stateful (s=0x7fffed18b5b8 "", size=72, errors=0x7ffff19db0e8 "strict", consumed=0x7ffffffd7e48) at Objects/unicodeobject.c:4472 #7 0x0000000000607922 in utf_7_decode (self=, args=(b'xxx\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+ICg', 'strict')) at ./Modules/_codecsmodule.c:271 ---------- assignee: serhiy.storchaka keywords: 3.4regression, buildbot messages: 210467 nosy: larry, ncoghlan, serhiy.storchaka priority: release blocker severity: normal stage: needs patch status: open title: Assertion failure in test_readline type: crash versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:35:03 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 13:35:03 +0000 Subject: [issue20542] Assertion failure in test_readline In-Reply-To: <1391780013.0.0.395448319598.issue20542@psf.upfronthosting.co.za> Message-ID: <3fLHYy2JPVz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 2e7c46718b83 by Nick Coghlan in branch 'default': Issue 20542: Temporarily skip failing test http://hg.python.org/cpython/rev/2e7c46718b83 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:39:16 2014 From: report at bugs.python.org (Ned Deily) Date: Fri, 07 Feb 2014 13:39:16 +0000 Subject: [issue20542] Assertion failure in test_readline In-Reply-To: <1391780013.0.0.395448319598.issue20542@psf.upfronthosting.co.za> Message-ID: <1391780356.92.0.169513765395.issue20542@psf.upfronthosting.co.za> Ned Deily added the comment: Duplicate of Issue20520 ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:46:49 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 13:46:49 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <3fLHqY2YKSz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset f3f92d55f942 by Nick Coghlan in branch 'default': Issue #20053: Mark as an expected failure for 3.4 http://hg.python.org/cpython/rev/f3f92d55f942 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 14:55:55 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Feb 2014 13:55:55 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391779793.81.0.11321872604.issue20540@psf.upfronthosting.co.za> Message-ID: <1391781353.2296.1.camel@fsol> Antoine Pitrou added the comment: > Modern operation systems have new functions like writev() to send to > consecutive buffers. Can't we use them, and emulate them if they are > missing (use 3.2 algorithm: join if small, or send separatly)? What would the complication bring? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 15:13:22 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 14:13:22 +0000 Subject: [issue20542] Assertion failure in test_readline In-Reply-To: <1391780013.0.0.395448319598.issue20542@psf.upfronthosting.co.za> Message-ID: <1391782402.59.0.668317004512.issue20542@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> duplicate status: open -> closed superseder: -> Segfault in UTF-7 incremental decoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 15:14:13 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 14:14:13 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <1391782453.83.0.247007108647.issue20538@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that I added a skip for test_readline in issue 20542 before realising this bug had already been filed. ---------- keywords: +3.4regression, buildbot nosy: +georg.brandl, larry, ncoghlan priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 15:28:34 2014 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Feb 2014 14:28:34 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391783314.29.0.255838170841.issue20053@psf.upfronthosting.co.za> Paul Moore added the comment: As noted in http://bugs.python.org/issue1311 (referenced from http://bugs.python.org/issue20541) it's not actually correct to assume that os.path.exists(os.devnull) returns true, as on Windows the "null device" is not a proper filesystem object. So I'd suggest that the code here needs to avoid relying on this assumption. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 15:35:32 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 14:35:32 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391783732.21.0.816852207286.issue20053@psf.upfronthosting.co.za> Nick Coghlan added the comment: The problem is that the assumption of assumption of an exists <-> open equivalence is in pip's configuration file loading rather than in ensurepip or venv - the idea was to pass in an existing but empty file to avoid needing a change in pip to fix this. However, it looks like we're just going to have to live with the misbehaviour on Windows until it can be fixed on the pip side for Python 3.4.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 15:37:58 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 14:37:58 +0000 Subject: [issue20541] os.path.exists() gives wrong answer for Windows special files In-Reply-To: <1391777254.4.0.885932258701.issue20541@psf.upfronthosting.co.za> Message-ID: <1391783878.34.0.832481758048.issue20541@psf.upfronthosting.co.za> Nick Coghlan added the comment: As per issue 1311, the exists returns True <-> stat will work equivalence is deliberate. We'll have to find a different way to resolve issue 20053 on Windows. Due to the special files on Windows, the only reliable cross-platform way to find out whether or not *open* will work on a given filename is to actually try it. ---------- resolution: -> invalid stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 15:40:09 2014 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Feb 2014 14:40:09 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391784009.12.0.225154760957.issue20053@psf.upfronthosting.co.za> Nick Coghlan added the comment: (Note that the fix on the pip side may be something more direct like just ignoring all config files and environment variables when ENSUREPIP_OPTIONS is set, rather than changing the way it reads the config files) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 15:41:28 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Feb 2014 14:41:28 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391784088.77.0.0348811675419.issue20539@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I also think OverflowError is better than MemoryError here. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 15:53:52 2014 From: report at bugs.python.org (Irvin Probst) Date: Fri, 07 Feb 2014 14:53:52 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391784832.03.0.100782981292.issue20540@psf.upfronthosting.co.za> Irvin Probst added the comment: FWIW, according to your comments I tried a quick and dirty fix in my code as I can't wait for a new Python release to make it work: The do_stuff function now does: """ def do_stuff(): client=make_client('',6666, b"foo") data_proxy=client.get_proxy() #make a dummy request to get the underlying #fd we are reading from (see bug #20540) c=data_proxy.good([1,2],[3,4]) fd=data_proxy._tls.connection._handle #setting TCP_NODELAY on 3.3.x should fix the delay issue until a new release sock=socket.fromfd(fd, socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) for i in range(10): t_s=time.time() c=data_proxy.good([1,2],[3,4]) print(time.time()-t_s) print(c) """ I'm now down to 0.04s per request instead of ~0.08s, I guess the remaining delay comes from the server side socket which has not been affected by the TCP_NODELAY on the client side. Regards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:08:23 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 07 Feb 2014 15:08:23 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391785703.24.0.807813947846.issue20499@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Ok, I finally managed to get the test suite right for this, so here is the patch diff for everything. I made a few final changes to the module itself (mostly to please the test suite), so I'll edited the complete code as well. ---------- keywords: +patch Added file: http://bugs.python.org/file33958/statistics_with_exact_ratios.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:10:32 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 07 Feb 2014 15:10:32 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391785832.31.0.0395481062612.issue20499@psf.upfronthosting.co.za> Changes by Wolfgang Maier : Added file: http://bugs.python.org/file33959/statistics.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:24:31 2014 From: report at bugs.python.org (Gareth Rees) Date: Fri, 07 Feb 2014 15:24:31 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391786671.05.0.0576622236881.issue20539@psf.upfronthosting.co.za> Gareth Rees added the comment: It's not a case of internal storage overflowing. The error is from Modules/mathmodule.c:1426 and it's the input 10**19 that's too large to convert to a C long. You get the same kind of error in other places where PyLong_AsLong or PyLong_AsInt is called on a user-supplied value, for example: >>> import pickle >>> pickle.dumps(10**19, 10**19) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long ---------- nosy: +Gareth.Rees _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:43:39 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Fri, 07 Feb 2014 15:43:39 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391774688.74.0.496101236342.issue20499@psf.upfronthosting.co.za> Message-ID: Oscar Benjamin added the comment: A fast Decimal.as_integer_ratio() would be useful in any case. If you're going to use decimals though then you can trap inexact and keep increasing the precision until it becomes exact. The problem is with rationals that cannot be expressed in a finite number of decimal digits - these need to be handled separately. I've attached decimalsum.py that shows how to compute an exact sum of any mix of int, float and Decimal, but not Fraction. When I looked at this before, having special cases for everything from int to float to Decimal to Fraction makes the code really complicated. The common cases are int and float. For these cases sum() and fsum() are much faster. However you need to also have code that checks everything in the iterable. One option is to do something like: import math import itertools from decimal import Decimal from decimalsum import decimalsum def _sum(numbers): subtotals = [] for T, nums in itertools.groupby(numbers, type): if T is int: subtotals.append(sum(nums)) elif T is float: subtotals.append(math.fsum(nums)) elif T is Decimal: subtotals.append(decimalsum(nums)) else: raise NotImplementedError return decimalsum(subtotals) The main problem here is that fsum rounds every time it returns meaning that this sum is order-dependent if there are a mix of floats and other types (See issue19086 where I asked for way to change that). Also having separate code blocks to manage all the different types internally in e.g. the less trivial variance calculations is tedious. ---------- Added file: http://bugs.python.org/file33960/decimalsum.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- from decimal import getcontext, Inexact, Decimal def decimalsum(iterable, start=Decimal('0')): '''Exact sum of Decimal/int/float mix; Result is *unrounded*''' if not isinstance(start, Decimal): start = Decimal(start) # We need our own context and we can't just set it once because # the loop could be over a generator/iterator/coroutine ctx = getcontext().copy() ctx.traps[Inexact] = True one = Decimal(1) total = start for x in iterable: if not isinstance(x, Decimal): x = Decimal(x) # Increase the precision until we get an exact result. while True: try: total = total.fma(one, x, ctx) break except Inexact: ctx.prec *= 2 # Result is exact and unrounded. return total D = Decimal assert decimalsum([D("1.02"), 3e100, D("0.98"), -3e100]) == 2 From report at bugs.python.org Fri Feb 7 16:44:48 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 15:44:48 +0000 Subject: [issue20476] If new email policies are used, default message factory should be EmailMessage In-Reply-To: <1391292485.67.0.381493162498.issue20476@psf.upfronthosting.co.za> Message-ID: <3fLLRg33GNz7LjT@mail.python.org> Roundup Robot added the comment: New changeset 77082b818676 by R David Murray in branch 'default': #20476: use EmailMessage as factory if non-compat32 policy is used. http://hg.python.org/cpython/rev/77082b818676 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:46:14 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 15:46:14 +0000 Subject: [issue20476] If new email policies are used, default message factory should be EmailMessage In-Reply-To: <1391292485.67.0.381493162498.issue20476@psf.upfronthosting.co.za> Message-ID: <1391787974.5.0.974015779648.issue20476@psf.upfronthosting.co.za> R. David Murray added the comment: I'm leaving this open and changing the version to 3.5 to remind myself to fix this right once default is open for 3.5 changes. ---------- stage: commit review -> needs patch versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:48:35 2014 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Feb 2014 15:48:35 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: Message-ID: Guido van Rossum added the comment: OK, this sounds like rounding up is important to avoid busy-wait (but maybe only when rounding down would give us zero), and we shouldn't have to worry about a courser timer, it will just make us late and that's always acceptable. On Fri, Feb 7, 2014 at 1:13 AM, Charles-Fran?ois Natali < report at bugs.python.org> wrote: > > Charles-Fran?ois Natali added the comment: > > > How sure are you? Suppose I use poll() with a 0.5 msec timeout. This > > presumably gets rounded up to 1 msec. But if the system clock has e.g. a > 10 > > msec resolution, won't this still wait 0 msec? Or will it wait until the > > next "tick" occurs, which could be anywhere between 0 and 10 msec in the > > future? > > It depends :-) > With high-resolution timers, you'll get 1ms. > Without, you'll likely get 10ms (time quantum). > An implementation returning without delay would be seriously broken. > > > But if so, why wouldn't a poll() with a 0 msec timeout also wait > > between 0 and 10 msec? > > Because the kernel doesn't suspend the current task/thread, it just checks > the list of currently FDs, and returns immediately. > See e.g. > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/select.c?id=797a796a13df6b84a4791e57306737059b5b2384#n772 > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:55:33 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 15:55:33 +0000 Subject: [issue20477] Add examples of using the new contentmanager api to the email docs In-Reply-To: <1391294758.28.0.146811184979.issue20477@psf.upfronthosting.co.za> Message-ID: <3fLLh40Zpfz7LjN@mail.python.org> Roundup Robot added the comment: New changeset a9d7d53d5fbd by R David Murray in branch 'default': #20477: add examples of using the new contentmanager API. http://hg.python.org/cpython/rev/a9d7d53d5fbd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:56:56 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 15:56:56 +0000 Subject: [issue20477] Add examples of using the new contentmanager api to the email docs In-Reply-To: <1391294758.28.0.146811184979.issue20477@psf.upfronthosting.co.za> Message-ID: <1391788616.7.0.357739987974.issue20477@psf.upfronthosting.co.za> R. David Murray added the comment: There being no objections, I have committed these. Now we'll see if Antoine or someone corrects my google-translated French in post review... ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 17:18:22 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 16:18:22 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391789902.46.0.081699878923.issue20505@psf.upfronthosting.co.za> STINNER Victor added the comment: About Windows, it looks like select() and GetQueuedCompletionStatus() (poll function the IocpProactor) round the timeout away from zero (the timeout is a number of milliseconds, an integer). Examples with GetQueuedCompletionStatus(): - 2 ms (timeout) => 15 ms (elasped time) - 100 ms => 109 ms - 157 ms => 172 ms Example with select(): - 2 ms => 16 ms - 100 ms => 110 ms - 156 ms => 171 ms ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 17:23:26 2014 From: report at bugs.python.org (Joshua Johnston) Date: Fri, 07 Feb 2014 16:23:26 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1391790206.79.0.902899485219.issue18857@psf.upfronthosting.co.za> Joshua Johnston added the comment: I'm sorry to reopen this but after it biting me quite a few times more I still cannot think of a valid use-case for this behavior that someone would be depending on 'None' being passed. I think your backwards compatibility concerns are artificial. Can anyone describe a use-case that depended on arg=None being passed in a query string? I am sure that anyone who is encountering this behavior is treating the string 'None' as None when encountered in a request query string. Consider this example usage. A website presents a user with a form to search their twitter followers using the twitter api https://api.twitter.com/1.1/friends/ids.json Form fields optional screen_name: [________] (assume more fields) Handler gets the form post and builds the dict for the search query string. # User entered nothing so params = {'screen_name': None, ..more fields} params = {k: self.request.get(k, None) for k in self.request.GET} url = "https://api.twitter.com/1.1/friends/ids.json?" + urllib.urlencode(params) print url "https://api.twitter.com/1.1/friends/ids.json?screen_name=None" This would cause the twitter search api to look for your friends with None in their screen name. Not exactly what you'd expect right? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 17:39:32 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 16:39:32 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391791172.15.0.661382377277.issue20505@psf.upfronthosting.co.za> STINNER Victor added the comment: "If you want to keep the current approach, nothing prevents from using a fixed "slack" value, independant of the selector (e.g. 1ms seems reasonable)." select() and kqueue() are able to sleep less than 1 ms. Using a slack of 1 ms would reduce the accuracy. I don't see why we should limit the accuracy. Why 1 ms? Because of poll/epoll? What about Windows and its resolution of 15.6 ms? Well, under 1 ms, don't expect accurate results :-) For example on my fast Linux box, a select() with a timeout of 61 us takes 137 us (elapsed time measued in Python). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 17:45:26 2014 From: report at bugs.python.org (Ethan Furman) Date: Fri, 07 Feb 2014 16:45:26 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391791526.48.0.0253909730847.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: Because I didn't know how to make it work with 0 and 1. Thank you! I'll get that in today. ---------- stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 17:46:52 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 07 Feb 2014 16:46:52 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391791612.17.0.102873784248.issue20499@psf.upfronthosting.co.za> Wolfgang Maier added the comment: In principle, your approach using itertools.groupby, the existing _sum, your decimalsum, and my _ExactRatio class could be combined. You could call decimalsum for Decimal and subclasses, the current _sum for everything else. _sum would return an _ExactRatio instance now anyway, just modify decimalsum accordingly and you are done. The problem I see is that it would cause a slow down in many cases where no Decimals or just a few are involved (think of mixes of ints and floats as a realistic scenario, and consider also that you would have to do an isinstance check to catch subclasses of Decimal). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 17:48:27 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 16:48:27 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1391791707.77.0.637416030723.issue18857@psf.upfronthosting.co.za> R. David Murray added the comment: What is returning a field dictionary containing None instead of an empty string? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 17:54:39 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 16:54:39 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391792079.19.0.562571299697.issue20505@psf.upfronthosting.co.za> STINNER Victor added the comment: "Let me state this last point once again: no busy loop can occur now that timeouts are rounded up." Agreed. The busy loop issue was solved by rounding the timeout away from zero in select and selectors module. "Sure, some syscalls, on some OS, can sometimes return a little bit earlier than expected, e.g. epoll can return after 0.98ms instead of 1ms. But that's not an issue, if that's the case you'll just loop an extra time, *all* event loops just work this way." I would like to avoid this *useless* loop, because such case can be common. What's the point of polling again? We just polled all file descriptors. In msg209772: I saw on "x86 Gentoo 3.x" that "waiting 99.9 ms took 99.6 ms and 99.9 ms, and waiting 9.9 ms took 9.7 ms." But I remember that I saw larger difference, but I don't remember in which state the code was. So let's get more data from buildbots: I add again the "dt < timeout" message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 17:57:58 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 16:57:58 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <3fLN456z3Qz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 3b94a4ef244e by Victor Stinner in branch 'default': Issue #20505: add debug info http://hg.python.org/cpython/rev/3b94a4ef244e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:00:37 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Feb 2014 17:00:37 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: Message-ID: <20140207170036.GA15998@sleipnir.bytereef.org> Stefan Krah added the comment: Oscar Benjamin wrote: > If you're going to use decimals though then you can trap inexact and > keep increasing the precision until it becomes exact. For sums that is not necessary. Create a context with MAX_EMAX, MIN_EMIN and MAX_PREC and mpd_add() -- the underlying libmpdec function -- will only use as many digits as neccessary. Of course, calculating 1/3 in MAX_PREC would be catastrophic. > The problem is with rationals that cannot be expressed in a finite number > of decimal > digits - these need to be handled separately. I've attached > decimalsum.py that shows how to compute an exact sum of any mix of > int, float and Decimal, but not Fraction. Yes, I was thinking of a "don't do that" approach. Do people have mixed Fractions and Decimals in their data? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:08:27 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 17:08:27 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391792907.17.0.0181454947372.issue20539@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thinking about it, `ValueError` seems like the right exception type: nothing's actually overflowing, because we haven't even tried to do any computation. This is just a limitation of what `math.factorial` is prepared to accept as input (and perhaps that limitation should be documented). Here's a patch. Bikeshedding about the exception type and the exception message is welcome. ---------- keywords: +patch Added file: http://bugs.python.org/file33961/huge_factorial_input.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:16:39 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 17:16:39 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391793399.96.0.258848489382.issue20539@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Extension Modules type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:19:39 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 17:19:39 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391793579.54.0.422108635289.issue20539@psf.upfronthosting.co.za> STINNER Victor added the comment: OverflowError makes sense because math.factorial(10**19) will overflow in CPython on common platforms, even if it didn't overflowed yet. On a supercomputer with a different Python implementation, you may be able to compute it. IMO An OverflowError is specific to a platform and Python implementation, whereas ValueError is "portable": any Python implementation must raise such error. I can imagine that a Python implementation may return a pseudo-int type which is supposed to be the result of math.factorial(), so you can compute for example math.factorial(10**19) % 2 (hint: result is 0). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:25:39 2014 From: report at bugs.python.org (Joshua Johnston) Date: Fri, 07 Feb 2014 17:25:39 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1391793939.29.0.0328048997594.issue18857@psf.upfronthosting.co.za> Joshua Johnston added the comment: In this exact example it would be an empty string. It was a fake setup to illustrate a real problem. This is the important part: params = dict(screen_name=None,count=300) url = "https://api.twitter.com/1.1/friends/ids.json?" + urllib.urlencode(params) print url # "https://api.twitter.com/1.1/friends/ids.json?screen_name=None&count=300" screen_name=None is not the behavior you would want. Another example is in webapp2's uri_for function which uses urlencode internally. ref: http://stackoverflow.com/questions/7081250/webapp2-jinja2-how-can-i-get-uri-for-working-in-jinja2-views If you try to use uri_for in your jinja2 template you must jump through hoops like: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:27:34 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 17:27:34 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1391794054.22.0.996034311421.issue18857@psf.upfronthosting.co.za> R. David Murray added the comment: None of those problems exist if you correctly use the empty string to indicate an empty string value instead of trying to use None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:28:55 2014 From: report at bugs.python.org (Eric Snow) Date: Fri, 07 Feb 2014 17:28:55 +0000 Subject: [issue20541] os.path.exists() gives wrong answer for Windows special files In-Reply-To: <1391783878.34.0.832481758048.issue20541@psf.upfronthosting.co.za> Message-ID: Eric Snow added the comment: > As per issue 1311, the exists returns True <-> stat will work equivalence is deliberate. We'll have to find a different way to resolve issue 20053 on Windows. I was going t say we should note this design/impl. detail in the os.path.exists() docs. However, it already is! :) ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:37:45 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 17:37:45 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391794665.94.0.909001964743.issue20505@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 3b94a4ef244e by Victor Stinner in branch 'default': > Issue #20505: add debug info Some results. AMD64 Windows7 SP1 3.x: == Windows-7-6.1.7601-SP1 little-endian SelectSelector.select(156.001 ms) took 156.000 ms (granularity=15.600 ms, resolution=0.001 ms) x86 Ubuntu Shared 3.x: == Linux-2.6.31.5-linode21-i686-with-debian-lenny-sid little-endian EpollSelector.select(99.947 ms) took 99.534 ms (granularity=1.000 ms, resolution=1.000 ms) Oh, for Windows: select() was called with a timeout of 157 ms but slept during 156 ms. So sometimes it's a little less than the timeout (1 ms). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:48:27 2014 From: report at bugs.python.org (Zachary Ware) Date: Fri, 07 Feb 2014 17:48:27 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391795307.84.0.65831308015.issue20530@psf.upfronthosting.co.za> Zachary Ware added the comment: New patch still gives an assertion failure at line 153 of typeobject.c when trying to get __text_signature__ from anything that should have one (on Windows, at least). Python 3.4.0b3+ (default, Feb 7 2014, 11:43:04) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> type.__text_signature__ >>> object.__text_signature__ Assertion failed: *end == ')', file ..\Objects\typeobject.c, line 153 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 18:49:30 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 17:49:30 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <6188373.BUhUMCOQYB@raxxla> Serhiy Storchaka added the comment: Here are patches for 3.3 and 3.4 (this is 3.3+ only bug). ---------- keywords: +patch Added file: http://bugs.python.org/file33962/issue20538-3.3.patch Added file: http://bugs.python.org/file33963/issue20538-3.4.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r e5a78f7c2dcb Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Fri Feb 07 10:06:39 2014 +0200 +++ b/Lib/test/test_codecs.py Fri Feb 07 19:46:39 2014 +0200 @@ -852,13 +852,40 @@ def test_partial(self): self.check_partial( - "a+-b", + 'a+-b\x00c\x80d\u0100e\U00010000f', [ - "a", - "a", - "a+", - "a+-", - "a+-b", + 'a', + 'a', + 'a+', + 'a+-', + 'a+-b', + 'a+-b', + 'a+-b', + 'a+-b', + 'a+-b', + 'a+-b\x00', + 'a+-b\x00c', + 'a+-b\x00c', + 'a+-b\x00c', + 'a+-b\x00c', + 'a+-b\x00c', + 'a+-b\x00c\x80', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d\u0100', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e\U00010000', + 'a+-b\x00c\x80d\u0100e\U00010000f', ] ) diff -r e5a78f7c2dcb Objects/unicodeobject.c --- a/Objects/unicodeobject.c Fri Feb 07 10:06:39 2014 +0200 +++ b/Objects/unicodeobject.c Fri Feb 07 19:46:39 2014 +0200 @@ -4474,8 +4474,16 @@ /* return state */ if (consumed) { if (inShift) { + *consumed = startinpos; + if (outpos != shiftOutStart && + PyUnicode_MAX_CHAR_VALUE(unicode) > 127) { + PyObject *result = PyUnicode_FromKindAndData( + PyUnicode_KIND(unicode), PyUnicode_DATA(unicode), + shiftOutStart); + Py_DECREF(unicode); + unicode = result; + } outpos = shiftOutStart; /* back off output */ - *consumed = startinpos; } else { *consumed = s-starts; -------------- next part -------------- diff -r 3b94a4ef244e Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Fri Feb 07 17:53:13 2014 +0100 +++ b/Lib/test/test_codecs.py Fri Feb 07 19:46:46 2014 +0200 @@ -124,8 +124,6 @@ "".join(codecs.iterdecode([bytes([c]) for c in encoded], self.encoding)) ) - # Temporary skip, see http://bugs.python.org/issue20542 - @unittest.skip def test_readline(self): def getreader(input): stream = io.BytesIO(input.encode(self.encoding)) @@ -899,13 +897,40 @@ def test_partial(self): self.check_partial( - "a+-b", + 'a+-b\x00c\x80d\u0100e\U00010000f', [ - "a", - "a", - "a+", - "a+-", - "a+-b", + 'a', + 'a', + 'a+', + 'a+-', + 'a+-b', + 'a+-b', + 'a+-b', + 'a+-b', + 'a+-b', + 'a+-b\x00', + 'a+-b\x00c', + 'a+-b\x00c', + 'a+-b\x00c', + 'a+-b\x00c', + 'a+-b\x00c', + 'a+-b\x00c\x80', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d', + 'a+-b\x00c\x80d\u0100', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e', + 'a+-b\x00c\x80d\u0100e\U00010000', + 'a+-b\x00c\x80d\u0100e\U00010000f', ] ) diff -r 3b94a4ef244e Objects/unicodeobject.c --- a/Objects/unicodeobject.c Fri Feb 07 17:53:13 2014 +0100 +++ b/Objects/unicodeobject.c Fri Feb 07 19:46:46 2014 +0200 @@ -4459,8 +4459,16 @@ /* return state */ if (consumed) { if (inShift) { + *consumed = startinpos; + if (writer.pos != shiftOutStart && writer.maxchar > 127) { + PyObject *result = PyUnicode_FromKindAndData( + writer.kind, writer.data, shiftOutStart); + Py_XDECREF(errorHandler); + Py_XDECREF(exc); + _PyUnicodeWriter_Dealloc(&writer); + return result; + } writer.pos = shiftOutStart; /* back off output */ - *consumed = startinpos; } else { *consumed = s-starts; From report at bugs.python.org Fri Feb 7 18:50:13 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 17:50:13 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <1391795413.46.0.36437455026.issue20538@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:04:45 2014 From: report at bugs.python.org (Donald Stufft) Date: Fri, 07 Feb 2014 18:04:45 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391796285.52.0.462387294476.issue20053@psf.upfronthosting.co.za> Donald Stufft added the comment: I'm not sure I grasp what the problem is ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:06:35 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 18:06:35 +0000 Subject: [issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit In-Reply-To: <1379791348.59.0.547034800598.issue19063@psf.upfronthosting.co.za> Message-ID: <3fLPbG2cPBz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 4daf3cec9419 by R David Murray in branch '3.3': #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4. http://hg.python.org/cpython/rev/4daf3cec9419 New changeset f942f1eddfea by R David Murray in branch 'default': #20531: Revert e20f98a8ed71, the 3.4 version of the #19063 fix. http://hg.python.org/cpython/rev/f942f1eddfea New changeset ef8aaace85ca by R David Murray in branch 'default': #20531: Apply the 3.3 version of the #19063 fix. http://hg.python.org/cpython/rev/ef8aaace85ca New changeset aab7258a31d3 by R David Murray in branch 'default': Merge: #19063: the unicode-in-set_payload problem isn't getting fixed in 3.4. http://hg.python.org/cpython/rev/aab7258a31d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:06:35 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 18:06:35 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <3fLPbH0kdTz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset f942f1eddfea by R David Murray in branch 'default': #20531: Revert e20f98a8ed71, the 3.4 version of the #19063 fix. http://hg.python.org/cpython/rev/f942f1eddfea New changeset ef8aaace85ca by R David Murray in branch 'default': #20531: Apply the 3.3 version of the #19063 fix. http://hg.python.org/cpython/rev/ef8aaace85ca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:09:33 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 18:09:33 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <1391796573.08.0.150102946797.issue20531@psf.upfronthosting.co.za> R. David Murray added the comment: OK, backward compatibility is restored. Hopefully I can fix the underlying problem right in 3.5 as part of issue 8489. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:14:15 2014 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 07 Feb 2014 18:14:15 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <1391796855.3.0.33296068524.issue20531@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Thanks David. I've confirmed the fix works (copying 'email' package over Python 3.4.0b3). ---------- resolution: fixed -> stage: committed/rejected -> type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:15:23 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 18:15:23 +0000 Subject: [issue20532] Mark all tests which use _testcapi as CPython only In-Reply-To: <1391709584.86.0.554035328709.issue20532@psf.upfronthosting.co.za> Message-ID: <1391796923.73.0.126320329683.issue20532@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ezio for your review. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:16:41 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 18:16:41 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391797001.58.0.931069072699.issue20539@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay; OverflowError seems to have the majority vote. I'll change it to that. Any strong opinions on the message? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:21:45 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Feb 2014 18:21:45 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391797305.12.0.223449653676.issue20539@psf.upfronthosting.co.za> Antoine Pitrou added the comment: "Outrageously" sounds like the argument is immoral, but do we have an objective test for that? :-) (nitpicking a bit: negative values should probably raise a proper ValueError, no?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:23:30 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 18:23:30 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391797410.31.0.788250139434.issue20539@psf.upfronthosting.co.za> Mark Dickinson added the comment: > nitpicking a bit: negative values should probably raise a proper ValueError, no? I think they do, with this patch. Or maybe I'm misunderstanding? With the current form of the patch: >>> math.factorial(10**20) Traceback (most recent call last): File "", line 1, in ValueError: factorial() argument outrageously large >>> math.factorial(-10**20) Traceback (most recent call last): File "", line 1, in ValueError: factorial() not defined for negative values ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:25:05 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Feb 2014 18:25:05 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391797505.97.0.373885384315.issue20539@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, well, my bad. I just wanted to have a good argument :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:30:31 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 18:30:31 +0000 Subject: [issue20531] TypeError in e-mail.parser when non-ASCII is present In-Reply-To: <1391697894.48.0.687210900333.issue20531@psf.upfronthosting.co.za> Message-ID: <1391797831.87.0.996662938812.issue20531@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> fixed stage: -> committed/rejected type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:37:51 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 18:37:51 +0000 Subject: [issue20089] email.message_from_string no longer working in Python 3.4 In-Reply-To: <1388239743.81.0.886859790367.issue20089@psf.upfronthosting.co.za> Message-ID: <1391798271.93.0.457157767459.issue20089@psf.upfronthosting.co.za> R. David Murray added the comment: This check has been reverted in issue 20531. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed superseder: -> TypeError in e-mail.parser when non-ASCII is present type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:37:54 2014 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Feb 2014 18:37:54 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391798274.18.0.711073201561.issue20053@psf.upfronthosting.co.za> Paul Moore added the comment: In ensurepip, _disable_pip_configuration_settings has the line: os.environ['PIP_CONFIG_FILE'] = os.devnull On Windows, os.devnull does not behave like a real file in that os.path.exists(os.devnull) is False even though opening it works fine. So that line of code is not portable to Windows. The problem in pip us in baseparser.py in ConfigOptionParser: def get_config_files(self): config_file = os.environ.get('PIP_CONFIG_FILE', False) if config_file and os.path.exists(config_file): files = [config_file] else: files = [default_config_file] There's no way to force pip to *not* use a config file. A quick hack would be to respect a new environment variable (PIP_NO_CONFIG_FILE) which if set says to set files to [] here. A bigger fix is to implement a proper "isolated mode" in pip. I could probably knock up the "quick hack" as a PR for pip reasonably easily. This should really be discussed on the pip tracker, though. Nick - did you raise an issue on pip for this? Assuming you did, can you post the reference here? Either way, ensurepip needs to be changed to use whatever mechanism pip implements. I am against special casing os.devnull in pip just to make this work (although it would address the issue). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:40:47 2014 From: report at bugs.python.org (Donald Stufft) Date: Fri, 07 Feb 2014 18:40:47 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391798447.67.0.12329782976.issue20053@psf.upfronthosting.co.za> Donald Stufft added the comment: The proper fix is an isolated mode, but we could special case devnull in pip for 1.5.3 and make a proper isolated solution in 1.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:44:35 2014 From: report at bugs.python.org (Keith Randall) Date: Fri, 07 Feb 2014 18:44:35 +0000 Subject: [issue20543] ** operator does not overflow to inf Message-ID: <1391798675.64.0.456943405881.issue20543@psf.upfronthosting.co.za> New submission from Keith Randall: >>> 1e200*1e200 inf >>> 1e200**2 Traceback (most recent call last): File "", line 1, in OverflowError: (34, 'Numerical result out of range') Shouldn't floating-point operations overflow to inf, not generate exceptions? ---------- components: Interpreter Core messages: 210517 nosy: Keith.Randall priority: normal severity: normal status: open title: ** operator does not overflow to inf type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:45:44 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 18:45:44 +0000 Subject: [issue20013] imaplib behaviour when deleting selected folder In-Reply-To: <1387355660.84.0.595349398689.issue20013@psf.upfronthosting.co.za> Message-ID: <3fLQSR4d5Qz7Lmt@mail.python.org> Roundup Robot added the comment: New changeset a24f7d195b8f by R David Murray in branch 'default': #20013: don't raise socket error when selected mailbox deleted. http://hg.python.org/cpython/rev/a24f7d195b8f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:46:27 2014 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Feb 2014 18:46:27 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391798787.2.0.900440215625.issue20053@psf.upfronthosting.co.za> Paul Moore added the comment: Maybe. I don't know what *else* might fail because devnull is special. The filename gets passed straight to configparser, for a start. But if you want to do that I'm OK with that - I just won't make that change myself. Would the special-casing be permanent or would it be removed when isolated mode is implemented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:47:22 2014 From: report at bugs.python.org (Donald Stufft) Date: Fri, 07 Feb 2014 18:47:22 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391798842.53.0.372354402287.issue20053@psf.upfronthosting.co.za> Donald Stufft added the comment: I'd remove it in 1.6 with a proper isolated mode. I'm purely thinking of minimal changes to make it easier to to get it into 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:51:54 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 18:51:54 +0000 Subject: [issue20013] imaplib behaviour when deleting selected folder In-Reply-To: <1387355660.84.0.595349398689.issue20013@psf.upfronthosting.co.za> Message-ID: <3fLQbY6by3z7LjN@mail.python.org> Roundup Robot added the comment: New changeset aecc0a4be052 by R David Murray in branch '3.3': #20013: don't raise socket error when selected mailbox deleted. http://hg.python.org/cpython/rev/aecc0a4be052 New changeset 16af3de2240f by R David Murray in branch '2.7': #20013: don't raise socket error when selected mailbox deleted. http://hg.python.org/cpython/rev/16af3de2240f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:53:43 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 18:53:43 +0000 Subject: [issue20013] imaplib behaviour when deleting selected folder In-Reply-To: <1387355660.84.0.595349398689.issue20013@psf.upfronthosting.co.za> Message-ID: <1391799223.97.0.651623782863.issue20013@psf.upfronthosting.co.za> R. David Murray added the comment: Fix applied without tests, as I haven't found time to write them, given the poor existing test coverage of this module. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:54:29 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 18:54:29 +0000 Subject: [issue20543] ** operator does not overflow to inf In-Reply-To: <1391798675.64.0.456943405881.issue20543@psf.upfronthosting.co.za> Message-ID: <1391799269.88.0.917397410242.issue20543@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Shouldn't floating-point operations overflow to inf, not generate exceptions? This has been discussed a few times before (I'll try to find the references). But to answer you question: actually, no. I think they *should* generate exceptions. That is, if I were to change anything here, it would be the result of the multiplication, not the result of the ** operation. IMO, numerically naive users shouldn't be exposed to infinities and NaNs; they should get exceptions for invalid inputs instead. The math and cmath modules fairly rigorously follow this idea, but as you've discovered the built-in operators aren't so consistent. Fixing it without breaking existing code and without annoying existing users is tricky, though. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:55:03 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 07 Feb 2014 18:55:03 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391799303.77.0.218671995131.issue20530@psf.upfronthosting.co.za> Yury Selivanov added the comment: Larry, I'm attaching a revised version of the patch -- larry.even.newerer.signature.syntax.3.diff. Changes: 1. test_signature_on_class_without_init was fixed, inspect.signature was fixed as well. Now, for class Meta(type): pass "inspect.signature(Meta)" will raise a ValueError. > I also *think* that all the code after this comment: > # No '__text_signature__' was found for the 'obj' class. > should be removed. You are right, but I'd prefer to leave that code until 3.5, when we have correct signature for 'type'. > The reason this happens: inspect.Signature gets to > the "for base in mro" case for handling classes. > The first base it tries is type(), but type() doesn't > have a public signature so it keeps going. The next > class in the MRO is object(), which has a signature > of "()", so it uses that. > It shouldn't keep going! I'm 99% certain that the first > entry in the MRO will always be callable. (Is it possible > to have a type in Python that isn't callable?) Unfortunately, no, we need to traverse the MRO. See the "test_signature_on_builtin_class" unit test, for instance. The way I solved the current bug, is to fixing the code from traversing the full MRO, to traversing the MRO without the last item -- 'object' builtin. 2. _strip_non_python_syntax -> _signature_strip_non_python_syntax Minor fixup, just to have all signature helper functions in inspect.py follow one notation. 3. test_strip_non_python_syntax -> was moved to another test case -- TestSignaturePrivateHelpers 4. I also fixed one thing that Zachary found: unused 's' variable in the '_signature_fromstr' method. Here's a quick summary of changes (diff of the diffs, omitting some changes in tests): https://gist.github.com/1st1/8869242 ---------- Added file: http://bugs.python.org/file33964/larry.even.newerer.signature.syntax.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 19:57:43 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 18:57:43 +0000 Subject: [issue20543] ** operator does not overflow to inf In-Reply-To: <1391798675.64.0.456943405881.issue20543@psf.upfronthosting.co.za> Message-ID: <1391799463.37.0.206425069088.issue20543@psf.upfronthosting.co.za> Mark Dickinson added the comment: Issue #3222 is related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:03:33 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 19:03:33 +0000 Subject: [issue20543] ** operator does not overflow to inf In-Reply-To: <1391798675.64.0.456943405881.issue20543@psf.upfronthosting.co.za> Message-ID: <1391799813.08.0.875164287622.issue20543@psf.upfronthosting.co.za> Mark Dickinson added the comment: And here's a link to the middle of a related discussion under the heading "Turn off ZeroDivisionError?" on python-list, Feb 2008. https://mail.python.org/pipermail/python-list/2008-February/473302.html You'd have to read up- and down-thread to get the entire discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:05:17 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 19:05:17 +0000 Subject: [issue20543] ** operator does not overflow to inf In-Reply-To: <1391798675.64.0.456943405881.issue20543@psf.upfronthosting.co.za> Message-ID: <1391799917.67.0.0444828620531.issue20543@psf.upfronthosting.co.za> Mark Dickinson added the comment: See also #18570. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:07:44 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 19:07:44 +0000 Subject: [issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not In-Reply-To: <1391688822.97.0.233110009283.issue20529@psf.upfronthosting.co.za> Message-ID: <1391800064.62.0.534764913248.issue20529@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:10:09 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 07 Feb 2014 19:10:09 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391800209.0.0.937116961296.issue20539@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch. ---------- Added file: http://bugs.python.org/file33965/huge_factorial_input_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:10:52 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 07 Feb 2014 19:10:52 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391800252.12.0.639099134833.issue20530@psf.upfronthosting.co.za> Yury Selivanov added the comment: One more patch (v4) I fixed the commented out 'ThisWorksNow' test. And also 'inspect.signature' now raises a bit more coherent exception for that particular case. ---------- Added file: http://bugs.python.org/file33966/larry.even.newerer.signature.syntax.4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:15:17 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Feb 2014 19:15:17 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391800517.03.0.565125150695.issue20540@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch with the 3.2 heuristic for deciding when to concatenate. ---------- keywords: +3.3regression -patch priority: normal -> high stage: -> patch review Added file: http://bugs.python.org/file33967/multi_nagle_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:21:06 2014 From: report at bugs.python.org (Joshua Johnston) Date: Fri, 07 Feb 2014 19:21:06 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1391800866.67.0.940792746064.issue18857@psf.upfronthosting.co.za> Joshua Johnston added the comment: If this was a function to encode a dict into something then I would see your point and agree. urlencode is specifically designed to work within the domain or URIs. In this domain, it is acceptable to have an empty value for a key in a query string. None is a representation of nothing, empty, null, the absence of a value. Therefore you would expect a function in the domain of URIs to construct a valid URI component when you specifically tell it to use None. Valid is up to you, either ignore the key-value pair completely, or use key[=&] to represent the empty value. Take Requests as an example that gets it right: >>> import requests >>> requests.get('http://www.google.com/', params={'key': None}).url u'http://www.google.com/' >>> requests.get('http://www.google.com/', params={'key': ''}).url u'http://www.google.com/?key=' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:25:50 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 07 Feb 2014 19:25:50 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391791172.15.0.661382377277.issue20505@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > select() and kqueue() are able to sleep less than 1 ms. Using a slack of 1 ms would reduce the accuracy. I don't see why we should limit the accuracy. Why 1 ms? Because of poll/epoll? What about Windows and its resolution of 15.6 ms? > > Well, under 1 ms, don't expect accurate results :-) For example on my fast Linux box, a select() with a timeout of 61 us takes 137 us (elapsed time measued in Python). That's precisely why I suggested 1ms. And, by definition, it would only be used if the select()/poll() call returns earlier in the first place, so it doesn't reduce the accuracy. > I would like to avoid this *useless* loop, because such case can be common. > What's the point of polling again? We just polled all file descriptors. "If it ain't broke, don't fix it": for the 10th time, all event loops work like this, and this has *never* been an issue. So I suggest we stop making up complicated solutions to non-existent problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:26:15 2014 From: report at bugs.python.org (Ethan Furman) Date: Fri, 07 Feb 2014 19:26:15 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391801175.38.0.955167848172.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: Okay, I went with __reduce__ since we don't ever use the pickle protocol information. I added a test for class-nested Enums since protocol 4 supports it. I left the test for test_subclasses_without_getnewargs alone as the point of that test is to make sure that _make_class_unpicklable is working properly, not to see if we can somehow get any of it to pickle. Running all tests now. ---------- Added file: http://bugs.python.org/file33968/issue20534.stoneleaf.02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:27:50 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 19:27:50 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1391801270.22.0.355416010845.issue19772@psf.upfronthosting.co.za> R. David Murray added the comment: While the copy solution seems reasonable, unfortunately it looks like the solution isn't that simple. Your test method didn't start with 'test_', so it didn't get run. Your fix doesn't fix the problem, since other parts of the code are holding on to a pointer to the original message object. But even if I change your fix to only make a local copy and use it to get the transformed payload, that fix breaks other tests, since the *headers* aren't changed in the output, even if the payload is. This is because of the odd way the generator accumulates its output, and I unfortunately don't have time to remember how it all works in order to craft a fix before the 3.4 alpha :(. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:36:28 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 07 Feb 2014 19:36:28 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391800517.03.0.565125150695.issue20540@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Updated patch with the 3.2 heuristic for deciding when to concatenate. LGTM. For posterity, a quick benchmark performing 100 trivial remote calls: Before: $ ./python ~/test_manager.py 8.202659845352173 After: $ ./python ~/test_manager.py 0.13146567344665527 Note that we're still behind the pre-rewrite performance (this is on 2.7): $ ./python ~/test_manager.py 0.0707828998566 That's probably just the C->Python overhead, but I'll double-check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:36:29 2014 From: report at bugs.python.org (Ethan Furman) Date: Fri, 07 Feb 2014 19:36:29 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391801789.5.0.578626355413.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: I also removed the protocol 2 warning from the docs, and added this note: .. note:: With pickle protocol version 4 it is possible to easily pickle enums nested in other classes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 20:56:55 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 19:56:55 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1391803015.32.0.684719008761.issue18857@psf.upfronthosting.co.za> R. David Murray added the comment: No, the domain of URIs does not have *any* concept of a null value. It only has the concept of a string being empty or not empty (or the key not existing at all...ie: it doesn't exist in your params dict). You are trying to map a Python concept (the singleton object None, which is used for a variety of purposes) into a domain that does not have an equivalent concept. That said, following the requests model of omitting the key if the value is None is something we could consider as a convenience enhancement. But we would again run into Python's strict backward compatibility policy. I could imagine some programmer building an internal web service that turns the string 'None' back into a Python None value. The fact that it would have to be an internal thing would mean we'd never hear about it...until we broke it :) Whether or not adding this feature would require a new keyword argument to urlencode is a judgment call. It might be an acceptable change in a feature release. ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:05:02 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 20:05:02 +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: <3fLSCx4k2mz7Ljv@mail.python.org> Roundup Robot added the comment: New changeset 63f8ea0eeb6d by R David Murray in branch '3.3': #17369: Improve handling of broken RFC2231 values in get_filename. http://hg.python.org/cpython/rev/63f8ea0eeb6d New changeset e0a90b1c4cdf by R David Murray in branch 'default': Merge: #17369: Improve handling of broken RFC2231 values in get_filename. http://hg.python.org/cpython/rev/e0a90b1c4cdf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:07:09 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 20:07:09 +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: <1391803629.84.0.615281011563.issue17369@psf.upfronthosting.co.za> R. David Murray added the comment: I've applied the first fix. I'll leave the issue open until I make the equivalent fix for the new header parsing code. ---------- stage: patch review -> needs patch versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:25:10 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:25:10 +0000 Subject: [issue20544] Use specific asserts in operator tests Message-ID: <1391804710.79.0.27308793582.issue20544@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the operator module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_operator_asserts.patch keywords: easy, patch messages: 210540 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in operator tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33969/test_operator_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:25:25 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:25:25 +0000 Subject: [issue20545] Use specific asserts in unicode tests Message-ID: <1391804725.49.0.807419128336.issue20545@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes unicode related tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests, Unicode files: test_unicode_asserts.patch keywords: easy, patch messages: 210541 nosy: benjamin.peterson, ezio.melotti, haypo, lemburg, loewis, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in unicode tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33970/test_unicode_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:25:27 2014 From: report at bugs.python.org (Joshua Johnston) Date: Fri, 07 Feb 2014 20:25:27 +0000 Subject: [issue18857] urlencode of a None value uses the string 'None' In-Reply-To: <1377633255.35.0.29938622913.issue18857@psf.upfronthosting.co.za> Message-ID: <1391804727.25.0.133015518737.issue18857@psf.upfronthosting.co.za> Joshua Johnston added the comment: While the RFC makes no mention of empty values either way, it has become standard practice to either omit the key-value completely or pass a key (optional = sign) by itself in these situations so I would consider that as standard behavior. While I stand by my position that the function is broken in regards to None, I do not have the clout to make this change without support from the community so I will leave it at that. >>>Whether or not adding this feature would require a new keyword argument to urlencode is a judgment call. >>>It might be an acceptable change in a feature release. I do believe that it should be changed in a future release and a new keyword argument would suffice except for when the abstraction level is high enough to shield you from being able to specify this new argument. >>I could imagine some programmer building an internal web service that >>turns the string 'None' back into a Python None value. The fact that it >>would have to be an internal thing would mean we'd never hear about >>it...until we broke it :) I was talking to someone about the same thing during lunch today. This whole bug report came about because I was finding 'None' string values in our app engine datastore because of optional parameters with None values being encoded as 'None'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:25:44 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:25:44 +0000 Subject: [issue20546] Use specific asserts in int tests Message-ID: <1391804744.01.0.671211669548.issue20546@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the int class tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_long_asserts.patch keywords: easy, patch messages: 210543 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in int tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33971/test_long_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:25:56 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:25:56 +0000 Subject: [issue20547] Use specific asserts in bigmem tests Message-ID: <1391804756.75.0.781107542362.issue20547@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes bigmem tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_bigmem_asserts.patch keywords: easy, patch messages: 210544 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in bigmem tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33972/test_bigmem_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:26:12 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:26:12 +0000 Subject: [issue20548] Use specific asserts in warnings and exceptions tests Message-ID: <1391804772.02.0.729156315156.issue20548@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes warnings and exceptions related tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_warnexc_asserts.patch keywords: easy, patch messages: 210545 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in warnings and exceptions tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33973/test_warnexc_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:26:45 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:26:45 +0000 Subject: [issue20549] Use specific asserts in mailbox, smtplib and poplib tests Message-ID: <1391804805.68.0.562354478477.issue20549@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the mailbox, smtplib and poplib modules tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_mailbox_asserts.patch keywords: easy, patch messages: 210546 nosy: giampaolo.rodola, petri.lehtinen, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in mailbox, smtplib and poplib tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33974/test_mailbox_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:26:56 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:26:56 +0000 Subject: [issue20550] Use specific asserts in collections tests Message-ID: <1391804816.95.0.0835407946311.issue20550@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes collections tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests keywords: easy messages: 210547 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in collections tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:27:16 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:27:16 +0000 Subject: [issue20551] Use specific asserts in decimal tests Message-ID: <1391804836.31.0.134510679108.issue20551@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the decimal module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_decimal_asserts.patch keywords: easy, patch messages: 210548 nosy: facundobatista, mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in decimal tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33975/test_decimal_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:27:36 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:27:36 +0000 Subject: [issue20552] Use specific asserts in bytes tests Message-ID: <1391804856.25.0.0710909652112.issue20552@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes bytes tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_bytes_asserts.patch keywords: easy, patch messages: 210549 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in bytes tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33976/test_bytes_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:27:44 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:27:44 +0000 Subject: [issue20553] Use specific asserts in ipaddress tests Message-ID: <1391804864.8.0.447928748965.issue20553@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the ipaddress module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_ipaddress_asserts.patch keywords: easy, patch messages: 210550 nosy: ncoghlan, pmoody, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in ipaddress tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33977/test_ipaddress_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:29:32 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:29:32 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1391804972.25.0.924033182214.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Use specific asserts in bigmem tests, Use specific asserts in int tests, Use specific asserts in mailbox, smtplib and poplib tests, Use specific asserts in operator tests, Use specific asserts in unicode tests, Use specific asserts in warnings and exceptions tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:29:52 2014 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Feb 2014 20:29:52 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391804992.3.0.9013483579.issue20053@psf.upfronthosting.co.za> Paul Moore added the comment: Sounds reasonable. Having thought about it a bit more, I don't think it's a big deal. I'll put a PR together for special-casing devnull. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:30:27 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 20:30:27 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1391805027.62.0.891686140603.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Use specific asserts in bytes tests, Use specific asserts in collections tests, Use specific asserts in decimal tests, Use specific asserts in ipaddress tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:45:02 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Feb 2014 20:45:02 +0000 Subject: [issue20551] Use specific asserts in decimal tests In-Reply-To: <1391804836.31.0.134510679108.issue20551@psf.upfronthosting.co.za> Message-ID: <1391805902.75.0.862948173467.issue20551@psf.upfronthosting.co.za> Stefan Krah added the comment: I must say that I'm moderately against these kinds of changes since the benefit is small. The original reason for keeping the older forms of assert* was to keep the diffs between 2.5-3.x manageable. Perhaps that reason is gone now, but still: If anything changes, I must update my private test suite, perhaps deal with merge conflicts etc... ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:48:51 2014 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Feb 2014 20:48:51 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391806131.18.0.289194622925.issue20053@psf.upfronthosting.co.za> Paul Moore added the comment: https://github.com/pypa/pip/pull/1543 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:54:24 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 07 Feb 2014 20:54:24 +0000 Subject: [issue20537] logging exc_info parameter should accept exception instances In-Reply-To: <1391730788.17.0.188838717397.issue20537@psf.upfronthosting.co.za> Message-ID: <1391806464.66.0.232486485571.issue20537@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I believe it's too late for feature changes in 3.4, so removing it from versions. Alright. Was worth a try ;) > It would be good if the patch addressed documentation changes, too :-) Sure, I'll add the documentation, when we start working on 3.5. Are you OK with the general idea of the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:55:08 2014 From: report at bugs.python.org (Stefan Krah) Date: Fri, 07 Feb 2014 20:55:08 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391800209.0.0.937116961296.issue20539@psf.upfronthosting.co.za> Message-ID: <20140207205507.GA17382@sleipnir.bytereef.org> Stefan Krah added the comment: I slightly favor the ValueError patch because there is only a single exception to catch. PyLong_AsUnsignedLong() also raises OverflowError for both positive values that are too large and for negative values. Perhaps the error message could contain the actual range of allowed values, especially since LONG_MAX differs across platforms. The drawback is that "outrageously" would have to go then. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 21:56:39 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 20:56:39 +0000 Subject: [issue20549] Use specific asserts in mailbox, smtplib and poplib tests In-Reply-To: <1391804805.68.0.562354478477.issue20549@psf.upfronthosting.co.za> Message-ID: <1391806599.29.0.118039112989.issue20549@psf.upfronthosting.co.za> R. David Murray added the comment: Looks good to me. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:04:40 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Feb 2014 21:04:40 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391807080.16.0.410663963863.issue20481@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Attached is a patch which: - documents that mixed types are not currently supported; - changes the behaviour of _sum to raise TypeError on mixed input types (mixing int and is allowed, but nothing else); - updates the tests; - adds some documentation changes for issue 20389. ---------- Added file: http://bugs.python.org/file33978/stats.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:22:21 2014 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 07 Feb 2014 21:22:21 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391808141.34.0.407980346092.issue20505@psf.upfronthosting.co.za> Guido van Rossum added the comment: In the end I think Charles-Francois is right -- the rounding up in selectmodule.c (for epoll) and selectors.py (for poll and, redundantly[*], for epoll) should be sufficient to avoid the busy-wait behavior with delays under 1ms. We're not promising real-time guarantees at any level, so both returning too early and too late must be acceptable. If a test fails frequently despite relaxed constraints, that's a problem with the test. So I think Victor should apply his first patch (remove_granularity.patch) to both CPython and Tulip and then we can adjust any tests that still cause occasional red buildbots. [*] It's not redundant when using Tulip on Python 3.3, so I prefer to keep it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:29:27 2014 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 07 Feb 2014 21:29:27 +0000 Subject: [issue20537] logging exc_info parameter should accept exception instances In-Reply-To: <1391730788.17.0.188838717397.issue20537@psf.upfronthosting.co.za> Message-ID: <1391808567.28.0.425412369833.issue20537@psf.upfronthosting.co.za> Vinay Sajip added the comment: Yes - or I would have said something :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:34:19 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 21:34:19 +0000 Subject: [issue20554] Use specific asserts in argparse and optparse tests Message-ID: <1391808859.25.0.0531028969207.issue20554@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes argparse and optparse modules tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_optparse_asserts.patch keywords: patch messages: 210560 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Use specific asserts in argparse and optparse tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33979/test_optparse_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:34:25 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 21:34:25 +0000 Subject: [issue20555] Use specific asserts in urllib related tests Message-ID: <1391808865.17.0.101662916847.issue20555@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the urllib, httplib, ftplib, cgi, and wsgiref modules tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_urllib_asserts.patch keywords: patch messages: 210561 nosy: giampaolo.rodola, orsenthil, pje, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in urllib related tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33980/test_urllib_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:34:38 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 21:34:38 +0000 Subject: [issue20556] Use specific asserts in threading tests Message-ID: <1391808878.85.0.661174932104.issue20556@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the threading module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_threading_asserts.patch keywords: patch messages: 210562 nosy: brett.cannon, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use specific asserts in threading tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33981/test_threading_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:34:57 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 21:34:57 +0000 Subject: [issue20557] Use specific asserts in io tests Message-ID: <1391808897.1.0.851007465151.issue20557@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch makes the io module tests use more specific asserts. This will provide more useful failure report. ---------- components: Tests files: test_io_asserts.patch keywords: patch messages: 210563 nosy: benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach priority: normal severity: normal stage: patch review status: open title: Use specific asserts in io tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33982/test_io_asserts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:36:36 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 21:36:36 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1391808996.43.0.203211896388.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Use specific asserts in argparse and optparse tests, Use specific asserts in io tests, Use specific asserts in threading tests, Use specific asserts in urllib related tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:37:29 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 07 Feb 2014 21:37:29 +0000 Subject: [issue20478] Avoid inadvertently special casing Counter in statistics module In-Reply-To: <1391303789.61.0.448801013488.issue20478@psf.upfronthosting.co.za> Message-ID: <1391809049.52.0.215524122067.issue20478@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Fix as suggested by Nick, and new test. ---------- keywords: +patch Added file: http://bugs.python.org/file33983/counter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:39:09 2014 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 07 Feb 2014 21:39:09 +0000 Subject: [issue20555] Use specific asserts in urllib related tests In-Reply-To: <1391808865.17.0.101662916847.issue20555@psf.upfronthosting.co.za> Message-ID: <1391809149.49.0.98560896495.issue20555@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:41:26 2014 From: report at bugs.python.org (Ethan Furman) Date: Fri, 07 Feb 2014 21:41:26 +0000 Subject: [issue20543] ** operator does not overflow to inf In-Reply-To: <1391798675.64.0.456943405881.issue20543@psf.upfronthosting.co.za> Message-ID: <1391809286.27.0.530976410337.issue20543@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:42:55 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 21:42:55 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1391809375.05.0.590411928025.issue16510@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After chipping off yet some small separate issues, there are only 276 changed lines left in 80 files. ---------- Added file: http://bugs.python.org/file33984/tests_asserts_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 22:51:39 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 21:51:39 +0000 Subject: [issue20440] Use Py_REPLACE/Py_XREPLACE macros In-Reply-To: <1391019258.76.0.341506038923.issue20440@psf.upfronthosting.co.za> Message-ID: <1391809899.65.0.953930564519.issue20440@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Py_ASSIGN was proposed by Paul Pogonyshev in msg70798, and this also looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:12:13 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 22:12:13 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391811133.0.0.930264318942.issue20534@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Pickle will prefer the __reduce_ex__() method over the __reduce__() method. If base class defined the __reduce_ex__() method, Enum.__reduce__() will be ignored. > I left the test for test_subclasses_without_getnewargs alone as the point of that test is to make sure that _make_class_unpicklable is working properly, not to see if we can somehow get any of it to pickle. Without these changes pickling failed, but not because _make_class_unpicklable. I added other comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:22:39 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 22:22:39 +0000 Subject: [issue20525] Got compiler warning when compiling readline module In-Reply-To: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> Message-ID: <1391811759.44.0.625975992152.issue20525@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Interesting, how compiler got this warning? In readline6 the declarations of legacy functions including completion_matches are in "#if 0" block. In libedit it declared with "const char *". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:25:43 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 22:25:43 +0000 Subject: [issue20545] Use specific asserts in unicode tests In-Reply-To: <1391804725.49.0.807419128336.issue20545@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: - self.assertTrue(type(result) is str, type(result)) + self.assertIs(type(result), str, type(result)) You can probably drop the third parameter. Victor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:28:16 2014 From: report at bugs.python.org (Gary Bernhardt) Date: Fri, 07 Feb 2014 22:28:16 +0000 Subject: [issue20539] math.factorial may throw OverflowError In-Reply-To: <1391770469.14.0.441115710554.issue20539@psf.upfronthosting.co.za> Message-ID: <1391812096.41.0.416518880174.issue20539@psf.upfronthosting.co.za> Gary Bernhardt added the comment: Although I thoroughly enjoyed "outrageously", I agree with Stefan about including the range of values. As a user who doesn't know the implementation, "outrageously" will just leave me asking why, but indicating the range will tell me exactly why the exception was raised. ---------- nosy: +garybernhardt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:34:03 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Feb 2014 22:34:03 +0000 Subject: [issue20545] Use specific asserts in unicode tests In-Reply-To: <1391804725.49.0.807419128336.issue20545@psf.upfronthosting.co.za> Message-ID: <1391812443.35.0.228545898666.issue20545@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:37:00 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 22:37:00 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <3fLWbH5Z7Qz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset d853955491a2 by Victor Stinner in branch 'default': Issue #20505: Remove resolution and _granularity from selectors and asyncio http://hg.python.org/cpython/rev/d853955491a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:42:27 2014 From: report at bugs.python.org (Phil Connell) Date: Fri, 07 Feb 2014 22:42:27 +0000 Subject: [issue2292] Missing *-unpacking generalizations In-Reply-To: <1205595680.3.0.859525264867.issue2292@psf.upfronthosting.co.za> Message-ID: <1391812947.95.0.282206338227.issue2292@psf.upfronthosting.co.za> Changes by Phil Connell : ---------- nosy: +pconnell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:43:38 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 22:43:38 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391813018.34.0.654033627975.issue20505@psf.upfronthosting.co.za> STINNER Victor added the comment: More data from buildbots (before d853955491a2). x86 Ubuntu Shared 3.x: == Linux-2.6.31.5-linode21-i686-with-debian-lenny-sid little-endian EpollSelector.select(99.947 ms) took 99.291 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(99.928 ms) took 99.553 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(499.962 ms) took 100.384 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(398.823 ms) took 398.241 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(9.918 ms) took 9.209 ms (granularity=1.000 ms, resolution=1.000 ms) PollSelector.select(499.963 ms) took 101.114 ms (granularity=1.000 ms, resolution=1.000 ms) SelectSelector.select(499.940 ms) took 101.417 ms (granularity=0.001 ms, resolution=0.001 ms) x86 Gentoo Non-Debug 3.x == Linux-2.6.35-vs2.3.0.36.32-gentoo-i686-Intel-R-_Core-TM-2_CPU_6600_ at _2.40GHz-with-gentoo-2.1 little-endian [130/389] test_asyncio EpollSelector.select(99.986 ms) took 99.796 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(99.980 ms) took 99.346 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(499.987 ms) took 100.093 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(9.979 ms) took 9.573 ms (granularity=1.000 ms, resolution=1.000 ms) PollSelector.select(499.987 ms) took 100.038 ms (granularity=1.000 ms, resolution=1.000 ms) SelectSelector.select(499.987 ms) took 100.048 ms (granularity=0.001 ms, resolution=0.001 ms) x86 Gentoo 3.x: == Linux-2.6.35-vs2.3.0.36.32-gentoo-i686-Intel-R-_Core-TM-2_CPU_6600_ at _2.40GHz-with-gentoo-2.1 little-endian [302/389/1] test_asyncio EpollSelector.select(99.971 ms) took 99.771 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(99.955 ms) took 99.737 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(499.973 ms) took 100.077 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(399.545 ms) took 399.015 ms (granularity=1.000 ms, resolution=1.000 ms) EpollSelector.select(9.949 ms) took 9.552 ms (granularity=1.000 ms, resolution=1.000 ms) PollSelector.select(499.973 ms) took 100.059 ms (granularity=1.000 ms, resolution=1.000 ms) SelectSelector.select(499.973 ms) took 100.072 ms (granularity=0.001 ms, resolution=0.001 ms) "select(499.973 ms) took 100.077" are tests on signals interrupting the select. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 23:49:20 2014 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Feb 2014 22:49:20 +0000 Subject: [issue20505] Remove resolution from selectors and granularity from asyncio In-Reply-To: <1391470456.74.0.460953910028.issue20505@psf.upfronthosting.co.za> Message-ID: <1391813359.99.0.48105927029.issue20505@psf.upfronthosting.co.za> STINNER Victor added the comment: > So I think Victor should apply his first patch (remove_granularity.patch) to both CPython and Tulip and then we can adjust any tests that still cause occasional red buildbots. Ok, I did that. So I understand that the code was a micro-optimization for a minor or zero gain. Sorry Charles-Fran?ois for having insisted so much to keep it :) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 00:01:46 2014 From: report at bugs.python.org (Paul Moore) Date: Fri, 07 Feb 2014 23:01:46 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391814106.8.0.215250217381.issue20053@psf.upfronthosting.co.za> Paul Moore added the comment: Fix now merged into pip 1.5.X branch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 00:57:15 2014 From: report at bugs.python.org (Ethan Furman) Date: Fri, 07 Feb 2014 23:57:15 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391817435.09.0.826082101386.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: The version 2 docs: http://docs.python.org/2/library/pickle.html#object.__reduce_ex__: ------------------------------------------------------------------------- The object class implements both __reduce__() and __reduce_ex__(); however, if a subclass overrides __reduce__() but not __reduce_ex__(), the __reduce_ex__() implementation detects this and calls __reduce__(). ------------------------------------------------------------------------- The current docs may say the same thing, but much less clearly: http://docs.python.org/dev/library/pickle.html#object.__reduce_ex__: ------------------------------------------------------------------------- Alternatively, a __reduce_ex__() method may be defined. The only difference is this method should take a single integer argument, the protocol version. When defined, pickle will prefer it over the __reduce__() method. In addition, __reduce__() automatically becomes a synonym for the extended version. The main use for this method is to provide backwards-compatible reduce values for older Python releases. ------------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 01:00:55 2014 From: report at bugs.python.org (Ethan Furman) Date: Sat, 08 Feb 2014 00:00:55 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391817655.47.0.806563406985.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: Ethan commented: ---------------- > I left the test for test_subclasses_without_getnewargs alone as the point of > that test is to make sure that _make_class_unpicklable is working properly, > not to see if we can somehow get any of it to pickle. Serhiy replied: --------------- > Without these changes pickling failed, but not because _make_class_unpicklable. Well, the direct cause is that the Enum class in question failed to define __getnewargs__; the indirect cause is that without __getnewargs__ the metaclass will call _make_class_unpicklable. So neither the enum nor its members should pickle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 01:17:01 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Feb 2014 00:17:01 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) In-Reply-To: <1391569015.82.0.789033083368.issue20516@psf.upfronthosting.co.za> Message-ID: <1391818621.71.0.72382768206.issue20516@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 01:17:47 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Feb 2014 00:17:47 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) In-Reply-To: <1391569015.82.0.789033083368.issue20516@psf.upfronthosting.co.za> Message-ID: <1391818667.42.0.862269504466.issue20516@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the patch. This will have to wait for 3.5, since 3.4 is currently in feature freeze stage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 01:55:43 2014 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 08 Feb 2014 00:55:43 +0000 Subject: [issue20558] ECONNRESET value in logging.config is valid with Linux [distros]; not valid with *BSD Message-ID: <1391820943.88.0.107305353589.issue20558@psf.upfronthosting.co.za> New submission from Garrett Cooper: The logging module checks for ECONNRESET if it's equal to 104. This is valid on Linux, but not [some] other OSes. On FreeBSD and OpenBSD [*] it's 54, not 104. The attached patch fixes the logging code to check for errno.ECONNRESET in !win32 environments. http://www.openbsd.org/cgi-bin/man.cgi?query=errno&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=htmlvim ---------- files: patch messages: 210580 nosy: yaneurabeya priority: normal severity: normal status: open title: ECONNRESET value in logging.config is valid with Linux [distros]; not valid with *BSD Added file: http://bugs.python.org/file33985/patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 01:56:14 2014 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 08 Feb 2014 00:56:14 +0000 Subject: [issue20558] ECONNRESET value in logging.config is valid with Linux [distros]; not valid with *BSD In-Reply-To: <1391820943.88.0.107305353589.issue20558@psf.upfronthosting.co.za> Message-ID: <1391820974.67.0.692831345079.issue20558@psf.upfronthosting.co.za> Changes by Garrett Cooper : ---------- components: +Library (Lib) type: -> behavior versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 02:00:37 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Feb 2014 01:00:37 +0000 Subject: [issue20558] ECONNRESET value in logging.config is valid with Linux [distros]; not valid with *BSD In-Reply-To: <1391820943.88.0.107305353589.issue20558@psf.upfronthosting.co.za> Message-ID: <1391821237.94.0.246761910649.issue20558@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 02:28:40 2014 From: report at bugs.python.org (Antony Lee) Date: Sat, 08 Feb 2014 01:28:40 +0000 Subject: [issue20267] TemporaryDirectory does not resolve path when created using a relative path In-Reply-To: <1389761308.4.0.00958902784577.issue20267@psf.upfronthosting.co.za> Message-ID: <1391822920.59.0.641457920632.issue20267@psf.upfronthosting.co.za> Antony Lee added the comment: Thanks for the fix. The same fix seems should also work for mkstemp and mktemp -- is it really worth creating a new issue for them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 02:42:45 2014 From: report at bugs.python.org (Antony Lee) Date: Sat, 08 Feb 2014 01:42:45 +0000 Subject: [issue20247] Condition._is_owned is wrong In-Reply-To: <1389660921.49.0.651163897864.issue20247@psf.upfronthosting.co.za> Message-ID: <1391823765.51.0.187287253804.issue20247@psf.upfronthosting.co.za> Antony Lee added the comment: For the second half, the same behavior applies under Linux -- basically, a simple Lock doesn't have a notion of owning thread and can the be unlocked by any thread. However, the first half is not correct if the lock used is a *RLock-like* object (that is, it has a notion of ownership, and once acquired it can be reacquired and released only by the owning thread). If that is the case, then _lock.acquire(0) will succeed if the current thread already owns the lock (or if no one owns it) and fail if the lock is owned by another thread. So perhaps it may not be possible to do really better, but the docs could (should?) mention that custom implementations of locks passed to Condition objects should implement their own version of _is_owned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 02:45:10 2014 From: report at bugs.python.org (Ian Beaver) Date: Sat, 08 Feb 2014 01:45:10 +0000 Subject: [issue14130] memoryview: add multi-dimensional indexing and slicing In-Reply-To: <1330259007.41.0.197339877072.issue14130@psf.upfronthosting.co.za> Message-ID: <1391823910.86.0.72846464747.issue14130@psf.upfronthosting.co.za> Ian Beaver added the comment: If there is any way to get this implemented, it is needed. For one, the docs on memoryview make no mention that indexing and slicing doesn't work with multi-dimensional data which led me to believe it was supported until I tried using it. A second reason is currently this represents a loss of functionality from the buffer type in python2. In porting code using the buffer type in python2 to python3, you get a very unhelpful "NotImplementedError" with no description when trying to slice a memoryview. There is no workaround but to call tobytes() and copy the data in memory to an object that supports slicing, but for very large objects this defeats the primary purpose of using buffers in the first place, which is to avoid memory copies. ---------- nosy: +undercoveridiot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 03:42:33 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Feb 2014 02:42:33 +0000 Subject: [issue20558] ECONNRESET value in logging.config is valid with Linux [distros]; not valid with *BSD In-Reply-To: <1391820943.88.0.107305353589.issue20558@psf.upfronthosting.co.za> Message-ID: <1391827353.49.0.187467764169.issue20558@psf.upfronthosting.co.za> R. David Murray added the comment: On windows, errno.ECONNRESET is set equal to errno.WSAECONNRESET. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 03:56:54 2014 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 08 Feb 2014 02:56:54 +0000 Subject: [issue20558] ECONNRESET value in logging.config is valid with Linux [distros]; not valid with *BSD In-Reply-To: <1391820943.88.0.107305353589.issue20558@psf.upfronthosting.co.za> Message-ID: <1391828214.4.0.0644278414632.issue20558@psf.upfronthosting.co.za> Garrett Cooper added the comment: Good to know! I updated the patch to remove the errno abstraction, grab the errno attribute from the OSError, and sort the imports. ---------- Added file: http://bugs.python.org/file33986/patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 03:57:26 2014 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 08 Feb 2014 02:57:26 +0000 Subject: [issue20558] ECONNRESET value in logging.config is valid with Linux [distros]; not valid with *BSD In-Reply-To: <1391820943.88.0.107305353589.issue20558@psf.upfronthosting.co.za> Message-ID: <1391828246.49.0.767106035859.issue20558@psf.upfronthosting.co.za> Changes by Garrett Cooper : Removed file: http://bugs.python.org/file33985/patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 04:40:30 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 08 Feb 2014 03:40:30 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1391830830.87.0.117328899792.issue19772@psf.upfronthosting.co.za> Vajrasky Kok added the comment: > Your test method didn't start with 'test_', so it didn't get run. Ah sorry about that. This is the updated patch. It fixed the problem and passed all test. ---------- Added file: http://bugs.python.org/file33987/fix_serialization_message_object_mutation_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 05:34:24 2014 From: report at bugs.python.org (Bill Winslow) Date: Sat, 08 Feb 2014 04:34:24 +0000 Subject: [issue20559] urllib/http fail to sanitize a non-ascii url Message-ID: <1391834064.13.0.416589140445.issue20559@psf.upfronthosting.co.za> New submission from Bill Winslow: The following code will produce a UnicodeEncodeError about a character being non-ascii: from urllib import request, parse, error url = 'http://en.wikipedia.org/wiki/Antonio Vallejo-N?jera' req = request.Request(url) response = request.urlopen(req) This fails as follows: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.3/urllib/request.py", line 156, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.3/urllib/request.py", line 469, in open response = self._open(req, data) File "/usr/lib/python3.3/urllib/request.py", line 487, in _open '_open', req) File "/usr/lib/python3.3/urllib/request.py", line 447, in _call_chain result = func(*args) File "/usr/lib/python3.3/urllib/request.py", line 1268, in http_open return self.do_open(http.client.HTTPConnection, req) File "/usr/lib/python3.3/urllib/request.py", line 1248, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "/usr/lib/python3.3/http/client.py", line 1067, in request self._send_request(method, url, body, headers) File "/usr/lib/python3.3/http/client.py", line 1095, in _send_request self.putrequest(method, url, **skips) File "/usr/lib/python3.3/http/client.py", line 959, in putrequest self._output(request.encode('ascii')) UnicodeEncodeError: 'ascii' codec can't encode character '\xe1' in position 27: ordinal not in range(128) I examined the library code in question: line 958 in http/client.py, the line before the one that barfs, contains the following comment: # Non-ASCII characters should have been eliminated earlier I added a print statement to the library code: print(request) self._output(request.encode('ascii')) This prints the following: >>> response = request.urlopen(req) GET /wiki/Antonio Vallejo-N?jera HTTP/1.1 Traceback (most recent call last): ... I confirmed that the 27th character as mentioned in the traceback is in fact the ? in the last name. Clearly either urllib or http is not properly sanitizing the url -- unfortunately, my knowledge is useless as to determining where the actual error is; hopefully this report contains enough detail to make it easy enough. ---------- components: Library (Lib), Unicode messages: 210587 nosy: Dubslow, ezio.melotti, haypo priority: normal severity: normal status: open title: urllib/http fail to sanitize a non-ascii url type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 06:03:43 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 08 Feb 2014 05:03:43 +0000 Subject: [issue20525] Got compiler warning when compiling readline module In-Reply-To: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> Message-ID: <1391835823.68.0.816839105829.issue20525@psf.upfronthosting.co.za> Vajrasky Kok added the comment: It's weird. When I make clean and configure again and make again, the error warning message disappear. Prior to that, I could confirm, I was in this block: #ifdef HAVE_RL_COMPLETION_MATCHES #define completion_matches(x, y) \ rl_completion_matches((x), ((rl_compentry_func_t *)(y))) #else #if defined(_RL_FUNCTION_TYPEDEF) Here I am!!!!!!!!!!!!!!!!!!!! extern char **completion_matches(char *, rl_compentry_func_t *); #else #if !defined(__APPLE__) extern char **completion_matches(char *, CPFunction *); #endif #endif #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 06:05:03 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 08 Feb 2014 05:05:03 +0000 Subject: [issue20267] TemporaryDirectory does not resolve path when created using a relative path In-Reply-To: <1389761308.4.0.00958902784577.issue20267@psf.upfronthosting.co.za> Message-ID: <1391835903.98.0.835421380506.issue20267@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Thanks for the fix. The same fix seems should also work for mkstemp and mktemp -- is it really worth creating a new issue for them? No, no new issue is necessary. I think I'll update the patch and merge it in 3.5, as it's too late for 3.4 ---------- versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 06:11:56 2014 From: report at bugs.python.org (Bill Winslow) Date: Sat, 08 Feb 2014 05:11:56 +0000 Subject: [issue20559] urllib/http fail to sanitize a non-ascii url In-Reply-To: <1391834064.13.0.416589140445.issue20559@psf.upfronthosting.co.za> Message-ID: <1391836316.13.0.734249225356.issue20559@psf.upfronthosting.co.za> Bill Winslow added the comment: Follow up -- I need to use urllib.parse.quote to safely encode a url -- though if I may be so bold, I submit that since much of the goal of Python 3 was to make unicode "just work", I the (stupid) user shouldn't have to remember to safely encode unicode urls... A reasonable way to do it would be to insert the following in place of urllib/request.py line 469 (which is OpenerDirector.open()): response = self._open(req, data) would become try: response = self._open(req, data) except UnicodeDecodeError as e: req.full_url = quote(req.full_url, safe='/%') response = self._open(req, data) That's untested of course, but hopefully it'll encourage discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 08:11:43 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 07:11:43 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391817655.47.0.806563406985.issue20534@psf.upfronthosting.co.za> Message-ID: <5801813.akqDBUrD3H@raxxla> Serhiy Storchaka added the comment: > ------------------------------------------------------------------------- > The object class implements both __reduce__() and __reduce_ex__(); > however, if a subclass overrides __reduce__() but not __reduce_ex__(), > the __reduce_ex__() implementation detects this and calls __reduce__(). > ------------------------------------------------------------------------- This is about default object.__reduce_ex__() implementation. But base class can override it. >>> import enum, pickle >>> class C(int): ... def __reduce_ex__(self, proto): ... return C, (int(self),) ... >>> class E(C): ... X = C(42) ... >>> y = C(42) >>> pickle.loads(pickle.dumps(y)) 42 >>> type(pickle.loads(pickle.dumps(y))) >>> pickle.loads(pickle.dumps(E.X)) 42 >>> type(pickle.loads(pickle.dumps(E.X))) Well, the direct cause is that the Enum class in question failed to define __getnewargs__; the indirect cause is that without __getnewargs__ the metaclass will call _make_class_unpicklable. > Well, the direct cause is that the Enum class in question failed to define > __getnewargs__; the indirect cause is that without __getnewargs__ the > metaclass will call _make_class_unpicklable. > > So neither the enum nor its members should pickle. Actually they don't pickle due to wrong __module__. After adding NEI.__module__ = NamedInt.__module__ = __name__ PicklingError no longer raised for enum class. And "BadPickle.__qualname__ = 'BadPickle'" in test_exploding_pickle is redundant, because BadPickle.__qualname__ already is 'BadPickle' (due to the module argument in constructor). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 08:13:06 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 07:13:06 +0000 Subject: [issue20525] Got compiler warning when compiling readline module In-Reply-To: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> Message-ID: <1391843586.03.0.248462286218.issue20525@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Then perhaps this is just misconfiguration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 09:14:43 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 08 Feb 2014 08:14:43 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1391847283.26.0.0573727630863.issue19772@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Actually, I am thinking of this approach (cloning the message just after entering the flatten method): diff -r b541ecd32115 Lib/email/generator.py --- a/Lib/email/generator.py Fri Feb 07 16:11:17 2014 -0800 +++ b/Lib/email/generator.py Sat Feb 08 15:55:01 2014 +0800 @@ -67,7 +67,7 @@ # Just delegate to the file object self._fp.write(s) - def flatten(self, msg, unixfrom=False, linesep=None): + def flatten(self, msg_obj, unixfrom=False, linesep=None): r"""Print the message object tree rooted at msg to the output file specified when the Generator instance was created. @@ -86,6 +86,8 @@ # from the msg, and _encoded_XXX constants for operating on data that # has already been converted (to bytes in the BytesGenerator) and # inserted into a temporary buffer. + import copy + msg = copy.copy(msg_obj) policy = msg.policy if self.policy is None else self.policy if linesep is not None: policy = policy.clone(linesep=linesep) It works for this bug but apparently it fails one test. ====================================================================== FAIL: test_make_boundary (__main__.TestMessageAPI) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_email/test_email.py", line 199, in test_make_boundary 'multipart/form-data; boundary="==') AssertionError: 'multipart/form-data' != 'multipart/form-data; boundary="==' - multipart/form-data + multipart/form-data; boundary="== So somehow, according to the ultimate design of email library, msg can not leave flatten method unscratched. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 09:26:22 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 08 Feb 2014 08:26:22 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391847982.09.0.0697684633043.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the updated patch for gc module based on Zachary's review. ---------- Added file: http://bugs.python.org/file33988/clinic_gc_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:12:29 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 08 Feb 2014 09:12:29 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391850749.99.0.778182110589.issue20185@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the updated patch for long object based on Zachary's review. ---------- Added file: http://bugs.python.org/file33989/clinic_longobject_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:13:02 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 08 Feb 2014 09:13:02 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391850782.12.0.999673231115.issue20185@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33954/clinic_longobject_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:13:12 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 08 Feb 2014 09:13:12 +0000 Subject: [issue20546] Use specific asserts in int tests In-Reply-To: <1391804744.01.0.671211669548.issue20546@psf.upfronthosting.co.za> Message-ID: <1391850792.29.0.0118293859576.issue20546@psf.upfronthosting.co.za> Mark Dickinson added the comment: Looks fine to me. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:13:15 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 08 Feb 2014 09:13:15 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1391850795.91.0.401444288867.issue20185@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file33951/clinic_gc_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:28:11 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 09:28:11 +0000 Subject: [issue14130] memoryview: add multi-dimensional indexing and slicing In-Reply-To: <1330259007.41.0.197339877072.issue14130@psf.upfronthosting.co.za> Message-ID: <1391851691.07.0.904048890828.issue14130@psf.upfronthosting.co.za> Nick Coghlan added the comment: memoryview supports slicing - it just doesn't support NumPy style *multi-dimensional* slicing (and buffer doesn't support that either). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:29:53 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 09:29:53 +0000 Subject: [issue14130] memoryview: add multi-dimensional indexing and slicing In-Reply-To: <1330259007.41.0.197339877072.issue14130@psf.upfronthosting.co.za> Message-ID: <1391851793.97.0.913300976432.issue14130@psf.upfronthosting.co.za> Nick Coghlan added the comment: (However, if you're on Python 3.2, then you'll likely need to upgrade to Python 3.3 - memoryview *does* have a lot of additional limitations in Python 3.2) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:37:24 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 09:37:24 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <1391852244.71.0.0664548897019.issue20538@psf.upfronthosting.co.za> Nick Coghlan added the comment: Patches look good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:40:21 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 09:40:21 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <1391852421.33.0.547235510334.issue20167@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I checked that -m idlelib acts the same as -m idlelib.idle, and that there is still a problem after opening a second editor window after the original. So the messages seem tied to not opening a shell window. In testing the patch, I noticed that exceptions are now occurring in all three .__del__ methods. With the candidate release imminent, I decided to only fix what is broken and only apply to 3.4 and not worry now about possible merge problems in the future. ---------- assignee: -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:44:49 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 09:44:49 +0000 Subject: [issue20478] Avoid inadvertently special casing Counter in statistics module In-Reply-To: <1391303789.61.0.448801013488.issue20478@psf.upfronthosting.co.za> Message-ID: <3fLpPq5fxqz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 78d0b7472697 by Nick Coghlan in branch 'default': Issue #20478: avoid special casing Counter in statistics http://hg.python.org/cpython/rev/78d0b7472697 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:47:29 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 09:47:29 +0000 Subject: [issue20478] Avoid inadvertently special casing Counter in statistics module In-Reply-To: <1391303789.61.0.448801013488.issue20478@psf.upfronthosting.co.za> Message-ID: <1391852849.2.0.748107890059.issue20478@psf.upfronthosting.co.za> Nick Coghlan added the comment: Committed on your behalf Steven, since I'm still not sure if your SSH key has been registered yet. ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:48:00 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 09:48:00 +0000 Subject: [issue20167] Exception on IDLE closing In-Reply-To: <1389128258.47.0.666257212012.issue20167@psf.upfronthosting.co.za> Message-ID: <3fLpTW45wmz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset f9f2c57f7d00 by Terry Jan Reedy in branch 'default': Issue #20167: Suppress 3.4 specific 'Exception ignored' messages. http://hg.python.org/cpython/rev/f9f2c57f7d00 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 10:49:14 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 09:49:14 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391852954.67.0.605057334909.issue20481@psf.upfronthosting.co.za> Nick Coghlan added the comment: Claiming to commit before 3.4rc1 (as I believe Steven's SSH key still needs to be added) ---------- assignee: stevenjd -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 11:03:31 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 10:03:31 +0000 Subject: [issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module In-Reply-To: <1390653440.27.0.247965137131.issue20389@psf.upfronthosting.co.za> Message-ID: <1391853811.33.0.804144876437.issue20389@psf.upfronthosting.co.za> Nick Coghlan added the comment: Steven included some draft docs updates in a separate patch for issue 20481 - I have split those out and uploaded them here (since this discussion refers to the docstrings as well). ---------- keywords: +patch nosy: +ncoghlan Added file: http://bugs.python.org/file33990/issue20389_statistics_docs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 11:13:56 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Sat, 08 Feb 2014 10:13:56 +0000 Subject: [issue19145] Inconsistent behaviour in itertools.repeat when using negative times In-Reply-To: <1380727396.47.0.412229295257.issue19145@psf.upfronthosting.co.za> Message-ID: <1391854436.83.0.506810264153.issue19145@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Here is the ultimate patch for this bug. The doc fix is based on Larry's writing: https://mail.python.org/pipermail/python-dev/2014-January/132156.html I made sure the patch could be compiled by Sphinx and displayed nicely. I added test and comment in the code. ---------- Added file: http://bugs.python.org/file33991/ultimate_solution_for_negative_times_via_keyword_behaviours.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 11:14:09 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 10:14:09 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <3fLq3h1b56z7LjN@mail.python.org> Roundup Robot added the comment: New changeset 5db74cd953ab by Nick Coghlan in branch 'default': Close #20481: Disallow mixed type input in statistics http://hg.python.org/cpython/rev/5db74cd953ab ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 11:14:31 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 10:14:31 +0000 Subject: [issue20560] tkFileFilter.c: ostypeCount not initialized? Message-ID: <1391854471.94.0.0196154123534.issue20560@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Fresh Win7 VC express debug build (F7), 2.7 only: fairly recent (last 3 months?) regression. In debug console, import idlelib.idle. Try to Open a file. Get message that ostypeCount is used before initialized. If open python_d with F5 in VC, [break] takes me to VS debugger, which points to line 341 in tkFileFilter.c (where is that in the directory tree?). if (ostypeCount > 0 && ostypeList != NULL) { I am slightly puzzled because it appears that line 234 for (i=0; i _______________________________________ From report at bugs.python.org Sat Feb 8 11:16:28 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 10:16:28 +0000 Subject: [issue20560] tkFileFilter.c: ostypeCount not initialized? In-Reply-To: <1391854471.94.0.0196154123534.issue20560@psf.upfronthosting.co.za> Message-ID: <1391854588.86.0.835196907532.issue20560@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If I start the 2.7 console directly instead of under the debugger, I can ignore the message and open a file and everything *seems* normal. Most users would be less comfortable doing that, but I presume the message would not appear in a release build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 11:18:43 2014 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 08 Feb 2014 10:18:43 +0000 Subject: [issue20558] ECONNRESET value in logging.config is valid with Linux [distros]; not valid with *BSD In-Reply-To: <1391820943.88.0.107305353589.issue20558@psf.upfronthosting.co.za> Message-ID: <1391854723.63.0.816856796063.issue20558@psf.upfronthosting.co.za> Vinay Sajip added the comment: There's a small possibility that someone could be relying on logging.config.RESET_ERROR being present, so I think it makes more sense to: 1. Leave RESET_ERROR as a module attribute, but set it unconditionally to errno.ECONNRESET. 2. Use e.errno rather than e.args[0], and compare it against RESET_ERROR since that's available, in the exception suite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 11:19:08 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 10:19:08 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391854748.17.0.398721994415.issue20481@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, I committed a slight variant of Steven's patch: - I moved the issue 20389 doc changes to a separate patch that I uploaded over there - Steven had marked one of the tests as potentially obsolete, I just removed it entirely. If we decide we eventually want it back, it's still there in the VCS history :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 11:39:27 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 08 Feb 2014 10:39:27 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391852244.71.0.0664548897019.issue20538@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Maybe you can a new truncate operation to unicode writer? As you want. The patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 12:10:27 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sat, 08 Feb 2014 11:10:27 +0000 Subject: [issue20561] Decimal handling error in statistics module Message-ID: <1391857827.55.0.926154753892.issue20561@psf.upfronthosting.co.za> New submission from Wolfgang Maier: Can this still be fixed in 3.4 ?? I came across this bug in the statistics module today: >>> import statistics >>> data = [Decimal('1e4')] >>> statistics.mean(data) Traceback (most recent call last): File "", line 1, in statistics.mean(data) File "C:/Python33\statistics.py", line 316, in mean return _sum(data)/n File "C:/Python33\statistics.py", line 167, in _sum total += Fraction(n, d) File "C:\Python33\lib\fractions.py", line 163, in __new__ raise TypeError("both arguments should be " TypeError: both arguments should be Rational instances The reason for this is that the statistics module converts Decimals to exact ratios internally like this: def _decimal_to_ratio(d): """Convert Decimal d to exact integer ratio (numerator, denominator). >>> from decimal import Decimal >>> _decimal_to_ratio(Decimal("2.6")) (26, 10) """ sign, digits, exp = d.as_tuple() if exp in ('F', 'n', 'N'): # INF, NAN, sNAN assert not d.is_finite() raise ValueError num = 0 for digit in digits: num = num*10 + digit if sign: num = -num den = 10**-exp #if type(den) != int: # print (d, sign, digits, exp, num, den) return (num, den) The important part here is the line: den = 10**-exp which makes den an int if - and **only** if - exp is negative. However, the exponent in the namedtuple returned by Decimal.as_tuple() is not guaranteed to be negative and in fact: >>>Decimal('1e4').as_tuple() DecimalTuple(sign=0, digits=(1,), exponent=4) With this den in the above function becomes a float, which raises an error subsequently in _sum, when it essentially tries to do: Fraction(num, den) IMPORTANT: I have been running this example on my laptop with Python3.3.0 and the statistics module imported from sys.path. Thus, I cannot exclude that the decimal module has changed since 3.3.0 and is now always returning a negative exponent with .as_tuple(). I'm abroad and cannot verify this against the Python3.4dev build. Could somebody confirm this for 3.4 and reject this issue immediately if the error doesn't occur ? If this is not version dependent though, then there is a very simple bug-fix for it, which I suggest should still be incorporated into 3.4: if exp >= 0: return int(x), 1 inserted right after the raise ValueError line is doing the job. I cannot generate the diff for this myself, so could somebody do this. Thanks a lot for your efforts! ---------- messages: 210613 nosy: oscarbenjamin, python-dev, skrah, stevenjd, wolma priority: normal severity: normal status: open title: Decimal handling error in statistics module type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 12:11:36 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 11:11:36 +0000 Subject: [issue18805] ipaddress netmask/hostmask parsing bugs In-Reply-To: <1377131918.88.0.806374780855.issue18805@psf.upfronthosting.co.za> Message-ID: <1391857896.87.0.928849098709.issue18805@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've found the patch Peter mentions above (git diff HEAD^ on ipaddress-py), and will apply it to 3.3 and default. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 12:12:26 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sat, 08 Feb 2014 11:12:26 +0000 Subject: [issue20561] Decimal handling error in statistics module In-Reply-To: <1391857827.55.0.926154753892.issue20561@psf.upfronthosting.co.za> Message-ID: <1391857946.79.0.28815546007.issue20561@psf.upfronthosting.co.za> Wolfgang Maier added the comment: #if type(den) != int: # print (d, sign, digits, exp, num, den) was inserted by me of course for debugging this. Forgot to take it out again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 12:16:31 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 11:16:31 +0000 Subject: [issue18805] ipaddress netmask/hostmask parsing bugs In-Reply-To: <1377131918.88.0.806374780855.issue18805@psf.upfronthosting.co.za> Message-ID: <1391858191.47.0.69110745555.issue18805@psf.upfronthosting.co.za> Nick Coghlan added the comment: Oh, that's annoying - it doesn't apply cleanly to the stdlib version, even after adjusting the filenames :P ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 12:18:43 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sat, 08 Feb 2014 11:18:43 +0000 Subject: [issue20561] Decimal handling error in statistics module In-Reply-To: <1391857827.55.0.926154753892.issue20561@psf.upfronthosting.co.za> Message-ID: <1391858323.07.0.136869334756.issue20561@psf.upfronthosting.co.za> Changes by Wolfgang Maier : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 12:29:29 2014 From: report at bugs.python.org (Stefan Krah) Date: Sat, 08 Feb 2014 11:29:29 +0000 Subject: [issue20561] Decimal handling error in statistics module In-Reply-To: <1391857827.55.0.926154753892.issue20561@psf.upfronthosting.co.za> Message-ID: <1391858969.14.0.388478741425.issue20561@psf.upfronthosting.co.za> Stefan Krah added the comment: This looks like a duplicate of #20536. Steven, do you think you have a chance to fix this before rc1? ---------- keywords: +3.4regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 12:35:34 2014 From: report at bugs.python.org (Stefan Krah) Date: Sat, 08 Feb 2014 11:35:34 +0000 Subject: [issue20561] Decimal handling error in statistics module In-Reply-To: <1391857827.55.0.926154753892.issue20561@psf.upfronthosting.co.za> Message-ID: <1391859334.61.0.954728064436.issue20561@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- keywords: -3.4regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 13:08:33 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 08 Feb 2014 12:08:33 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) In-Reply-To: <1391569015.82.0.789033083368.issue20516@psf.upfronthosting.co.za> Message-ID: <1391861313.61.0.790037099936.issue20516@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Just a quick comment on the patch: in as_completed(), if the future is cancelled or finished, control is yielded back to the caller with the condition's lock held. As a general rule, libraries should not yield control to the caller with a lock held, because depending on what the client does, this can lead to a deadlock. For example, Future.__repr__() acquires the future's lock: since the current implementation uses a reentrant lock, it won't cause a deadlock if called from the same thread, but it could deadlock e.g. if another thread called a similar method which acquires this lock. Also, more generally, when you hold an object's lock it's to make sure that it's always seen in a consistent state, and yielding control to the user means that it can potentially see it in an inconsistent state. See e.g. the excellent "Java Concurrency in Practice", or "Effective Java" for more details. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 13:09:11 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 12:09:11 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <3fLscQ4z6Lz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset 8d40d9cee409 by Serhiy Storchaka in branch '3.3': Issue #20538: UTF-7 incremental decoder produced inconsistant string when http://hg.python.org/cpython/rev/8d40d9cee409 New changeset e988661e458c by Serhiy Storchaka in branch 'default': Issue #20538: UTF-7 incremental decoder produced inconsistant string when http://hg.python.org/cpython/rev/e988661e458c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 13:13:36 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 12:13:36 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <1391861616.31.0.948679588334.issue20538@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Nick and Victor for your reviews. As far as there is only one place where truncating unicode writer is needed, I don't think this is worth special function. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 13:32:57 2014 From: report at bugs.python.org (Glenn Langford) Date: Sat, 08 Feb 2014 12:32:57 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) In-Reply-To: <1391569015.82.0.789033083368.issue20516@psf.upfronthosting.co.za> Message-ID: <1391862777.7.0.435411143425.issue20516@psf.upfronthosting.co.za> Glenn Langford added the comment: > if the future is cancelled or finished, control is yielded back to the caller with the condition's lock held. Hmmm...I don't agree. I assume you are looking at this code: with f._condition: # Lock the Future; yield if completed or add our Waiter if f._state in [CANCELLED_AND_NOTIFIED, FINISHED]: yield f Note that the context manager will be called in this case to release the lock before f is yielded to the caller. class MiniContext(): def __init__(self): pass def __enter__(self): print('Hello') def __exit__(self, *args): print('Goodbye') def gen(): with MiniContext(): yield 1 print(next(gen())) prints: Hello Goodbye 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 13:43:08 2014 From: report at bugs.python.org (Johnny Wezel) Date: Sat, 08 Feb 2014 12:43:08 +0000 Subject: [issue20562] sqlite3 returns result set with doubled first entry Message-ID: <1391863388.33.0.362303830227.issue20562@psf.upfronthosting.co.za> New submission from Johnny Wezel: I could isolate a bug where sqlite3 returns a result set from a select where the first entry occurs twice. >>> sys.version_info sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0) >>> import sqlite3 >>> sqlite3.version_info (2, 6, 0) $ uname -a Linux 3.10.25-gentoo #1 SMP PREEMPT Wed Jan 29 18:05:47 CET 2014 x86_64 Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz GenuineIntel GNU/Linux ---------- components: Extension Modules files: t.py messages: 210622 nosy: jwezel priority: normal severity: normal status: open title: sqlite3 returns result set with doubled first entry type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file33992/t.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:00:47 2014 From: report at bugs.python.org (Ethan Furman) Date: Sat, 08 Feb 2014 13:00:47 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391864447.61.0.935879196518.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: The only thing I hate more than being wrong is being wrong because Python isn't acting the way I think it should. :/ So, __qualname__ is not set properly when using the function API (although it has nothing to do with manually setting __module__ (I removed it, tested, no difference)). And, if a subclass defines __reduce__, but an ancestor class defines __reduce_ex__, the ancestor class wins -- this seems to completely defeat the purpose of subclassing. I'll add a 'qualname' parameter (mirroring the 'module' parameter) to the function API, and I'll use __reduce_ex__. A little experimenting shows that if the base class implements any of __reduce__, __reduce_ex__, __getnewargs__, or __getnewargs_ex__ that pickling will work, so modified that portion of Enum as well. ---------- nosy: +eli.bendersky resolution: fixed -> Added file: http://bugs.python.org/file33993/issue20534.stoneleaf.03.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:02:25 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 08 Feb 2014 13:02:25 +0000 Subject: [issue20561] Decimal handling error in statistics module In-Reply-To: <1391858969.14.0.388478741425.issue20561@psf.upfronthosting.co.za> Message-ID: <20140208130142.GH3799@ando> Steven D'Aprano added the comment: On Sat, Feb 08, 2014 at 11:29:29AM +0000, Stefan Krah wrote: > This looks like a duplicate of #20536. Steven, do you think you > have a chance to fix this before rc1? Working on it now. Should have a patch and regression tests in 15 minutes, I'll post it on 20536. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:05:42 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:05:42 +0000 Subject: [issue18805] ipaddress netmask/hostmask parsing bugs In-Reply-To: <1377131918.88.0.806374780855.issue18805@psf.upfronthosting.co.za> Message-ID: <1391864742.67.0.407753754624.issue18805@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, what I have done is translated the new *tests* from the upstream patch to the standard library tests, and then used the upstream functional patch as a guide for fixing the standard library version. I'll upload the final patch here, but I won't wait for review before committing it (I'd like to ensure it makes the 3.4rc1 tag tomorrow). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:07:56 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 13:07:56 +0000 Subject: [issue20546] Use specific asserts in int tests In-Reply-To: <1391804744.01.0.671211669548.issue20546@psf.upfronthosting.co.za> Message-ID: <3fLtwC2Q4Yz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset e47c46ede37e by Serhiy Storchaka in branch '2.7': Issue #20546: Use specific asserts in int tests. http://hg.python.org/cpython/rev/e47c46ede37e New changeset 265446b8b48c by Serhiy Storchaka in branch '3.3': Issue #20546: Use specific asserts in int tests. http://hg.python.org/cpython/rev/265446b8b48c New changeset 79ddfbea25d7 by Serhiy Storchaka in branch 'default': Issue #20546: Use specific asserts in int tests. http://hg.python.org/cpython/rev/79ddfbea25d7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:07:56 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 13:07:56 +0000 Subject: [issue20555] Use specific asserts in urllib related tests In-Reply-To: <1391808865.17.0.101662916847.issue20555@psf.upfronthosting.co.za> Message-ID: <3fLtwD0mCXz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset b21397ca58c7 by Serhiy Storchaka in branch '2.7': Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests. http://hg.python.org/cpython/rev/b21397ca58c7 New changeset b6f8d5148a05 by Serhiy Storchaka in branch '3.3': Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests. http://hg.python.org/cpython/rev/b6f8d5148a05 New changeset 868675190b34 by Serhiy Storchaka in branch 'default': Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests. http://hg.python.org/cpython/rev/868675190b34 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:07:57 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 13:07:57 +0000 Subject: [issue20549] Use specific asserts in mailbox, smtplib and poplib tests In-Reply-To: <1391804805.68.0.562354478477.issue20549@psf.upfronthosting.co.za> Message-ID: <3fLtwD69mtz7Ljn@mail.python.org> Roundup Robot added the comment: New changeset 1c3fcba31708 by Serhiy Storchaka in branch '2.7': Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests. http://hg.python.org/cpython/rev/1c3fcba31708 New changeset bd1d6916b689 by Serhiy Storchaka in branch '3.3': Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests. http://hg.python.org/cpython/rev/bd1d6916b689 New changeset 2e5e66f9e228 by Serhiy Storchaka in branch 'default': Issue #20549: Use specific asserts in mailbox, smtplib and poplib tests. http://hg.python.org/cpython/rev/2e5e66f9e228 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:08:43 2014 From: report at bugs.python.org (Ethan Furman) Date: Sat, 08 Feb 2014 13:08:43 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391864923.57.0.653338667822.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: Serhiy commented: ----------------- > Actually they don't pickle due to wrong __module__. After adding > > NEI.__module__ = NamedInt.__module__ = __name__ > > PicklingError no longer raised for enum class. If you were to look at the `_make_class_unpicklable` function you would see it works by setting __module__ to . So, in fact, it does not pickle precisely because it has the wrong module, and your change undoes what Enum was tryng to do: if an instance cannot be pickled, don't let the class be pickled either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:16:13 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 08 Feb 2014 13:16:13 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) In-Reply-To: <1391862777.7.0.435411143425.issue20516@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Note that the context manager will be called in this case to release the lock before f is yielded to the caller. > > class MiniContext(): > def __init__(self): > pass > > def __enter__(self): > print('Hello') > > def __exit__(self, *args): > print('Goodbye') > > def gen(): > with MiniContext(): > yield 1 > > print(next(gen())) > > prints: > > Hello > Goodbye > 1 Actually, I think what you're seeing here is the context manager being garbage collected right after the call to next(), and therefore before the call to print(), because no reference to it is kept. So __exit__() is called right away. But if you rewrite it like this: """ for e in gen(): print(e) """ You see: """ Hello 1 Goodbye """ It would be suprising if __exit__() got called before exit of the syntactic block, just imagine what would happen with the following code: """ def read_file(path): with open(path) as f: for line in f: yield line """ if the file was closed before yielding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:21:13 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 13:21:13 +0000 Subject: [issue18805] ipaddress netmask/hostmask parsing bugs In-Reply-To: <1377131918.88.0.806374780855.issue18805@psf.upfronthosting.co.za> Message-ID: <3fLvCX2DZqz7LjM@mail.python.org> Roundup Robot added the comment: New changeset ca5ea7c24370 by Nick Coghlan in branch '3.3': Issue #18805: better netmask validation in ipaddress http://hg.python.org/cpython/rev/ca5ea7c24370 New changeset 90dfb26869a7 by Nick Coghlan in branch 'default': Merge fix for #18805 from 3.3 http://hg.python.org/cpython/rev/90dfb26869a7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:26:41 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:26:41 +0000 Subject: [issue18805] ipaddress netmask/hostmask parsing bugs In-Reply-To: <1377131918.88.0.806374780855.issue18805@psf.upfronthosting.co.za> Message-ID: <1391866001.86.0.739427462325.issue18805@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attaching my patch for reference (although I just realised I need to tweak the NEWS entry slightly to indicate that valid prefixes that were previously rejected are now accepted). Sorry we weren't able to make use of your patch Jon, but thanks for the detailed description of the parsing problems! ---------- Added file: http://bugs.python.org/file33994/issue18805_standard_library.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:30:46 2014 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 08 Feb 2014 13:30:46 +0000 Subject: [issue20536] statistics._decimal_to_ratio() produces non-integer ratio In-Reply-To: <1391730139.77.0.406178455931.issue20536@psf.upfronthosting.co.za> Message-ID: <1391866246.59.0.455735020047.issue20536@psf.upfronthosting.co.za> Steven D'Aprano added the comment: See also issue 20561, which is a duplicate of this. Fix and tests for this in the attached patch. Could somebody please commit it for me, my ssh key apparently hasn't been registered yet. ---------- assignee: -> stevenjd keywords: +patch nosy: +larry priority: high -> release blocker resolution: -> fixed Added file: http://bugs.python.org/file33995/decimal_to_ratio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:31:20 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 13:31:20 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391866280.7.0.580446190734.issue20534@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know if this was discussed, but as far as enums will be used for platform depending constants (as ENOENT or AF_UNIX), I think that enums should be pickled by name, not by value. Here is the __reduce_ex__ implementation: def __reduce_ex__(self, proto): if proto < 4: return getattr, (self.__class__, self._name_) return self.__class__.__qualname__ + '.' + self._name_ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:36:38 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 13:36:38 +0000 Subject: [issue20555] Use specific asserts in urllib related tests In-Reply-To: <1391808865.17.0.101662916847.issue20555@psf.upfronthosting.co.za> Message-ID: <1391866598.79.0.293729652829.issue20555@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Giampaolo. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:37:18 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 13:37:18 +0000 Subject: [issue20549] Use specific asserts in mailbox, smtplib and poplib tests In-Reply-To: <1391804805.68.0.562354478477.issue20549@psf.upfronthosting.co.za> Message-ID: <1391866638.86.0.596649805464.issue20549@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review David. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:38:09 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 13:38:09 +0000 Subject: [issue20546] Use specific asserts in int tests In-Reply-To: <1391804744.01.0.671211669548.issue20546@psf.upfronthosting.co.za> Message-ID: <1391866689.22.0.379164994984.issue20546@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Mark. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:40:37 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 13:40:37 +0000 Subject: [issue18805] ipaddress netmask/hostmask parsing bugs In-Reply-To: <1377131918.88.0.806374780855.issue18805@psf.upfronthosting.co.za> Message-ID: <3fLvdw5BxXz7Ljm@mail.python.org> Roundup Robot added the comment: New changeset 19ca11099f07 by Nick Coghlan in branch '3.3': Fix #18805 NEWS entry http://hg.python.org/cpython/rev/19ca11099f07 New changeset e0b1c937e57c by Nick Coghlan in branch 'default': Merge #18805 NEWS fix from 3.3 http://hg.python.org/cpython/rev/e0b1c937e57c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:43:16 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:43:16 +0000 Subject: [issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map In-Reply-To: <1382534189.14.0.63787411181.issue19363@psf.upfronthosting.co.za> Message-ID: <1391866996.08.0.279731111927.issue19363@psf.upfronthosting.co.za> Nick Coghlan added the comment: Switched to be a docs-only bug as Gareth suggested. ---------- assignee: rhettinger -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, ncoghlan resolution: wont fix -> stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:47:12 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:47:12 +0000 Subject: [issue18805] ipaddress netmask/hostmask parsing bugs In-Reply-To: <1377131918.88.0.806374780855.issue18805@psf.upfronthosting.co.za> Message-ID: <1391867232.7.0.483304851584.issue18805@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 Sat Feb 8 14:49:40 2014 From: report at bugs.python.org (Glenn Langford) Date: Sat, 08 Feb 2014 13:49:40 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) In-Reply-To: <1391569015.82.0.789033083368.issue20516@psf.upfronthosting.co.za> Message-ID: <1391867380.1.0.556850957148.issue20516@psf.upfronthosting.co.za> Glenn Langford added the comment: > Actually, I think what you're seeing here is the context manager being garbage collected Yes indeed, I am with you now. Thanks for identifying the problem, and for your explanation. The future should not be yielded while locked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:49:53 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:49:53 +0000 Subject: [issue20563] Mark ipaddress as stable? Message-ID: <1391867393.51.0.348238863582.issue20563@psf.upfronthosting.co.za> New submission from Nick Coghlan: Peter, with issue 18805 fixed, what do you think about removing the provisional status from the ipaddress API? Aside from issue 19157 (where I'm not sure the behaviour even needs changing), the other open ipaddress issues appear to be docs related or RFEs. At this point, making ipaddress subject to the usual backwards compatibility guarantees seems fairly low risk. ---------- assignee: pmoody messages: 210641 nosy: larry, ncoghlan, pmoody priority: normal severity: normal stage: commit review status: open title: Mark ipaddress as stable? type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:51:51 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:51:51 +0000 Subject: [issue20536] statistics._decimal_to_ratio() produces non-integer ratio In-Reply-To: <1391730139.77.0.406178455931.issue20536@psf.upfronthosting.co.za> Message-ID: <1391867511.53.0.874877176058.issue20536@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: stevenjd -> ncoghlan nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:52:44 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 13:52:44 +0000 Subject: [issue20545] Use specific asserts in unicode tests In-Reply-To: <1391804725.49.0.807419128336.issue20545@psf.upfronthosting.co.za> Message-ID: <1391867564.86.0.741238491371.issue20545@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Removed redundant information from error messages in multibyte codec tests. ---------- Added file: http://bugs.python.org/file33996/test_unicode_asserts_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:55:26 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 13:55:26 +0000 Subject: [issue20536] statistics._decimal_to_ratio() produces non-integer ratio In-Reply-To: <1391730139.77.0.406178455931.issue20536@psf.upfronthosting.co.za> Message-ID: <3fLvz15ZYFz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 0f9309f8c755 by Nick Coghlan in branch 'default': Close #20536: correctly handle Decimal exponents in statistics http://hg.python.org/cpython/rev/0f9309f8c755 ---------- nosy: +python-dev stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:56:02 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:56:02 +0000 Subject: [issue20561] Decimal handling error in statistics module In-Reply-To: <1391857827.55.0.926154753892.issue20561@psf.upfronthosting.co.za> Message-ID: <1391867762.11.0.00716042795311.issue20561@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> duplicate status: open -> closed superseder: -> statistics._decimal_to_ratio() produces non-integer ratio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:57:43 2014 From: report at bugs.python.org (Ethan Furman) Date: Sat, 08 Feb 2014 13:57:43 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <1391867863.51.0.719901725807.issue20534@psf.upfronthosting.co.za> Ethan Furman added the comment: I do not recall if it was or not. The main difference would be in how aliases were handled. For example, if W and Z were the same value on system A, but different on system B, then going from A - B via pickle W and Z would still be the same using the current methods (pickling by value). Considering that on system A, W and Z are two names for the exact same object, and that with SomeEnum(xx) the 'xx' is a value, how could we pickle just the name and be able to unpickle on sytem B? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:58:37 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:58:37 +0000 Subject: [issue20553] Use specific asserts in ipaddress tests In-Reply-To: <1391804864.8.0.447928748965.issue20553@psf.upfronthosting.co.za> Message-ID: <1391867917.31.0.5267160153.issue20553@psf.upfronthosting.co.za> Nick Coghlan added the comment: Changes look fine to me - I did just check in some other updates to test_ipaddress, but I believe they're far enough away from these that the patch should still apply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:05:54 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 14:05:54 +0000 Subject: [issue20406] Use application icon for IDLE In-Reply-To: <1390817290.68.0.153594821127.issue20406@psf.upfronthosting.co.za> Message-ID: <3fLwC54GBcz7Lnd@mail.python.org> Roundup Robot added the comment: New changeset bda1739215b4 by Terry Jan Reedy in branch '3.3': Issue #20406: Use Python application icons for Idle window title bars. http://hg.python.org/cpython/rev/bda1739215b4 New changeset 3aa6fd1dc2c9 by Terry Jan Reedy in branch 'default': Issue #20406: Use Python application icons for Idle window title bars. http://hg.python.org/cpython/rev/3aa6fd1dc2c9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:21:54 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Feb 2014 14:21:54 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1391869314.0.0.300191114822.issue19772@psf.upfronthosting.co.za> R. David Murray added the comment: I'm guessing the problem is that copy is a shallow copy, and message objects can be deeply nested. Doing a deepcopy might work, but as things are currently, that could cost a lot of memory, so I don't want to do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:24:02 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 14:24:02 +0000 Subject: [issue20406] Use application icon for IDLE In-Reply-To: <1390817290.68.0.153594821127.issue20406@psf.upfronthosting.co.za> Message-ID: <1391869442.84.0.11214724798.issue20406@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For 2.7, this substitution #root.wm_iconphoto(True, *icons) root.tk.call('wm', 'iconphoto', str(root), "-default", *icons) does not work on Windows. If I change the test string "Windows" to force execution to the tk.call above, the icon is a black square, which is worse than the Tk icon. Does it work right on linux? ---------- assignee: -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:32:01 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 14:32:01 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391869921.89.0.799174638786.issue3068@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I tried applying the patch and Hg say this: abort: unable to strip away 1 of 1 dirs from Bindings.py Since the patch just adds a line, I do not understand the message. Do you have any ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:34:05 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 14:34:05 +0000 Subject: [issue20406] Use application icon for IDLE In-Reply-To: <1391869442.84.0.11214724798.issue20406@psf.upfronthosting.co.za> Message-ID: <2710468.0cTn40gB6b@raxxla> Serhiy Storchaka added the comment: Yes, it works right on Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:40:25 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 14:40:25 +0000 Subject: [issue20553] Use specific asserts in ipaddress tests In-Reply-To: <1391804864.8.0.447928748965.issue20553@psf.upfronthosting.co.za> Message-ID: <3fLwyw4MGLz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 58be80e7e653 by Serhiy Storchaka in branch '3.3': Issue #20553. Use specific asserts in ipaddress tests. http://hg.python.org/cpython/rev/58be80e7e653 New changeset 2bcb574d579f by Serhiy Storchaka in branch 'default': Issue #20553. Use specific asserts in ipaddress tests. http://hg.python.org/cpython/rev/2bcb574d579f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:41:36 2014 From: report at bugs.python.org (Martin Teichmann) Date: Sat, 08 Feb 2014 14:41:36 +0000 Subject: [issue20518] multiple inheritance + C extension = possibly unexpected __base__ In-Reply-To: <1391589036.91.0.744972661823.issue20518@psf.upfronthosting.co.za> Message-ID: <1391870496.87.0.77192372443.issue20518@psf.upfronthosting.co.za> Martin Teichmann added the comment: I've been working a bit on a solution to this issue, one proposal is in the attached patch. The patch adds a new flag to tp_flags, called Py_TPFLAGS_SOLID, which marks a class as being solid, i.e. its memory layout is incompatible with its parent layout. C classes can then set this flag, and cpython will assure that no incompatible classes are in the same inheritance graph. Other solutions are certainly thinkable: Eric proposed one should use the MRO instead of __base__. This is a great idea, why is cpython itself not doing it? Instead of traversing the inheritance graph trying to find the solid base, one could simply iterate over the MRO. In order to illustrate where the actual problem lies, here another example: ========================================= rom PyQt4.QtCore import QObject, QTimer, QTimerEvent # QObject is the parent of QTimer class Mixin(QObject): # this overwrites QObject.timerEvent def timerEvent(self, e): print('mixed in') super().timerEvent(e) class B(Mixin, QTimer): pass class C(QTimer, Mixin): pass event = QTimerEvent(0) b = B() try: b.timerEvent(event) except Exception as e: print(e) print('---------') c = C() c.timerEvent(event) ========================================= I'm writing a mixin class, that overwrites a method from QObject. In the end I am calling this method (normally that's done from within PyQt4). For class B, this mixing in works properly, my code is executed, but then I am getting an exception: PyQt4 had made b and instance of QObject, not QTimer, since this is where the __base__ is pointing to. For class C, my code is never called because PyQt4 is not cooperating. Sure, I could write wrapper classes for every Qt class that I want to mix into, but what would be the point of a mixin class then? I hope I made my problem a bit clearer. ---------- Added file: http://bugs.python.org/file33997/patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:41:50 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 14:41:50 +0000 Subject: [issue20553] Use specific asserts in ipaddress tests In-Reply-To: <1391804864.8.0.447928748965.issue20553@psf.upfronthosting.co.za> Message-ID: <1391870510.81.0.610953360462.issue20553@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Nick for your review. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:42:47 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 14:42:47 +0000 Subject: [issue20406] Use application icon for IDLE In-Reply-To: <1390817290.68.0.153594821127.issue20406@psf.upfronthosting.co.za> Message-ID: <3fLx1f2YcvzQxP@mail.python.org> Roundup Robot added the comment: New changeset d4f9efd4be7d by Terry Jan Reedy in branch '2.7': Issue #20406: Use Python application icons for Idle window title bars. http://hg.python.org/cpython/rev/d4f9efd4be7d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:44:38 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 14:44:38 +0000 Subject: [issue20551] Use specific asserts in decimal tests In-Reply-To: <1391804836.31.0.134510679108.issue20551@psf.upfronthosting.co.za> Message-ID: <1391870678.51.0.305519164693.issue20551@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:46:52 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 14:46:52 +0000 Subject: [issue20406] Use application icon for IDLE In-Reply-To: <1390817290.68.0.153594821127.issue20406@psf.upfronthosting.co.za> Message-ID: <1391870812.8.0.407635906789.issue20406@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:52:30 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Feb 2014 14:52:30 +0000 Subject: [issue20562] sqlite3 returns result set with doubled first entry In-Reply-To: <1391863388.33.0.362303830227.issue20562@psf.upfronthosting.co.za> Message-ID: <1391871150.64.0.531299127587.issue20562@psf.upfronthosting.co.za> R. David Murray added the comment: Here is an even more cut down example. Note that removing the commit avoids the problem. ---------- nosy: +r.david.murray versions: +Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33998/t.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 15:54:20 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 14:54:20 +0000 Subject: [issue20462] Python IDLE auto closed when creating a new file or open existing file In-Reply-To: <1391193371.56.0.893226127057.issue20462@psf.upfronthosting.co.za> Message-ID: <1391871260.34.0.534991238116.issue20462@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Closing until there is evidence that there is a problem with the distribution that we can fix. ---------- resolution: -> later stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:00:17 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 15:00:17 +0000 Subject: [issue20496] function definition tutorial encourages bad practice In-Reply-To: <1391404187.28.0.545168168954.issue20496@psf.upfronthosting.co.za> Message-ID: <1391871617.81.0.294367436212.issue20496@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is a later example introduced by "It is simple to write a function that returns a list of the numbers of the Fibonacci series, instead of printing it:" that does exactly what you suggest. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:04:14 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 15:04:14 +0000 Subject: [issue20497] Unclear word in socket document. In-Reply-To: <1391408382.37.0.746852071929.issue20497@psf.upfronthosting.co.za> Message-ID: <1391871854.91.0.971521006747.issue20497@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'Single' that argument passing has changed, but I would have to know what it was previously (3.1) to know what the change is. Perhaps you can review the 3.1 signature and suggest a better wording for the change note. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:06:44 2014 From: report at bugs.python.org (Glenn Langford) Date: Sat, 08 Feb 2014 15:06:44 +0000 Subject: [issue20516] Concurrent.futures base concurrency improvement (with patch) In-Reply-To: <1391569015.82.0.789033083368.issue20516@psf.upfronthosting.co.za> Message-ID: <1391872004.51.0.678808121699.issue20516@psf.upfronthosting.co.za> Glenn Langford added the comment: Updated patch: Fixed bug where quick yield in as_completed() did not release lock on future. ---------- Added file: http://bugs.python.org/file33999/futures-base-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:23:34 2014 From: report at bugs.python.org (Stefan Krah) Date: Sat, 08 Feb 2014 15:23:34 +0000 Subject: [issue14130] memoryview: add multi-dimensional indexing and slicing In-Reply-To: <1330259007.41.0.197339877072.issue14130@psf.upfronthosting.co.za> Message-ID: <1391873014.29.0.202419368044.issue14130@psf.upfronthosting.co.za> Stefan Krah added the comment: Ian, could you please provide an example where multi-dimensional indexing and slicing works in 2.x but not in 3.3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:36:46 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Feb 2014 15:36:46 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1391873806.83.0.221152418353.issue19772@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, it is because the boundary computation intentionally modifies the message object. Which is a questionable design decision overall, but is now set in stone :(. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:41:41 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 15:41:41 +0000 Subject: [issue20560] tkFileFilter.c: ostypeCount not initialized? In-Reply-To: <1391854471.94.0.0196154123534.issue20560@psf.upfronthosting.co.za> Message-ID: <2791876.pMj65sl9Zv@raxxla> Serhiy Storchaka added the comment: What Tk version do you use? This bug was fixed 5 years ago. http://core.tcl.tk/tk/info/01ac8739ab148160b39d604439cdab1f4ebe4b0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:56:05 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Sat, 08 Feb 2014 15:56:05 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <3fLq3h1b56z7LjN@mail.python.org> Message-ID: Oscar Benjamin added the comment: > Close #20481: Disallow mixed type input in statistics If I understand correctly the reason for hastily pushing this patch through is that it's the safe option: disallow mixing types as a quick fix for soon to be released 3.4. If we want to allow mixing types then that can be a new feature for 3.5. Is that correct? If so should the discussion about what to do in 3.5 take place in this issue (i.e. reopen for 3.5) or should it be a new issue? issue20499 would benefit from clarity about the statistics module policy for mixing types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 17:25:43 2014 From: report at bugs.python.org (pmoody) Date: Sat, 08 Feb 2014 16:25:43 +0000 Subject: [issue20563] Mark ipaddress as stable? In-Reply-To: <1391867393.51.0.348238863582.issue20563@psf.upfronthosting.co.za> Message-ID: <1391876743.97.0.540382547346.issue20563@psf.upfronthosting.co.za> pmoody added the comment: Works for me. I was going to say that there was still the issue with the mask parsing which turned out to be more difficult than simply applying the ipaddress-py patch but it looks like you've managed to get that applied. I spent a few hours banging my head on the keyboard before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 17:51:47 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 16:51:47 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <3fLztW0hG2z7Ljm@mail.python.org> Roundup Robot added the comment: New changeset 34fb36972f8d by R David Murray in branch '3.3': #19772: Do not mutate message when downcoding to 7bit. http://hg.python.org/cpython/rev/34fb36972f8d New changeset 2e97d3500970 by R David Murray in branch 'default': Merge #19772: Do not mutate message when downcoding to 7bit. http://hg.python.org/cpython/rev/2e97d3500970 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 18:09:39 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Feb 2014 17:09:39 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1391879379.27.0.132161881119.issue19772@psf.upfronthosting.co.za> R. David Murray added the comment: Vajrasky: thanks for your work on this, it helped me find a reasonable (if ugly) solution. However, the 'if' statement in your patch that checks specifically for the combination of old and new cte of 8bit and base64 puzzles me. The same problem occurs here if the CTE we end up with is quoted-printable, which will be the case, for example, for latin-1. The logical way to think abut the problem here (we don't want to modify the message) would be "if the CTE changed, we need to restore it". So why check specifically for 8bit and base64? The straightforward translation of "if the CTE changed, we need to restore it" would have been: 'if self.orig_cte != cte'. In my solution I preferred to leave the original object unchanged, and re-copy it to re-change the headers when needed. This is ugly, but it is more future proof against the down-coding code someday changing other headers or other characteristics of the message. And I needed to use deepcopy, because copy would just copy a pointer to the _headers list, and therefore the original headers list would still get modified. The deepcopy isn't that costly here, though, because we know that it is only called on a message that is not a multipart, since the copies are triggered only from _handle_text. It's still not pretty, but I think it is the best we can do without completely restructuring the way the generator does its work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 18:10:22 2014 From: report at bugs.python.org (pmoody) Date: Sat, 08 Feb 2014 17:10:22 +0000 Subject: [issue19157] ipaddress.IPv6Network.hosts function omits network and broadcast addresses In-Reply-To: <1380840691.26.0.505062253334.issue19157@psf.upfronthosting.co.za> Message-ID: <1391879422.01.0.296119608998.issue19157@psf.upfronthosting.co.za> pmoody added the comment: Since there's no broadcast address for ipv6, should calling .broadcast* on an ipv6 address raise an exception? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 18:10:30 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Feb 2014 17:10:30 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1391879430.73.0.825973990053.issue19772@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 18:25:36 2014 From: report at bugs.python.org (pmoody) Date: Sat, 08 Feb 2014 17:25:36 +0000 Subject: [issue19157] ipaddress.IPv6Network.hosts function omits network and broadcast addresses In-Reply-To: <1380840691.26.0.505062253334.issue19157@psf.upfronthosting.co.za> Message-ID: <1391880336.48.0.986090074697.issue19157@psf.upfronthosting.co.za> pmoody added the comment: Hey Michiel, the patch looks good to me. Have you signed the contributor license agreement? http://www.python.org/psf/contrib/contrib-form/ Nick, is there anyway for me to check if this has been signed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 18:58:19 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 17:58:19 +0000 Subject: [issue20560] tkFileFilter.c: ostypeCount not initialized? In-Reply-To: <1391854471.94.0.0196154123534.issue20560@psf.upfronthosting.co.za> Message-ID: <1391882299.78.0.167304660008.issue20560@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I may have mentioned before, I *now* use the 'standard' one for Windows for each version of Python, as fetched by Tools/buildbots/external.bat. For 2.7 this is 8.5.2. The reason I just noticed about a month ago is that I previously ran all repository builds with one version of tcl/tk, the latest -- and had no problems. When 3.4 switched to 8.6.0, I wanted to use that for the repository build also, but my impression is that 2.7 and 3.3 cannot run with 8.6. So I put each Python branch clone in a separate directory instead of side-by-side in one directory as recommended in the developer guide. (This is a nuisance.) I do not really understand why Windows users of 2.7 as saddled with such an old release of tcl/tk. If there is nothing to be done about this, we can close it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 19:10:56 2014 From: report at bugs.python.org (Remi Pointel) Date: Sat, 08 Feb 2014 18:10:56 +0000 Subject: [issue13414] test_strftime failed on OpenBSD In-Reply-To: <1321436711.11.0.148655032298.issue13414@psf.upfronthosting.co.za> Message-ID: <1391883056.13.0.679048288757.issue13414@psf.upfronthosting.co.za> Remi Pointel added the comment: I close this bug because it's corrected by the commit (revision 1.2): http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/time/wcsftime.c It was a bug in our wcsftime. Thanks. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 19:13:50 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 18:13:50 +0000 Subject: [issue16983] header parsing could apply postel's law to encoded words inside quotes In-Reply-To: <1358370824.34.0.785969797245.issue16983@psf.upfronthosting.co.za> Message-ID: <3fM1jB04jhz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 1dcb9d0d53a6 by R David Murray in branch '3.3': #16983: Apply postel's law to encoded words inside quoted strings. http://hg.python.org/cpython/rev/1dcb9d0d53a6 New changeset 5f7e626730df by R David Murray in branch 'default': Merge: #16983: Apply postel's law to encoded words inside quoted strings. http://hg.python.org/cpython/rev/5f7e626730df ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 19:19:44 2014 From: report at bugs.python.org (Remi Pointel) Date: Sat, 08 Feb 2014 18:19:44 +0000 Subject: [issue20564] test_threadsignals.py "failed" on OpenBSD because too slow (> 3sec) Message-ID: <1391883584.64.0.946216274397.issue20564@psf.upfronthosting.co.za> New submission from Remi Pointel: Hi, I have 2 tests which "failed" on OpenBSD (tested on i386, amd64 and sparc64) in: - test_threadsignals.py/test_lock_acquire_interruption - test_threadsignals.py/test_rlock_acquire_interruption ====================================================================== FAIL: test_lock_acquire_interruption (__main__.ThreadSignals) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_threadsignals.py", line 94, in test_lock_acquire_interruption self.assertLess(dt, 3.0) AssertionError: 5.020112991333008 not less than 3.0 ====================================================================== FAIL: test_rlock_acquire_interruption (__main__.ThreadSignals) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_threadsignals.py", line 122, in test_rlock_acquire_interruption self.assertLess(dt, 3.0) AssertionError: 5.0101478099823 not less than 3.0 On the 3 machines it took ~ 5sec. I'm asking why it's 3 seconds by default in the tests? Could we modify the value to 6 instead of 3, is it acceptable? Thanks for your response, Remi. ---------- components: Tests messages: 210672 nosy: rpointel priority: normal severity: normal status: open title: test_threadsignals.py "failed" on OpenBSD because too slow (> 3sec) versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 19:20:07 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Feb 2014 18:20:07 +0000 Subject: [issue16983] header parsing could apply postel's law to encoded words inside quotes In-Reply-To: <1358370824.34.0.785969797245.issue16983@psf.upfronthosting.co.za> Message-ID: <1391883607.05.0.962139505719.issue16983@psf.upfronthosting.co.za> R. David Murray added the comment: The old header parsing code already decodes these, although it gets the spacing wrong if you do the standard str(make_header(decode_header(x))) dance. The fix for the new header parsing code only handles the specific case of only encoded words surrounded by double quotes. That's the only variation I've seen in the wild so far, so I think that may be enough. To extend it to handle mixed regular text and encoded words would require rewriting the qcontent and ptext functions. Possible, but not worth it unless a real use case turns up. (Although, I think there might be a bug in quoted text parsing that may make that rewrite worthwhile later; but it is only a bug if you are actually walking the parse tree, it is not a functional bug.) Oh, and I decided to treat this as a bug fix, not an enhancement, because the old parser code already did this decoding. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: enhancement -> behavior versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 19:26:34 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 18:26:34 +0000 Subject: [issue20565] Update Tcl/Tk version for buildbots Message-ID: <1391883994.31.0.277087136027.issue20565@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently Windows buildbots use old versions of Tcl/Tk. These versions contain bugs (for example see issue20560). Versions mentioned in Tools/buildbot/external-common.bat: On 2.7: 8.5.2.1/8.5.2.0 On 3.3: 8.5.11.0 On 3.4: 8.6.1.0 Some buildbots even use beta version of 8.6 (I needed write workaround in testsuite for behavior differences). Recent Tcl/Tk versions: Tcl/Tk 8.6.1 Sep 20, 2013 Tcl/Tk 8.5.15 Sep 18, 2013 Tcl/Tk 8.4.20 Jun 1, 2013 Perhaps it is time to update Tcl/Tk to recent versions? ---------- messages: 210674 nosy: pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Update Tcl/Tk version for buildbots versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 19:27:51 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 18:27:51 +0000 Subject: [issue20560] tkFileFilter.c: ostypeCount not initialized? In-Reply-To: <1391854471.94.0.0196154123534.issue20560@psf.upfronthosting.co.za> Message-ID: <1391884071.28.0.0213494402218.issue20560@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be we should update Tcl/Tk on buildbots (issue20565). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 19:41:22 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 18:41:22 +0000 Subject: [issue20535] run_tests.py: Work around issues 20355 and 20361 In-Reply-To: <1391723717.25.0.167441884978.issue20535@psf.upfronthosting.co.za> Message-ID: <1391884882.61.0.326690338275.issue20535@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ezio.melotti, michael.foord, pitrou stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 20:11:05 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 19:11:05 +0000 Subject: [issue20520] Readline test in test_codecs is broken In-Reply-To: <1391605774.47.0.366195437882.issue20520@psf.upfronthosting.co.za> Message-ID: <1391886665.95.0.431473309461.issue20520@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 20:27:22 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 19:27:22 +0000 Subject: [issue20283] Wrong keyword parameter name in regex pattern methods In-Reply-To: <1389905067.44.0.489524795145.issue20283@psf.upfronthosting.co.za> Message-ID: <1391887642.36.0.0204675496474.issue20283@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Larry, so what is your decision? 1. Apply the "hard" patch and then convert Modules/_sre.c to use Argument Clinic (issue20148). 2. Revert converted match() method, apply the "soft" patch, and delay applying of the "hard" patch and then converting to use Argument Clinic to 3.5. Applying the "soft" patch and then the "hard" patch will cause more source churn than just applying the "hard" patch. 3. Use show_in_signature hack. I don't like this, it looks ugly and adds too much source churn. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 20:28:08 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Feb 2014 19:28:08 +0000 Subject: [issue20148] Derby: Convert the _sre module to use Argument Clinic In-Reply-To: <1389024268.98.0.254349402597.issue20148@psf.upfronthosting.co.za> Message-ID: <1391887688.29.0.523725382812.issue20148@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Wrong keyword parameter name in regex pattern methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 20:36:24 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 19:36:24 +0000 Subject: [issue20534] Enum tests fail with pickle protocol 4 In-Reply-To: <1391721950.3.0.401090497621.issue20534@psf.upfronthosting.co.za> Message-ID: <3fM3XS1C05z7LjM@mail.python.org> Roundup Robot added the comment: New changeset 9f75f8a2cbb4 by Ethan Furman in branch 'default': Close issue20534: all pickle protocols now supported. http://hg.python.org/cpython/rev/9f75f8a2cbb4 ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 20:36:55 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 08 Feb 2014 19:36:55 +0000 Subject: [issue20564] test_threadsignals.py "failed" on OpenBSD because too slow (> 3sec) In-Reply-To: <1391883584.64.0.946216274397.issue20564@psf.upfronthosting.co.za> Message-ID: <1391888215.2.0.157372252373.issue20564@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: > I'm asking why it's 3 seconds by default in the tests? > Could we modify the value to 6 instead of 3, is it acceptable? No, see this comment: """ self.assertRaises(KeyboardInterrupt, lock.acquire, timeout=5) dt = time.time() - t1 # Checking that KeyboardInterrupt was raised is not sufficient. # We want to assert that lock.acquire() was interrupted because # of the signal, not that the signal handler was called immediately # after timeout return of lock.acquire() (which can fool assertRaises). """ 5s corresponds exactly to the timeout passed to acquire(), which means that it didn't get interrupted, which is precisely the goal of the test. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 21:15:10 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 20:15:10 +0000 Subject: [issue12675] tokenize module happily tokenizes code with syntax errors In-Reply-To: <1312203519.76.0.918580877349.issue12675@psf.upfronthosting.co.za> Message-ID: <1391890510.94.0.71926497357.issue12675@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 21:18:14 2014 From: report at bugs.python.org (Glenn Langford) Date: Sat, 08 Feb 2014 20:18:14 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks Message-ID: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> New submission from Glenn Langford: In asyncio, tasks.py as_completed() appears to trigger adding and removing callbacks multiple times for the pending set of futures, each time a single future completes. For example, to wait for 5 futures which complete at different times: - as_completed() uses _wait() - _wait() will add 5 callbacks, one for each future - when one future completes, a callback is triggered and all 5 callbacks are removed; this is because _wait() was called with FIRST_COMPLETED - for the 4 remaining futures - 4 callbacks have to be added back again - when the next future completes, the 4 callbacks are removed etc? The worst case is if as_completed() is called to wait for all of a larger number of futures, which complete at different times. For example, with 100 futures worst case, ~10,000 callback adds and removes would be performed. (I am very new to the asyncio code, so I don't have a patch to offer at this point). ---------- components: Library (Lib) messages: 210679 nosy: glangford, gvanrossum, haypo, pitrou priority: normal severity: normal status: open title: asyncio as_completed() thrashes adding and removing callbacks type: performance versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 21:30:01 2014 From: report at bugs.python.org (Glenn Langford) Date: Sat, 08 Feb 2014 20:30:01 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391891401.81.0.897504078101.issue20566@psf.upfronthosting.co.za> Changes by Glenn Langford : Added file: http://bugs.python.org/file34000/test_thrash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 21:31:10 2014 From: report at bugs.python.org (Glenn Langford) Date: Sat, 08 Feb 2014 20:31:10 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391891470.18.0.0394055575139.issue20566@psf.upfronthosting.co.za> Changes by Glenn Langford : Added file: http://bugs.python.org/file34001/output.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:16:59 2014 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 08 Feb 2014 21:16:59 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391894219.09.0.260276647412.issue20566@psf.upfronthosting.co.za> Guido van Rossum added the comment: Yup, I remember feeling a bit guilty doing it this way, but at least the semantics are correctly, and there were bigger fish to fry. Thanks for the test code that proves the issue! I assume it can be fixed by not using _wait() but some custom approach. If we get this done by RC2, fine, otherwise we'll just have to documented that this is O(N**2) and not to use it for large numbers of tasks until the fix lands, perhaps in 3.4.1. (Usually there's a solution that avoids as_completed() altogether.) I've created upstream bug http://code.google.com/p/tulip/issues/detail?id=127 to track this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:24:10 2014 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 08 Feb 2014 21:24:10 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391894650.08.0.411427661008.issue20540@psf.upfronthosting.co.za> Richard Oudkerk added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:27:23 2014 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 08 Feb 2014 21:27:23 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391894843.42.0.833071936478.issue20566@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:30:42 2014 From: report at bugs.python.org (Remi Pointel) Date: Sat, 08 Feb 2014 21:30:42 +0000 Subject: [issue20564] test_threadsignals.py "failed" on OpenBSD because too slow (> 3sec) In-Reply-To: <1391883584.64.0.946216274397.issue20564@psf.upfronthosting.co.za> Message-ID: <1391895042.74.0.423496978637.issue20564@psf.upfronthosting.co.za> Remi Pointel added the comment: arf, sorry for the noise... I didn't seen this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:41:22 2014 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 08 Feb 2014 21:41:22 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391895682.23.0.883332907901.issue20566@psf.upfronthosting.co.za> Guido van Rossum added the comment: BTW, just curious: Glenn, what led you to discover this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:42:39 2014 From: report at bugs.python.org (STINNER Victor) Date: Sat, 08 Feb 2014 21:42:39 +0000 Subject: [issue20564] test_threadsignals.py "failed" on OpenBSD because too slow (> 3sec) In-Reply-To: <1391883584.64.0.946216274397.issue20564@psf.upfronthosting.co.za> Message-ID: <1391895759.61.0.433498213098.issue20564@psf.upfronthosting.co.za> STINNER Victor added the comment: What is your OpenBSD version? Before 5.2, there were many issues with signals. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:43:28 2014 From: report at bugs.python.org (Remi Pointel) Date: Sat, 08 Feb 2014 21:43:28 +0000 Subject: [issue20564] test_threadsignals.py "failed" on OpenBSD because too slow (> 3sec) In-Reply-To: <1391883584.64.0.946216274397.issue20564@psf.upfronthosting.co.za> Message-ID: <1391895808.21.0.548105764459.issue20564@psf.upfronthosting.co.za> Remi Pointel added the comment: I'm in -current (5.5-beta). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:43:36 2014 From: report at bugs.python.org (Richard Oudkerk) Date: Sat, 08 Feb 2014 21:43:36 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391895816.94.0.374289478132.issue20540@psf.upfronthosting.co.za> Richard Oudkerk added the comment: BTW, I see little difference between 3.2 and the unpatched default branch on MacOSX: $ py-32/release/python.exe ~/Downloads/test_manager.py 0.0007331371307373047 8.20159912109375e-05 9.417533874511719e-05 8.082389831542969e-05 7.796287536621094e-05 0.00011587142944335938 0.00011396408081054688 7.891654968261719e-05 8.392333984375e-05 7.605552673339844e-05 10 $ time py-default/release/python.exe ~/Downloads/test_manager.py 0.0007359981536865234 0.0001289844512939453 0.00018715858459472656 0.00015497207641601562 0.00012087821960449219 0.00013399124145507812 0.00011992454528808594 0.00011587142944335938 0.00010895729064941406 0.00017499923706054688 10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 22:55:35 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 21:55:35 +0000 Subject: [issue20065] Python-3.3.3/Modules/socketmodule.c:1660:14: error: 'CAN_RAW' undeclared (first use in this function) In-Reply-To: <1387961196.27.0.560814998744.issue20065@psf.upfronthosting.co.za> Message-ID: <3fM6d21nFgz7LjN@mail.python.org> Roundup Robot added the comment: New changeset b1ff233d3ab1 by Charles-Fran?ois Natali in branch '3.3': Issue #20065: socketmodule: Fix build error when AF_CAN is defined without the http://hg.python.org/cpython/rev/b1ff233d3ab1 New changeset 39a60d62d2a6 by Charles-Fran?ois Natali in branch 'default': Issue #20065: socketmodule: Fix build error when AF_CAN is defined without the http://hg.python.org/cpython/rev/39a60d62d2a6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:01:40 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Feb 2014 22:01:40 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391896900.24.0.902636746385.issue20540@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Note that we're still behind the pre-rewrite performance (this is on > 2.7): If I believe the `time` command, the difference is additional userspace CPU time, therefore probably the pure Python overhead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:01:56 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 22:01:56 +0000 Subject: [issue20565] Update Tcl/Tk version for buildbots In-Reply-To: <1391883994.31.0.277087136027.issue20565@psf.upfronthosting.co.za> Message-ID: <1391896916.06.0.87439994236.issue20565@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think the Windows buildbots should use the version delivered with the installer. While sticking with one tcl/tk version for one 18 to 24 month cycle is ok, perhaps we should consider updating the version delivered with 2.7. The features exposed by tkinter could remain stable even if new features are added to tcl/tk in micro releases. On linux, a program written for Python x.y may have to work with multiple tcl/tk versions. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:02:36 2014 From: report at bugs.python.org (Glenn Langford) Date: Sat, 08 Feb 2014 22:02:36 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391896956.38.0.901624059133.issue20566@psf.upfronthosting.co.za> Glenn Langford added the comment: > Glenn, what led you to discover this? It was found by code inspection. I recently started looking at concurrent.futures, really just curious as to how futures were implemented. Because one of the concurrent.futures bugs I raised also applied to asyncio, I started poking into the source for it as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:07:04 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Feb 2014 22:07:04 +0000 Subject: [issue20565] Update Tcl/Tk version for buildbots In-Reply-To: <1391883994.31.0.277087136027.issue20565@psf.upfronthosting.co.za> Message-ID: <1391897224.69.0.27471267966.issue20565@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think this is done through the "external" SVN project: http://svn.python.org/projects/external/ ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:09:17 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 22:09:17 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <3fM6wr4hLXz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 4816ab0477d2 by Antoine Pitrou in branch '3.3': Issue #20540: Fix a performance regression (vs. Python 3.2) when layering a multiprocessing Connection over a TCP socket. http://hg.python.org/cpython/rev/4816ab0477d2 New changeset 125c24f47f3c by Antoine Pitrou in branch 'default': Issue #20540: Fix a performance regression (vs. Python 3.2) when layering a multiprocessing Connection over a TCP socket. http://hg.python.org/cpython/rev/125c24f47f3c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:09:57 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Feb 2014 22:09:57 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391897397.46.0.756722450789.issue20540@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the fix. If there's less low-hanging fruit to pick, we can do that in another issue :) ---------- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:21:40 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 22:21:40 +0000 Subject: [issue20481] Clarify type coercion rules in statistics module In-Reply-To: <1391304711.74.0.578704343666.issue20481@psf.upfronthosting.co.za> Message-ID: <1391898100.88.0.641267430019.issue20481@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yes, a new RFE to sensibly handle mixed type input in 3.5 would make sense (I did something similar for the issue where we removed the special casing of Counter for 3.4). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:26:03 2014 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 08 Feb 2014 22:26:03 +0000 Subject: [issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not In-Reply-To: <1391688822.97.0.233110009283.issue20529@psf.upfronthosting.co.za> Message-ID: <1391898363.44.0.755123876229.issue20529@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I think, it is simply okay to mention about ResourceWarning being displayed. I spent something thinking and going into mechanics of how it is displayed may be an overkill for that line in unittest.rst. I'll make the change and if you see any further information can be added, please comment on it. ---------- nosy: +orsenthil status: pending -> open versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:28:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 22:28:52 +0000 Subject: [issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not In-Reply-To: <1391688822.97.0.233110009283.issue20529@psf.upfronthosting.co.za> Message-ID: <3fM7MR5S3kz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset a8a6dc7f478b by Senthil Kumaran in branch '3.3': Include the mention of ResourceWarning being displayed by default by the test runner. http://hg.python.org/cpython/rev/a8a6dc7f478b New changeset 7fc1e8095fb8 by Senthil Kumaran in branch 'default': merge from 3.3 http://hg.python.org/cpython/rev/7fc1e8095fb8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:33:27 2014 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 08 Feb 2014 22:33:27 +0000 Subject: [issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not In-Reply-To: <1391688822.97.0.233110009283.issue20529@psf.upfronthosting.co.za> Message-ID: <1391898807.31.0.920371455652.issue20529@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:51:31 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sat, 08 Feb 2014 22:51:31 +0000 Subject: [issue20536] statistics._decimal_to_ratio() produces non-integer ratio In-Reply-To: <1391730139.77.0.406178455931.issue20536@psf.upfronthosting.co.za> Message-ID: <1391899891.77.0.739735710299.issue20536@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Steven, I think if exp >= 0: return int(x), 1 would have been a better patch, but yours is certainly working, just slower I guess. ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:56:37 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 22:56:37 +0000 Subject: [issue14983] email.generator should always add newlines after closing boundaries In-Reply-To: <1338619942.49.0.98561751956.issue14983@psf.upfronthosting.co.za> Message-ID: <3fM7zS5Nr4z7Ljd@mail.python.org> Roundup Robot added the comment: New changeset d579866d6419 by R David Murray in branch '2.7': #14983: always add a line end after a MIME boundary marker. http://hg.python.org/cpython/rev/d579866d6419 New changeset c2538789c8cf by R David Murray in branch '3.3': #14983: always add a line end after a MIME boundary marker. http://hg.python.org/cpython/rev/c2538789c8cf New changeset 7486c45eb53f by R David Murray in branch 'default': Merge: #14983: always add a line end after a MIME boundary marker. http://hg.python.org/cpython/rev/7486c45eb53f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:58:22 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 08 Feb 2014 22:58:22 +0000 Subject: [issue14983] email.generator should always add newlines after closing boundaries In-Reply-To: <1338619942.49.0.98561751956.issue14983@psf.upfronthosting.co.za> Message-ID: <1391900302.45.0.576896613147.issue14983@psf.upfronthosting.co.za> R. David Murray added the comment: The existing tests that need to be changed to reflect the new behavior are sufficient for testing this, I think. There is small amount of backward compatibility concern here, but since it is an RFC compliance bug and it fixes a problem with verification, I decided that the small risk is worth it. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 23:59:51 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sat, 08 Feb 2014 22:59:51 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391900391.25.0.427197838622.issue20499@psf.upfronthosting.co.za> Wolfgang Maier added the comment: I worked out a slightly speedier version of decimal_to_ratio today (Stefan: that's when I duplicated your bug report): from decimal import Context def _decimal_to_ratio (x): _, digits, exp = x.as_tuple() if exp in _ExactRatio.decimal_infinite: # INF, NAN, sNAN assert not d.is_finite() raise ValueError if exp < 0: exp = -exp return int(x.scaleb(exp, Context(prec=len(digits)))), 10**exp return int(x), 1 makes the variance functions in my re-implementation about 20-30% faster for Decimal. It's not a big breakthrough, but still. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 00:05:21 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 23:05:21 +0000 Subject: [issue20563] Mark ipaddress as stable? In-Reply-To: <1391867393.51.0.348238863582.issue20563@psf.upfronthosting.co.za> Message-ID: <1391900721.96.0.294152754164.issue20563@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, I quickly gave up on trying to *apply* that netmask parsing patch for issue 18805, and instead just reimplemented it using the original as a guide (and, most importantly, as the source of the new test cases). The slightly different testing setup in the stdlib version also meant I could ensure that IPInterface was fixed in addition to IPNetwork. Issue 19157 was the only one that gave me pause, but we won't change that until 3.5 anyway, and it is well within the limits of the kind of changes we consider acceptable in feature releases. I'll make the change to the 3.4 docs (including What's New) to remove the disclaimer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 00:05:34 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 23:05:34 +0000 Subject: [issue20563] Mark ipaddress as stable? In-Reply-To: <1391867393.51.0.348238863582.issue20563@psf.upfronthosting.co.za> Message-ID: <1391900734.25.0.145822738467.issue20563@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: pmoody -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 00:09:21 2014 From: report at bugs.python.org (Wolfgang Maier) Date: Sat, 08 Feb 2014 23:09:21 +0000 Subject: [issue20499] Rounding errors with statistics.variance In-Reply-To: <1391431579.33.0.244887922603.issue20499@psf.upfronthosting.co.za> Message-ID: <1391900961.78.0.220504708951.issue20499@psf.upfronthosting.co.za> Wolfgang Maier added the comment: oops, > if exp in _ExactRatio.decimal_infinite: # INF, NAN, sNAN should read if exp in ('F', 'n', 'N'): # INF, NAN, sNAN of course. What I pasted comes from a micro-optimization I tried, but which doesn't give any benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 00:18:39 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Feb 2014 23:18:39 +0000 Subject: [issue20563] Mark ipaddress as stable? In-Reply-To: <1391867393.51.0.348238863582.issue20563@psf.upfronthosting.co.za> Message-ID: <3fM8St1LH2z7LjN@mail.python.org> Roundup Robot added the comment: New changeset 2b9c10f3b969 by Nick Coghlan in branch 'default': Close #20563: Declare ipaddress API stable http://hg.python.org/cpython/rev/2b9c10f3b969 ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 00:36:18 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 08 Feb 2014 23:36:18 +0000 Subject: [issue20567] test_ttk_guionly gets 'can't invoke "event" command: application has been destroyed' messages from Tk Message-ID: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> New submission from Ned Deily: Seen with default (3.4.0) framework builds on OS X 10.9 with ActiveTcl 8.5.15.0: ./configure --enable-universalsdk=/ --with-universal-archs=intel --enable-framework=/tmp/t/Library/Frameworks make && make install cd /tmp/t /tmp/t/bin/python3.4 -m test -w -uall [...] [343/389/1] test_ttk_guionly can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" [344/389/1] test_ttk_textonly [...] When running test_ttk_guionly by itself (or in combination with a few neighboring tests): /tmp/t/bin/python3.4 -m test -w -uall test_ttk_guionly the message is not seen. I had not seen this behavior prior to somewhere in the 3.4.0 development cycle. ---------- components: Tests, Tkinter messages: 210704 nosy: ned.deily priority: normal severity: normal stage: needs patch status: open title: test_ttk_guionly gets 'can't invoke "event" command: application has been destroyed' messages from Tk versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 01:08:05 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 00:08:05 +0000 Subject: [issue20568] Pass --default-install to ensurepip in the Windows installers? Message-ID: <1391904485.94.0.961786946534.issue20568@psf.upfronthosting.co.za> New submission from Nick Coghlan: Installing 3.4b3 on Windows to test issue 20053, I was surprised to find that after installation, "pip install " didn't work. I had forgotten that due to the flat executable namespace on POSIX systems, we only install pip3 and pip3.4 by default - you have to pass "--default-install" to ensurepip to get it to install the unqualified "pip". For virtual environments, we handle that in the venv module - it passes "--default-pip" when invoking the ensurepip CLI. Given that Windows uses "python" for both Python 2 & 3 (in contrast to the POSIX python/python3 and python2/python3 conventions), perhaps we should be passing --default-install to ensurepip in the Windows installers as well? ---------- components: Installation messages: 210705 nosy: dstufft, larry, loewis, ncoghlan, pmoore priority: deferred blocker severity: normal stage: needs patch status: open title: Pass --default-install to ensurepip in the Windows installers? type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 01:23:42 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 00:23:42 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <1391905422.09.0.598006527553.issue20500@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 01:47:12 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Feb 2014 00:47:12 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <3fMBR333Xjz7Lk1@mail.python.org> Roundup Robot added the comment: New changeset e7708864a8d5 by Nick Coghlan in branch 'default': Close #20500: Don't trigger PyObject_Str assertion at shutdown http://hg.python.org/cpython/rev/e7708864a8d5 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 01:49:28 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 00:49:28 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <1391906968.68.0.826929057558.issue20500@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the report Xavier - 3.4 is a bit fussier about not losing that exception state silently, so the shutdown code simply needed to clear it explicitly after saving it on the local stack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 02:00:33 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 01:00:33 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <1391907633.02.0.55140019409.issue20500@psf.upfronthosting.co.za> Nick Coghlan added the comment: I also added a versionchanged to PyObject_Str and a note in the Porting section of What's New, as third party extensions could also be affected by this change - it elevates "may silently discard an active exception" to "debug build assertion failure". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 02:17:23 2014 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Feb 2014 01:17:23 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391908643.29.0.569488321764.issue20566@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm looking into a solution for this. The idea is pretty straightforward: http://codereview.appspot.com/61210043. This needs more code to support the optional timeout feature, and it now returns Futures instead of coroutines (which I think is fine). But to my surprise, test_as_completed_reverse_wait() failed. After nearly an hour of debugging my own code I realized that this test specifically verifies the following weird behavior: if you get two values (futures/coroutines) out of as_completed() without waiting for either, and then wait for the *second* one, it will wait for the *first* result. I guess this is defensible because it is the first one you wait for, but I find it hard to believe that this is desirable behavior -- even though I wrote the code and the test! (http://code.google.com/p/tulip/source/detail?r=674355412f33.) So I'd like permission to just change these semantics. They aren't clear from the docs or from PEP 3156, and concurrent.futures.as_completed() doesn't have the same issue (there, __next__() on the iterator blocks until the result is ready). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 02:44:04 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Feb 2014 01:44:04 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <1391910244.83.0.646913524193.issue20500@psf.upfronthosting.co.za> STINNER Victor added the comment: "I also added a versionchanged to PyObject_Str and a note in the Porting section of What's New, as third party extensions could also be affected by this change - it elevates "may silently discard an active exception" to "debug build assertion failure"." Hi, I added this check in many other functions: PyEval_EvalFrameEx(), PyEval_CallObjectWithKeywords(), PyObject_Repr(), PyObject_Str(). And also private methods like type_call(). I added these assertions when I worked on #18408 to ensure that MemoryError exceptions are no more ignored. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 03:01:03 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Feb 2014 02:01:03 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <3fMD4G4F5Jz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 41023a501c7b by Nick Coghlan in branch 'default': Issue #20500: Note other public APIs with the new assertion http://hg.python.org/cpython/rev/41023a501c7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 03:05:25 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Feb 2014 02:05:25 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <3fMD9K01Jvz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 9e7594d65178 by Nick Coghlan in branch 'default': Issue #20500: clarify that invocation may be indirect http://hg.python.org/cpython/rev/9e7594d65178 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 03:06:39 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 02:06:39 +0000 Subject: [issue20500] assertion failed when passing an exception object to sys.exit In-Reply-To: <1391432829.26.0.791023513998.issue20500@psf.upfronthosting.co.za> Message-ID: <1391911599.14.0.324743151658.issue20500@psf.upfronthosting.co.za> Nick Coghlan added the comment: Above commits added notes for the other two currently documented public APIs directly affected by the change (PyEval_CallObjectWithKeywords isn't currently documented, despite the public name), and also updated the porting note to clarify that these operations may be invoked indirectly via other public APIs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 03:46:31 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Sun, 09 Feb 2014 02:46:31 +0000 Subject: [issue20569] IDLE : Add clipboard history feature Message-ID: <1391913991.05.0.696306257044.issue20569@psf.upfronthosting.co.za> New submission from Saimadhav Heblikar: Hi, this patch adds clipboard history feature to idle.with this,we can retrieve any cut/copied text after the start of idle. it uses a list to store the messages called _clipboard_history it creates a dialog window to present a listbox and a paste button to the user. further ideas for this patch could include making the clipboard history accessible across files(which is not possible in this patch) ---------- components: IDLE files: python-clipboard-history-enhancement.patch keywords: patch messages: 210714 nosy: sahutd priority: normal severity: normal status: open title: IDLE : Add clipboard history feature type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file34002/python-clipboard-history-enhancement.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 04:55:11 2014 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Feb 2014 03:55:11 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391918111.87.0.481577593567.issue20566@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, code is ready for review at http://code.google.com/p/tulip/source/detail?r=674355412f33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 04:56:54 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 03:56:54 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391918214.85.0.351371887995.issue20530@psf.upfronthosting.co.za> Nick Coghlan added the comment: Updated patch fixes an assertion failure in typeobject.c (end doesn't point at the ")", it points at the newline immediately after it). ---------- Added file: http://bugs.python.org/file34003/issue20530_fixed_assertion.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 05:20:15 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 04:20:15 +0000 Subject: [issue20570] Bundle pip 0.15.3 in Python 3.4rc2 Message-ID: <1391919615.88.0.398800251792.issue20570@psf.upfronthosting.co.za> New submission from Nick Coghlan: Larry, we currently have 0.15.2 bundled for 3.4rc1. This is the latest release of pip: http://www.pip-installer.org/en/latest/news.html#changelog However, there are a few additional fixes that have been merged to the pip 1.5.X maintenance branch that could be included in a 0.15.3 release: - the workaround to resolve issue 20053 on Windows - a number of fixes related to wheel downloads - ensuring hash fragments in URLs are checked properly It would be good to get those resolved prior to the final 3.4 release. ---------- assignee: larry messages: 210717 nosy: dstufft, larry, ncoghlan, pmoore priority: deferred blocker severity: normal status: open title: Bundle pip 0.15.3 in Python 3.4rc2 type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 05:22:14 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 04:22:14 +0000 Subject: [issue20053] venv and ensurepip are affected by default pip config file In-Reply-To: <1387780868.34.0.410698465934.issue20053@psf.upfronthosting.co.za> Message-ID: <1391919734.31.0.0219561821476.issue20053@psf.upfronthosting.co.za> Nick Coghlan added the comment: I created issue 20570 to propose updating to pip 1.5.3 for 3.4rc2. That would include the pip side workaround for this issue, also allowing this issue to be closed. ---------- dependencies: +Bundle pip 0.15.3 in Python 3.4rc2 nosy: +larry priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 05:24:40 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 04:24:40 +0000 Subject: [issue20570] Bundle pip 0.15.3 in Python 3.4rc2 In-Reply-To: <1391919615.88.0.398800251792.issue20570@psf.upfronthosting.co.za> Message-ID: <1391919880.11.0.471415846929.issue20570@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +Marcus.Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 05:27:45 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 04:27:45 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391920065.06.0.244703165964.issue20530@psf.upfronthosting.co.za> Larry Hastings added the comment: Nick: I made the same fix on the plane, except I also added an assert that end - start >= 2. ;-) I'm going to go through everyone's feedback, and if there are any significant changes I'll post a new patch, otherwise I think this patch is basically ready. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 05:31:29 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 04:31:29 +0000 Subject: [issue20568] Pass --default-install to ensurepip in the Windows installers? In-Reply-To: <1391904485.94.0.961786946534.issue20568@psf.upfronthosting.co.za> Message-ID: <1391920289.3.0.311248365698.issue20568@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +Marcus.Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 05:56:09 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 04:56:09 +0000 Subject: [issue20570] Bundle pip 0.15.3 in Python 3.4rc2 In-Reply-To: <1391919615.88.0.398800251792.issue20570@psf.upfronthosting.co.za> Message-ID: <1391921769.73.0.0486984874281.issue20570@psf.upfronthosting.co.za> Nick Coghlan added the comment: Donald also pointed out that we want the fix to make pip complain if it is passed a wheel 2.0+ file (it's currently missing the version number warnings/errors that are called for in PEP 427). That isn't merged yet upstream, but will be part of 0.15.3. I interpreted Larry's comments on IRC as in-principle approval, so passing this to Donald to resolve (3.4rc2 is scheduled for February 23rd). ---------- assignee: larry -> dstufft _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 05:57:04 2014 From: report at bugs.python.org (Donald Stufft) Date: Sun, 09 Feb 2014 04:57:04 +0000 Subject: [issue20570] Bundle pip 0.15.3 in Python 3.4rc2 In-Reply-To: <1391919615.88.0.398800251792.issue20570@psf.upfronthosting.co.za> Message-ID: <1391921824.03.0.108844462603.issue20570@psf.upfronthosting.co.za> Donald Stufft added the comment: Just t be clear, it's 1.5.3 not 0.15.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 05:57:54 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 04:57:54 +0000 Subject: [issue20570] Bundle pip 1.5.3 in Python 3.4rc2 In-Reply-To: <1391919615.88.0.398800251792.issue20570@psf.upfronthosting.co.za> Message-ID: <1391921874.31.0.128268199631.issue20570@psf.upfronthosting.co.za> Nick Coghlan added the comment: Oops - 0.15.3 was the version of Beaker we just released, so my brain keeps confusing the two numbers :) ---------- title: Bundle pip 0.15.3 in Python 3.4rc2 -> Bundle pip 1.5.3 in Python 3.4rc2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 07:16:10 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Feb 2014 06:16:10 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <3fMKkd6LwGz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 29d9638bf449 by Larry Hastings in branch 'default': Issue #20530: Argument Clinic's signature format has been revised again. http://hg.python.org/cpython/rev/29d9638bf449 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 07:23:03 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 06:23:03 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <1391926983.22.0.758235217276.issue20530@psf.upfronthosting.co.za> Larry Hastings added the comment: I made a couple final tweaks to what was essentially Nick's patch: * Argument Clinic wraps parameters in the signature at 72 columns instead of 79 columns. There are a couple extra characters that get emitted, so this ensures that the generated lines are never > 80. * Added an assert to typeobject.c that end - start > 2, so that the subsequent assert on end[-1] is always a legal memory access. * inspect._strip_non_python_syntax() now emits a space after commas in the signature, enhancing readability on the off chance that someone needs to read them. * Added a couple extra tests for _strip_non_python_syntax(). Thanks for all the reviews and the fixes, everybody! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 07:34:12 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 06:34:12 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <1391927652.6.0.404289824865.issue20538@psf.upfronthosting.co.za> Larry Hastings added the comment: This checkin appears to be causing a regression in the Windows buildbots. http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4040 test_streamreaderwriter (test.test_codecs.WithStmtTest) ... test test_codecs failed ok ====================================================================== ERROR: test_readline (test.test_codecs.CP65001Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_codecs.py", line 157, in test_readline self.assertEqual(readalllines("".join(vw), True), "|".join(vw)) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_codecs.py", line 136, in readalllines line = reader.readline(size=size, keepends=keepends) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\codecs.py", line 548, in readline data = self.read(readsize, firstline=True) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\codecs.py", line 494, in read newchars, decodedbytes = self.decode(data, self.errors) UnicodeDecodeError: 'CP_UTF8' codec can't decode bytes in position 0--1: No mapping for the Unicode character exists in the target code page. ---------------------------------------------------------------------- Ran 206 tests in 5.912s ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 07:43:59 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 06:43:59 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <1391928239.01.0.287494845358.issue20538@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- resolution: fixed -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 07:58:06 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 06:58:06 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <1391929086.2.0.0201772892583.issue20538@psf.upfronthosting.co.za> Larry Hastings added the comment: And to be clear: I'm currently waiting on this before tagging 3.4rc1. If someone who understands the issue could fix this soon, I would appreciate it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 09:09:05 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Feb 2014 08:09:05 +0000 Subject: [issue20569] IDLE : Add clipboard history feature In-Reply-To: <1391913991.05.0.696306257044.issue20569@psf.upfronthosting.co.za> Message-ID: <1391933345.39.0.0256619863396.issue20569@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Some issues that I think of off the top of my head, without looking into the details of the code. 0. I am not sure how I would use this. I am thus not sure why I might push this, especially given that there are a hundred other Idle issues, many with patches that also need to be reviewed. Enlighten and persuade me. Also see 7. 1. There are at least 4 styles of tkinter imports: a. import tkinter b. import tkinter as tk c. from tkinter import a,b,c d. from tkinter import * My personal preference is b, c, (a,d). I have never done a census of idlelib modules to see what is currently used. While tkinter was designed somewhat to allow d, 'from *' in general has lost favor since Idle was written to in favor of b. That change was made in the tkinter docs, for instance http://docs.python.org/3/library/tkinter.html#a-simple-hello-world-program a few years ago. So I would like to use 'as tk' for new code. 2. idlever is useless and should probably be removed after checking for any current uses. The import here is not used and should be removed. 3. Writing tests for old code is slow and somewhat tedious. A new module should come with a test module in idle_test/. It might be named test_clipboard.py (see 6.) Check the README and existing files for what I might be looking for. 4. The purpose of the if __name__: block is not clear. If it is simply a sanity check, this should be in the test file, guarded by 'requires(gui)'. The 'if __name__' block should run that file. 5. I dislike the existing and obsolete practice of camel-case module names that duplicate class names. They also violate PEP 8. Uppercase module names outside of idlelib were changed in 3.0. I would like to change the existing names within idlelib also. 6. The practice of putting each class in a separate file is not standard, neither in the stdlib nor in the community at large. This file is under 50 lines, which is pretty small. Some possibilities of where to put this class are the editor file, an new editor helper class file, or a clipboard file. Are there other clipboard classes or functions that could be moved into a consolidated clipboard.py? existing file where this class might 7. As you indicate, this seems more like a proof of concept than a finished design. Let us consider features of the recent files list. a. The recent files list is not tied to a particular Idle version, let alone a particular window in a particular session of a particular version. I use the save-across sessions and versions features constantly. Most uses I can think of for a clipboard history would involve multiple windows, and possible multiple Idle sessions. An example would be boilerplate 'if __name__'. Perhaps I am more interested in a persistent snippets list with a easy way to copy an entire item (ie, click anywhere on an item and have that copy the entire item to the clipboard to be pasted whereever). b. The recent files list contains short pointers to possible large files on disk. The clipboard contents are not limited in size. I might not want 10 megabytes kept and saved to disk, so there should be a way to delete entries. Or perhaps entries should be added explicitly rather than automatically. c. The recent files list is limited to 20 entries -- the 20 most recently opened. (This should be user-configurable.) Entries that are dropped off can be found through the normal open process. Entries that are dropped off a snippet list are gone. So perhaps they should not disappear without warning. d. Entries in the recent files list fit on one line. That would not be true for snippets. Perhaps a snippets window should use a tree widget so items could be condensed to a single line (the first, or a title) or expanded to the full snippet. 8. In some respects it would be good if this were implemented as an extension that could be enabled or not. See #3068 for improving the selection and configuration of extensions. 9. Little features for Idle can be applied to all versions current at the time of application. See PEP 434 for Idle does not follow the normal rule. But don't worry about the version header. * (I prefer not to read patches in detail until the author is recorded as having signed the CLA.) ---------- nosy: +terry.reedy stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 09:22:21 2014 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 09 Feb 2014 08:22:21 +0000 Subject: [issue20065] Python-3.3.3/Modules/socketmodule.c:1660:14: error: 'CAN_RAW' undeclared (first use in this function) In-Reply-To: <1387961196.27.0.560814998744.issue20065@psf.upfronthosting.co.za> Message-ID: <1391934141.66.0.550187508653.issue20065@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Should be fixed now. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 09:54:37 2014 From: report at bugs.python.org (Paul Moore) Date: Sun, 09 Feb 2014 08:54:37 +0000 Subject: [issue20568] Pass --default-install to ensurepip in the Windows installers? In-Reply-To: <1391904485.94.0.961786946534.issue20568@psf.upfronthosting.co.za> Message-ID: <1391936077.34.0.515058453017.issue20568@psf.upfronthosting.co.za> Paul Moore added the comment: I had not noticed that, but yes. It would be unreasonable on Windows to install pip3 and pip3.4 but not plain pip. So +1 on this change. (In fact, on Windows, omitting the versioned names would conform more closely to how Python is installed, but it's not something that's worth losing sleep over). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:09:49 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 09:09:49 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391936989.3.0.704525161014.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: Here's a first cut at a patch. With this applied Python passes the whole test suite. I was surprised at how ticklish the OSError object was about adding a fifth member, with this weird "exception tuples can only have two members" policy. But test_exceptions helped me find all the problems. ---------- keywords: +patch Added file: http://bugs.python.org/file34004/larry.oserror.add.filename2.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:14:58 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 09:14:58 +0000 Subject: [issue20538] Segfault in UTF-7 incremental decoder In-Reply-To: <1391765528.81.0.362071183373.issue20538@psf.upfronthosting.co.za> Message-ID: <1391937298.52.0.964807508937.issue20538@psf.upfronthosting.co.za> Larry Hastings added the comment: Marking as closed and opening a new issue as per Serhiy's suggestion. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:16:49 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 09:16:49 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots Message-ID: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> New submission from Larry Hastings: The Windows buildbots are currently broken due to a codec issue. I populated the "nosy" list based on the "unicode" experts from the Experts Index. http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4040 test_streamreaderwriter (test.test_codecs.WithStmtTest) ... test test_codecs failed ok ====================================================================== ERROR: test_readline (test.test_codecs.CP65001Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_codecs.py", line 157, in test_readline self.assertEqual(readalllines("".join(vw), True), "|".join(vw)) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_codecs.py", line 136, in readalllines line = reader.readline(size=size, keepends=keepends) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\codecs.py", line 548, in readline data = self.read(readsize, firstline=True) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\codecs.py", line 494, in read newchars, decodedbytes = self.decode(data, self.errors) UnicodeDecodeError: 'CP_UTF8' codec can't decode bytes in position 0--1: No mapping for the Unicode character exists in the target code page. ---------- components: Tests messages: 210732 nosy: benjamin.peterson, ezio.melotti, haypo, larry, loewis, pitrou priority: release blocker severity: normal stage: needs patch status: open title: test_codecs currently failing on several Windows buildbots type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:20:30 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 09:20:30 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots In-Reply-To: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> Message-ID: <1391937630.26.0.0313952304782.issue20571@psf.upfronthosting.co.za> Larry Hastings added the comment: Note that this appears to be in Windows-specific code ("CP_UTF8"), rather than being cross-platform code which happens to only fail on Windows. So we need someone who does both Windows and Unicode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:24:32 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 09:24:32 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots In-Reply-To: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> Message-ID: <1391937872.7.0.572936301302.issue20571@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Unicode, Windows nosy: +doerwalter, lemburg, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:34:46 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 09:34:46 +0000 Subject: [issue20283] Wrong keyword parameter name in regex pattern methods In-Reply-To: <1389905067.44.0.489524795145.issue20283@psf.upfronthosting.co.za> Message-ID: <1391938486.27.0.592435428476.issue20283@psf.upfronthosting.co.za> Larry Hastings added the comment: Use #3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:35:31 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 09:35:31 +0000 Subject: [issue20283] Wrong keyword parameter name in regex pattern methods In-Reply-To: <1389905067.44.0.489524795145.issue20283@psf.upfronthosting.co.za> Message-ID: <1391938531.83.0.806435606626.issue20283@psf.upfronthosting.co.za> Larry Hastings added the comment: "pattern" should be keyword-only, and if used the function should generate a DeprecationWarning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:37:01 2014 From: report at bugs.python.org (Dmitry Shachnev) Date: Sun, 09 Feb 2014 09:37:01 +0000 Subject: [issue14983] email.generator should always add newlines after closing boundaries In-Reply-To: <1338619942.49.0.98561751956.issue14983@psf.upfronthosting.co.za> Message-ID: <1391938621.79.0.755881754988.issue14983@psf.upfronthosting.co.za> Dmitry Shachnev added the comment: Thank you for committing this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:45:52 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 09:45:52 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391939152.48.0.431950405014.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: Added a test checking that the error messages show up properly. ---------- assignee: -> larry stage: needs patch -> patch review Added file: http://bugs.python.org/file34005/larry.oserror.add.filename2.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 10:47:12 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 09:47:12 +0000 Subject: [issue20567] test_ttk_guionly gets 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391939232.23.0.126428095752.issue20567@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you try test_ttk_guionly after test_all, test_builtins, test_tcl? If the issue is not reproduced, try to use binary search: divide the tests before test_ttk_guionly on to parts, and run tests with one half, then with other. Repeat until found the culprit. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:01:10 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 10:01:10 +0000 Subject: [issue19255] Don't "wipe" builtins at shutdown In-Reply-To: <1381700055.32.0.691639350713.issue19255@psf.upfronthosting.co.za> Message-ID: <1391940070.01.0.338541830421.issue19255@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unfortunately this patch doesn't fix issue19021. Popen.__del__ is called when whiping the idlelib.rpc module which was collected in a weaklist. But the builtins module also was collected in a weaklist and wiped before idlelib.rpc. Here is revised patch which fixes issue19021. It defers wiping of the builtins and sys modules (this partially restores 3.3 algorithm) and fixes other related issues (some of these fixes should be backported to older versions). ---------- stage: needs patch -> patch review versions: +Python 3.4 -Python 3.5 Added file: http://bugs.python.org/file34006/modules_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:23:20 2014 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 09 Feb 2014 10:23:20 +0000 Subject: [issue20572] subprocess.Popen.wait() undocumented "endtime" parameter Message-ID: <1391941400.18.0.703922206544.issue20572@psf.upfronthosting.co.za> New submission from Giampaolo Rodola': http://hg.python.org/cpython/file/29d9638bf449/Lib/subprocess.py#l1144 This was introduced in revision 6b627e121573 and is currently not documented. I'm not sure whether this is a documentation issue or "endtime" should have been "_endtime" instead. ---------- messages: 210740 nosy: giampaolo.rodola, rnk priority: normal severity: normal status: open title: subprocess.Popen.wait() undocumented "endtime" parameter versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:23:22 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Feb 2014 10:23:22 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots In-Reply-To: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> Message-ID: <1391941402.44.0.0466418930383.issue20571@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks to be related to changeset e988661e458c5402c0236cd1084a8671249a760d Issue #20538: UTF-7 incremental decoder produced inconsistant string when input was truncated in BASE64 section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:24:10 2014 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 09 Feb 2014 10:24:10 +0000 Subject: [issue20572] subprocess.Popen.wait() undocumented "endtime" parameter In-Reply-To: <1391941400.18.0.703922206544.issue20572@psf.upfronthosting.co.za> Message-ID: <1391941450.17.0.128496355211.issue20572@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Sorry: revision a161081e8f7c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:29:28 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 10:29:28 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots In-Reply-To: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> Message-ID: <1391941768.18.0.81378324297.issue20571@psf.upfronthosting.co.za> Larry Hastings added the comment: Serhiy said on IRC that he doesn't have a Windows development environment, so he didn't think he could help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:34:42 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 10:34:42 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots In-Reply-To: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> Message-ID: <1391942082.82.0.230530497867.issue20571@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: UTF-7 decoder is not related to this test. The test_readline test was broken from the born, and a part of this test was do nothing. After fixing it in issue20520, new bugs were exposed: issue20538 and this. This bug was hidden until fixing issue20538. Note that there is no test_partial in CP65001Test. Perhaps it is related. The simplest solution would be to temporary skip test_readline in CP65001Test: test_readline = unittest.expectedFailure(ReadTest.test_readline) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:43:48 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 10:43:48 +0000 Subject: [issue20567] test_ttk_guionly gets 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391942628.45.0.9287248502.issue20567@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Threading and subprocess tests also evoke a suspicion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:47:50 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Feb 2014 10:47:50 +0000 Subject: [issue20567] test_ttk_guionly gets 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391942870.88.0.118884462153.issue20567@psf.upfronthosting.co.za> Ned Deily added the comment: $ /usr/local/bin/python3.3 -m test -w -uall test_idle test_ttk_guionly [1/2] test_idle [2/2] test_ttk_guionly can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" All 2 tests OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:53:14 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Feb 2014 10:53:14 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots In-Reply-To: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> Message-ID: <1391943194.27.0.134649517107.issue20571@psf.upfronthosting.co.za> STINNER Victor added the comment: The test tries to decode a partial UTF-8 bytes string. The problem is that codecs.code_page_decode() doesn't implement fully partial decoders. The decoder only supports partial decoding for a few code pages: 932, 936, 949, 950, and 1361. The partial decoding is currently based on IsDBCSLeadByteEx(): http://msdn.microsoft.com/en-us/library/windows/desktop/dd318667%28v=vs.85%29.aspx It may be possible to enhance decoders, but it's not a regression from Python 3.3 and so can be done in Python 3.5. Please just skip failing tests for CP_UTF8 (cp 65001) and maybe other Windows code pages in test_codecs. (I don't have time to write a patch to skip, sorry.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:59:13 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Feb 2014 10:59:13 +0000 Subject: [issue20567] test_ttk_guionly gets 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391943553.77.0.791655919726.issue20567@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 11:59:22 2014 From: report at bugs.python.org (Vladimir Rutsky) Date: Sun, 09 Feb 2014 10:59:22 +0000 Subject: [issue20573] "built-in repr()" function link on the repr module documentation is incorrect Message-ID: <1391943562.07.0.0261710580563.issue20573@psf.upfronthosting.co.za> New submission from Vladimir Rutsky: http://docs.python.org/2/library/repr.html page contains several links on built-in function `repr()` (search for "built-in repr()" on page), but links goes to `Repr.repr()` functions of `Repr` module instead of http://docs.python.org/library/functions.html#repr This is reverse situation to bug described in http://bugs.python.org/issue14489 ---------- messages: 210748 nosy: rutsky priority: normal severity: normal status: open title: "built-in repr()" function link on the repr module documentation is incorrect versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 12:09:29 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Feb 2014 11:09:29 +0000 Subject: [issue20567] test_ttk_guionly gets 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391944169.09.0.58752976278.issue20567@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 12:26:04 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Feb 2014 11:26:04 +0000 Subject: [issue20567] test_idle causes test_ttk_guionly 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391945164.67.0.363089086741.issue20567@psf.upfronthosting.co.za> Ned Deily added the comment: The combination of just test_idle followed by test_ttk_guionly also produces the "application has been destroyed" messages on Debian Linux and when run from a build directory (e.g. not installed) and with 2.7, 3.3, and default. ---------- title: test_ttk_guionly gets 'can't invoke "event" command: application has been destroyed' messages from Tk -> test_idle causes test_ttk_guionly 'can't invoke "event" command: application has been destroyed' messages from Tk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 12:38:37 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Feb 2014 11:38:37 +0000 Subject: [issue20573] "built-in repr()" function link on the repr module documentation is incorrect In-Reply-To: <1391943562.07.0.0261710580563.issue20573@psf.upfronthosting.co.za> Message-ID: <1391945917.23.0.645778921182.issue20573@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 12:56:21 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Feb 2014 11:56:21 +0000 Subject: [issue20437] Use Py_CLEAR to safe clear attributes In-Reply-To: <1391003394.34.0.16321379297.issue20437@psf.upfronthosting.co.za> Message-ID: <3fMTH871ybz7Lkq@mail.python.org> Roundup Robot added the comment: New changeset 6b10943a5916 by Serhiy Storchaka in branch '2.7': Issue #20437: Fixed 43 potential bugs when deleting objects references. http://hg.python.org/cpython/rev/6b10943a5916 New changeset 6adac0d9b933 by Serhiy Storchaka in branch '3.3': Issue #20437: Fixed 21 potential bugs when deleting objects references. http://hg.python.org/cpython/rev/6adac0d9b933 New changeset 3110fb3095a2 by Serhiy Storchaka in branch 'default': Issue #20437: Fixed 22 potential bugs when deleting objects references. http://hg.python.org/cpython/rev/3110fb3095a2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 13:14:09 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Feb 2014 12:14:09 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots In-Reply-To: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> Message-ID: <3fMTgj23DXz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 4f6499fc2f09 by Victor Stinner in branch 'default': Issue #20571: skip test_readline() of test_codecs for Windows code page 65001. http://hg.python.org/cpython/rev/4f6499fc2f09 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 13:16:52 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 12:16:52 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391948212.48.0.896377002679.issue20540@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: _send_bytes() now looks a little complicated. There are no need in separate branches for n==0. header + buf where buf is b'' is fast (it is not slower than additional check n > 0). So this microoptimization is not needed. The chunks list is not needed, we can just call self._send(). This will get rid of small overhead of creating and iterating a list. ---------- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file34007/multi_nagle_simplify.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 13:20:06 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Feb 2014 12:20:06 +0000 Subject: [issue20540] Python 3.3/3.4 regression in multiprocessing manager ? In-Reply-To: <1391774788.17.0.649419287978.issue20540@psf.upfronthosting.co.za> Message-ID: <1391948406.85.0.298922640831.issue20540@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: rejected -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 13:40:13 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 12:40:13 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391949613.19.0.123395827287.issue20517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are *WithUnicodeFilenames() functions needed? Py_UNICODE API considered as deprecated and there is no need to support compatibility with older versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 13:42:32 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 12:42:32 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391949752.54.0.0374896572607.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: There aren't any deprecation warnings in the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:05:06 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 13:05:06 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391949752.54.0.0374896572607.issue20517@psf.upfronthosting.co.za> Message-ID: <2111566.0kXOngTNEh@raxxla> Serhiy Storchaka added the comment: http://docs.python.org/3/c-api/unicode.html#deprecated-py-unicode-apis ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:06:42 2014 From: report at bugs.python.org (Jeroen Ruigrok van der Werven) Date: Sun, 09 Feb 2014 13:06:42 +0000 Subject: [issue20570] Bundle pip 1.5.3 in Python 3.4rc2 In-Reply-To: <1391919615.88.0.398800251792.issue20570@psf.upfronthosting.co.za> Message-ID: <1391951202.23.0.0776621428713.issue20570@psf.upfronthosting.co.za> Jeroen Ruigrok van der Werven added the comment: Nick et al, currently trying b3 and using the bundled pip (1.5.2) to update the bundled setuptools from 2.1 to 2.2 on Windows 7 and I get the following. Any idea if this is still an issue with the newer versions (and thus might be relevant to this case)? F:\Python34>Scripts\pip3.4.exe install -U setuptools Downloading/unpacking setuptools from https://pypi.python.org/packages/3.4/s/setuptools/setuptools-2.2-py2.py3-none-any.whl#md5=3b7d84f496aed8c07b91efba4aa197a4 Cleaning up... Exception: Traceback (most recent call last): File "F:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main status = self.run(options, args) File "F:\Python34\lib\site-packages\pip\commands\install.py", line 274, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "F:\Python34\lib\site-packages\pip\req.py", line 1206, in prepare_files for subreq in dist.requires(req_to_install.extras): File "F:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2232, in requires dm = self._dep_map File "F:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2423, in _dep_map self.__dep_map = self._compute_dependencies() File "F:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2445, in _compute_dependencies for req in self._parsed_pkg_info.get_all('Requires-Dist') or []: File "F:\Python34\lib\site-packages\pip\_vendor\pkg_resources.py", line 2415, in _parsed_pkg_info self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO)) File "F:\Python34\lib\email\parser.py", line 70, in parsestr return self.parse(StringIO(text), headersonly=headersonly) File "F:\Python34\lib\email\parser.py", line 60, in parse return feedparser.close() File "F:\Python34\lib\email\feedparser.py", line 170, in close self._call_parse() File "F:\Python34\lib\email\feedparser.py", line 163, in _call_parse self._parse() File "F:\Python34\lib\email\feedparser.py", line 449, in _parsegen self._cur.set_payload(EMPTYSTRING.join(lines)) File "F:\Python34\lib\email\message.py", line 311, in set_payload " payload") from None TypeError: charset argument must be specified when non-ASCII characters are used in the payload Storing debug log for failure in C:\Users\asmodai\pip\pip.log ---------- nosy: +asmodai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:07:56 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 13:07:56 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391951276.74.0.116572900047.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: But the PyErr_ functions that accept Py_UNICODE aren't marked deprecated. http://docs.python.org/3.4/c-api/exceptions.html#unicode-exception-objects ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:08:43 2014 From: report at bugs.python.org (Tal Einat) Date: Sun, 09 Feb 2014 13:08:43 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391951323.74.0.0612199615262.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: It's an old patch and it may not be in a properly recognized format. I'll create a new patch soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:18:25 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Feb 2014 13:18:25 +0000 Subject: [issue20574] Implement incremental decoder for cp65001 Message-ID: <1391951905.18.0.272262636483.issue20574@psf.upfronthosting.co.za> New submission from STINNER Victor: (Follow up of issue #20538 and #20571.) Attached patch implements incremental decoders for multibyte code pages (on Windows), especially for CP_UTF8 aka "cp65001" in Python. Code pages 932, 936, 949, 950 and 1361 already have an incremental decoder since: --- changeset: 38817:549c547700af branch: legacy-trunk user: Martin v. L?wis date: Wed Jun 14 05:21:04 2006 +0000 files: Doc/api/concrete.tex Include/unicodeobject.h Lib/encodings/mbcs.py Misc/NEWS Modules/_codecsmodule.c Objects/unicodeobject.c description: Patch #1455898: Incremental mode for "mbcs" codec. --- Python currently uses IsDBCSLeadByteEx(): http://msdn.microsoft.com/en-us/library/windows/desktop/dd318667%28v=vs.85%29.aspx And CharPrevA(): http://msdn.microsoft.com/en-us/library/windows/desktop/ms647471%28v=vs.85%29.aspx But IsDBCSLeadByteEx() only supports code pages 932, 936, 949, 950 and 1361. Python supports the code page 65001 (codec "cp65001") since Python 3.3. New tests on incremental decoders were added in Python 3.4: I addedd a skip for cp65001 since it was not supported (#20571). This issue implements the incremental decoder and so removes the skip. I prefer to wait for Python 3.5 (not rush for add this new feature after 3.4 beta 3). cp65001 is mostly used for output (sys.stdout/sys.stderr) on Windows, not for input. ---------- files: incremental_cp_utf8.patch keywords: patch messages: 210759 nosy: haypo, larry, loewis, serhiy.storchaka priority: normal severity: normal status: open title: Implement incremental decoder for cp65001 type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file34008/incremental_cp_utf8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:18:47 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 13:18:47 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391951276.74.0.116572900047.issue20517@psf.upfronthosting.co.za> Message-ID: <2014041.6LP7sNOsEE@raxxla> Serhiy Storchaka added the comment: Perhaps they should be. Note that all functions that accept Py_UNICODE are not a part of stable API. In any case I don't think we should add *new* functions with deprecated API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:18:55 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Feb 2014 13:18:55 +0000 Subject: [issue20571] test_codecs currently failing on several Windows buildbots In-Reply-To: <1391937409.03.0.728071863469.issue20571@psf.upfronthosting.co.za> Message-ID: <1391951935.77.0.555337722048.issue20571@psf.upfronthosting.co.za> STINNER Victor added the comment: I opened #20574 to implement the missing feature for cp65001. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:29:43 2014 From: report at bugs.python.org (Oscar Benjamin) Date: Sun, 09 Feb 2014 13:29:43 +0000 Subject: [issue20575] Type handling policy for the statistics module Message-ID: <1391952583.31.0.349942146298.issue20575@psf.upfronthosting.co.za> New submission from Oscar Benjamin: As of issue20481, the statistics module for Python 3.4 will disallow any mixing of numeric types with the exception of int that can mix with any other type (but only one at a time). My understanding is that this change was not necessarily considered to be a permanent policy but rather a quick fix for Python 3.4 in order to explicitly prevent certain confusing situations arising from mixing Decimal with other stdlib numeric types. issue20499 has a lot of discussion about different ways to improve accuracy and speed for the mean, variance etc. functions in the statistics module. It's tricky though to come up with a concrete implementation without having a clear specification for how the module should handle different numeric types. There are several related issues to do with type handling. Should the statistics module 1) Use the same coercion rules as the numeric tower (pep-3141)? 2) Allow Decimal to mix with any types from the numeric tower? 3) Allow non-stdlib types that don't use the numeric tower? 4) Allow any mixing of types at all? 5) Strive to achieve the maximum possible accuracy for every type that it accepts? I don't personally see much of a use-case for mixing e.g. Decimal and Fraction. I don't think it's unreasonable to require users to choose a numeric type and stick to it. The common cases will almost certainly be either all int or all float so those should be the main targets of any speed optimisation. If a user is using Fraction/Decimal then they must have gone out of their way to do so and they may as well do so consistently for all of their data. When choosing to use Fraction you do so because you want perfect accuracy. Mixing those Fractions with floating point types such as float and Decimal doesn't make any sense. Although there is a sense in which Decimals are also exact since they are always exact in their constructor. However I don't think there's any case where the Decimal constructor can be used but the Fraction constructor cannot so this mixing of types is unnecessary. As with Fraction a user who chooses to use Decimal is going out of their way to do so because of the kind of accuracy guarantees that the type provides. It doesn't make any sense to mix these with floats that are inherently tainted with the wrong kind of rounding error. So mixing Decimal and float doesn't make any sense either. Note that ordinary arithmetic prohibits the mixing of Decimal with Fraction/float so that on this point the statistics module is essentially maintaining a consistent position with respect to the policy of the Decimal type. On the other hand ordinary arithmetic allows all of int, float, Fraction and complex and indeed any other type subscribing to the ABCs in the numeric tower to be mixed. As of issue20481 the statistics module does not allow any type mixing except for int: http://hg.python.org/cpython/rev/5db74cd953ab Note also that it uses type identity rather than subclass relationships or ABCs so that it is not even possible to mix e.g. float with a float subclass. The most common case of mixing will almost certainly be int and float which will work. However I doubt that the current policy would be considered to be in keeping with Python's general policy on numeric types and anticipate that there will be a desire to change it in the future. The obvious candidate for a policy is the numeric tower and ABCs of PEP-3141. In that case the statistics module has a partial precedent on which to base its policy. The only tricky part is that Decimal is not part of the numeric tower. So there needs to be a special rule for Decimal such as "it only mixes with int/Integral". Basing the policy on the numeric tower is attractive but it is worth noting that the std lib types int, float, Fraction and Decimal are the only types that actually implement and register with these ABCs. So it's not much different from saying that those particular types (and subclasses of) are accepted but I think that that is better than the current policy. Third party numeric types don't implement the interfaces described in PEP-3141. However one thing that is implemented by every third-party numeric type that I know of is __float__. So if there was to be a desire to support those in the statistics module then the simplest extension of the policy on types is to say that any non-numeric-tower types will simply be coerced with float. This still leaves the issue about how type mixing works there but, again, perhaps the safest option before the need arises is just to say that no type mixing is allowed if any input object is not from the numeric tower. What do you think? ---------- components: Library (Lib) messages: 210762 nosy: ncoghlan, oscarbenjamin, skrah, stevenjd, wolma priority: normal severity: normal status: open title: Type handling policy for the statistics module type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:47:33 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 13:47:33 +0000 Subject: [issue20576] Default signatures for slots should be positional-only Message-ID: <1391953653.09.0.426145547934.issue20576@psf.upfronthosting.co.za> New submission from Larry Hastings: I just realized that the signatures for builtin slot functions (__iadd__, __delitem__, etc) only accept positional-only arguments. But when I added the signatures by hand to all the slots I didn't mark them as positional-only. The attached patch remedies that oversight. ---------- assignee: larry components: Library (Lib) files: larry.slots.are.positional.only.1.diff keywords: patch messages: 210763 nosy: larry, ncoghlan, yselivanov priority: normal severity: normal stage: patch review status: open title: Default signatures for slots should be positional-only type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file34009/larry.slots.are.positional.only.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:50:56 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 13:50:56 +0000 Subject: [issue20574] Implement incremental decoder for cp65001 In-Reply-To: <1391951905.18.0.272262636483.issue20574@psf.upfronthosting.co.za> Message-ID: <1391953856.12.0.486194417958.issue20574@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Nice. Could you please also add test_partial for CP65001 (if this will make sense)? What is performance regression of this patch? I considered this issue as a bug. And if performance regression is not too big, I think it can be applied to 3.3+. Otherwise a warning should be added that CP65001 doesn't not work with input text streams. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:53:54 2014 From: report at bugs.python.org (Glenn Langford) Date: Sun, 09 Feb 2014 13:53:54 +0000 Subject: [issue20566] asyncio as_completed() thrashes adding and removing callbacks In-Reply-To: <1391890694.33.0.714223329819.issue20566@psf.upfronthosting.co.za> Message-ID: <1391954034.03.0.373361638287.issue20566@psf.upfronthosting.co.za> Glenn Langford added the comment: > OK, code is ready for review at http://code.google.com/p/tulip/source/detail?r=674355412f33 This looks like a link to an old revision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 14:56:25 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 13:56:25 +0000 Subject: [issue20437] Use Py_CLEAR to safe clear attributes In-Reply-To: <1391003394.34.0.16321379297.issue20437@psf.upfronthosting.co.za> Message-ID: <1391954185.48.0.679069307986.issue20437@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Larry and Antoine for your reviews. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 15:08:17 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 14:08:17 +0000 Subject: [issue20567] test_idle causes test_ttk_guionly 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391954897.9.0.0401482007183.issue20567@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +IDLE nosy: +kbk, roger.serwy, terry.reedy type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 15:29:57 2014 From: report at bugs.python.org (Georg Brandl) Date: Sun, 09 Feb 2014 14:29:57 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391956197.13.0.794667561083.issue20517@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 16:47:53 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 15:47:53 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391960873.89.0.490790634657.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: Attached is patch #3. This one has been tested on Linux, Windows 7 64-bit, and Snow Leopard 64-bit. Windows Server 2008 32-bit and 64-bit are running now, looking good so far. Changes: * The order of arguments for OSError is now: (errno, string, filename, winerror, filename2) The winerror argument is always ignored on non-Windows platforms and may be any value. Preserving the order of existing calls is important. I considered making filename2 a keyword-only argument (as Georg suggested in IRC) but this would have made pickling and unpickling much more elaborate. * Removed new functions taking Py_UNICODE at Serhiy's insistence. * Removed PyErr_SetFromWindowsErrWithFilenameObject from documentation, as it doesn't even exist. * Further documentation fixes. ---------- Added file: http://bugs.python.org/file34010/larry.oserror.add.filename2.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 17:30:46 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Feb 2014 16:30:46 +0000 Subject: [issue20567] test_idle causes test_ttk_guionly 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391963446.79.0.411012601392.issue20567@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ned, do you actually *see* this on 2.7, 3.3? The message looks suspiciously like the somewhat strange 3.4-only shutdown message suppressed by #20167. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 17:35:33 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Feb 2014 16:35:33 +0000 Subject: [issue20572] subprocess.Popen.wait() undocumented "endtime" parameter In-Reply-To: <1391941400.18.0.703922206544.issue20572@psf.upfronthosting.co.za> Message-ID: <1391963733.23.0.710084686237.issue20572@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed, there's no issue number or NEWS entry. It's not clear from the limited context why this parameter was added. It doesn't appear to be consistent with the rest of the stdlib: the application can compute timeout from its desired endtime, which is how all of the other stdlib 'wait' APIs work. ---------- nosy: +gps, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 18:10:53 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Feb 2014 17:10:53 +0000 Subject: [issue20572] subprocess.Popen.wait() undocumented "endtime" parameter In-Reply-To: <1391941400.18.0.703922206544.issue20572@psf.upfronthosting.co.za> Message-ID: <1391965853.64.0.188389870005.issue20572@psf.upfronthosting.co.za> R. David Murray added the comment: Also, the implementation as it stands is in any case flawed, since specifying both timeout and endtime is allowed by the code, and results in endtime overriding timeout silently, and in the posix version the resulting timeout error message will have the ignored timeout in it. Unfortunately this has been in here for a while (March 2011) so people may be using it. Based on the docs in the original commit (c4a0fa6e687c), I suspect endtime on wait was supposed to be an internal parameter....except that it is never used internally. The endtime is converted back to a timeout in order to call wait. Ideally we'd just drop it...but it may be in use in wild. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 18:21:00 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 17:21:00 +0000 Subject: [issue20567] test_idle causes test_ttk_guionly 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391966460.84.0.274334671515.issue20567@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which fixes symptoms. Maybe we'll find better solution. These messages are produced when the ttk::ThemeChanged command called from a callback for already destroyed Tk root window. ---------- keywords: +patch Added file: http://bugs.python.org/file34011/issue20567.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 18:31:08 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Feb 2014 17:31:08 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391967068.68.0.320024072232.issue3068@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please do; the devguide says which format is preferred. While you are at it, please 1. write it against 3.3, leaving a 2.7 backport for last; 2. just add the new stuff, leaving format-paragraph changes for a separate patch; 3. consider the format points I raised with #20569 (if you disagree, let's discuss) a. 'import tkinter as tk' b. a new test file c. shorter, lowercase title, such as 'configex.py', or... d. is a new file really needed? or add to what is now called configDialog.py? I am ready to do this. While it is too late for 3.3.4 and 3.4.0 (rc1) due out today, I would like to have this in and tested in use for subsequent releases after that (2.7.7, the final 3.3.5, 3.4.1, and of course, 3.5.0). While reviewing #20569 I realized that having an easy way to enable/disable extensions would lower the bar for adding new ones. The fact that some people would not want something present would not prevent having it available to others. (This point is true even if a clipboard history or snippets list could not be added as an extension.) A current 'Future of Python' thread on idle-sig reminded me that multiple people would like 1 or more of the tested idlex extensions added. This dialog would make additions easier by making their use easier. That thread also suggested that Idle needs more 'excitement', which means some new features. Tests and bug fixes, though important, tend to be boring to most people. So I have adjusted my priorities a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 18:42:35 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 17:42:35 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391967755.7.0.270787971289.issue20517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure that PyErr_SetFromWindowsErrWithFilenames() and PyErr_SetExcFromWindowsErrWithFilenames() will be useful. "const char*" filenames are not recommended on Windows. Victor can say more. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 18:49:49 2014 From: report at bugs.python.org (Tal Einat) Date: Sun, 09 Feb 2014 17:49:49 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391968189.5.0.205212026691.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: I'm glad that adding features to IDLE is being considered! However, I really think that new features should be chosen with extreme care. Adding advanced features aimed mostly at "power" users should be avoided unless really necessary, IMO. The reason I'm pushing this extension is because it is straight-forward to use and make things using IDLE easier and less frustrating, especially for novice users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 19:13:06 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 09 Feb 2014 18:13:06 +0000 Subject: [issue20567] test_idle causes test_ttk_guionly 'can't invoke "event" command: application has been destroyed' messages from Tk In-Reply-To: <1391902578.02.0.588798272285.issue20567@psf.upfronthosting.co.za> Message-ID: <1391969585.99.0.963200400126.issue20567@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Running just the two tests fails on windows also, with all three versions. For 2.7, test_ttk_guionly is skipped with "test_ttk_guionly skipped -- tk not available: Can't find a usable init.tcl in the following directories:. This in spite of the fact that the idle test just found init.tcl and that the ttk test passes without the idle test running first. This is relatively recent. Does the test runner not delete modules as they are finished? I am rebuilding python and will try tests again. If problem persists and patch solves it, I will go ahead and apply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 19:16:21 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 18:16:21 +0000 Subject: [issue20569] IDLE : Add clipboard history feature In-Reply-To: <1391913991.05.0.696306257044.issue20569@psf.upfronthosting.co.za> Message-ID: <1391969781.73.0.751658260804.issue20569@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Clipboard history is OS feature, an application shouldn't duplicate it. Every modern Linux DE has builtin clipboard history manager, and I believe there are third-party programs for Windows. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 19:27:39 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 18:27:39 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391970459.52.0.323872443738.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: New patch incorporating Serhiy's suggestions. Thanks, Serhiy! Did more testing with the buildbots. Windows Server 2008 32-bit and 64-bit were both fine. So were ARMv7, OpenIndiana 64-bit, Gentoo 32-bit, FreeBSD 10 64-bit, and PowerLinux PPC 64-bit. (This was all run using diff #3, but diff #4 doesn't change any C code. It just changes the test and some docs.) Can I get a LGTM? ---------- Added file: http://bugs.python.org/file34012/larry.oserror.add.filename2.4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 20:28:36 2014 From: report at bugs.python.org (Tal Einat) Date: Sun, 09 Feb 2014 19:28:36 +0000 Subject: [issue20577] IDLE: Remove FormatParagraph's width setting from config dialog Message-ID: <1391974116.91.0.4701294104.issue20577@psf.upfronthosting.co.za> New submission from Tal Einat: Following up issue3068, this is a separate patch which moves the "paragraph reformat width" setting from the "general" tab in IDLE's config dialog to the relevant place in the extensions configuration. ---------- components: IDLE files: taleinat.20140209.IDLE__Remove_format_paragraph_width_from_config_dialog.patch keywords: patch messages: 210779 nosy: taleinat priority: normal severity: normal status: open title: IDLE: Remove FormatParagraph's width setting from config dialog versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file34013/taleinat.20140209.IDLE__Remove_format_paragraph_width_from_config_dialog.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 20:31:40 2014 From: report at bugs.python.org (Tal Einat) Date: Sun, 09 Feb 2014 19:31:40 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1391974300.16.0.790259073716.issue3068@psf.upfronthosting.co.za> Tal Einat added the comment: Here's an updated patch. As requested, the patch is against the current 3.3 branch and applies cleanly to default. I tested with both Python 3.3.4 RC1 and 3.4.0 beta 3, while overriding their idlelib with the one from the repo with these changes. I also removed from this patch the moving of the line width setting for the FormatParagraph extension from the base config dialog to the extensions config. See separate patch for this in issue20577. ---------- Added file: http://bugs.python.org/file34014/taleinat.20140209.IDLE__Add_a_config_dialog_for_extensions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 20:32:49 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 19:32:49 +0000 Subject: [issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release In-Reply-To: <1239039911.64.0.172824576559.issue5712@psf.upfronthosting.co.za> Message-ID: <1391974369.43.0.0313839830772.issue5712@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Martin. May be this issue was fixed in issue19020. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 20:35:03 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 19:35:03 +0000 Subject: [issue1602742] itemconfigure returns incorrect text property of text items Message-ID: <1391974503.06.0.591940263167.issue1602742@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> pending superseder: -> Regression: Windows-tkinter-idle, unicode, and 0xxx filename _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 20:43:45 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Feb 2014 19:43:45 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391975025.61.0.361616314365.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: One more tweak from Serhiy. ---------- Added file: http://bugs.python.org/file34015/larry.oserror.add.filename2.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 20:47:43 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Feb 2014 19:47:43 +0000 Subject: [issue20574] Implement incremental decoder for cp65001 In-Reply-To: <1391953856.12.0.486194417958.issue20574@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: It might be faster, or (more likely) has zero impact on performances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 20:51:15 2014 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Feb 2014 19:51:15 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391967755.7.0.270787971289.issue20517@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Support of bytes filenames has ben deprecated on Windows, Unicode is really the native type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 21:27:48 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 20:27:48 +0000 Subject: [issue20570] Bundle pip 1.5.3 in Python 3.4rc2 In-Reply-To: <1391951202.23.0.0776621428713.issue20570@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: I believe that may be an actual bug in the 3.4b3 email module (especially if pip 1.5.2 behaves itself in 3.3). If you can reproduce the error with the default branch (or rc1 when it's available), please file a new issue (with me, Larry and R. David Murray on the nosy list). If it doesn't happen with rc1,then I would assume it was caused by one of the 3.4 email issues that David fixed recently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 21:30:45 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 20:30:45 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1391977845.2.0.467179541022.issue13153@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is updated patch (after committing issue20368 which made main refactoring). It makes PythonCmd never fail due to arguments decoding error. ---------- Added file: http://bugs.python.org/file34016/tkinter_pythoncmd_args_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 21:31:54 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Feb 2014 20:31:54 +0000 Subject: [issue20576] Default signatures for slots should be positional-only In-Reply-To: <1391953653.09.0.426145547934.issue20576@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Good catch, and the patch looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 21:58:16 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 20:58:16 +0000 Subject: [issue6815] UnicodeDecodeError in os.path.expandvars In-Reply-To: <1251791477.43.0.253856390345.issue6815@psf.upfronthosting.co.za> Message-ID: <1391979496.5.0.135043290561.issue6815@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 21:58:34 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 20:58:34 +0000 Subject: [issue19974] tarfile doesn't overwrite symlink by directory In-Reply-To: <1386935948.7.0.893963676407.issue19974@psf.upfronthosting.co.za> Message-ID: <1391979514.86.0.209360276829.issue19974@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 22:02:39 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Feb 2014 21:02:39 +0000 Subject: [issue19954] test_tk floating point exception on my gentoo box with tk 8.6.1 In-Reply-To: <1386797179.8.0.0943570301002.issue19954@psf.upfronthosting.co.za> Message-ID: <1391979759.07.0.425338139015.issue19954@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think we can close this issue as far as the bug is in third-party software and we can't do anything with this. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 22:05:56 2014 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 09 Feb 2014 21:05:56 +0000 Subject: [issue20572] subprocess.Popen.wait() undocumented "endtime" parameter In-Reply-To: <1391941400.18.0.703922206544.issue20572@psf.upfronthosting.co.za> Message-ID: <1391979956.32.0.351994559084.issue20572@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I'd be for just getting rid of it for 3.4 now that we still can. Being that this parameter is 1) not documented and 2) it's not even clear what it does I think it's unlikely that there's people using it. ---------- nosy: +georg.brandl, larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 23:11:24 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 09 Feb 2014 22:11:24 +0000 Subject: [issue16314] Support xz compression in distutils In-Reply-To: <1351114378.64.0.718374634123.issue16314@psf.upfronthosting.co.za> Message-ID: <1391983884.67.0.592830525858.issue16314@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: AFAIK distutils is no longer frozen. ---------- nosy: +Arfrever resolution: wont fix -> stage: committed/rejected -> patch review status: closed -> open versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 23:35:46 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Feb 2014 22:35:46 +0000 Subject: [issue20535] run_tests.py: Work around issues 20355 and 20361 In-Reply-To: <1391723717.25.0.167441884978.issue20535@psf.upfronthosting.co.za> Message-ID: <1391985346.78.0.277733578215.issue20535@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This sounds fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 23:58:13 2014 From: report at bugs.python.org (Jeroen Ruigrok van der Werven) Date: Sun, 09 Feb 2014 22:58:13 +0000 Subject: [issue20570] Bundle pip 1.5.3 in Python 3.4rc2 In-Reply-To: <1391919615.88.0.398800251792.issue20570@psf.upfronthosting.co.za> Message-ID: <1391986693.47.0.0170241794476.issue20570@psf.upfronthosting.co.za> Jeroen Ruigrok van der Werven added the comment: Yes, looks like it is just the email module: F:\Python33>Scripts\pip3.3.exe install -U setuptools Downloading/unpacking setuptools from https://pypi.python.org/packages/3.4/s/setuptools/setuptools-2.2-py2.py3-none-any.whl#md5=3b7d84f496aed8c07b91efba4aa197a4 Installing collected packages: setuptools Found existing installation: setuptools 2.1 Uninstalling setuptools: Successfully uninstalled setuptools Successfully installed setuptools Cleaning up... I'll check rc1 when it's released by Larry and file as needed. Thanks for verifying. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 00:27:28 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Feb 2014 23:27:28 +0000 Subject: [issue20570] Bundle pip 1.5.3 in Python 3.4rc2 In-Reply-To: <1391919615.88.0.398800251792.issue20570@psf.upfronthosting.co.za> Message-ID: <1391988448.11.0.213513051544.issue20570@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, that issue was fixed on Friday. It is *possible* the fix still has a problem though, since the code in question is still different from that in 3.3.3. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 01:13:49 2014 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 10 Feb 2014 00:13:49 +0000 Subject: [issue20578] BufferedIOBase.readinto1 is missing Message-ID: <1391991229.05.0.363628736117.issue20578@psf.upfronthosting.co.za> New submission from Nikolaus Rath: It would be nice to have a readinto1 method to complement the existing read, readinto, and read1 methods of io.BufferedIOBase. ---------- components: Library (Lib) messages: 210794 nosy: nikratio priority: normal severity: normal status: open title: BufferedIOBase.readinto1 is missing type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 01:17:57 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Feb 2014 00:17:57 +0000 Subject: [issue20578] BufferedIOBase.readinto1 is missing In-Reply-To: <1391991229.05.0.363628736117.issue20578@psf.upfronthosting.co.za> Message-ID: <1391991477.94.0.929142673121.issue20578@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 01:41:55 2014 From: report at bugs.python.org (Nikolaus Rath) Date: Mon, 10 Feb 2014 00:41:55 +0000 Subject: [issue20578] BufferedIOBase.readinto1 is missing In-Reply-To: <1391991229.05.0.363628736117.issue20578@psf.upfronthosting.co.za> Message-ID: <1391992915.2.0.21274805576.issue20578@psf.upfronthosting.co.za> Nikolaus Rath added the comment: (I'll work on a patch for this myself, this bug is just to prevent duplicate work) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 02:45:40 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 10 Feb 2014 01:45:40 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1391996740.37.0.356095032523.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: Okay. I have revived the Py_UNICODE functions I removed in patch #3. The patch now works fine on my Ubuntu 13.10 64-bit box, and at least compiled on a Windows buildbot. It's now building on nine buildbots. Assuming the buildbots look good, can I check this in? ---------- Added file: http://bugs.python.org/file34017/larry.oserror.add.filename2.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 04:11:31 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 10 Feb 2014 03:11:31 +0000 Subject: [issue19772] str serialization of Message object may mutate the payload and CTE. In-Reply-To: <1385396051.26.0.384603344718.issue19772@psf.upfronthosting.co.za> Message-ID: <1392001891.24.0.183707747946.issue19772@psf.upfronthosting.co.za> Vajrasky Kok added the comment: > So why check specifically for 8bit and base64? I was in hurry when creating this patch. I think that was part of the debug code. This patch was created with the purpose to illuminate the culprit of this bug. And it served its purpose. After uploading this patch, I was about to refine the patch. Then I started to think about.... shouldn't there be a more elegant way to solve this problem? Cloning the msg after entering the flatten message? It is supposed to be a clean and simple solution. Then I hit the part where the boundary computation intentionally modifies the message object. Then I remembered the email API had too much magics on it. >.< ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 07:06:06 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Feb 2014 06:06:06 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <3fMxSX473Vz7LkQ@mail.python.org> Roundup Robot added the comment: New changeset 081a9d8ba3c7 by Larry Hastings in branch 'default': Issue #20517: Functions in the os module that accept two filenames http://hg.python.org/cpython/rev/081a9d8ba3c7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 07:14:01 2014 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Feb 2014 06:14:01 +0000 Subject: [issue20318] subprocess.Popen can hang in threaded applications in Python 2 In-Reply-To: <1390249819.03.0.991344131396.issue20318@psf.upfronthosting.co.za> Message-ID: <1392012841.41.0.808022305846.issue20318@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 07:23:21 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Feb 2014 06:23:21 +0000 Subject: [issue20530] Change the text signature format (again) to be more robust In-Reply-To: <1391695750.05.0.146053236138.issue20530@psf.upfronthosting.co.za> Message-ID: <3fMxrS4rqtz7LpH@mail.python.org> Roundup Robot added the comment: New changeset 28aef6e22736 by Larry Hastings in branch 'default': Issue #20530: The signatures for slot builtins have been updated http://hg.python.org/cpython/rev/28aef6e22736 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 07:48:41 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 10 Feb 2014 06:48:41 +0000 Subject: [issue16074] Bad error message in os.rename, os.link, and os.symlink In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1392014921.5.0.893087828686.issue16074@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Now, that we have fixed this bug in Python 3.4 with this commit http://hg.python.org/cpython/rev/081a9d8ba3c7, what should we do with the bug in Python 3.3? Use my patch (omitting filenames)? Keep the status quo (one filename)? If yes, close this ticket as invalid. Backport Larry's commit (two filenames) which is not straightforward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 07:55:32 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 10 Feb 2014 06:55:32 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1392015332.34.0.771428225269.issue20517@psf.upfronthosting.co.za> Larry Hastings added the comment: It's in! And the buildbots look healthy. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 07:56:53 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 10 Feb 2014 06:56:53 +0000 Subject: [issue20576] Default signatures for slots should be positional-only In-Reply-To: <1391953653.09.0.426145547934.issue20576@psf.upfronthosting.co.za> Message-ID: <1392015413.03.0.31311100928.issue20576@psf.upfronthosting.co.za> Larry Hastings added the comment: I used a different issue number in Misc/NEWS, but this was fixed in revision 28aef6e22736 checked in just a little while ago. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 08:02:15 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 10 Feb 2014 07:02:15 +0000 Subject: [issue19974] tarfile doesn't overwrite symlink by directory In-Reply-To: <1386935948.7.0.893963676407.issue19974@psf.upfronthosting.co.za> Message-ID: <1392015735.95.0.145773862375.issue19974@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Yeah, you are right, Serhiy. I check the behaviour of GNU tar command line. It always replaces the target no matter what kind of file source and target are. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 08:51:04 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Feb 2014 07:51:04 +0000 Subject: [issue15227] Fatal Python error: PyEval_RestoreThread: NULL tstate on example script.. In-Reply-To: <1341030356.65.0.710942348238.issue15227@psf.upfronthosting.co.za> Message-ID: <1392018664.08.0.079404410736.issue15227@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 08:52:29 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 07:52:29 +0000 Subject: [issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type In-Reply-To: <1389018497.06.0.693451933582.issue20145@psf.upfronthosting.co.za> Message-ID: <1392018749.75.0.384275358723.issue20145@psf.upfronthosting.co.za> Ezio Melotti added the comment: The two signatures of assertRaisesRegex are: assertRaisesRegex(exception, regex, callable, *args, **kwds) assertRaisesRegex(exception, regex, msg=None) IIUC what you are saying is that if you forget the regex and call assertRaisesRegex(exception, callable) the test will pass. I think it would be ok to add a check to see if the second argument is a callable or None (or maybe check if it's a string or regex object?), and give an appropriate error message if it's not. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 08:59:17 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Feb 2014 07:59:17 +0000 Subject: [issue19906] Typo in urllib documentation In-Reply-To: <1386326764.33.0.520291465102.issue19906@psf.upfronthosting.co.za> Message-ID: <3fMzz90SMCz7LkP@mail.python.org> Roundup Robot added the comment: New changeset 2ac7551986ba by Ezio Melotti in branch '2.7': #19906: clarify note in urllib docs. http://hg.python.org/cpython/rev/2ac7551986ba ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:00:05 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 08:00:05 +0000 Subject: [issue19906] Typo in urllib documentation In-Reply-To: <1386326764.33.0.520291465102.issue19906@psf.upfronthosting.co.za> Message-ID: <1392019205.96.0.9232116848.issue19906@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the initial patch! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:10:04 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 08:10:04 +0000 Subject: [issue19871] json module won't parse a float that starts with a decimal point In-Reply-To: <1386058873.01.0.290791588539.issue19871@psf.upfronthosting.co.za> Message-ID: <1392019804.49.0.332708751899.issue19871@psf.upfronthosting.co.za> Ezio Melotti added the comment: I missed this comment from Serhiy: > There are too many cases where json and Python syntax differ. How many differences there are between the two? I think we might add notes to the table at http://docs.python.org/3/library/json.html#encoders-and-decoders (either something similar to the notes in the table at http://docs.python.org/3/library/stdtypes.html#mutable-sequence-types, or just a couple of lines in a third column). If there are too many differences and we follow the specs we can just add a note saying that the decoding is done according to the specs, add a link to them, and mention a few examples that are valid in Python but not in JSON (like Serhiy did in his message). ---------- keywords: +easy nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:13:48 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 08:13:48 +0000 Subject: [issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc In-Reply-To: <1390469977.33.0.983072297482.issue20362@psf.upfronthosting.co.za> Message-ID: <1392020028.74.0.140535826478.issue20362@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:21:29 2014 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Feb 2014 08:21:29 +0000 Subject: [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1392020489.38.0.72999803295.issue9694@psf.upfronthosting.co.za> Martin Panter added the comment: A new ?required arguments? section seems too arbitrary to me. It would clash with the ?positional arguments? heading, since those are also required by default. I would go with the heading ?options?, as a noun. That term seems to be well used, at least on Linux and Wikipedia (see https://en.wikipedia.org/wiki/Command-line_option). Other terms are ?flag? and ?switch?. In this thread I see two arguments against this: 1. Eric Smith prefers to retain the noun ?arguments?. How about something like ?non-positional arguments? then? 2. Steven Bethard is worried about backwards compatibility. I thought the Python people were happy to make these sort of changes each minor release (e.g. 3.4 to 3.5). The module?s source code uses the term ?optionals? a lot more than this one heading. It would be clearer if this term were dropped, or only used for things that are truly optional. So even if you can?t fix the help output until Python 4, please fix the documentation and the rest of the source code :) ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:29:01 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Feb 2014 08:29:01 +0000 Subject: [issue12296] Minor clarification in devguide In-Reply-To: <1307634327.28.0.988674687108.issue12296@psf.upfronthosting.co.za> Message-ID: <3fN0dS2WlRz7LjN@mail.python.org> Roundup Robot added the comment: New changeset 4ce6bfb27267 by Ezio Melotti in branch 'default': #12296: clarify paragraph about backward-compatibility. Patch by Moritz Neeb, Jyrki Pulliainen, and ?ric Araujo. http://hg.python.org/devguide/rev/4ce6bfb27267 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:30:22 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 08:30:22 +0000 Subject: [issue12296] Minor clarification in devguide In-Reply-To: <1307634327.28.0.988674687108.issue12296@psf.upfronthosting.co.za> Message-ID: <1392021022.61.0.858088623256.issue12296@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patches! ---------- assignee: eric.araujo -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:38:07 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 08:38:07 +0000 Subject: [issue18234] Unicodedata module should provide access to codepoint aliases In-Reply-To: <1371428658.79.0.833817613364.issue18234@psf.upfronthosting.co.za> Message-ID: <1392021487.16.0.367492903617.issue18234@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #20433. ---------- stage: -> needs patch versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:38:15 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 08:38:15 +0000 Subject: [issue20433] add aliasedname() and namedaliases() methods to unicodedata module In-Reply-To: <1390981355.06.0.989685125573.issue20433@psf.upfronthosting.co.za> Message-ID: <1392021495.37.0.320224083294.issue20433@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:43:07 2014 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Feb 2014 08:43:07 +0000 Subject: [issue20351] Add doc examples for DictReader and DictWriter In-Reply-To: <1390414077.91.0.281809568509.issue20351@psf.upfronthosting.co.za> Message-ID: <1392021787.11.0.527649161829.issue20351@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 10:05:41 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Feb 2014 09:05:41 +0000 Subject: [issue19871] json module won't parse a float that starts with a decimal point In-Reply-To: <1386058873.01.0.290791588539.issue19871@psf.upfronthosting.co.za> Message-ID: <1392023141.88.0.0869079818513.issue19871@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My point is that Python and JSON are two different languages which have different syntaxes. JSON is not Python and Python is not JSON. We can't enumerate all differences unless to cite Python [1] and JSON [2] specifications. For differences from JSON specifications see [3]. [1] http://docs.python.org/3/reference/index.html [2] http://tools.ietf.org/html/rfc4627.html [3] http://docs.python.org/3/library/json.html#standard-compliance ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 10:07:16 2014 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Feb 2014 09:07:16 +0000 Subject: [issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl In-Reply-To: <1329500177.48.0.42118882394.issue14044@psf.upfronthosting.co.za> Message-ID: <1392023236.33.0.937532147721.issue14044@psf.upfronthosting.co.za> Martin Panter added the comment: The server in question is sending a chunked response, but seems to be closing the connection when it is done, without sending a zero-length chunk (which I understand it is meant to according to the HTTP protocol). My Firefox shows the XML without any indication of error. But then if I manually truncate a chunked response to Firefox it doesn?t indicate an error either, which I would probably want to know about. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 10:23:18 2014 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Feb 2014 09:23:18 +0000 Subject: [issue19974] tarfile doesn't overwrite symlink by directory In-Reply-To: <1386935948.7.0.893963676407.issue19974@psf.upfronthosting.co.za> Message-ID: <1392024198.96.0.232179844548.issue19974@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 10:59:15 2014 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Feb 2014 09:59:15 +0000 Subject: [issue20517] Support errors with two filenames for errno exceptions In-Reply-To: <1391571790.8.0.840627368503.issue20517@psf.upfronthosting.co.za> Message-ID: <1392026355.24.0.973538055594.issue20517@psf.upfronthosting.co.za> STINNER Victor added the comment: Why did you add so many versions of the same functions? Only PyErr_SetExcFromWindowsErrWithFilenameObjects() and PyErr_SetFromErrnoWithFilenameObjects() are used. The Py_UNICODE type is deprecated, you should not add new functions using it in Python 3.4. +PyObject *PyErr_SetFromWindowsErrWithUnicodeFilenames( + int ierr, + const Py_UNICODE *filename, + const Py_UNICODE *filename2) And you should avoid passing raw bytes string to build an error message, you probably has the Python object version of the filename somewhere in your code. +PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenames( + PyObject *exc, + /* decoded from the filesystem encoding */ + const char *filename, + const char *filename2 + ); +PyObject *PyErr_SetExcFromWindowsErrWithFilenames( + PyObject *exc, + int ierr, + const char *filename, + const char *filename2) In Python 3.3, there are also too many functions to raise an OSError, I don't that you should so many new functions. Please remove: - PyErr_SetFromWindowsErrWithUnicodeFilenames - PyErr_SetFromErrnoWithFilenames - PyErr_SetExcFromWindowsErrWithFilenames Having two filenames in OSError is the best fix for functions like os.rename when we don't know which path raised the error. I remember that it was hard to guess if the source or the destination was the problem, so thanks for working on this. Note: When I wrote "Unicode is really the native type", I mean a PyObject* object which is a str, not Py_UNICODE* which is deprecated. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 11:10:42 2014 From: report at bugs.python.org (Ned Deily) Date: Mon, 10 Feb 2014 10:10:42 +0000 Subject: [issue20579] OS X IDLE keyboard accelerators fail or misbehave with Cocoa Tk Message-ID: <1392027042.62.0.0419013450349.issue20579@psf.upfronthosting.co.za> New submission from Ned Deily: On OS X, most of the IDLE command keyboard accelerators that use the OS X